Make WordPress Core


Ignore:
Timestamp:
11/13/2013 03:22:48 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Use get_current_site() instead of the $current_site global when possible.

props jeremyfelt.
fixes #25158.

File:
1 edited

Legend:

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

    r26081 r26120  
    21882188*/
    21892189function network_site_url( $path = '', $scheme = null ) {
    2190     global $current_site;
    2191 
    21922190    if ( ! is_multisite() )
    21932191        return site_url($path, $scheme);
     2192
     2193    $current_site = get_current_site();
    21942194
    21952195    if ( 'relative' == $scheme )
     
    22192219*/
    22202220function network_home_url( $path = '', $scheme = null ) {
    2221     global $current_site;
    2222 
    22232221    if ( ! is_multisite() )
    22242222        return home_url($path, $scheme);
    22252223
     2224    $current_site = get_current_site();
    22262225    $orig_scheme = $scheme;
    22272226
Note: See TracChangeset for help on using the changeset viewer.