[wp-hackers] Single Action hook for _new_ posts of any type?

John Blackbourn johnbillion+wp at gmail.com
Wed Aug 4 01:05:35 UTC 2010

On Tue, Aug 3, 2010 at 11:28 PM, Peter Adams <peter at oncefuture.com> wrote:
> right. thanks.
> But how do you tell if it's an auto-save that is firing the hook?
> Seems like this hook shouldn't get called on an auto-save but it does from what i can tell...

There are two helper functions available for just this -
wp_is_post_autosave($post_id) and wp_is_post_revision($post_id).


More information about the wp-hackers mailing list