[wp-hackers] Plugin options being cleared on save

Scott Bressler sbressler at gmail.com
Mon Oct 18 16:46:49 UTC 2010


I'm saving a plugin's options into a serialized array. On plugin activation,
I insert a version number into the array, which properly appears when I
check the database. However, when I save the options that I added to the
"Writing" screen (using add_settings_section, add_settings_field, and
register_setting), which let the user change the other two settings in the
serialized array, the version number is removed from the array.

Any idea why the version number is kicked out of the array on first save?

Thanks!

-Scott


More information about the wp-hackers mailing list