Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_the_tags() {
- $buffy = '';
- $terms_ui_array = array();
- $tags_spot_text = __td('TAGS', TD_THEME_NAME); // the default text for tags - on CPT we can overwrite this via the panel
- // on single posts we deal with tags
- $td_post_tags = get_the_tags($this->post->ID);
- if (!empty($td_post_tags)) {
- foreach ($td_post_tags as $tag) {
- $terms_ui_array[$tag->name] = array (
- 'url' => get_tag_link($tag->term_id)
- );
- }
- }
- if (!empty($terms_ui_array)) {
- $buffy .= '<ul class="td-mega-menu-tags td-tags td-post-small-box clearfix">';
- $buffy .= '<li><span>' . $tags_spot_text . '</span></li>';
- foreach ($terms_ui_array as $term_name => $term_params) {
- $buffy .= '<li><a href="' . $term_params['url'] . '">' . $term_name . '</a></li>';
- }
- $buffy .= '</ul>';
- }
- return $buffy;
- }
Advertisement
Add Comment
Please, Sign In to add comment