Make WordPress Core


Ignore:
Timestamp:
11/17/2008 08:03:31 PM (16 years ago)
Author:
ryan
Message:

Don't cache filtered term objects. see #8146

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r9652 r9737  
    310310    }
    311311
    312     if ( is_object($term) ) {
     312    if ( is_object($term) && empty($term->filter) ) {
    313313        wp_cache_add($term->term_id, $term, $taxonomy);
    314314        $_term = $term;
    315315    } else {
     316        if ( is_object($term) )
     317            $term = $term->term_id;
    316318        $term = (int) $term;
    317319        if ( ! $_term = wp_cache_get($term, $taxonomy) ) {
     
    890892        }
    891893    }
     894
     895    if ( $do_object )
     896        $term->filter = $context;
     897    else
     898        $term['filter'] = $context;
    892899
    893900    return $term;
Note: See TracChangeset for help on using the changeset viewer.