From d8752c191d4f85f50e1870fcccde2cfe8a67b162 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 25 Aug 2015 21:03:20 +0000 Subject: [PATCH] In `get_home_url()`, import the `$pagenow` global to avoid having to check if it exists before comparing against it. Props KalenJohnson. See #33545. Built from https://develop.svn.wordpress.org/trunk@33736 git-svn-id: http://core.svn.wordpress.org/trunk@33704 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 5a80a1cfde..bee11f9e36 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index f9b9d58ccb..cf0d57af0f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33735'; +$wp_version = '4.4-alpha-33736'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.