Make WordPress Core


Ignore:
Timestamp:
08/26/2016 09:34:36 PM (10 years ago)
Author:
wonderboymusic
Message:

Multisite: move get_current_site() to load.php so that it can be used in more places, instead of importing global $current_site.

See #37699.

File:
1 edited

Legend:

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

    r38369 r38388  
    32643264        $current_site = get_current_site();
    32653265
    3266         if ( 'relative' == $scheme )
     3266        if ( 'relative' == $scheme ) {
    32673267                $url = $current_site->path;
    3268         else
     3268        } else {
    32693269                $url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme );
    3270 
    3271         if ( $path && is_string( $path ) )
     3270        }
     3271
     3272        if ( $path && is_string( $path ) ) {
    32723273                $url .= ltrim( $path, '/' );
     3274        }
    32733275
    32743276        /**
    … …  
    33103312                $scheme = is_ssl() && ! is_admin() ? 'https' : 'http';
    33113313
    3312         if ( 'relative' == $scheme )
     3314        if ( 'relative' == $scheme ) {
    33133315                $url = $current_site->path;
    3314         else
     3316        } else {
    33153317                $url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme );
    3316 
    3317         if ( $path && is_string( $path ) )
     3318        }
     3319
     3320        if ( $path && is_string( $path ) ) {
    33183321                $url .= ltrim( $path, '/' );
     3322        }
    33193323
    33203324        /**
Note: See TracChangeset for help on using the changeset viewer.