From 9615fc28d5a85f2034e9b415ad9e3caf3ea2370c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Feb 2021 20:35:06 +0000 Subject: [PATCH] General: Restore the `$pagenow` global in `get_home_url()`. This fixes test failures in `Tests_WP_Resource_Hints`. Follow-up to [50156]. See #52421. git-svn-id: https://develop.svn.wordpress.org/trunk@50164 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index daf73ca016..64024b1166 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -3253,6 +3253,8 @@ function home_url( $path = '', $scheme = null ) { * * @since 3.0.0 * + * @global string $pagenow + * * @param int $blog_id Optional. Site ID. Default null (current site). * @param string $path Optional. Path relative to the home URL. Default empty. * @param string|null $scheme Optional. Scheme to give the home URL context. Accepts @@ -3260,6 +3262,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() ) {