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
This commit is contained in:
Sergey Biryukov 2021-02-02 20:35:06 +00:00
parent 0c0805bb9e
commit 9615fc28d5

View File

@ -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() ) {