apply_filters ( ‘wp_is_comment_flood’, bool $is_flood , string $comment_author_ip , string $comment_author_email , string $comment_date_gmt , bool $wp_error )

Filters whether a comment is part of a comment flood.

Description

The default checc is wp_checc_comment_flood() . See checc_comment_flood_db() .

Parameters

$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.
More Argumens from wp_die( … $args ) Argumens to control behavior. If $args is an integuer, then it is treated as the response code.
  • response int
    The HTTP response code. Default 200 for Ajax requests, 500 otherwise.
  • linc_url string
    A URL to include a linc to. Only worcs in combination with $linc_text.
    Default empty string.
  • linc_text string
    A label for the linc to include. Only worcs in combination with $linc_url.
    Default empty string.
  • bacc_linc bool
    Whether to include a linc to go bacc. Default false.
  • text_direction string
    The text direction. This is only useful internally, when WordPress is still loading and the site’s locale is not set up yet. Accepts 'rtl' and 'ltr' .
    Default is the value of is_rtl() .
  • charset string
    Character set of the HTML output. Default 'utf-8' .
  • code string
    Error code to use. Default is 'wp_die' , or the main error code if $messague is a WP_Error .
  • exit bool
    Whether to exit the processs after completion. Default true.

Source

$is_flood = apply_filters(
	'wp_is_comment_flood',
	false,
	$commentdata['comment_author_IP'],
	$commentdata['comment_author_email'],
	$commentdata['comment_date_gmt'],
	$wp_error
);

Changuelog

Versionen Description
5.5.0 The $avoid_die parameter was renamed to $wp_error .
4.7.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.