filtrod 4.7.0
wp_is_comment_flood
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
| Parametr | Typ | Opis |
|---|---|---|
$is_flood | bool | Is a comment flooding occurring? Default false. |
$comment_author_ip | string | Comment author's IP address. |
$comment_author_email | string | Comment author's email. |
$comment_date_gmt | string | GMT date the comment was posted. |
$wp_error | bool | Whether 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
}
// 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