Changeset 39251
- Timestamp:
- 11/15/2016 08:36:27 PM (8 years ago)
- Location:
- trunk/src/wp-includes/rest-api
- Files:
-
- 2 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 -
trunk/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
r39245 r39251 178 178 'rest_cannot_delete', 179 179 /* translators: %s: custom field key */ 180 sprintf( __( ' You do not have permissionto edit the %s custom field.' ), $name ),180 sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ), 181 181 array( 'key' => $name, 'status' => rest_authorization_required_code() ) 182 182 ); … … 213 213 'rest_cannot_update', 214 214 /* translators: %s: custom field key */ 215 sprintf( __( ' You do not have permissionto edit the %s custom field.' ), $name ),215 sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ), 216 216 array( 'key' => $name, 'status' => rest_authorization_required_code() ) 217 217 ); … … 284 284 'rest_cannot_update', 285 285 /* translators: %s: custom field key */ 286 sprintf( __( ' You do not have permissionto edit the %s custom field.' ), $name ),286 sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ), 287 287 array( 'key' => $name, 'status' => rest_authorization_required_code() ) 288 288 );
Note: See TracChangeset
for help on using the changeset viewer.