Skip to content

Commit a43a2b0

Browse files
committed
Make filterable
1 parent 278d274 commit a43a2b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wp-includes/comment.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,11 @@ function wp_allow_comment( $commentdata, $wp_error = false ) {
714714

715715
$dupe_id = $wpdb->get_var( $dupe );
716716

717+
// Allow duplicate notes for resolution purposes.
718+
if ( isset( $commentdata['comment_type'] ) && 'note' === $commentdata['comment_type'] ) {
719+
$dupe_id = false;
720+
}
721+
717722
/**
718723
* Filters the ID, if any, of the duplicate comment found when creating a new comment.
719724
*
@@ -726,11 +731,6 @@ function wp_allow_comment( $commentdata, $wp_error = false ) {
726731
*/
727732
$dupe_id = apply_filters( 'duplicate_comment_id', $dupe_id, $commentdata );
728733

729-
// Allow duplicate notes for resolution purposes.
730-
if ( isset( $commentdata['comment_type'] ) && 'note' === $commentdata['comment_type'] ) {
731-
$dupe_id = false;
732-
}
733-
734734
if ( $dupe_id ) {
735735
/**
736736
* Fires immediately after a duplicate comment is detected.

0 commit comments

Comments
 (0)