In get_home_url()
, import the $pagenow
global to avoid having to check if it exists before comparing against it.
Props KalenJohnson. See #33545. git-svn-id: https://develop.svn.wordpress.org/trunk@33736 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ff7fcf5f04
commit
1fb94edb99
@ -2732,6 +2732,8 @@ function home_url( $path = '', $scheme = null ) {
|
||||
* @return string Home URL link with optional path appended.
|
||||
*/
|
||||
function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||
global $pagenow;
|
||||
|
||||
$orig_scheme = $scheme;
|
||||
|
||||
if ( empty( $blog_id ) || !is_multisite() ) {
|
||||
@ -2743,7 +2745,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||
}
|
||||
|
||||
if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {
|
||||
if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow'] )
|
||||
if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow )
|
||||
$scheme = 'https';
|
||||
else
|
||||
$scheme = parse_url( $url, PHP_URL_SCHEME );
|
||||
|
Loading…
Reference in New Issue
Block a user