get_main_network_id
Filters the main network ID.
Usage
add_filter( 'get_main_network_id', 'wp_kama_get_main_network_id_filter' ); /** * Function for `get_main_network_id` filter-hook. * * @param int $main_network_id The ID of the main network. * * @return int */ function wp_kama_get_main_network_id_filter( $main_network_id ){ // filter... return $main_network_id; }
- $main_network_id(int)
- The ID of the main network.
Changelog
Since 4.3.0 | Introduced. |
Where the hook is called
get_main_network_id
wp-includes/functions.php 6295
return (int) apply_filters( 'get_main_network_id', $main_network_id );