Changeset 53760 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
- Timestamp:
- 07/22/2022 01:58:46 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
r53679 r53760 611 611 $response = rest_ensure_response( $data ); 612 612 613 $links = $this->prepare_links( $item ); 614 $response->add_links( $links ); 615 616 if ( ! empty( $links['self']['href'] ) ) { 617 $actions = $this->get_available_actions( $item, $request ); 618 619 $self = $links['self']['href']; 620 621 foreach ( $actions as $rel ) { 622 $response->add_link( $rel, $self ); 613 if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { 614 $links = $this->prepare_links( $item ); 615 $response->add_links( $links ); 616 617 if ( ! empty( $links['self']['href'] ) ) { 618 $actions = $this->get_available_actions( $item, $request ); 619 620 $self = $links['self']['href']; 621 622 foreach ( $actions as $rel ) { 623 $response->add_link( $rel, $self ); 624 } 623 625 } 624 626 }
Note: See TracChangeset
for help on using the changeset viewer.