Changeset 2975
- Timestamp:
- 10/29/2005 10:24:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-category.php
r2943 r2975 416 416 417 417 function in_category($category) { // Check if the current post is in the given category 418 global $post, $category_cache; 419 $cats = ''; 420 foreach ( $category_cache[$post->ID] as $cat ) { 421 $cats[] = $cat->cat_ID; 422 } 423 424 if ( in_array($category, $cats) ) 418 global $category_cache; 419 420 if ( isset( $category_cache[$post->ID][$category] ) ) 425 421 return true; 426 422 else 427 423 return false; 428 424 } 425 429 426 ?>
Note: See TracChangeset
for help on using the changeset viewer.