[wp-trac] [WordPress Trac] #54498: New FSE REST Endpoints may need to manually call `wp_after_insert_post()`

WordPress Trac noreply at wordpress.org
Wed Nov 24 01:51:19 UTC 2021


#54498: New FSE REST Endpoints may need to manually call `wp_after_insert_post()`
---------------------------+--------------------
 Reporter:  peterwilsoncc  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  5.9
Component:  REST API       |    Version:
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+--------------------
 The following REST API endpoints used for FSE store data in the post table
 and may need to be altered to manually call `wp_after_insert_post()` after
 disabling it as part of the call to `wp_insert_post()` and related
 functions.

 The purpose of the `wp_after_insert_post` hook (fired by the function of
 the same name) is to fire after all data for a post has been updated: the
 post object, the terms and the meta data.

 * `WP_REST_Global_Styles_Controller::update_item()` may update meta data
 after the call to `wp_update_post()`
 * `WP_REST_Menu_Items_Controller` both for create and update methods. This
 may require changes to the signature for `wp_update_nav_menu_item()`
 * `WP_REST_Templates_Controller` both for create and update methods.

 I've put this on the 5.9 milestone for consideration as it relates to the
 FSE features.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54498>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list