wp_is_large_network
Filters whether the network is considered large.
Description
Parameters (3)
- 0. $count_10000 (number)
- Whether the network has more than 10000 users or sites.
- 1. $users (string) =>
'users'
- The component to count. Accepts users,, or sites..
- 2. $count (number)
- The count of items for the component.
Usage
- To run the hook, copy the example below.
- $count_10000 = apply_filters( 'wp_is_large_network', $count_10000, $users, $count );
- if ( !empty( $count_10000 ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wp_is_large_network callback
- function filter_wp_is_large_network( $count_10000, $users, $count ) {
- // make filter magic happen here...
- return $count_10000;
- };
- // add the filter
- add_filter( 'wp_is_large_network', 'filter_wp_is_large_network', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wp_is_large_network', 'filter_wp_is_large_network', 10, 3 );
Defined (2)
The filter is defined in the following location(s).
- /wp-includes/ms-functions.php
- return apply_filters( 'wp_is_large_network', $count > 10000, 'users', $count );
- return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count );