From 6221b8a74422692bde92510a05584ead025e0962 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Feb 2021 20:57:31 +0000 Subject: [PATCH] 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 --- src/wp-includes/link-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 64024b1166..5bbfc53c60 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -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 ) {