Changeset 51786 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
- Timestamp:
- 09/09/2021 06:35:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
r51000 r51786 201 201 * 202 202 * @since 4.7.0 203 * 204 * @param WP_Taxonomy $taxonomy Taxonomy data. 205 * @param WP_REST_Request $request Full details about the request. 203 * @since 5.9.0 Renamed `$taxonomy` to `$item` to match parent class for PHP 8 named parameter support. 204 * 205 * @param WP_Taxonomy $item Taxonomy data. 206 * @param WP_REST_Request $request Full details about the request. 206 207 * @return WP_REST_Response Response object. 207 208 */ 208 public function prepare_item_for_response( $taxonomy, $request ) { 209 $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; 209 public function prepare_item_for_response( $item, $request ) { 210 // Restores the more descriptive, specific name for use within this method. 211 $taxonomy = $item; 212 $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; 210 213 211 214 $fields = $this->get_fields_for_response( $request );
Note: See TracChangeset
for help on using the changeset viewer.