Changeset 39082 for trunk/src/wp-includes/ms-blogs.php
- Timestamp:
- 11/02/2016 12:30:29 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r38943 r39082 767 767 */ 768 768 function switch_to_blog( $new_blog, $deprecated = null ) { 769 global $wpdb ;769 global $wpdb, $wp_roles; 770 770 771 771 $blog_id = get_current_blog_id(); … … 823 823 824 824 if ( did_action( 'init' ) ) { 825 wp_roles()->reinit();825 $wp_roles = new WP_Roles(); 826 826 $current_user = wp_get_current_user(); 827 827 $current_user->for_blog( $new_blog ); … … 851 851 */ 852 852 function restore_current_blog() { 853 global $wpdb ;853 global $wpdb, $wp_roles; 854 854 855 855 if ( empty( $GLOBALS['_wp_switched_stack'] ) ) { … … 897 897 898 898 if ( did_action( 'init' ) ) { 899 wp_roles()->reinit();899 $wp_roles = new WP_Roles(); 900 900 $current_user = wp_get_current_user(); 901 901 $current_user->for_blog( $blog );
Note: See TracChangeset
for help on using the changeset viewer.