On this page
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 check is wp_check_comment_flood() . See check_comment_flood_db() .
Parameters
$is_floodbool-
Is a comment flooding occurring? Default false.
$comment_author_ipstring-
Comment author's IP address.
$comment_author_emailstring-
Comment author's email.
$comment_date_gmtstring-
GMT date the comment was posted.
$wp_errorbool-
Whether to return a WP_Error object instead of executing wp_die() or die() if a comment flood is occurring.
More Arguments from wp_die( ... $args )
Arguments to control behavior. If$argsis an integer, then it is treated as the response code.
responseintThe HTTP response code. Default 200 for Ajax requests, 500 otherwise.link_urlstringA URL to include a link to. Only works in combination with $link_text.
Default empty string.link_textstringA label for the link to include. Only works in combination with $link_url.
Default empty string.back_linkboolWhether to include a link to go back. Default false.text_directionstringThe 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() .charsetstringCharacter set of the HTML output. Default'utf-8'.codestringError code to use. Default is'wp_die', or the main error code if $message is a WP_Error.exitboolWhether to exit the process after completion. Default true.
Source
File: wp-includes/comment.php. View all references
$is_flood = apply_filters(
'wp_is_comment_flood',
false,
$commentdata['comment_author_IP'],
$commentdata['comment_author_email'],
$commentdata['comment_date_gmt'],
$wp_error
);
Related
Used By
| Used By | Description |
|---|---|
| wp_allow_comment() wp-includes/comment.php | Validates whether this comment is allowed to be made. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_is_comment_flood