Make WordPress Core


Ignore:
Timestamp:
11/15/2016 10:22:33 PM (9 years ago)
Author:
SergeyBiryukov
Message:

REST API: Unify permission error messages.

Props ramiy.
Fixes #38803.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php

    r39161 r39257  
    124124        $parent_post_type_obj = get_post_type_object( $parent->post_type );
    125125        if ( ! current_user_can( $parent_post_type_obj->cap->edit_post, $parent->ID ) ) {
    126             return new WP_Error( 'rest_cannot_read', __( 'Sorry, you cannot view revisions of this post.' ), array( 'status' => rest_authorization_required_code() ) );
     126            return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to view revisions of this post.' ), array( 'status' => rest_authorization_required_code() ) );
    127127        }
    128128
Note: See TracChangeset for help on using the changeset viewer.