Update in_category to use the new object_term_cache, it wasn't so much with the working before.

git-svn-id: https://develop.svn.wordpress.org/trunk@5693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2007-06-13 00:16:33 +00:00
parent 75a683cbf3
commit 526eac00b8
1 changed files with 3 additions and 3 deletions

View File

@ -156,9 +156,9 @@ function get_the_category_list($separator = '', $parents='') {
}
function in_category( $category ) { // Check if the current post is in the given category
global $category_cache, $post, $blog_id;
global $object_term_cache, $post, $blog_id;
if ( isset( $category_cache[$blog_id][$post->ID][$category] ) )
if ( isset( $object_term_cache[$blog_id][$post->ID]['category'][$category] ) )
return true;
else
return false;