Make WordPress Core


Ignore:
Timestamp:
01/11/2012 09:26:18 PM (13 years ago)
Author:
ryan
Message:

Use wp_cache_add() instead of wp_cache_set() when priming the object term cache in update_object_term_cache(). Pass the real post_type to clean_object_term_cache() instead of hard-coding post. Call clean_object_term_cache() from clean_bookmark_cache(). Props leewillis77. fixes #19690

File:
1 edited

Legend:

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

    r19684 r19729  
    26582658
    26592659    foreach ( $ids as $id ) {
    2660         foreach ( $taxonomies  as $taxonomy ) {
     2660        foreach ( $taxonomies as $taxonomy ) {
    26612661            if ( ! isset($object_terms[$id][$taxonomy]) ) {
    26622662                if ( !isset($object_terms[$id]) )
     
    26692669    foreach ( $object_terms as $id => $value ) {
    26702670        foreach ( $value as $taxonomy => $terms ) {
    2671             wp_cache_set($id, $terms, "{$taxonomy}_relationships");
     2671            wp_cache_add( $id, $terms, "{$taxonomy}_relationships" );
    26722672        }
    26732673    }
Note: See TracChangeset for help on using the changeset viewer.