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()). git-svn-id: http://svn.automattic.com/wordpress/trunk@20569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -360,7 +360,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
if ( $page->post_parent == $page->ID ) {
|
||||
$page->post_parent = 0;
|
||||
$wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) );
|
||||
clean_post_cache( $page->ID, $page->post_type );
|
||||
clean_post_cache( $page );
|
||||
}
|
||||
|
||||
if ( 0 == $page->post_parent )
|
||||
|
||||
Reference in New Issue
Block a user