WordPress at Your Fingertips
filter is not described

pre_count_users filter-hook . WP 5.1.0

Filters the user count before queries are run.

Return a non-null value to cause count_users() to return early.


add_filter( 'pre_count_users', 'filter_function_name_9220', 10, 3 );
function filter_function_name_9220( $result, $strategy, $site_id ){
	// filter...

	return $result;
The value to return instead.
Default: null to continue with the query
Optional. The computational strategy to use when counting the users. Accepts either 'time' or 'memory'.
Default: 'time'
Optional. The site ID to count users for.
Default: current site


Since 5.1.0 Introduced.

Where the hook is called

wp-includes/user.php 1096
$pre = apply_filters( 'pre_count_users', null, $strategy, $site_id );

Where in WP core the hook is used WordPress

Usage not found.