Action hook 'comment_flood_trigger'

in WP Core File wp-includes/comment.php at line 898

View Source

comment_flood_trigger

Action Hook
Description
Fires before the comment flood message is triggered.

Hook Information

File Location wp-includes/comment.php View on GitHub
Hook Type Action
Line Number 898

Hook Parameters

Type Name Description
int $time_lastcomment Timestamp of when the last comment was posted.
int $time_newcomment Timestamp of when the new comment was posted.

Usage Examples

Basic Usage
<?php
// Hook into comment_flood_trigger
add_action('comment_flood_trigger', 'my_custom_function', 10, 2);

function my_custom_function($time_lastcomment, $time_newcomment) {
    // Your custom code here
}

Source Code Context

wp-includes/comment.php:898 - How this hook is used in WordPress core
<?php
 893  			 * @since 1.5.0
 894  			 *
 895  			 * @param int $time_lastcomment Timestamp of when the last comment was posted.
 896  			 * @param int $time_newcomment  Timestamp of when the new comment was posted.
 897  			 */
 898  			do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment );
 899  
 900  			if ( $avoid_die ) {
 901  				return true;
 902  			} else {
 903  				/**

PHP Documentation

<?php
/**
			 * Fires before the comment flood message is triggered.
			 *
			 * @since 1.5.0
			 *
			 * @param int $time_lastcomment Timestamp of when the last comment was posted.
			 * @param int $time_newcomment  Timestamp of when the new comment was posted.
			 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-includes/comment.php
Related Hooks

Related hooks will be displayed here in future updates.