Opened 12 years ago
Closed 11 years ago
#23759 closed enhancement (duplicate)
Pass $update to save_post and wp_insert_post actions
Reported by: | alex-ye | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | Cc: |
Description
For now it's hard to check if the post is updated or publish for the first time when using save_post and wp_insert_post hooks
Attachments (1)
Change History (8)
#4
in reply to:
↑ 3
@
12 years ago
Replying to SergeyBiryukov:
For now it's hard to check if the post is updated or publish for the first time
Post status transition actions can be used as a workaround:
http://codex.wordpress.org/Post_Status_Transitions
Related: #21450
Yes it could be used , but Post_Status_Transitions it's different form what I ask , especially when you want all things in one function I currently check $_POSTupdate? in the back-end , but what about when you make some staff in the front-end ...
I read the Related ticket but and I think we cant make the both in the core :)
#5
@
12 years ago
There are already pre_post_update, edit_post, and post_updated hooks. I'd rather not add something else to the ubiquitous save_post hook, too.
Post status transition actions can be used as a workaround:
http://codex.wordpress.org/Post_Status_Transitions
Related: #21450