wphooks.info - comment_duplicate_trigger

comment_duplicate_trigger

(trunk - 5.0-alpha-42719)

The hook occurs in the following file:

wp-includes/comment.php:
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
	$dupe_id = apply_filters( 'duplicate_comment_id', $dupe_id, $commentdata );

	if ( $dupe_id ) {
		/**
		 * Fires immediately after a duplicate comment is detected.
		 *
		 * @since 3.0.0
		 *
		 * @param array $commentdata Comment data.
		 */
		do_action( 'comment_duplicate_trigger', $commentdata );
		if ( true === $avoid_die ) {
			return new WP_Error( 'comment_duplicate', __( 'Duplicate comment detected; it looks as though you’ve already said that!' ), 409 );
		} else {
			if ( wp_doing_ajax() ) {
				die( __( 'Duplicate comment detected; it looks as though you’ve already said that!' ) );
			}

			wp_die( __( 'Duplicate comment detected; it looks as though you’ve already said that!' ), 409 );
		}