Пример #1
0
function thesis_options_head()
{
    wp_enqueue_style('thesis-options-stylesheet', THESIS_CSS_FOLDER . '/options.css');
    #wp
    if ($_GET['page'] == 'thesis-file-editor') {
        wp_enqueue_script('color-picker', THESIS_SCRIPTS_FOLDER . '/jscolor/jscolor.js');
    } elseif ($_GET['page'] == 'options-manager') {
        $manager = new thesis_options_manager();
        $manager->add_js();
        $manager->manage_options();
    } else {
        wp_enqueue_script('jquery-ui-core');
        #wp
        wp_enqueue_script('jquery-ui-sortable');
        #wp
        wp_enqueue_script('jquery-ui-tabs');
        #wp
        wp_enqueue_script('thesis-admin-js', THESIS_SCRIPTS_FOLDER . '/thesis.js');
        #wp
        if ($_GET['page'] == 'thesis-design-options') {
            wp_enqueue_script('color-picker', THESIS_SCRIPTS_FOLDER . '/jscolor/jscolor.js');
        }
        #wp
    }
}
Пример #2
0
function thesis_options_head()
{
    wp_enqueue_style('thesis-options-stylesheet', THESIS_CSS_FOLDER . '/options.css');
    #wp
    if ($_GET['page'] == 'thesis-file-editor') {
        require_once ABSPATH . 'wp-admin/includes/misc.php';
        #wp
        wp_enqueue_script('color-picker', THESIS_SCRIPTS_FOLDER . '/jscolor/jscolor.js');
        #wp
        if (function_exists('use_codepress')) {
            wp_enqueue_script('codepress');
        }
        if (use_codepress()) {
            add_action('admin_print_footer_scripts', 'codepress_footer_js');
        }
    } elseif ($_GET['page'] == 'options-manager') {
        $manager = new thesis_options_manager();
        $manager->add_js();
        $manager->manage_options();
    } else {
        wp_enqueue_script('jquery-ui-core');
        #wp
        wp_enqueue_script('jquery-ui-sortable');
        #wp
        wp_enqueue_script('jquery-ui-tabs');
        #wp
        wp_enqueue_script('thesis-admin-js', THESIS_SCRIPTS_FOLDER . '/thesis.js');
        #wp
        if ($_GET['page'] == 'thesis-design-options') {
            wp_enqueue_script('color-picker', THESIS_SCRIPTS_FOLDER . '/jscolor/jscolor.js');
        }
        #wp
    }
}