- 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-templates-controller.php
r52434 r53760 663 663 $response = rest_ensure_response( $data ); 664 664 665 $links = $this->prepare_links( $template->id ); 666 $response->add_links( $links ); 667 if ( ! empty( $links['self']['href'] ) ) { 668 $actions = $this->get_available_actions(); 669 $self = $links['self']['href']; 670 foreach ( $actions as $rel ) { 671 $response->add_link( $rel, $self ); 665 if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { 666 $links = $this->prepare_links( $template->id ); 667 $response->add_links( $links ); 668 if ( ! empty( $links['self']['href'] ) ) { 669 $actions = $this->get_available_actions(); 670 $self = $links['self']['href']; 671 foreach ( $actions as $rel ) { 672 $response->add_link( $rel, $self ); 673 } 672 674 } 673 675 }
Note: See TracChangeset
for help on using the changeset viewer.