wpseek.com
A WordPress-centric search engine for devs and theme authors



pre_get_main_site_id › WordPress Filter Hooks

Since4.9.0
Deprecatedn/a
apply_filters( 'pre_get_main_site_id', null, $this )
Parameters: (2)
  • (int|null) $main_site_id If a positive integer is returned, it is interpreted as the main site ID.
    Required: Yes
  • (WP_Network) $network The network object for which the main site was detected.
    Required: Yes
Defined at:
Codex:

Filters the main site ID.

Returning a positive integer will effectively short-circuit the function.





Source

$main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this );