evertiro / Username-Changer

A simple plugin to change registered usernames.
http://wordpress.org/plugins/username-changer/
GNU General Public License v2.0
4 stars 5 forks source link

If all checkboxes are unchecked when a multifield is saved, the settings are now properly saved #11

Closed Gnifle closed 7 years ago

Gnifle commented 7 years ago

Fixes #10

Adds a hidden field to all multifield checkbox field groups, with a reference to the field group ID.

Adds a hook on pre_update_option_{$option} from option.php to the function multicheck_empty_validation().

Adds the function multicheck_empty_validation() that handles validation of whether a multifield field group was empty (all unchecked) or not. If empty, ensures that the value is still updated to an empty array.

evertiro commented 7 years ago

Sorry it took so long for me to notice! Can you submit the same bug to the actual S214-Settings library repo? That's an upstream bug more than a bug in Username Changer.