Merge clear_global_post_cache() into clean_post_cache(). fixes #11744

git-svn-id: https://develop.svn.wordpress.org/trunk@12768 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-01-19 19:45:44 +00:00
parent 09aaaaaa23
commit 299bd70ce0
2 changed files with 5 additions and 5 deletions

View File

@ -661,13 +661,10 @@ function get_blog_post( $blog_id, $post_id ) {
return $post;
}
// deprecated, see clean_post_cache()
function clear_global_post_cache( $post_id ) {
global $wpdb;
wp_cache_delete( $wpdb->blogid . '-' . $post_id, 'global-posts' );
return;
}
add_action( 'publish_post', 'clear_global_post_cache' );
add_action( 'delete_post', 'clear_global_post_cache' );
function add_user_to_blog( $blog_id, $user_id, $role ) {
switch_to_blog($blog_id);

View File

@ -3672,6 +3672,9 @@ function clean_post_cache($id) {
foreach( $children as $cid )
clean_post_cache( $cid );
}
if ( is_multisite() )
wp_cache_delete( $wpdb->blogid . '-' . $id, 'global-posts' );
}
/**