Esempio n. 1
0
function inkthemes_optionsframework_add_admin()
{
    global $query_string;
    $themename = cc_get_option('of_themename');
    $shortname = cc_get_option('of_shortname');
    if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'optionsframework') {
        if (isset($_REQUEST['of_save']) && 'reset' == $_REQUEST['of_save']) {
            $options = cc_get_option('of_template');
            inkthemes_reset_options($options, 'optionsframework');
            header("Location: admin.php?page=optionsframework&reset=true");
            die;
        }
    }
}
Esempio n. 2
0
function inkthemes_optionsframework_add_admin()
{
    global $query_string;
    if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'optionsframework') {
        if (isset($_REQUEST['of_save']) && 'reset' == $_REQUEST['of_save']) {
            inkthemes_reset_options();
            header("Location: admin.php?page=optionsframework&reset=true");
            die;
        }
    }
    $theme_option = inkthemes_options();
    $themename = $theme_option['theme_name'];
    $of_page = add_theme_page($themename, __('Theme Options', 'colorway'), 'edit_theme_options', 'optionsframework', 'inkthemes_optionsframework_options_page', 'div');
    // Add framework functionaily to the head individually
    add_action("admin_print_scripts-{$of_page}", 'inkthemes_load_only');
}