Use wp_start_object_cache() in switch_to_blog(). Props prettyboymp. Fixes #15361
git-svn-id: https://develop.svn.wordpress.org/trunk@16359 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d1e3fc25f
commit
cf7f2d92b4
@ -500,7 +500,7 @@ function switch_to_blog( $new_blog, $validate = false ) {
|
||||
else
|
||||
$global_groups = false;
|
||||
|
||||
wp_cache_init();
|
||||
wp_start_object_cache();
|
||||
if ( function_exists('wp_cache_add_global_groups') ) {
|
||||
if ( is_array( $global_groups ) )
|
||||
wp_cache_add_global_groups( $global_groups );
|
||||
@ -564,7 +564,7 @@ function restore_current_blog() {
|
||||
else
|
||||
$global_groups = false;
|
||||
|
||||
wp_cache_init();
|
||||
wp_start_object_cache();
|
||||
if ( function_exists('wp_cache_add_global_groups') ) {
|
||||
if ( is_array( $global_groups ) )
|
||||
wp_cache_add_global_groups( $global_groups );
|
||||
|
Loading…
Reference in New Issue
Block a user