Make WordPress Core


Ignore:
Timestamp:
04/23/2012 10:04:35 PM (13 years ago)
Author:
duck_
Message:

Accept a post object in clean_post_cache(). Fixes #20486.

The post_type can then be accessed to properly clean the taxonomy relationships cache.
The full object is useful in situations when an ID might reference a post that has been
removed from the database (e.g. wp_delete_post()).

File:
1 edited

Legend:

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

    r20435 r20569  
    15801580    $wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) );
    15811581
    1582     clean_post_cache( $post_id, $post->post_type );
     1582    clean_post_cache( $post );
    15831583
    15841584    do_action('wp_update_comment_count', $post_id, $new, $old);
Note: See TracChangeset for help on using the changeset viewer.