Ticket #21879: destroy_posts_count_cache.patch
File destroy_posts_count_cache.patch, 847 bytes (added by , 13 years ago) |
---|
-
wp-includes/post.php
old new 2090 2090 foreach ( (array) $children as $child ) 2091 2091 clean_post_cache( $child ); 2092 2092 } 2093 2094 wp_cache_delete ($post->post_type, 'counts'); 2093 2095 2094 2096 wp_clear_scheduled_hook('publish_future_post', array( $postid ) ); 2095 2097 … … 2131 2133 2132 2134 wp_trash_post_comments($post_id); 2133 2135 2136 wp_cache_delete ($post['post_type'], 'counts'); 2137 2134 2138 do_action('trashed_post', $post_id); 2135 2139 2136 2140 return $post; … … 3024 3028 do_action('transition_post_status', $new_status, $old_status, $post); 3025 3029 do_action("{$old_status}_to_{$new_status}", $post); 3026 3030 do_action("{$new_status}_{$post->post_type}", $post->ID, $post); 3031 wp_cache_delete ($post->post_type, 'counts'); 3032 3027 3033 } 3028 3034 3029 3035 //