Make WordPress Core


Ignore:
Timestamp:
12/17/2014 04:38:44 PM (11 years ago)
Author:
boonebgorges
Message:

Update individual term caches in get_terms().

This was removed in [29915] as part of the attempt to add cache support to
get_term_by(). When that support was removed in [30900], it was not properly
restored.

This changeset includes a unit test to verify that the cache is properly primed
for terms found in get_terms(), as well as tests to verify the other cache
setting that was touched by [30900].

Fixes #30749. See #21760.

File:
1 edited

Legend:

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

    r30900 r30954  
    19131913
    19141914    $terms = $wpdb->get_results($query);
     1915    if ( 'all' == $_fields ) {
     1916        update_term_cache( $terms );
     1917    }
    19151918
    19161919    if ( empty($terms) ) {
Note: See TracChangeset for help on using the changeset viewer.