Changeset 2616
- Timestamp:
- 05/27/2005 06:10:41 AM (21 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
-
functions.php (modified) (1 diff)
-
template-functions-category.php (modified) (1 diff)
-
template-functions-general.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2612 r2616 543 543 if ( empty($category) ) 544 544 return null; 545 546 $category = (int) $category; 545 547 546 548 if ( ! isset($cache_categories)) -
trunk/wp-includes/template-functions-category.php
r2608 r2616 102 102 103 103 function get_the_category_by_ID($cat_ID) { 104 $cat_ID = (int) $cat_ID; 104 105 $category = &get_category($cat_ID); 105 106 return $category->cat_name; -
trunk/wp-includes/template-functions-general.php
r2513 r2616 206 206 207 207 function single_cat_title($prefix = '', $display = true ) { 208 $cat = get_query_var('cat');209 if(!empty($cat) && !(strtoupper($cat) == 'ALL')) {210 $my_cat_name = get_the_category_by_ID($cat);211 if(!empty($my_cat_name)) {212 if ($display)213 echo $prefix.strip_tags($my_cat_name);214 else215 return strip_tags($my_cat_name);216 }217 }208 $cat = intval( get_query_var('cat') ); 209 if( !empty($cat) && !(strtoupper($cat) == 'ALL') ) { 210 $my_cat_name = get_the_category_by_ID($cat); 211 if( !empty($my_cat_name) ) { 212 if ($display) 213 echo $prefix.strip_tags($my_cat_name); 214 else 215 return strip_tags($my_cat_name); 216 } 217 } 218 218 } 219 219
Note: See TracChangeset
for help on using the changeset viewer.