Ticket #5815 (closed enhancement: fixed)

Opened 5 months ago

Last modified 5 months ago

Add an action just prior to updating an edited post

Reported by: tellyworth Assigned to: ryan
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords: has-patch
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

pre_post_update_action-r6744.patch (481 bytes) - added by tellyworth on 02/11/08 07:20:34.

Change History

02/11/08 07:20:34 changed by tellyworth

  • attachment pre_post_update_action-r6744.patch added.

02/11/08 16:36:14 changed by lloydbudd

  • milestone changed from 2.6 to 2.5.

02/19/08 08:21:40 changed by ryan

  • owner changed from anonymous to ryan.

02/20/08 16:46:44 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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