filtrod 2.7.0
wp_count_comments
Opis — z kodu źródłowego
Filters the comments count for a given post or the whole site.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$count | array | \stdClass | An empty array or an object containing comment counts. |
$post_id | int | The post ID. Can be 0 to represent the whole site. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_count_comments', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_count_comments', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii