REST API: Include featured_media in embed responses.

Props kadamwhite, jnylen0, westonruter.
Fixes #39805.


git-svn-id: https://develop.svn.wordpress.org/trunk@40602 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan McCue
2017-05-10 04:45:10 +00:00
parent 292a871e44
commit faa6386ca0
2 changed files with 101 additions and 1 deletions

View File

@@ -1966,7 +1966,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
$schema['properties']['featured_media'] = array(
'description' => __( 'The ID of the featured media for the object.' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'context' => array( 'view', 'edit', 'embed' ),
);
break;