You appear to be a bot. Output may be restricted
Description
Determine whether a network is the main network of the Multisite installation.
Usage
$bool = is_main_network( $network_id );
Parameters
- $network_id
- ( int ) optional – Optional. Network ID to test. Defaults to current network.
Returns
bool True if $network_id is the main network, or if not running Multisite.
Source
File name: wordpress/wp-includes/functions.php
Lines:
1 to 13 of 13
function is_main_network( $network_id = null ) { if ( ! is_multisite() ) { return true; } if ( null === $network_id ) { $network_id = get_current_network_id(); } $network_id = (int) $network_id; return ( get_main_network_id() === $network_id ); }