We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 992a3bd commit f0ee469Copy full SHA for f0ee469
src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
@@ -640,7 +640,7 @@ public function create_item( $request ) {
640
return $prepared_comment;
641
}
642
643
- $prepared_comment['comment_type'] = empty( $request['type'] ) ? 'comment' : $request['type'];
+ $prepared_comment['comment_type'] = $request['type'];
644
645
if ( ! isset( $prepared_comment['comment_content'] ) ) {
646
$prepared_comment['comment_content'] = '';
@@ -1567,6 +1567,7 @@ public function get_item_schema() {
1567
'type' => 'string',
1568
'context' => array( 'view', 'edit', 'embed' ),
1569
'readonly' => true,
1570
+ 'default' => 'comment',
1571
),
1572
1573
);
0 commit comments