Multisite: Revert [38388].

Restore `get_current_site()` to a multisite only function. Providing this in single site may be a possibility in the future, but should have a dedicated ticket and discussion.

See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38636 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt
2016-09-20 21:38:08 +00:00
parent 201f9d2864
commit 2515aab673
6 changed files with 54 additions and 48 deletions
+3 -1
View File
@@ -1088,11 +1088,13 @@ function get_networks( $args = array() ) {
*
* @since 4.6.0
*
* @global WP_Network $current_site
*
* @param WP_Network|int|null $network Optional. Network to retrieve. Default is the current network.
* @return WP_Network|null The network object or null if not found.
*/
function get_network( $network = null ) {
$current_site = get_current_site();
global $current_site;
if ( empty( $network ) && isset( $current_site ) ) {
$network = $current_site;
}