[wp-hackers] Insert stuff into the excerpt based on a custom field, wipe out custom field

Peter Westwood peter.westwood at ftwr.co.uk
Thu Sep 24 19:54:12 UTC 2009


On 24 Sep 2009, at 20:44, Matt Martz wrote:
>>>
>
> The problem is that you are hooking save_post and performing a
> wp_update_post within the callback.  wp_update_post causes the  
> save_post
> action to be fired again and thus you are creating a processing loop.
>


A better solution therefore would be to use the wp_insert_post_data  
filter and modify the data being inserted/updated before it hits the db.

Cheers

Peter
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-hackers mailing list