Changeset 53724 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
- Timestamp:
- 07/19/2022 04:20:54 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
r53722 r53724 290 290 291 291 /** 292 * Prepares links for the request. 293 * 294 * @since 6.1.0 295 * 296 * @param @param WP_Taxonomy $taxonomy The taxonomy. 297 * @return array Links for the given taxonomy. 298 */ 299 protected function prepare_links( $taxonomy ) { 300 return array( 301 'collection' => array( 302 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), 303 ), 304 'https://api.w.org/items' => array( 305 'href' => rest_url( rest_get_route_for_taxonomy_items( $taxonomy->name ) ), 306 ), 307 ); 308 } 309 310 /** 292 311 * Retrieves the taxonomy's schema, conforming to JSON Schema. 293 312 * … … 428 447 return $new_params; 429 448 } 430 431 /**432 * Prepares links for the request.433 *434 * @since 6.1.0435 *436 * @param @param WP_Taxonomy $taxonomy The taxonomy.437 * @return array Links for the given taxonomy.438 */439 protected function prepare_links( $taxonomy ) {440 return array(441 'collection' => array(442 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ),443 ),444 'https://api.w.org/items' => array(445 'href' => rest_url( rest_get_route_for_taxonomy_items( $taxonomy->name ) ),446 ),447 );448 }449 450 449 }
Note: See TracChangeset
for help on using the changeset viewer.