Пример #1
0
function thesis_save_design_options()
{
    if (!current_user_can('edit_themes')) {
        wp_die(__('Easy there, homey. You don’t have admin privileges to access theme options.', 'thesis'));
    }
    if (isset($_POST['submit'])) {
        $design_options = new Design();
        $design_options->get_design_options();
        $design_options->update_design_options();
        update_option('thesis_design_options', $design_options);
    }
    thesis_generate_css();
    wp_redirect(admin_url('admin.php?page=thesis-design-options&updated=true'));
}