comment_flood_trigger WordPress Action Hook

The comment_flood_trigger hook is used to limit the number of comments a user can make in a given period of time. It takes two arguments: the first is the number of comments the user is allowed to make in the given period, and the second is the period of time (in seconds) in which the limit applies. If a user exceeds the limit, their comments will be held in a moderation queue until an administrator approves them. This is a useful measure to prevent comment spam, as well as to keep conversations flowing smoothly by preventing one user from flooding the comment section with their own comments.

do_action( 'comment_flood_trigger', int $time_lastcomment, int $time_newcomment ) #

Fires before the comment flood message is triggered.


Parameters

$time_lastcomment

(int)Timestamp of when the last comment was posted.

$time_newcomment

(int)Timestamp of when the new comment was posted.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.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