Changeset 38457 for trunk/src/wp-includes/load.php
- Timestamp:
- 08/31/2016 04:55:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r38431 r38457 471 471 * @since 3.0.0 472 472 * @access private 473 *474 * @global int $blog_id Blog ID.475 473 */ 476 474 function wp_start_object_cache() { 477 global $blog_id;478 479 475 $first_init = false; 480 476 if ( ! function_exists( 'wp_cache_init' ) ) { 481 477 if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) { 482 478 require_once ( WP_CONTENT_DIR . '/object-cache.php' ); 483 if ( function_exists( 'wp_cache_init' ) ) 479 if ( function_exists( 'wp_cache_init' ) ) { 484 480 wp_using_ext_object_cache( true ); 481 } 485 482 } 486 483 … … 496 493 } 497 494 498 if ( ! wp_using_ext_object_cache() ) 495 if ( ! wp_using_ext_object_cache() ) { 499 496 require_once ( ABSPATH . WPINC . '/cache.php' ); 497 } 500 498 501 499 /* … … 504 502 * have changed and it may need to update keys and cleanup caches. 505 503 */ 506 if ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) ) 507 wp_cache_switch_to_blog( $blog_id);508 elseif ( function_exists( 'wp_cache_init' ) )504 if ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) ) { 505 wp_cache_switch_to_blog( get_current_blog_id() ); 506 } elseif ( function_exists( 'wp_cache_init' ) ) { 509 507 wp_cache_init(); 508 } 510 509 511 510 if ( function_exists( 'wp_cache_add_global_groups' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.