WordPress at a glance
action is not described

check_comment_flood action-hook . WP 2.3.0

Fires immediately before a comment is marked approved.

Allows checking for comment flooding.

Usage

add_action( 'check_comment_flood', 'action_function_name_5045', 10, 4 );
function action_function_name_5045( $comment_author_IP, $comment_author_email, $comment_date_gmt, $avoid_die ){
	// action...
}
$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.
$avoid_die(true/false)
Whether to prevent executing wp_die() or die() if a comment flood is occurring.

Notes

  • Since 4.7.0 The $avoid_die parameter was added.

Where the hook is called

wp_allow_comment()
wp-includes/comment.php 696-702
do_action(
	'check_comment_flood',
	$commentdata['comment_author_IP'],
	$commentdata['comment_author_email'],
	$commentdata['comment_date_gmt'],
	$avoid_die
);

Where the hook is used (in WP core)

wp-includes/default-filters.php 236
add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 4 );