[wp-hackers] save_post action done twice
John Blackbourn
johnbillion+wp at gmail.com
Sat Oct 23 03:41:40 UTC 2010
Two handy functions for this scenario:
wp_is_post_revision( $post_id ) and wp_is_post_autosave( $post_id ).
John
On Fri, Oct 22, 2010 at 1:16 PM, scribu <mail at scribu.net> wrote:
> On Fri, Oct 22, 2010 at 1:52 PM, Scott Bressler <sbressler at gmail.com> wrote:
>
>> Is save_post better than edit_post? What cases would edit_post miss?
>>
>
> From the docblock of wp_insert_post():
>
> * @uses do_action() Calls 'edit_post' action on post ID and post data if
> this is an update.
> * @uses do_action() Calls 'save_post' and 'wp_insert_post' on post id and
> post data just before returning.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list