- Timestamp:
- 07/22/2022 01:58:46 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php
r51786 r53760 211 211 $response = rest_ensure_response( $data ); 212 212 213 $links = $handler->prepare_item_links( $item_id ); 214 $links['collection'] = array( 215 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), 216 ); 217 $response->add_links( $links ); 213 if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { 214 $links = $handler->prepare_item_links( $item_id ); 215 $links['collection'] = array( 216 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), 217 ); 218 $response->add_links( $links ); 219 } 218 220 219 221 return $response;
Note: See TracChangeset
for help on using the changeset viewer.