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/load.php

    r38363 r38388  
    10601060    return ( $thing instanceof WP_Error );
    10611061}
     1062
     1063/**
     1064 * Get the current network.
     1065 *
     1066 * Returns an object containing the 'id', 'domain', 'path', and 'site_name'
     1067 * properties of the network being viewed.
     1068 *
     1069 * @see wpmu_current_site()
     1070 *
     1071 * @since MU
     1072 *
     1073 * @global WP_Network $current_site
     1074 *
     1075 * @return WP_Network
     1076 */
     1077function get_current_site() {
     1078    global $current_site;
     1079    return $current_site;
     1080}
Note: See TracChangeset for help on using the changeset viewer.