Make WordPress Core

Changeset 21286


Ignore:
Timestamp:
07/20/2012 04:35:51 AM (12 years ago)
Author:
markjaquith
Message:

Clear the get_pages cache whenever ANY hierarchical post type cache is cleared — not just Pages. fixes #21279

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r21219 r21286  
    43874387    do_action( 'clean_post_cache', $post->ID, $post );
    43884388
     4389    if ( is_post_type_hierarchical( $post->post_type ) )
     4390        wp_cache_delete( 'get_pages', 'posts' );
     4391
    43894392    if ( 'page' == $post->post_type ) {
    43904393        wp_cache_delete( 'all_page_ids', 'posts' );
    4391         wp_cache_delete( 'get_pages', 'posts' );
    43924394        do_action( 'clean_page_cache', $post->ID );
    43934395    }
Note: See TracChangeset for help on using the changeset viewer.