wppaste
WordPress

do_action( 'check_comment_flood', string $comment_author_ip, string $comment_author_email, string $comment_date_gmt, bool $wp_error )

Since
2.3.0, 4.7.0, 5.5.0
Fires immediately before a comment is marked approved.

Description

Allows checking for comment flooding.

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

$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:774wp_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.	 */	do_action(		'check_comment_flood',		$commentdata['comment_author_IP'],		$commentdata['comment_author_email'],		$commentdata['comment_date_gmt'],		$wp_error	);

Changelog

Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 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 docblock
4.7.0
The $avoid_die parameter was added.from the docblock
2.3.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 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.