From 8f0f48e3f9bb993dbab1d9ddec5ded098d13ddc1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 17 Oct 2013 05:17:08 +0000 Subject: [PATCH] Avoid a notice in is_main_network() when called in single site. see #25030. Built from https://develop.svn.wordpress.org/trunk@25827 git-svn-id: http://core.svn.wordpress.org/trunk@25739 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e7babc8bb2..aea813b7d0 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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;