Changeset 39191 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
- Timestamp:
- 11/10/2016 02:20:09 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
r39106 r39191 178 178 */ 179 179 public function prepare_item_for_response( $taxonomy, $request ) { 180 180 $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; 181 181 $data = array( 182 182 'name' => $taxonomy->label, … … 188 188 'show_cloud' => $taxonomy->show_tagcloud, 189 189 'hierarchical' => $taxonomy->hierarchical, 190 'rest_base' => $base, 190 191 ); 191 192 … … 197 198 $response = rest_ensure_response( $data ); 198 199 199 $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;200 200 $response->add_links( array( 201 201 'collection' => array( … … 286 286 'readonly' => true, 287 287 ), 288 'rest_base' => array( 289 'description' => __( 'REST base route for the resource.' ), 290 'type' => 'string', 291 'context' => array( 'view', 'edit', 'embed' ), 292 'readonly' => true, 293 ), 288 294 ), 289 295 );
Note: See TracChangeset
for help on using the changeset viewer.