Skip to content

Commit 77bdf0d

Browse files
Skip flood and duplicate checks for notes
1 parent 4555a40 commit 77bdf0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,10 @@ public function create_item( $request ) {
714714
);
715715
}
716716

717-
$prepared_comment['comment_approved'] = wp_allow_comment( $prepared_comment, true );
717+
$prepared_comment['comment_approved'] =
718+
'note' === $prepared_comment['comment_type'] ?
719+
'1' :
720+
wp_allow_comment( $prepared_comment, true );
718721

719722
if ( is_wp_error( $prepared_comment['comment_approved'] ) ) {
720723
$error_code = $prepared_comment['comment_approved']->get_error_code();

0 commit comments

Comments
 (0)