get_main_network_id
Filter HookDescription
Filters the main network ID.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 6494 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$main_network_id
|
The ID of the main network. |
Usage Examples
Basic Usage
<?php
// Hook into get_main_network_id
add_filter('get_main_network_id', 'my_custom_filter', 10, 1);
function my_custom_filter($main_network_id) {
// Your custom filtering logic here
return $main_network_id;
}
Source Code Context
wp-includes/functions.php:6494
- How this hook is used in WordPress core
<?php
6489 *
6490 * @since 4.3.0
6491 *
6492 * @param int $main_network_id The ID of the main network.
6493 */
6494 return (int) apply_filters( 'get_main_network_id', $main_network_id );
6495 }
6496
6497 /**
6498 * Determines whether site meta is enabled.
6499 *
PHP Documentation
<?php
/**
* Filters the main network ID.
*
* @since 4.3.0
*
* @param int $main_network_id The ID of the main network.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.