Ticket #4506: general-template.php.diff
File general-template.php.diff, 914 bytes (added by , 18 years ago) |
---|
-
wp-includes/general-template.php
265 265 266 266 function single_cat_title($prefix = '', $display = true ) { 267 267 $cat = intval( get_query_var('cat') ); 268 $tag = intval( get_query_var('tag_id') ); 269 268 270 if ( !empty($cat) && !(strtoupper($cat) == 'ALL') ) { 269 271 $my_cat_name = apply_filters('single_cat_title', get_the_category_by_ID($cat)); 270 272 if ( !empty($my_cat_name) ) { … … 274 276 return strip_tags($my_cat_name); 275 277 } 276 278 } 279 280 if ( !empty($tag) ) { 281 $tag = get_term($tag, 'post_tag'); 282 $my_tag_name = apply_filters('single_tag_title', $tag->slug); 283 if ( ! empty($my_tag_name) ) { 284 if ( $display ) 285 echo $prefix.strip_tags($my_tag_name); 286 else 287 return strip_tags($my_tag_name); 288 } 289 } 277 290 } 278 291 279 292