From 31f2f68e82c6560a34f123774af8652dfd9791c2 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 28 Jun 2016 21:29:29 +0000 Subject: [PATCH] Multisite: Replace `wp_get_network()` internals with `get_network()`. `get_network()` should be considered a replacement for `wp_get_network()`. Props flixos90. Fixes #32504. Built from https://develop.svn.wordpress.org/trunk@37896 git-svn-id: http://core.svn.wordpress.org/trunk@37837 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-load.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index 759c2699d1..afacfe0077 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -137,15 +137,15 @@ function get_network_by_path( $domain, $path, $segments = null ) { * * @since 3.9.0 * @since 4.4.0 Converted to leverage WP_Network + * @since 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 ) { - if ( ! is_object( $network ) ) { - $network = WP_Network::get_instance( $network ); - } else { - $network = new WP_Network( $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 8516052ed3..61365f4b8a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37895'; +$wp_version = '4.6-alpha-37896'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.