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
This commit is contained in:
parent
4d6c257cf9
commit
dd43699344
|
@ -4423,7 +4423,7 @@ function is_main_site( $site_id = null, $network_id = null ) {
|
||||||
*/
|
*/
|
||||||
function get_main_site_id( $network_id = null ) {
|
function get_main_site_id( $network_id = null ) {
|
||||||
if ( ! is_multisite() ) {
|
if ( ! is_multisite() ) {
|
||||||
return 1;
|
return get_current_blog_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
$network = get_network( $network_id );
|
$network = get_network( $network_id );
|
||||||
|
|
Loading…
Reference in New Issue