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 a21c51f commit 992a3bdCopy full SHA for 992a3bd
src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
@@ -123,8 +123,8 @@ public function register_routes() {
123
* @return true|WP_Error True if the request has read access, error object otherwise.
124
*/
125
public function get_items_permissions_check( $request ) {
126
- $is_note = ! empty( $request['type'] ) && 'note' === $request['type'];
127
- $is_edit_context = ! empty( $request['context'] ) && 'edit' === $request['context'];
+ $is_note = 'note' === $request['type'];
+ $is_edit_context = 'edit' === $request['context'];
128
129
if ( ! empty( $request['post'] ) ) {
130
foreach ( (array) $request['post'] as $post_id ) {
0 commit comments