WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/17/2016 03:52:18 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.

Props ramiy, SergeyBiryukov.
Fixes #38808.

File:
1 edited

Legend:

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

    r39266 r39278  
    127127
    128128        if ( 'edit' === $request['context'] && ! current_user_can( $post_type->cap->edit_posts ) ) {
    129             return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit these posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
     129            return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
    130130        }
    131131
     
    459459
    460460        if ( ! current_user_can( $post_type->cap->create_posts ) ) {
    461             return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new posts.' ), array( 'status' => rest_authorization_required_code() ) );
     461            return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );
    462462        }
    463463
     
    709709
    710710        if ( $post && ! $this->check_delete_permission( $post ) ) {
    711             return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete posts.' ), array( 'status' => rest_authorization_required_code() ) );
     711            return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this post.' ), array( 'status' => rest_authorization_required_code() ) );
    712712        }
    713713
Note: See TracChangeset for help on using the changeset viewer.