apply_filters( 'wp_is_comment_flood', bool $is_flood, string $comment_author_ip, string $comment_author_email, string $comment_date_gmt, bool $wp_error )
- Since
- 4.7.0, 5.5.0
Filters whether a comment is part of a comment flood.
Description
The default check is wp_check_comment_flood(). See check_comment_flood_db().
Compatibility
- WordPress
- since 5.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
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.
Where this hook fires · 1
wp-includes/comment.php:800wp_allow_comment()
Source code
* @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. */ $is_flood = apply_filters( 'wp_is_comment_flood', false, $commentdata['comment_author_IP'], $commentdata['comment_author_email'], $commentdata['comment_date_gmt'], $wp_errorChangelog
Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.5.0
The
$avoid_die parameter was renamed to $wp_error.from the docblock4.7.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.