wp_throttle_comment_flood( bool $block, int $time_lastcomment, int $time_newcomment )

Whether a comment should be blocked because of comment flood.


Description Description


Parameters Parameters

$block

(bool) (Required) Whether plugin has already blocked comment.

$time_lastcomment

(int) (Required) Timestamp for last comment.

$time_newcomment

(int) (Required) Timestamp for new comment.


Top ↑

Return Return

(bool) Whether comment should be blocked.


Top ↑

Source Source

File: wp-includes/comment.php

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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.