From 58bca4922709aae51a50646796c86895e0035265 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Fri, 2 Sep 2016 23:48:31 +0000 Subject: [PATCH] Multisite: Deprecate `wp_get_network()`. `wp_get_network()` was converted into a wrapper for `get_network()` in 4.6.0 and can now be deprecated. This moves `wp_get_network()` to the bottom of `ms-load.php` as `ms-deprecated.php` is not available early enough. Props PieWP, flixos90. Fixes #37553. Built from https://develop.svn.wordpress.org/trunk@38515 git-svn-id: http://core.svn.wordpress.org/trunk@38456 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-load.php | 42 ++++++++++++++++++++++------------------- wp-includes/version.php | 2 +- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index 9fbaa5fa0d..abd70b803b 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -133,25 +133,6 @@ function get_network_by_path( $domain, $path, $segments = null ) { return WP_Network::get_by_path( $domain, $path, $segments ); } -/** - * Retrieve an object containing information about the requested network. - * - * @since 3.9.0 - * - * @internal In 4.6.0, converted to use get_network() - * - * @param object|int $network The network's database row or ID. - * @return WP_Network|false Object containing network information if found, false if not. - */ -function wp_get_network( $network ) { - $network = get_network( $network ); - if ( null === $network ) { - return false; - } - - return $network; -} - /** * Retrieve a site object by its domain and path. * @@ -542,3 +523,26 @@ function wpmu_current_site() { _deprecated_function( __FUNCTION__, '3.9.0' ); return $current_site; } + +/** + * Retrieve an object containing information about the requested network. + * + * @since 3.9.0 + * @deprecated 4.7.0 Use `get_network()` + * @see get_network() + * + * @internal In 4.6.0, converted to use get_network() + * + * @param object|int $network The network's database row or ID. + * @return WP_Network|false Object containing network information if found, false if not. + */ +function wp_get_network( $network ) { + _deprecated_function( __FUNCTION__, '4.7.0', 'get_network()' ); + + $network = get_network( $network ); + if ( null === $network ) { + return false; + } + + return $network; +} diff --git a/wp-includes/version.php b/wp-includes/version.php index ba615e9ff3..74b1673367 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38514'; +$wp_version = '4.7-alpha-38515'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.