filtrod 2.7.0
comment_class
Opis — z kodu źródłowego
Filters the returned CSS classes for the current comment.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$classes | string[] | An array of comment classes. |
$css_class | string[] | An array of additional classes added to the list. |
$comment_id | string | The comment ID as a numeric string. |
$comment | \WP_Comment | The comment object. |
$post | int | \WP_Post | The post ID or WP_Post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'comment_class', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'comment_class', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii