Make WordPress Core


Ignore:
Timestamp:
04/18/2008 08:24:35 PM (18 years ago)
Author:
ryan
Message:

Move cache cleaning of children to clean_post_cache(). see #6702

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/post.php

    r7712 r7744  
    26862686 */
    26872687function clean_post_cache($id) {
     2688        global $wpdb;
     2689        $id = (int) $id;
     2690
    26882691        wp_cache_delete($id, 'posts');
    26892692        wp_cache_delete($id, 'post_meta');
     
    26942697
    26952698        do_action('clean_post_cache', $id);
     2699
     2700        if ( $children = $wpdb->get_col( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d", $id) ) ) {
     2701                foreach( $children as $cid )
     2702                        clean_post_cache( $cid );
     2703        }
    26962704}
    26972705
     
    27262734 */
    27272735function clean_page_cache($id) {
    2728         global $wpdb;
    2729         $id = (int) $id;
    2730 
    27312736        clean_post_cache($id);
    27322737
     
    27352740
    27362741        do_action('clean_page_cache', $id);
    2737 
    2738         if ( $children = $wpdb->get_col( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d", $id) ) )
    2739                 foreach( $children as $cid )
    2740                         clean_page_cache( $cid );
    27412742}
    27422743
Note: See TracChangeset for help on using the changeset viewer.