Tag Info

New answers tagged

1

You appear to have the validation function commented out. Try this one for testing only: // WARNING THIS IS HORRIBLY UNSAFE DO NOT USE IN LIVE SITES function plugin_options_validate($input) { return $input; } Now do your options save? Validation functions are not optional. They take the settings, validate them, and return the valid ones. If you don't ...


0

An option is a meta information saved in the database as a string. An array is a memory specific variable that has its own characteristics. But to every problem there is a workaround: $myoption = json_encode($the_array(); add_option('myoption', $myoption, '', 'yes'); Now to fetch it: $myoption = json_decode(get_option('myoption')); Voila. When saving ...



Top 50 recent answers are included