[wp-trac] [WordPress Trac] #39696: REST API: Filter which links get embedded when passing the ?_embed query parameter

WordPress Trac noreply at wordpress.org
Mon Nov 25 23:26:47 UTC 2019


#39696: REST API: Filter which links get embedded when passing the ?_embed query
parameter
---------------------------------------------------+-----------------------
 Reporter:  rheinardkorf                           |       Owner:  jnylen0
     Type:  enhancement                            |      Status:  assigned
 Priority:  normal                                 |   Milestone:  5.4
Component:  REST API                               |     Version:  4.4
 Severity:  normal                                 |  Resolution:
 Keywords:  has-patch has-unit-tests dev-feedback  |     Focuses:  rest-api
---------------------------------------------------+-----------------------
Changes (by TimothyBlynJacobs):

 * keywords:  has-patch has-unit-tests needs-refresh => has-patch has-unit-
     tests dev-feedback


Comment:

 Uploaded a refresh patch mostly following @jnylen0's latest outline of
 functionality.

 Currently, the patch continues to check for the `$_GET` variable instead
 of pulling it from the `WP_REST_Request` object. I think that is a bit
 safer back-compat wise.

 I'm not strongly opposed to changing it to pull from the `WP_REST_Request`
 object if we think the impact will be low enough and it provides a
 meaningful benefit. But right now, even if we pulled from the request
 object, embeds still wouldn't work for internal requests.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39696#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list