wp_is_large_network
Filters whether the network is considered large.
Usage
add_filter( 'wp_is_large_network', 'wp_kama_is_large_network_filter', 10, 4 ); /** * Function for `wp_is_large_network` filter-hook. * * @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. * * @return bool */ function wp_kama_is_large_network_filter( $is_large_network, $component, $count, $network_id ){ // filter... return $is_large_network; }
- $is_large_network(true|false)
- Whether the network has more than 10000 users or sites.
- $component(string)
- The component to count. Accepts 'users', or 'sites'.
- $count(int)
- The count of items for the component.
- $network_id(int)
- The ID of the network being checked.
Changelog
Since 3.3.0 | Introduced. |
Since 4.8.0 | The $network_id parameter has been added. |
Where the hook is called
wp_is_large_network
wp-includes/ms-functions.php 2672
return apply_filters( 'wp_is_large_network', $is_large_network, 'users', $count, $network_id );
wp-includes/ms-functions.php 2678
return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count, $network_id );