mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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: https://develop.svn.wordpress.org/trunk@20569 602fd350-edb4-49c9-b593-d223f7449a82
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