[wp-trac] [WordPress Trac] #39805: Expose featured_media property on post resources in "embed" context

WordPress Trac noreply at wordpress.org
Tue Feb 7 16:38:22 UTC 2017


#39805: Expose featured_media property on post resources in "embed" context
-------------------------+-----------------------------
 Reporter:  kadamwhite   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 When you create a link relation that allows you to embed a post in a
 separate response, the "featured_media" property is omitted from that
 embedded post. This means that the only way to know the featured media
 item for an embedded post is to either re-request the embedded resource
 using the "view" or "edit" context, or else to use the _link to
 wp:featuredmedia (which _is_ present in the embedded resource, despite the
 omission of the featured_media property) to deduce the ID of the embedded
 post's associated media item.

 It would be more consistent and straightforward for the ID of the featured
 media for a post to be included in that post object when the post is
 embedded. To clarify, this is not suggesting the media item is recursively
 embedded: just that `featured_media: 4168` is included in that embedded
 post object.

 Thanks to @westonruter for raising this inconsistency.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39805>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list