[wp-trac] [WordPress Trac] #42864: REST API: Fire an action after items are completely inserted/updated

WordPress Trac noreply at wordpress.org
Mon Dec 11 03:41:28 UTC 2017


#42864: REST API: Fire an action after items are completely inserted/updated
--------------------------+-----------------------
 Reporter:  pento         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.0
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+-----------------------

Comment (by joemcgill):

 One side affect of this behavior is that if you're trying to support post
 meta in revisions, there is no hook that fires at the end of the process,
 meaning meta gets out of sync by one revision each time a new post + meta
 is saved.

 Relevant code is in `WP_REST_Posts_Controller::update_item()` and it may
 be relevant that the `rest_insert_*` hooks were moved to higher up in the
 method in r39288.

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


More information about the wp-trac mailing list