wp-includes/ms-network.php:23Retrieves network data given a network ID or network object.
$networkWP_Network|int|nulloptionalnullWP_Network|nullOne hook fires while get_network() runs, in this order:
function get_network( $network = null ) { global $current_site; if ( empty( $network ) && isset( $current_site ) ) { $network = $current_site; } if ( $network instanceof WP_Network ) { $_network = $network; } elseif ( is_object( $network ) ) { $_network = new WP_Network( $network ); } else { $_network = WP_Network::get_instance( $network ); } if ( ! $_network ) { return null; } /** * Fires after a network is retrieved. * * @since 4.6.0 * * @param WP_Network $_network Network data. */ $_network = apply_filters( 'get_network', $_network ); return $_network;}Introduced in 4.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/ms-network.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.