Make WordPress Core

Opened 21 years ago

Closed 21 years ago

Last modified 19 years ago

#1681 closed defect (bug) (fixed)

Need a general post_saved hook

Reported by: chuyskywalker's profile chuyskywalker 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.)

Attachments (1)

post_saved.diff (410 bytes) - added by chuyskywalker 21 years ago.
a patch that adds the proposed hook -- real tough one ;)

Download all attachments as: .zip

Change History (3)

@chuyskywalker
21 years ago

a patch that adds the proposed hook -- real tough one ;)

#1 @matt
21 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2887]) Fixes #1681 and the annoying empty meta problem.

#2 @(none)
19 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.