WP HOOKS
filtrod 4.7.0

wp_is_comment_flood

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

Opis — z kodu źródłowego

Filters whether a comment is part of a comment flood.

The default check is wp_check_comment_flood(). See check_comment_flood_db().

Parametry

ParametrTypOpis
$is_floodboolIs a comment flooding occurring? Default false.
$comment_author_ipstringComment author's IP address.
$comment_author_emailstringComment author's email.
$comment_date_gmtstringGMT date the comment was posted.
$wp_errorboolWhether to return a WP_Error object instead of executing wp_die() or die() if a comment flood is occurring.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_is_comment_flood', 'twoja_funkcja', 10, 5 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
	// Twój kod
}

Popularne w tej kategorii