[wp-hackers] Handling Custom Meta Boxes

Dylan Kuhn dylankkuhn at gmail.com
Thu Dec 24 19:53:28 UTC 2009

> I'm curious how most plugin developers handle saving settings from custom
> post meta_boxes.  I've always handled this by adding an action to save the
> result on 'save_post' and only updating if DOING_AUTOSAVE wasn't defined.
>  The problem with doing this, is that the save_post action is also called
> when a scheduled item is moved to published.  If this happens, the posted
> values from the meta_box isn't available and I can't alway use isset since
> that means I can never use checkboxes for input.

I find it helpful sometimes to have an input of type="hidden", which
allows me to use isset() to determine if data from my meta box is
included in the posted data.


More information about the wp-hackers mailing list