wp_get_network

Retrieve an object containing information about the requested network.

Description

(WP_Network|false) wp_get_network( (object|int) $network ); 

Returns (WP_Network|false)

Object containing network information if found, false if not.

Parameters (1)

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

Usage

  1. if ( !function_exists( 'wp_get_network' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-load.php'; 
  3.  
  4. // The network's database row or ID. 
  5. $network = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_get_network($network); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-load.php  
  1. function wp_get_network( $network ) { 
  2. _deprecated_function( __FUNCTION__, '4.7.0', 'get_network()' ); 
  3.  
  4. $network = get_network( $network ); 
  5. if ( null === $network ) { 
  6. return false; 
  7.  
  8. return $network;