[wp-trac] [WordPress Trac] #45114: Fire publishing related hooks after all data is saved via the REST API.

WordPress Trac noreply at wordpress.org
Tue Dec 1 20:55:20 UTC 2020


#45114: Fire publishing related hooks after all data is saved via the REST API.
-------------------------------------------------+-------------------------
 Reporter:  peterwilsoncc                        |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.6
Component:  REST API                             |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-dev-note has-patch commit dev-   |     Focuses:
  reviewed                                       |
-------------------------------------------------+-------------------------

Comment (by johnbillion):

 In [changeset:"49732" 49732]:
 {{{
 #!CommitTicketReference repository="" revision="49732"
 REST API: Pass the previous state of the post as a parameter to the
 `wp_after_insert_post` hook.

 This enables, for example, the previous post status to be used by this
 hook without the need to first capture it on an earlier hook.

 This also fixes the value of the `$fire_after_hooks` parameter in
 `get_default_post_to_edit()` so the `wp_after_insert_post` action
 correctly fires just once on the new post screen.

 This merges [45114] into the 5.6 branch

 See #45114
 }}}

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


More information about the wp-trac mailing list