[wp-trac] [WordPress Trac] #41445: post_parent can prevent media from embedding correctly
WordPress Trac
noreply at wordpress.org
Wed Jan 31 22:42:30 UTC 2018
#41445: post_parent can prevent media from embedding correctly
--------------------------+------------------------------
Reporter: loboyle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.8.3
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: rest-api
--------------------------+------------------------------
Comment (by stuartfeldt):
So can we override `get_item_permissions_check` in
`WP_REST_Attachments_Controller`, and then check if the requested
attachment id is also set as _thumbnail_id postmeta -- and then if the
request attachment id is a thumbnail on a published post allow it in the
wp:featuredmedia response?
Or is that too much overhead to check all of `wp_postmeta` for each of
these calls?
I'm happy to submit a patch if this is an acceptable approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41445#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list