Make WordPress Core


Ignore:
Timestamp:
08/21/2007 06:39:45 PM (17 years ago)
Author:
ryan
Message:

Some tag api additions from andy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r5780 r5912  
    273273            else
    274274                return strip_tags($my_cat_name);
     275        }
     276    }
     277}
     278
     279
     280function single_tag_title($prefix = '', $display = true ) {
     281    $tag_id = intval( get_query_var('tag_id') );
     282    if ( !empty($tag_id) ) {
     283        $my_tag = &get_term($tag_id, 'post_tag');
     284        $my_tag_name = apply_filters('single_tag_title', $my_tag->name);
     285        if ( !empty($my_tag_name) ) {
     286            if ( $display )
     287                echo $prefix.strip_tags($my_tag_name);
     288            else
     289                return strip_tags($my_tag_name);
    275290        }
    276291    }
Note: See TracChangeset for help on using the changeset viewer.