filtrod 6.8.0
pre_count_many_users_posts
Opis — z kodu źródłowego
Filters whether to short-circuit performing the post counts.
When filtering, return an array of posts counts as strings, keyed by the user ID.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$count | string[] | null | The post counts. Return a non-null value to short-circuit. |
$users | int[] | Array of user IDs. |
$post_type | string | string[] | Single post type or array of post types to check. |
$public_only | bool | Whether to only return counts for public posts. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_count_many_users_posts', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_count_many_users_posts', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii