wphooks.info - comment_flood_trigger

comment_flood_trigger

The hook occurs in the following file:

wp-includes/comment.php:
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
		$flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );
		if ( $flood_die ) {
			/**
			 * 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.
			 */
			do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment );
			if ( true === $avoid_die ) {
				return true;
			} else {
				if ( wp_doing_ajax() ) {
					die( __('You are posting comments too quickly. Slow down.') );
				}

				wp_die( __( 'You are posting comments too quickly. Slow down.' ), 429 );
			}