Changeset 61144
- Timestamp:
- 11/05/2025 08:32:08 PM (20 hours ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
-
comment.php (modified) (1 diff)
-
rest-api/endpoints/class-wp-rest-comments-controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r61138 r61144 715 715 $dupe_id = $wpdb->get_var( $dupe ); 716 716 717 // Allow duplicate notes for resolution purposes.718 if ( isset( $commentdata['comment_type'] ) && 'note' === $commentdata['comment_type'] ) {719 $dupe_id = false;720 }721 722 717 /** 723 718 * Filters the ID, if any, of the duplicate comment found when creating a new comment. -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r61105 r61144 715 715 } 716 716 717 $prepared_comment['comment_approved'] = wp_allow_comment( $prepared_comment, true ); 717 // Don't check for duplicates or flooding for notes. 718 $prepared_comment['comment_approved'] = 719 'note' === $prepared_comment['comment_type'] ? 720 '1' : 721 wp_allow_comment( $prepared_comment, true ); 718 722 719 723 if ( is_wp_error( $prepared_comment['comment_approved'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.