apply_filters( 'comment_flood_filter', bool $bool , int $time_lastcomment , int $time_newcomment )
Filters the comment flood status.
Parameters
-
$bool
bool -
Whether a comment flood is occurring. Default false.
-
$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
.
View all references
$flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
If you want to disable this function, enter the following code in the function.php file of your theme:
The default time required between multiple comments from the same user/IP is 15 seconds. If the user posts the second comment faster than 15 seconds after the first comment, the comment flood message is triggered.
Below is an example showing how to change the default time.
Source: https://wordpress.org/support/article/faq-working-with-wordpress/#how-do-i-prevent-comment-flooding
Top ↑
Feedback
Great note, thanks. The original reference link no longer works, I can’t seem to find it if it still exists. — By Bozz —