Clear the get_pages cache whenever ANY hierarchical post type cache is cleared — not just Pages. fixes #21279
git-svn-id: http://core.svn.wordpress.org/trunk@21286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5b2c145a4d
commit
c937101f27
|
@ -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