apply_filters( 'pre_count_users', null|string $result, string $strategy, int|null $site_id )

Filters the user count before queries are run.

Description Description

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

Top ↑

Parameters Parameters


(null|string) The value to return instead. Default null to continue with the query.


(string) The computational strategy to use when counting the users. Accepts either 'time' or 'memory'. Default 'time'.


(int|null) The site ID to count users for. Defaults to the current site.

Top ↑

Source Source

File: wp-includes/user.php

View on Trac

Top ↑

Changelog Changelog

Version Description
5.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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