Make WordPress Core


Ignore:
Timestamp:
08/26/2016 09:34:36 PM (9 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/ms-blogs.php

    r38232 r38388  
    10841084 * @since 4.6.0
    10851085 *
    1086  * @global WP_Network $current_site
    1087  *
    10881086 * @param WP_Network|int|null $network Optional. Network to retrieve. Default is the current network.
    10891087 * @return WP_Network|null The network object or null if not found.
    10901088 */
    10911089function get_network( $network = null ) {
    1092     global $current_site;
     1090    $current_site = get_current_site();
    10931091    if ( empty( $network ) && isset( $current_site ) ) {
    10941092        $network = $current_site;
Note: See TracChangeset for help on using the changeset viewer.