- Timestamp:
- 11/15/2016 08:36:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r39250 r39251 451 451 452 452 if ( ! empty( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( $post_type->cap->edit_others_posts ) ) { 453 return new WP_Error( 'rest_cannot_edit_others', __( ' You are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );453 return new WP_Error( 'rest_cannot_edit_others', __( 'Sorry, you are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) ); 454 454 } 455 455 456 456 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) ) { 457 return new WP_Error( 'rest_cannot_assign_sticky', __( ' You do not have permissionto make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) );457 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 458 458 } 459 459 … … 463 463 464 464 if ( ! $this->check_assign_terms_permission( $request ) ) { 465 return new WP_Error( 'rest_cannot_assign_term', __( ' You do not have permissionto assign the provided terms.' ), array( 'status' => rest_authorization_required_code() ) );465 return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign the provided terms.' ), array( 'status' => rest_authorization_required_code() ) ); 466 466 } 467 467 … … 592 592 593 593 if ( ! empty( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( $post_type->cap->edit_others_posts ) ) { 594 return new WP_Error( 'rest_cannot_edit_others', __( ' You are not allowed to update posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );594 return new WP_Error( 'rest_cannot_edit_others', __( 'Sorry, you are not allowed to update posts as this user.' ), array( 'status' => rest_authorization_required_code() ) ); 595 595 } 596 596 597 597 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) ) { 598 return new WP_Error( 'rest_cannot_assign_sticky', __( ' You do not have permissionto make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) );598 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 599 599 } 600 600 601 601 if ( ! $this->check_assign_terms_permission( $request ) ) { 602 return new WP_Error( 'rest_cannot_assign_term', __( ' You do not have permissionto assign the provided terms.' ), array( 'status' => rest_authorization_required_code() ) );602 return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign the provided terms.' ), array( 'status' => rest_authorization_required_code() ) ); 603 603 } 604 604
Note: See TracChangeset
for help on using the changeset viewer.