示例#1
0
function userpro_rd_get_option($option)
{
    $userpro_default_options = userpro_rd_default_options();
    $settings = get_option('userpro_rd');
    switch ($option) {
        default:
            if (isset($settings[$option])) {
                return $settings[$option];
            } else {
                return $userpro_default_options[$option];
            }
            break;
    }
}
示例#2
0
 function reset()
 {
     update_option('userpro_rd', userpro_rd_default_options());
     $this->options = array_merge($this->options, userpro_rd_default_options());
     echo '<div class="updated"><p><strong>' . __('Settings are reset to default.', 'userpro') . '</strong></p></div>';
 }