WordPress action hook · part of WordPress core

comment_flood_trigger

A WordPress core action that 3 plugins also fire themselves, running on 110+ sites between them.

How to use comment_flood_trigger

It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'comment_flood_trigger', function( $time_lastcomment, $time_newcomment ) {
	// Your code runs here.
}, 10, 2 );

Argument names come from AJAX Comments's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

3 plugins that fire comment_flood_trigger

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. AJAX Comments icon AJAX Comments100+ installs do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment ) ajax-comments.php:171
  2. Image Gallery and comments icon Image Gallery and comments10+ installs do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment ) ajax/post-ajax-comment.php:78
  3. Smart Throttle icon Smart ThrottleFewer than 10 installs do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment ) smart-throttle.php:117

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.