Filter hook 'wp_is_comment_flood'
in WP Core File wp-includes/comment.php at line 759
Description
Filters whether a comment is part of a comment flood. The default check is wp_check_comment_flood(). See check_comment_flood_db().
Occurrences
Filename |
Line Number |
wp-includes/comment.php |
759 |
Parameters
Type |
Name |
Description |
bool |
$is_flood |
Is a comment flooding occurring? Default false. |
string |
$comment_author_ip |
Comment author's IP address. |
string |
$comment_author_email |
Comment author's email. |
string |
$comment_date_gmt |
GMT date the comment was posted. |
bool |
$wp_error |
Whether to return a WP_Error object instead of executing wp_die() or die() if a comment flood is occurring. |
Usage Examples
Example 1
add_filter( 'wp_is_comment_flood', 'wp_check_comment_flood'
PHP Doc
/**
* Filters whether a comment is part of a comment flood.
*
* The default check is wp_check_comment_flood(). See check_comment_flood_db().
*
* @since 4.7.0
* @since 5.5.0 The `$avoid_die` parameter was renamed to `$wp_error`.
*
* @param bool $is_flood Is a comment flooding occurring? Default false.
* @param string $comment_author_ip Comment author's IP address.
* @param string $comment_author_email Comment author's email.
* @param string $comment_date_gmt GMT date the comment was posted.
* @param bool $wp_error Whether to return a WP_Error object instead of executing
* wp_die() or die() if a comment flood is occurring.
*/