Make WordPress Core


Ignore:
Timestamp:
08/25/2015 09:02:14 PM (9 years ago)
Author:
wonderboymusic
Message:

In get_home_url(), import the $pagenow global to avoid having to check if it exists before comparing against it.

Props KalenJohnson.
See #33545.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r33717 r33736  
    27332733*/
    27342734function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
     2735    global $pagenow;
     2736
    27352737    $orig_scheme = $scheme;
    27362738
     
    27442746
    27452747    if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {
    2746         if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow'] )
     2748        if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow )
    27472749            $scheme = 'https';
    27482750        else
Note: See TracChangeset for help on using the changeset viewer.