Warning: This function has been deprecated. Use get_network() instead.

wp_get_network() WordPress Function

The wp_get_network function allows you to get a network object by its id. This function is useful in multisite installations.

wp_get_network( object|int $network ) #

Retrieves an object containing information about the requested network.


Description

Top ↑

See also


Top ↑

Parameters

$network

(object|int)(Required)The network's database row or ID.


Top ↑

Return

(WP_Network|false) Object containing network information if found, false if not.


Top ↑

Source

File: wp-includes/ms-load.php

function wp_get_network( $network ) {
	_deprecated_function( __FUNCTION__, '4.7.0', 'get_network()' );

	$network = get_network( $network );
	if ( null === $network ) {
		return false;
	}

	return $network;
}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Use get_network()
3.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.