Filter hook 'pre_count_users'

in WP Core File wp-includes/user.php at line 1264

Description

Filters the user count before queries are run. Return a non-null value to cause count_users() to return early.

Occurrences

Filename Line Number
wp-includes/user.php 1264

Parameters

Type Name Description
null|array $result The value to return instead. Default null to continue with the query.
string $strategy Optional. The computational strategy to use when counting the users. Accepts either 'time' or 'memory'. Default 'time'.
int $site_id The site ID to count users for.

PHP Doc

/**
	 * Filters the user count before queries are run.
	 *
	 * Return a non-null value to cause count_users() to return early.
	 *
	 * @since 5.1.0
	 *
	 * @param null|array $result   The value to return instead. Default null to continue with the query.
	 * @param string     $strategy Optional. The computational strategy to use when counting the users.
	 *                             Accepts either 'time' or 'memory'. Default 'time'.
	 * @param int        $site_id  The site ID to count users for.
	 */