diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 76802fe..13308e82 100644
a
|
b
|
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
286 | 286 | $response = parent::prepare_item_for_response( $post, $request ); |
287 | 287 | $data = $response->get_data(); |
288 | 288 | |
| 289 | if ( wp_attachment_is( 'audio', $post ) || wp_attachment_is( 'video', $post ) ) { |
| 290 | $data['featured_media'] = (int) get_post_thumbnail_id( $post->ID ); |
| 291 | } |
| 292 | |
289 | 293 | $data['description'] = array( |
290 | 294 | 'raw' => $post->post_content, |
291 | 295 | /** This filter is documented in wp-includes/post-template.php */ |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index f9de736..161f087 100644
a
|
b
|
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1824 | 1824 | 'attachment' => array( |
1825 | 1825 | 'title', |
1826 | 1826 | 'author', |
| 1827 | 'thumbnail', |
1827 | 1828 | 'comments', |
1828 | 1829 | 'revisions', |
1829 | 1830 | 'custom-fields', |