Changeset 39342 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
- Timestamp:
- 11/23/2016 02:42:00 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
r39313 r39342 161 161 $tax_obj = get_taxonomy( $request['taxonomy'] ); 162 162 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 ) ); 164 164 } 165 165 $data = $this->prepare_item_for_response( $tax_obj, $request ); … … 236 236 'properties' => array( 237 237 'capabilities' => array( 238 'description' => __( 'All capabilities used by the resource.' ),238 'description' => __( 'All capabilities used by the taxonomy.' ), 239 239 'type' => 'object', 240 240 'context' => array( 'edit' ), … … 242 242 ), 243 243 'description' => array( 244 'description' => __( 'A human-readable description of the resource.' ),244 'description' => __( 'A human-readable description of the taxonomy.' ), 245 245 'type' => 'string', 246 246 'context' => array( 'view', 'edit' ), … … 248 248 ), 249 249 'hierarchical' => array( 250 'description' => __( 'Whether or not the resourceshould have children.' ),250 'description' => __( 'Whether or not the taxonomy should have children.' ), 251 251 'type' => 'boolean', 252 252 'context' => array( 'view', 'edit' ), … … 254 254 ), 255 255 'labels' => array( 256 'description' => __( 'Human-readable labels for the resourcefor various contexts.' ),256 'description' => __( 'Human-readable labels for the taxonomy for various contexts.' ), 257 257 'type' => 'object', 258 258 'context' => array( 'edit' ), … … 260 260 ), 261 261 'name' => array( 262 'description' => __( 'The title for the resource.' ),262 'description' => __( 'The title for the taxonomy.' ), 263 263 'type' => 'string', 264 264 'context' => array( 'view', 'edit', 'embed' ), … … 266 266 ), 267 267 'slug' => array( 268 'description' => __( 'An alphanumeric identifier for the resource.' ),268 'description' => __( 'An alphanumeric identifier for the taxonomy.' ), 269 269 'type' => 'string', 270 270 'context' => array( 'view', 'edit', 'embed' ), … … 278 278 ), 279 279 'types' => array( 280 'description' => __( 'Types associated with resource.' ),280 'description' => __( 'Types associated with the taxonomy.' ), 281 281 'type' => 'array', 282 282 'items' => array( … … 287 287 ), 288 288 'rest_base' => array( 289 'description' => __( 'REST base route for the resource.' ),289 'description' => __( 'REST base route for the taxonomy.' ), 290 290 'type' => 'string', 291 291 'context' => array( 'view', 'edit', 'embed' ), … … 309 309 $new_params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); 310 310 $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.' ), 312 312 'type' => 'string', 313 313 );
Note: See TracChangeset
for help on using the changeset viewer.