If wp-login.php is accessed over HTTPS, get_home_url() should not return HTTPS. This is the same assumption we use in the admin.

props willnorris.
fixes #16822.



git-svn-id: https://develop.svn.wordpress.org/trunk@24844 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-07-29 01:21:27 +00:00
parent 8d07217b58
commit 685fd7fdea

View File

@ -1913,7 +1913,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
}
if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {
if ( is_ssl() && ! is_admin() )
if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow'] )
$scheme = 'https';
else
$scheme = parse_url( $url, PHP_URL_SCHEME );