WP HOOKS
filtrod 2.7.0

comment_class

Args 5Plik wp-includes/comment-template.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the returned CSS classes for the current comment.

Parametry

ParametrTypOpis
$classesstring[]An array of comment classes.
$css_classstring[]An array of additional classes added to the list.
$comment_idstringThe comment ID as a numeric string.
$comment\WP_CommentThe comment object.
$postint | \WP_PostThe 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
}

Popularne w tej kategorii