mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Some tag api additions from andy.
git-svn-id: https://develop.svn.wordpress.org/trunk@5912 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -277,6 +277,21 @@ function single_cat_title($prefix = '', $display = true ) {
|
||||
}
|
||||
|
||||
|
||||
function single_tag_title($prefix = '', $display = true ) {
|
||||
$tag_id = intval( get_query_var('tag_id') );
|
||||
if ( !empty($tag_id) ) {
|
||||
$my_tag = &get_term($tag_id, 'post_tag');
|
||||
$my_tag_name = apply_filters('single_tag_title', $my_tag->name);
|
||||
if ( !empty($my_tag_name) ) {
|
||||
if ( $display )
|
||||
echo $prefix.strip_tags($my_tag_name);
|
||||
else
|
||||
return strip_tags($my_tag_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function single_month_title($prefix = '', $display = true ) {
|
||||
global $wp_locale;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user