is_main_site
is_main_site ( $site_id = null, $network_id = null )
Parameters:- (int) site_id Optional. Site ID to test. Defaults to current site.
- (int) network_id Optional. Network ID of the network to check for. Defaults to current network.
Returns:- (bool) True if $site_id is the main site of the network, or if not running Multisite.
Defined at:Change Log: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Description
Determines whether a site is the main site of the current network.