[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 Feb 20 09:03:47 UTC 2017


#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:  Future
Component:  REST API                             |  Release
 Severity:  normal                               |     Version:  4.4
 Keywords:  has-patch has-unit-tests needs-      |  Resolution:
  refresh                                        |     Focuses:  rest-api
-------------------------------------------------+-------------------------

Comment (by rheinardkorf):

 Replying to [comment:26 jnylen0]:
 > So, we'll need to compute the value of this parameter (either `false`,
 `true`, or an array) before calling `response_to_data`, and then pass it
 down to `embed_links` (with a default value of `true`).

 That sounds like a reasonable approach.


 > We can also make some further improvements to the test cases:
 > ...
 > I'm also happy to handle any of these further improvements later.

 I'm happy with later too.

 > Finally, you had asked about getting this change into 4.7.3.  For this
 release we are targeting fixes with potential backwards-compatibility
 implications, as these need to be made sooner rather than later.  Since
 this is a pretty clean enhancement, and it's not quite ready yet, I think
 we can hold off until 4.8 or a potential 4.7.4.
 >
 > If you need this functionality in the meantime, then I would recommend
 creating a plugin.  Here is a
 [https://gist.github.com/joehoyle/12e37c293adf2bb0ea1b potential starting
 point] for such a plugin.

 That is a great help. I might work on it via a plugin for now and that is
 a good starting point thanks.

 I'm going to keep this ticket in my to do pile, but seeing that we're only
 talking a potential 4.8 I think I might focus on a plugin to add this
 functionality.

 Thanks @jnylen0, thats been a great help.

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


More information about the wp-trac mailing list