Make WordPress Core


Ignore:
Timestamp:
11/23/2016 02:42:00 AM (10 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-types-controller.php

    r39313 r39342  
    120120
    121121                if ( empty( $obj ) ) {
    122                         return new WP_Error( 'rest_type_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );
     122                        return new WP_Error( 'rest_type_invalid', __( 'Invalid post type.' ), array( 'status' => 404 ) );
    123123                }
    124124
    125125                if ( empty( $obj->show_in_rest ) ) {
    126                         return new WP_Error( 'rest_cannot_read_type', __( 'Cannot view resource.' ), array( 'status' => rest_authorization_required_code() ) );
     126                        return new WP_Error( 'rest_cannot_read_type', __( 'Cannot view post type.' ), array( 'status' => rest_authorization_required_code() ) );
    127127                }
    128128
     
    205205                        'properties'           => array(
    206206                                'capabilities'     => array(
    207                                         'description'  => __( 'All capabilities used by the resource.' ),
     207                                        'description'  => __( 'All capabilities used by the post type.' ),
    208208                                        'type'         => 'object',
    209209                                        'context'      => array( 'edit' ),
     
    211211                                ),
    212212                                'description'      => array(
    213                                         'description'  => __( 'A human-readable description of the resource.' ),
     213                                        'description'  => __( 'A human-readable description of the post type.' ),
    214214                                        'type'         => 'string',
    215215                                        'context'      => array( 'view', 'edit' ),
     
    217217                                ),
    218218                                'hierarchical'     => array(
    219                                         'description'  => __( 'Whether or not the resource should have children.' ),
     219                                        'description'  => __( 'Whether or not the post type should have children.' ),
    220220                                        'type'         => 'boolean',
    221221                                        'context'      => array( 'view', 'edit' ),
     
    223223                                ),
    224224                                'labels'           => array(
    225                                         'description'  => __( 'Human-readable labels for the resource for various contexts.' ),
     225                                        'description'  => __( 'Human-readable labels for the post type for various contexts.' ),
    226226                                        'type'         => 'object',
    227227                                        'context'      => array( 'edit' ),
     
    229229                                ),
    230230                                'name'             => array(
    231                                         'description'  => __( 'The title for the resource.' ),
     231                                        'description'  => __( 'The title for the post type.' ),
    232232                                        'type'         => 'string',
    233233                                        'context'      => array( 'view', 'edit', 'embed' ),
     
    235235                                ),
    236236                                'slug'             => array(
    237                                         'description'  => __( 'An alphanumeric identifier for the resource.' ),
     237                                        'description'  => __( 'An alphanumeric identifier for the post type.' ),
    238238                                        'type'         => 'string',
    239239                                        'context'      => array( 'view', 'edit', 'embed' ),
     
    241241                                ),
    242242                                'taxonomies'       => array(
    243                                         'description'  => __( 'Taxonomies associated with resource.' ),
     243                                        'description'  => __( 'Taxonomies associated with post type.' ),
    244244                                        'type'         => 'array',
    245245                                        'items'        => array(
     
    250250                                ),
    251251                                'rest_base'            => array(
    252                                         'description'  => __( 'REST base route for the resource.' ),
     252                                        'description'  => __( 'REST base route for the post type.' ),
    253253                                        'type'         => 'string',
    254254                                        'context'      => array( 'view', 'edit', 'embed' ),
Note: See TracChangeset for help on using the changeset viewer.