Changeset 39259
- Timestamp:
- 11/15/2016 11:35:50 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r39257 r39259 110 110 111 111 if ( ! empty( $post_id ) && $post && ! $this->check_read_post_permission( $post ) ) { 112 return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you cannotread the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) );112 return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you are not allowed to read the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) ); 113 113 } elseif ( 0 === $post_id && ! current_user_can( 'moderate_comments' ) ) { 114 114 return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to read comments without a post.' ), array( 'status' => rest_authorization_required_code() ) ); … … 400 400 401 401 if ( ! $this->check_read_post_permission( $post ) ) { 402 return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you cannotread the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) );402 return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you are not allowed to read the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) ); 403 403 } 404 404 … … 616 616 617 617 if ( isset( $request['type'] ) && get_comment_type( $id ) !== $request['type'] ) { 618 return new WP_Error( 'rest_comment_invalid_type', __( 'Sorry, you cannotchange the comment type.' ), array( 'status' => 404 ) );618 return new WP_Error( 'rest_comment_invalid_type', __( 'Sorry, you are not allowed to change the comment type.' ), array( 'status' => 404 ) ); 619 619 } 620 620
Note: See TracChangeset
for help on using the changeset viewer.