[wp-trac] [WordPress Trac] #36603: wp_publish_post() does not fire post_updated action
WordPress Trac
noreply at wordpress.org
Wed Apr 20 13:25:16 UTC 2016
#36603: wp_publish_post() does not fire post_updated action
-------------------------------+-----------------------------
Reporter: Rarst | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
{{{
do_action( 'post_updated', $post_ID, $post_after, $post_before);
}}}
Gives convenient access to before/after state of the post for actions that
are conditional on exact changes performed.
`wp_publish_post()` inconsistently doesn't fire this hook, even though it
does fire `edit_post` and `save_*` hooks that come before and after it.
This makes it impossible to rely on `post_updated` hook since it will
never fire for any update performed by `wp_publish_post()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36603>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list