wp_is_large_network
Filter HookDescription
Filters whether the network is considered large.Hook Information
File Location |
wp-includes/ms-functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2735 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$is_large_network
|
Whether the network has more than 10000 users or sites. |
string
|
$component
|
The component to count. Accepts 'users', or 'sites'. |
int
|
$count
|
The count of items for the component. |
int
|
$network_id
|
The ID of the network being checked. |
Usage Examples
Basic Usage
<?php
// Hook into wp_is_large_network
add_filter('wp_is_large_network', 'my_custom_filter', 10, 4);
function my_custom_filter($is_large_network, $component, $count, $network_id) {
// Your custom filtering logic here
return $is_large_network;
}
Source Code Context
wp-includes/ms-functions.php:2735
- How this hook is used in WordPress core
<?php
2730 }
2731
2732 $count = get_blog_count( $network_id );
2733
2734 /** This filter is documented in wp-includes/ms-functions.php */
2735 return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count, $network_id );
2736 }
2737
2738 /**
2739 * Retrieves a list of reserved site on a sub-directory Multisite installation.
2740 *
PHP Documentation
<?php
/**
* Filters whether the network is considered large.
*
* @since 3.3.0
* @since 4.8.0 The `$network_id` parameter has been added.
*
* @param bool $is_large_network Whether the network has more than 10000 users or sites.
* @param string $component The component to count. Accepts 'users', or 'sites'.
* @param int $count The count of items for the component.
* @param int $network_id The ID of the network being checked.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/ms-functions.php
Related Hooks
Related hooks will be displayed here in future updates.