[wp-hackers] save_post action done twice
mail at scribu.net
Fri Oct 22 10:50:05 UTC 2010
On Fri, Oct 22, 2010 at 1:28 PM, Scott Bressler <sbressler at gmail.com> wrote:
> It seems that in hooking into the save_post action for saving the data in a
> custom meta-box, my callback is being called twice when either saving a
> draft post or updating a published post. If I instead hook into edit_post,
> my callback is only called once.
> Is this "double-calling" behavior with save_post expected? Should I be
> hooking into edit_post instead?
Yes, it's expected. You should be checking the post_type at the beginning of
More information about the wp-hackers