- Timestamp:
- 07/22/2022 01:58:46 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r53759 r53760 1934 1934 $response = rest_ensure_response( $data ); 1935 1935 1936 $links = $this->prepare_links( $post ); 1937 $response->add_links( $links ); 1938 1939 if ( ! empty( $links['self']['href'] ) ) { 1940 $actions = $this->get_available_actions( $post, $request ); 1941 1942 $self = $links['self']['href']; 1943 1944 foreach ( $actions as $rel ) { 1945 $response->add_link( $rel, $self ); 1936 if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { 1937 $links = $this->prepare_links( $post ); 1938 $response->add_links( $links ); 1939 1940 if ( ! empty( $links['self']['href'] ) ) { 1941 $actions = $this->get_available_actions( $post, $request ); 1942 1943 $self = $links['self']['href']; 1944 1945 foreach ( $actions as $rel ) { 1946 $response->add_link( $rel, $self ); 1947 } 1946 1948 } 1947 1949 }
Note: See TracChangeset
for help on using the changeset viewer.