wphooks.info - comment_duplicate_trigger

comment_duplicate_trigger

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/comment.php:
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
	$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 );
		}