Avoid a notice in is_main_network() when called in single site. see #25030.
git-svn-id: https://develop.svn.wordpress.org/trunk@25827 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5de9864891
commit
3c067c1ec2
@ -3349,11 +3349,11 @@ function is_main_site( $site_id = null ) {
|
||||
function is_main_network( $network_id = null ) {
|
||||
global $current_site, $wpdb;
|
||||
|
||||
$current_network_id = (int) $current_site->id;
|
||||
|
||||
if ( ! is_multisite() )
|
||||
return true;
|
||||
|
||||
$current_network_id = (int) $current_site->id;
|
||||
|
||||
if ( ! $network_id )
|
||||
$network_id = $current_network_id;
|
||||
$network_id = (int) $network_id;
|
||||
|
Loading…
Reference in New Issue
Block a user