Core Function
View Source on Trac ↗ is_main_network()
is_main_network( mixed $network_id = null ) Determines whether a network is the main network of the Multisite installation.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $network_id int | Optional. Network ID to test. Defaults to current network. |
Return Value
(bool)
True if $network_id is the main network, or if not running Multisite.
Function Information
Since Version
3.7.0
Source File
wp-includes/functions.php
Advertisement