[wp-trac] [WordPress Trac] #38964: Add filter to allow modifying response *after* embedded data is adde

WordPress Trac noreply at wordpress.org
Tue Nov 29 01:37:41 UTC 2016


#38964: Add filter to allow modifying response *after* embedded data is adde
-------------------------+-----------------------------
 Reporter:  loboyle      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  REST API     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------------
Changes (by jnylen0):

 * keywords:   => needs-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 I think a `rest_post_embed` filter right in between
 `$this->response_to_data` and `wp_json_encode` is a good idea.  We haven't
 needed this yet on WP.com, but we probably will.

 This filter wouldn't work for Joe's example of adding granularity to
 embeds.  This should be handled in core instead, though - see #35613.

 See also #38131 regarding excluding specific fields from responses.

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


More information about the wp-trac mailing list