[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:29:58 UTC 2020
#45114: Fire publishing related hooks after all data is saved via the REST API.
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner:
| peterwilsoncc
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.6
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-dev-note has-patch commit dev- | Focuses:
reviewed |
-------------------------------------------------+-------------------------
Comment (by johnbillion):
Spotted an issue here: https://github.com/WordPress/wordpress-
develop/blob/17be19d0c4edcad9e4de0c70d877914ce65b7040/src/wp-
admin/includes/post.php#L683-L696
`wp_after_insert_post()` gets called twice on the new post screen due to
this. The `$fire_after_hooks` parameter of `wp_insert_post()` is set to
true but `wp_after_insert_post()` is also manually called after setting
the post format.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45114#comment:71>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list