filtrod 1.5.0
get_comments_number
Opis — z kodu źródłowego
Filters the returned comment count for a post.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$comments_number | string | int | A string representing the number of comments a post has, otherwise 0. |
$post_id | int | Post ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_comments_number', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_comments_number', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii