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-taxonomies-controller.php

    r39313 r39342  
    161161                $tax_obj = get_taxonomy( $request['taxonomy'] );
    162162                if ( empty( $tax_obj ) ) {
    163                         return new WP_Error( 'rest_taxonomy_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );
     163                        return new WP_Error( 'rest_taxonomy_invalid', __( 'Invalid taxonomy.' ), array( 'status' => 404 ) );
    164164                }
    165165                $data = $this->prepare_item_for_response( $tax_obj, $request );
     
    236236                        'properties'           => array(
    237237                                'capabilities'     => array(
    238                                         'description'  => __( 'All capabilities used by the resource.' ),
     238                                        'description'  => __( 'All capabilities used by the taxonomy.' ),
    239239                                        'type'         => 'object',
    240240                                        'context'      => array( 'edit' ),
     
    242242                                ),
    243243                                'description'      => array(
    244                                         'description'  => __( 'A human-readable description of the resource.' ),
     244                                        'description'  => __( 'A human-readable description of the taxonomy.' ),
    245245                                        'type'         => 'string',
    246246                                        'context'      => array( 'view', 'edit' ),
     
    248248                                ),
    249249                                'hierarchical'     => array(
    250                                         'description'  => __( 'Whether or not the resource should have children.' ),
     250                                        'description'  => __( 'Whether or not the taxonomy should have children.' ),
    251251                                        'type'         => 'boolean',
    252252                                        'context'      => array( 'view', 'edit' ),
     
    254254                                ),
    255255                                'labels'           => array(
    256                                         'description'  => __( 'Human-readable labels for the resource for various contexts.' ),
     256                                        'description'  => __( 'Human-readable labels for the taxonomy for various contexts.' ),
    257257                                        'type'         => 'object',
    258258                                        'context'      => array( 'edit' ),
     
    260260                                ),
    261261                                'name'             => array(
    262                                         'description'  => __( 'The title for the resource.' ),
     262                                        'description'  => __( 'The title for the taxonomy.' ),
    263263                                        'type'         => 'string',
    264264                                        'context'      => array( 'view', 'edit', 'embed' ),
     
    266266                                ),
    267267                                'slug'             => array(
    268                                         'description'  => __( 'An alphanumeric identifier for the resource.' ),
     268                                        'description'  => __( 'An alphanumeric identifier for the taxonomy.' ),
    269269                                        'type'         => 'string',
    270270                                        'context'      => array( 'view', 'edit', 'embed' ),
     
    278278                                ),
    279279                                'types'            => array(
    280                                         'description'  => __( 'Types associated with resource.' ),
     280                                        'description'  => __( 'Types associated with the taxonomy.' ),
    281281                                        'type'         => 'array',
    282282                                        'items'        => array(
     
    287287                                ),
    288288                                'rest_base'            => array(
    289                                         'description'  => __( 'REST base route for the resource.' ),
     289                                        'description'  => __( 'REST base route for the taxonomy.' ),
    290290                                        'type'         => 'string',
    291291                                        'context'      => array( 'view', 'edit', 'embed' ),
     
    309309                $new_params['context'] = $this->get_context_param( array( 'default' => 'view' ) );
    310310                $new_params['type'] = array(
    311                         'description'  => __( 'Limit results to resources associated with a specific post type.' ),
     311                        'description'  => __( 'Limit results to taxonomies associated with a specific post type.' ),
    312312                        'type'         => 'string',
    313313                );
Note: See TracChangeset for help on using the changeset viewer.