Clear the get_pages cache whenever ANY hierarchical post type cache is cleared — not just Pages. fixes #21279
git-svn-id: https://develop.svn.wordpress.org/trunk@21286 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
237b7f6dbe
commit
ec527ab07d
@ -4386,9 +4386,11 @@ function clean_post_cache( $post ) {
|
||||
|
||||
do_action( 'clean_post_cache', $post->ID, $post );
|
||||
|
||||
if ( is_post_type_hierarchical( $post->post_type ) )
|
||||
wp_cache_delete( 'get_pages', 'posts' );
|
||||
|
||||
if ( 'page' == $post->post_type ) {
|
||||
wp_cache_delete( 'all_page_ids', 'posts' );
|
||||
wp_cache_delete( 'get_pages', 'posts' );
|
||||
do_action( 'clean_page_cache', $post->ID );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user