check_comment_flood WordPress Action Hook

The check_comment_flood WordPress hook is used to check whether a comment has been made within a certain time period. If a comment is made within a short time period, it is considered to be a flood comment and is therefore not allowed.

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

Fires immediately before a comment is marked approved.


Description

Allows checking for comment flooding.


Top ↑

Parameters

$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.

$wp_error

(bool)Whether to return a WP_Error object instead of executing wp_die() or die() if a comment flood is occurring.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0The $avoid_die parameter was renamed to $wp_error.
4.7.0The $avoid_die parameter was added.
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More