Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#5815 closed enhancement (fixed)

Add an action just prior to updating an edited post

Reported by: tellyworth's profile tellyworth Owned by: ryan's profile ryan
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

This patch adds a new 'pre_post_update' action that runs just prior to saving an edited post.

Sample scenario: a plugin needs to notify an external web service of changes to posts. By the time edit_post and transition status actions run, the contents of the post prior to saving are no longer known - including the old URL, which may have changed if post_status or post_name were edited. The new action gives plugins a chance to fetch any post fields they need before they're changed.

If there's a better way to do it I'm happy to hear of it.

Attachments (1)

pre_post_update_action-r6744.patch (481 bytes) - added by tellyworth 16 years ago.

Download all attachments as: .zip

Change History (4)

#1 @lloydbudd
16 years ago

  • Milestone changed from 2.6 to 2.5

#2 @ryan
16 years ago

  • Owner changed from anonymous to ryan

#3 @ryan
16 years ago

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

(In [6938]) pre_post_update action from tellyworth. fixes #5815

Note: See TracTickets for help on using tickets.