Make WordPress Core


Ignore:
Timestamp:
05/30/2016 04:10:16 AM (8 years ago)
Author:
boonebgorges
Message:

Don't clear object relationship caches on term update.

Since [37573], object relationship caches ({$taxonomy}_relationships)
contain term IDs rather than term objects. See #36814. As such, it's no longer
necessary to clear these caches when a term is updated; none of the data that's
changed on update (name, description, count, etc) is stored in the relationship
cache.

Fixes #36251.

File:
1 edited

Legend:

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

    r37578 r37593  
    29492949    do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );
    29502950
    2951     // Clean the relationship caches for all object types using this term.
    2952     $objects = $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tt_id ) );
    2953     $tax_object = get_taxonomy( $taxonomy );
    2954     foreach ( $tax_object->object_type as $object_type ) {
    2955         clean_object_term_cache( $objects, $object_type );
    2956     }
    2957 
    29582951    /**
    29592952     * Fires after a term has been updated, but before the term cache has been cleaned.
Note: See TracChangeset for help on using the changeset viewer.