filtrod 5.1.0
pre_count_users
Opis — z kodu źródłowego
Filters the user count before queries are run.
Return a non-null value to cause count_users() to return early.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$result | null | array | The value to return instead. Default null to continue with the query. |
$strategy | string | Optional. The computational strategy to use when counting the users. Accepts either 'time' or 'memory'. Default 'time'. |
$site_id | int | The site ID to count users for. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_count_users', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_count_users', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii