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-admin/includes/class-wp-posts-list-table.php

    r20423 r20569  
    361361                    $page->post_parent = 0;
    362362                    $wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) );
    363                     clean_post_cache( $page->ID, $page->post_type );
     363                    clean_post_cache( $page );
    364364                }
    365365
Note: See TracChangeset for help on using the changeset viewer.