function userpro_ed_get_option($option) { $userpro_default_options = userpro_ed_default_options(); $settings = get_option('userpro_ed'); switch ($option) { default: if (isset($settings[$option])) { return $settings[$option]; } else { return $userpro_default_options[$option]; } break; } }
function reset() { update_option('userpro_ed', userpro_ed_default_options()); $this->options = array_merge($this->options, userpro_ed_default_options()); echo '<div class="updated"><p><strong>' . __('Settings are reset to default.', 'userpro') . '</strong></p></div>'; }