Changeset 22087 for trunk/wp-includes/ms-blogs.php
- Timestamp:
- 10/01/2012 02:25:31 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-blogs.php
r22015 r22087 477 477 $GLOBALS['blog_id'] = $new_blog; 478 478 479 if ( did_action( 'init' ) ) {480 $wp_roles->reinit();481 $current_user = wp_get_current_user();482 $current_user->for_blog( $new_blog );483 }484 485 479 if ( function_exists( 'wp_cache_switch_to_blog' ) ) { 486 480 wp_cache_switch_to_blog( $new_blog ); … … 504 498 } 505 499 500 if ( did_action( 'init' ) ) { 501 $wp_roles->reinit(); 502 $current_user = wp_get_current_user(); 503 $current_user->for_blog( $new_blog ); 504 } 505 506 506 do_action( 'switch_blog', $new_blog, $prev_blog_id ); 507 507 $GLOBALS['switched'] = true; … … 537 537 $GLOBALS['blog_id'] = $blog; 538 538 $GLOBALS['table_prefix'] = $wpdb->prefix; 539 540 if ( did_action( 'init' ) ) {541 $wp_roles->reinit();542 $current_user = wp_get_current_user();543 $current_user->for_blog( $blog );544 }545 539 546 540 if ( function_exists( 'wp_cache_switch_to_blog' ) ) { … … 563 557 wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); 564 558 } 559 } 560 561 if ( did_action( 'init' ) ) { 562 $wp_roles->reinit(); 563 $current_user = wp_get_current_user(); 564 $current_user->for_blog( $blog ); 565 565 } 566 566
Note: See TracChangeset
for help on using the changeset viewer.