Use wp_start_object_cache() in switch_to_blog(). Props prettyboymp. Fixes #15361
git-svn-id: http://svn.automattic.com/wordpress/trunk@16359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7640c5748b
commit
5f0adf4d70
|
@ -500,7 +500,7 @@ function switch_to_blog( $new_blog, $validate = false ) {
|
||||||
else
|
else
|
||||||
$global_groups = false;
|
$global_groups = false;
|
||||||
|
|
||||||
wp_cache_init();
|
wp_start_object_cache();
|
||||||
if ( function_exists('wp_cache_add_global_groups') ) {
|
if ( function_exists('wp_cache_add_global_groups') ) {
|
||||||
if ( is_array( $global_groups ) )
|
if ( is_array( $global_groups ) )
|
||||||
wp_cache_add_global_groups( $global_groups );
|
wp_cache_add_global_groups( $global_groups );
|
||||||
|
@ -564,7 +564,7 @@ function restore_current_blog() {
|
||||||
else
|
else
|
||||||
$global_groups = false;
|
$global_groups = false;
|
||||||
|
|
||||||
wp_cache_init();
|
wp_start_object_cache();
|
||||||
if ( function_exists('wp_cache_add_global_groups') ) {
|
if ( function_exists('wp_cache_add_global_groups') ) {
|
||||||
if ( is_array( $global_groups ) )
|
if ( is_array( $global_groups ) )
|
||||||
wp_cache_add_global_groups( $global_groups );
|
wp_cache_add_global_groups( $global_groups );
|
||||||
|
|
Loading…
Reference in New Issue