[wp-hackers] Plugin options being cleared on save

Andrew Nacin wp at andrewnacin.com
Mon Oct 18 20:02:24 UTC 2010


Easiest way to do checkboxes is this:

$am_I_checked = ! empty( $_POST['checkbox'] );

I would avoid merging in arrays as things can sneak by. The sanitization
callback receives an array. Then build a second array key by key and return
that.

Nacin


More information about the wp-hackers mailing list