Changeset 53760 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php
- 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-block-directory-controller.php
r53315 r53760 119 119 // Restores the more descriptive, specific name for use within this method. 120 120 $plugin = $item; 121 122 $fields = $this->get_fields_for_response( $request ); 121 123 122 124 // There might be multiple blocks in a plugin. Only the first block is mapped. … … 147 149 148 150 $response = new WP_REST_Response( $block ); 149 $response->add_links( $this->prepare_links( $plugin ) ); 151 152 if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { 153 $response->add_links( $this->prepare_links( $plugin ) ); 154 } 150 155 151 156 return $response;
Note: See TracChangeset
for help on using the changeset viewer.