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. Built from https://develop.svn.wordpress.org/trunk@38388 git-svn-id: http://core.svn.wordpress.org/trunk@38329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1059,3 +1059,22 @@ function wp_doing_ajax() {
|
||||
function is_wp_error( $thing ) {
|
||||
return ( $thing instanceof WP_Error );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current network.
|
||||
*
|
||||
* Returns an object containing the 'id', 'domain', 'path', and 'site_name'
|
||||
* properties of the network being viewed.
|
||||
*
|
||||
* @see wpmu_current_site()
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
* @global WP_Network $current_site
|
||||
*
|
||||
* @return WP_Network
|
||||
*/
|
||||
function get_current_site() {
|
||||
global $current_site;
|
||||
return $current_site;
|
||||
}
|
||||
Reference in New Issue
Block a user