Multisite: Return get_current_blog_id() value instead of hard-coded 1 in get_main_site_id() for non-multisite environments.

See #41936.

Built from https://develop.svn.wordpress.org/trunk@41862


git-svn-id: http://core.svn.wordpress.org/trunk@41696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2017-10-14 22:46:48 +00:00
parent 5ea3d62192
commit e4550efbb7
2 changed files with 2 additions and 2 deletions

View File

@ -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 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta2-41861';
$wp_version = '4.9-beta2-41862';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.