Changeset 7744
- Timestamp:
- 04/18/2008 08:24:35 PM (18 years ago)
- File:
-
- 1 edited
-
branches/2.5/wp-includes/post.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/wp-includes/post.php
r7712 r7744 2686 2686 */ 2687 2687 function clean_post_cache($id) { 2688 global $wpdb; 2689 $id = (int) $id; 2690 2688 2691 wp_cache_delete($id, 'posts'); 2689 2692 wp_cache_delete($id, 'post_meta'); … … 2694 2697 2695 2698 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 } 2696 2704 } 2697 2705 … … 2726 2734 */ 2727 2735 function clean_page_cache($id) { 2728 global $wpdb;2729 $id = (int) $id;2730 2731 2736 clean_post_cache($id); 2732 2737 … … 2735 2740 2736 2741 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 );2741 2742 } 2742 2743
Note: See TracChangeset
for help on using the changeset viewer.