On this page
apply_filters( 'pre_count_users', null|array $result, string $strategy, int $site_id )
Filters the user count before queries are run.
Description
Return a non-null value to cause count_users() to return early.
Parameters
$resultnull|array-
The value to return instead. Default null to continue with the query.
$strategystring-
The computational strategy to use when counting the users.
Accepts either'time'or'memory'. Default'time'. $site_idint-
The site ID to count users for.
Source
File: wp-includes/user.php. View all references
$pre = apply_filters( 'pre_count_users', null, $strategy, $site_id );
Related
Used By
| Used By | Description |
|---|---|
| count_users() wp-includes/user.php | Counts number of users who have each of the user roles. |
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_count_users