Make WordPress Core


Ignore:
Timestamp:
04/29/2010 08:43:59 PM (12 years ago)
Author:
nacin
Message:

Update object term cache for custom post types. props scribu, fixes #12989.

File:
1 edited

Legend:

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

    r14245 r14310  
    16271627            $q['suppress_filters'] = false;
    16281628
     1629        if ( !isset($q['cache_results']) )
     1630            $q['cache_results'] = true;
     1631
    16291632        if ( !isset($q['post_type']) ) {
    16301633            if ( $this->is_search )
     
    25052508        }
    25062509
    2507         update_post_caches($this->posts);
     2510        if ( $q['cache_results'] )
     2511            update_post_caches($this->posts, $post_type);
    25082512
    25092513        if ($this->post_count > 0) {
Note: See TracChangeset for help on using the changeset viewer.