Filters the main site ID.
Returning a positive integer will effectively short-circuit the function.
$main_site_idint|null
$networkWP_Network
$main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this );
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_get_main_site_id