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.
Source
File: wp-includes/comment.php
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |