General: Remove admin exception for https in network_home_url().

Previously, `network_home_url()` would automatically switch to `https` if the current request is already `https`, but would only do so on the front end.

This mirrors the change made earlier for `get_home_url()`.

Follow-up to [12598], [21937], [24844], [50156].
See #52421.

git-svn-id: https://develop.svn.wordpress.org/trunk@50168 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-02-02 20:57:31 +00:00
parent d4b2126f07
commit 6221b8a744

View File

@@ -3590,7 +3590,7 @@ function network_home_url( $path = '', $scheme = null ) {
$orig_scheme = $scheme;
if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ), true ) ) {
$scheme = is_ssl() && ! is_admin() ? 'https' : 'http';
$scheme = is_ssl() ? 'https' : 'http';
}
if ( 'relative' === $scheme ) {