apply_filters( ‘pre_count_users’, null|array $result, string $strategy, int $site_id )

In this article

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

$pre = apply_filters( 'pre_count_users', null, $strategy, $site_id );

Changelog

VersionDescription
5.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.