Make WordPress Core


Ignore:
Timestamp:
06/13/2007 12:16:33 AM (19 years ago)
Author:
matt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r5660 r5693  
    156156}
    157157
    158 function in_category($category) { // Check if the current post is in the given category
    159     global $category_cache, $post, $blog_id;
    160 
    161     if ( isset( $category_cache[$blog_id][$post->ID][$category] ) )
     158function 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] ) )
    162162        return true;
    163163    else
Note: See TracChangeset for help on using the changeset viewer.