lib/Site.php
protected static function switch_to_blog( $site_name_or_id ) {
		if ( $site_name_or_id === null ) {
			$site_name_or_id = get_current_blog_id();
		}
		$info = get_blog_details($site_name_or_id);
		switch_to_blog($info->blog_id);
		return $info->blog_id;
	}
protected static function switch_to_blog( $site_name_or_id ) {
		if ( $site_name_or_id === null ) {
			$site_name_or_id = get_current_blog_id();
		}
		$info = get_blog_details($site_name_or_id);
		switch_to_blog($info->blog_id);
		return $info->blog_id;
	}
protected static function switch_to_blog ( $ site_name_or_id ) { if ( $ site_name_or_id === null ) { $ site_name_or_id = get_current_blog_id ( ) ; } $ info = get_blog_details ( $ site_name_or_id ) ; switch_to_blog ( $ info -> blog_id ) ; return $ info -> blog_id ; }
Switches to the blog requested in the request
@param string|integer|null $site_name_or_id
@return integer with the ID of the new blog
Switches to the blog requested in the request