Multisite: Replace `wp_get_network()` internals with `get_network()`.

`get_network()` should be considered a replacement for `wp_get_network()`.

Props flixos90.
Fixes #32504.


git-svn-id: https://develop.svn.wordpress.org/trunk@37896 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2016-06-28 21:28:48 +00:00
parent d93bc1943c
commit 204dedb99a
1 changed files with 4 additions and 4 deletions

View File

@ -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;