From dd436993449bbb603bb757a965bf52e28c9b6382 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Sat, 14 Oct 2017 22:45:28 +0000 Subject: [PATCH] Multisite: Return `get_current_blog_id()` value instead of hard-coded 1 in `get_main_site_id()` for non-multisite environments. See #41936. git-svn-id: https://develop.svn.wordpress.org/trunk@41862 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 87eef314ca..56a444b0f2 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -4423,7 +4423,7 @@ function is_main_site( $site_id = null, $network_id = null ) { */ function get_main_site_id( $network_id = null ) { if ( ! is_multisite() ) { - return 1; + return get_current_blog_id(); } $network = get_network( $network_id );