#1681 closed defect (bug) (fixed)
Need a general post_saved hook
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 1.6 |
| Component: | General | Keywords: | post hooks |
| Focuses: | Cc: |
Description
There is a need for a generalized post_saved hook. This hook would function much the same as edit_post and post_publish with the exception that those two are only activated in certain post-updating situations.
edit_post only hooks when you are 'updating' a post. IE: it's been saved once already and is being changed.
publish_post only hooks when you change a post from one status to "publish" status.
The hook I propose (post_saved) would be activated whenever a post is saved, regardless of what status or state it's in. Mostly, this hook would be useful for having a single place to hook both publish and edit, but specifically it allows you to hook a post after it has been "Saved" to a draft.
(Neither of the other hooks come into play when clicking "Write -> Save", so playing with draft posts the first time they are saved isn't possible.)
a patch that adds the proposed hook -- real tough one ;)