Make WordPress Core


Ignore:
Timestamp:
11/23/2016 02:42:00 AM (8 years ago)
Author:
joehoyle
Message:

REST API: Update “resource” strings to use the appropriate nouns.

Props ramiy.
Fixes #38811.

File:
1 edited

Legend:

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

    r39313 r39342  
    126126
    127127        if ( empty( $status ) ) {
    128             return new WP_Error( 'rest_status_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );
     128            return new WP_Error( 'rest_status_invalid', __( 'Invalid status.' ), array( 'status' => 404 ) );
    129129        }
    130130
     
    132132
    133133        if ( ! $check ) {
    134             return new WP_Error( 'rest_cannot_read_status', __( 'Cannot view resource.' ), array( 'status' => rest_authorization_required_code() ) );
     134            return new WP_Error( 'rest_cannot_read_status', __( 'Cannot view status.' ), array( 'status' => rest_authorization_required_code() ) );
    135135        }
    136136
     
    178178
    179179        if ( empty( $obj ) ) {
    180             return new WP_Error( 'rest_status_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );
     180            return new WP_Error( 'rest_status_invalid', __( 'Invalid status.' ), array( 'status' => 404 ) );
    181181        }
    182182
     
    249249            'properties'           => array(
    250250                'name'             => array(
    251                     'description'  => __( 'The title for the resource.' ),
     251                    'description'  => __( 'The title for the status.' ),
    252252                    'type'         => 'string',
    253253                    'context'      => array( 'embed', 'view', 'edit' ),
     
    255255                ),
    256256                'private'          => array(
    257                     'description'  => __( 'Whether posts with this resource should be private.' ),
     257                    'description'  => __( 'Whether posts with this status should be private.' ),
    258258                    'type'         => 'boolean',
    259259                    'context'      => array( 'edit' ),
     
    261261                ),
    262262                'protected'        => array(
    263                     'description'  => __( 'Whether posts with this resource should be protected.' ),
     263                    'description'  => __( 'Whether posts with this status should be protected.' ),
    264264                    'type'         => 'boolean',
    265265                    'context'      => array( 'edit' ),
     
    267267                ),
    268268                'public'           => array(
    269                     'description'  => __( 'Whether posts of this resource should be shown in the front end of the site.' ),
     269                    'description'  => __( 'Whether posts of this status should be shown in the front end of the site.' ),
    270270                    'type'         => 'boolean',
    271271                    'context'      => array( 'view', 'edit' ),
     
    273273                ),
    274274                'queryable'        => array(
    275                     'description'  => __( 'Whether posts with this resource should be publicly-queryable.' ),
     275                    'description'  => __( 'Whether posts with this status should be publicly-queryable.' ),
    276276                    'type'         => 'boolean',
    277277                    'context'      => array( 'view', 'edit' ),
     
    285285                ),
    286286                'slug'             => array(
    287                     'description'  => __( 'An alphanumeric identifier for the resource.' ),
     287                    'description'  => __( 'An alphanumeric identifier for the status.' ),
    288288                    'type'         => 'string',
    289289                    'context'      => array( 'embed', 'view', 'edit' ),
Note: See TracChangeset for help on using the changeset viewer.