Changeset 5868
- Timestamp:
- 08/14/07 03:01:26 (1 year ago)
- Files:
-
- trunk/wp-includes/category-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/category-template.php
r5797 r5868 157 157 158 158 function in_category( $category ) { // Check if the current post is in the given category 159 global $object_term_cache, $post, $blog_id; 160 161 if ( isset( $object_term_cache[$blog_id][$post->ID]['category'][$category] ) ) 159 global $post, $blog_id; 160 161 $categories = get_object_term_cache($post->ID, 'category'); 162 if ( false === $categories ) 163 $categories = get_object_terms($post->ID, 'category'); 164 if(array_key_exists($category, $categories)) 162 165 return true; 163 166 else
