mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Reduce use of global. Use get_blog_details() instead. fixes #22090
git-svn-id: https://develop.svn.wordpress.org/trunk@22108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3118,13 +3118,13 @@ function wp_suspend_cache_invalidation($suspend = true) {
|
||||
* @return bool True if not multisite or $blog_id is main site
|
||||
*/
|
||||
function is_main_site( $blog_id = '' ) {
|
||||
global $current_site, $current_blog;
|
||||
global $current_site;
|
||||
|
||||
if ( !is_multisite() )
|
||||
if ( ! is_multisite() )
|
||||
return true;
|
||||
|
||||
if ( !$blog_id )
|
||||
$blog_id = $current_blog->blog_id;
|
||||
if ( ! $blog_id )
|
||||
$blog_id = get_current_blog_id();
|
||||
|
||||
return $blog_id == $current_site->blog_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user