Make WordPress Core

Ticket #38879: 38879.patch

File 38879.patch, 938 bytes (added by ramiy, 8 years ago)
  • wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

     
    587587                $post_type = get_post_type_object( $this->post_type );
    588588
    589589                if ( $post && ! $this->check_update_permission( $post ) ) {
    590                         return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to update this post.' ), array( 'status' => rest_authorization_required_code() ) );
     590                        return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => rest_authorization_required_code() ) );
    591591                }
    592592
    593593                if ( ! empty( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( $post_type->cap->edit_others_posts ) ) {