[wp-hackers] Access to Previous Post Content

Bill Smith ml_wordpress at copperleaf.org
Wed May 9 17:05:01 GMT 2007


Hi,

I'm trying to get access to the previous content of an updated post. In 
other words, if a post is being updated, I'd like a chance to query the 
old post content *before* the new content is written. I've looked at the 
save_post action, but obviously that occurs after the post has been 
updated. Looking at the source for the wp_insert_post function, none of 
the filters that are called will give me the post id. Is there a way to 
do this? I thought about creating a query based on the slug which I can 
get with the name_save_pre filter, but not sure if that's the best way.

Bill


More information about the wp-hackers mailing list