wp_throttle_comment_flood

Definition:
function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) {}

Whether comment should be blocked because of comment flood.

Parameters

  • bool $block: Whether plugin has already blocked comment.
  • int $time_lastcomment: Timestamp for last comment.
  • int $time_newcomment: Timestamp for new comment.

Return values

returns:Whether comment should be blocked.

Source code

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;

}

4165

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: