[wp-hackers] detecting type of edit for parent_save_pre

Dion Hulse (dd32) wordpress at dd32.id.au
Sat Nov 21 22:07:00 UTC 2009


checking for DOING_AJAX is the simplest way to avoid autosaves for a start

On Sun, 22 Nov 2009 05:29:10 +1100, Steve Taylor <steve at sltaylor.co.uk>  
wrote:

> Just tried this but ran into all sorts of trouble. To be honest I've
> lost track of what it was - I think it (or I) got confused about
> revisions being saved.
>
> In any case, I've fixed the original problem by detecting
> $_POST["attachments"] - it works, at least. I'll put the new, more
> serious issue in a new thread.... Bah.
>
>
> 2009/11/20 scribu <scribu at gmail.com>:
>> You should hook into 'save_post' instead and check by $post->post_type
>> instead of relying on the $_POST variable.
>>
>>
>> --
>> http://scribu.net
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the wp-hackers mailing list