[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 20:49:40 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):

 I think we should stick with `_embed` and make sure all of these work,
 with appropriate test cases:

 - `?_embed`: all embeds
 - `?_embed=1`: all embeds
 - `?_embed=true`: all embeds
 - `?_embed=author,wp:term`: as expected
 - `?_embed[]=author&_embed[]=wp:term`: as expected
 - JSON `{ _embed: true }`: all embeds
 - JSON `{ _embed: 'author,wp:term' }`: as expected
 - JSON `{ _embed: [ 'author', 'wp:term' ] }`: as expected

 And probably POST params as well, though most of that should just fall
 into place if the implementation is correct.

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


More information about the wp-trac mailing list