wphooks.info - comment_flood_trigger

comment_flood_trigger

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/comment.php:
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
		$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 );
			}