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

WordPress Trac noreply at wordpress.org
Sat Jan 28 20:03:44 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):

 Replying to [comment:15 rheinardkorf]:
 > Because of the issue mentioned earlier with the server relying on $_GET
 I've had to set $_GET within the tests. This is not ideal and needs to be
 addressed if the server gets updated (created #39727).

 I am not sure I agree with this approach.  I have not tried it yet, but
 your earlier idea (option 2) seems to be a better solution:

 > This would not be an issue if the `$request` object from
 `::serve_request()` were [...] passed to `::response_to_data()` (and
 subsequently passed to `::embed_links`).

 In any case I'll take a closer look this coming week.

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


More information about the wp-trac mailing list