Determines whether a comment should be blocked because of comment flood.
Parameters
$block
boolrequired- Whether plugin has already blocked comment.
$time_lastcomment
intrequired- Timestamp for last comment.
$time_newcomment
intrequired- Timestamp for new comment.
Source
function wp_throttle_comment_flood( $block, $time_lastcomment, $time_newcomment ) {
if ( $block ) { // A plugin has already blocked... we'll let that decision stand.
return $block;
}
if ( ( $time_newcomment - $time_lastcomment ) < 15 ) {
return true;
}
return false;
}
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.