[wp-trac] [WordPress Trac] #45114: Publish posts and fire related hooks on `rest_after_insert_{$this->post_type}` for rest requests.

WordPress Trac noreply at wordpress.org
Sun Oct 21 21:38:04 UTC 2018


#45114: Publish posts and fire related hooks on
`rest_after_insert_{$this->post_type}` for rest requests.
---------------------------+------------------------------
 Reporter:  peterwilsoncc  |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  REST API       |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by peterwilsoncc):

 `wp_is_json_request()` was added in [43730] for #44534.

 It doesn't handle internal requests but it would be helpful if it did.

 I've realised my pseudo code won't work either as an internally dispatched
 request from another REST request such as those in
 `\WP_REST_Server::embed_links()` would remove the filter.

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


More information about the wp-trac mailing list