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:
  • 4: .

Description

Determines whether a site is the main site of the current network.

Related Functions

is_multisite, is_main_query, get_main_site_id, is_main_blog, is_main_network

Top Google Results

User discussions

wpseek mobile