wp_throttle_comment_flood

The timeline below displays how wordpress function wp_throttle_comment_flood has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Determines whether a comment should be blocked because of comment flood.
 *
 * @since 2.1.0
 *
 * @param bool $block            Whether plugin has already blocked comment.
 * @param int  $time_lastcomment Timestamp for last comment.
 * @param int  $time_newcomment  Timestamp for new comment.
 * @return bool Whether comment should be blocked.
 */
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;
}

WordPress Version: 5.5

/**
 * Whether a comment should be blocked because of comment flood.
 *
 * @since 2.1.0
 *
 * @param bool $block            Whether plugin has already blocked comment.
 * @param int  $time_lastcomment Timestamp for last comment.
 * @param int  $time_newcomment  Timestamp for new comment.
 * @return bool Whether comment should be blocked.
 */
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;
}

WordPress Version: 5.4

/**
 * Whether a comment should be blocked because of comment flood.
 *
 * @since 2.1.0
 *
 * @param bool $block Whether plugin has already blocked comment.
 * @param int $time_lastcomment Timestamp for last comment.
 * @param int $time_newcomment Timestamp for new comment.
 * @return bool Whether comment should be blocked.
 */
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;
}

WordPress Version: 3.8

/**
 * Whether a comment should be blocked because of comment flood.
 *
 * @since 2.1.0
 *
 * @param bool $block Whether plugin has already blocked comment.
 * @param int $time_lastcomment Timestamp for last comment.
 * @param int $time_newcomment Timestamp for new comment.
 * @return bool Whether comment should be blocked.
 */
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;
}

WordPress Version: 3.7

/**
 * Whether comment should be blocked because of comment flood.
 *
 * @since 2.1.0
 *
 * @param bool $block Whether plugin has already blocked comment.
 * @param int $time_lastcomment Timestamp for last comment.
 * @param int $time_newcomment Timestamp for new comment.
 * @return bool Whether comment should be blocked.
 */
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;
}