filtrod 3.7.0
wp_count_posts
Opis — z kodu źródłowego
Filters the post counts by status for the current post type.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$counts | \stdClass | An object containing the current post_type's post counts by status. |
$type | string | Post type. |
$perm | string | The permission to determine if the posts are 'readable' by the current user. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_count_posts', '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( 'wp_count_posts', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii