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

WordPress Trac noreply at wordpress.org
Fri Jan 27 23:16:48 UTC 2017


#39696: REST API: Filter which links get embedded when passing the ?_embed query
parameter
-------------------------------------------------+-------------------------
 Reporter:  rheinardkorf                         |       Owner:
     Type:  enhancement                          |  adamsilverstein
 Priority:  normal                               |      Status:  assigned
Component:  REST API                             |   Milestone:  Awaiting
 Severity:  normal                               |  Review
 Keywords:  2nd-opinion needs-refresh needs-     |     Version:  4.7.1
  unit-tests                                     |  Resolution:
                                                 |     Focuses:  rest-api
-------------------------------------------------+-------------------------

Comment (by jnylen0):

 If `_embed` is parsed as a standard parameter using the REST API parameter
 parsing logic, then JSON parameters should "just work".

 However, looking through the current code I see that this is not the case.
 So I guess we can just stick with `$_GET['_embed']` and not worry about
 JSON parsing for now.

 I am strongly -1 on adding a new parameter here.  We can pretty easily
 support both existing and new use cases with the same parameter - the
 `?_embed` cases I outlined above should be sufficient.

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


More information about the wp-trac mailing list