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/post.php

    r19727 r19729  
    43314331        return;
    43324332
     4333    $post = get_post( $id );
     4334
    43334335    wp_cache_delete($id, 'posts');
    43344336    wp_cache_delete($id, 'post_meta');
    43354337
    4336     clean_object_term_cache($id, 'post');
     4338    clean_object_term_cache( $id, $post->post_type );
    43374339
    43384340    wp_cache_delete( 'wp_get_archives', 'general' );
Note: See TracChangeset for help on using the changeset viewer.