Make WordPress Core


Ignore:
Timestamp:
09/24/2012 08:35:56 PM (12 years ago)
Author:
ryan
Message:

Fetch full terms for the post_category and tags_input queries and then wp_list_pluck() the desired fields. Fetching full terms primes the cache and reduces overall queries. Add cache invalidation to wp_set_post_terms(). Props scribu. see #21309

File:
1 edited

Legend:

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

    r21735 r21981  
    10631063        return false;
    10641064
     1065    if ( ! is_object_in_taxonomy( $post->post_type, $taxonomy ) )
     1066        return false;
     1067
    10651068    $terms = get_object_term_cache( $post->ID, $taxonomy );
    10661069    if ( false === $terms ) {
Note: See TracChangeset for help on using the changeset viewer.