[wp-hackers] detecting type of edit for parent_save_pre
steve at sltaylor.co.uk
Sun Nov 22 16:53:58 UTC 2009
Thanks, good tip. I guess this would skip Quick Edits too though?
I've started another thread about the problems with that - for now
I've actually disabled Quick Edit for pages where I've locked the
slug. It's tempting to use DOING_AJAX to filter autosaves as it
currently makes no difference, but I'll have to come up with something
more specific if/when I solve the Quick Edit issue.
2009/11/21 Dion Hulse (dd32) <wordpress at dd32.id.au>:
> 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>
>> 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.
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers