WPDev.one
Core Function
View Source on Trac ↗

get_main_site_id()

get_main_site_id( mixed $network_id = null )

Gets the main site ID.

Parameters 1 required

Name / Type Description
int

$network_id Optional. The ID of the network for which to get the main site. Defaults to the current network.

Required

Return Value

(int)
The ID of the main site.

Function Information

Since Version
4.9.0
Source File
wp-includes/functions.php
Advertisement