예제 #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
    }
}
예제 #3
0
    function options_page()
    {
        $rtl = get_bloginfo('text_direction') == 'rtl' ? ' rtl' : '';
        #wp
        echo "<div id=\"thesis_options\" class=\"wrap{$rtl}\">\n";
        thesis_version_indicator();
        thesis_options_title(__('Thesis Options Manager', 'thesis'), false);
        thesis_options_nav();
        thesis_options_status_check();
        thesis_options_manager::status_check();
        ?>
	<div class="options_column">
		<div class="options_module positive" id="download-thesis-options">
			<h3><?php 
        _e('Download Options', 'thesis');
        ?>
</h3>
			<div class="module_subsection">
				<h4><?php 
        _e('Site Options', 'thesis');
        ?>
</h4>
				<p class="add_extra_margin"><a class="action_button" href="<?php 
        echo wp_nonce_url(admin_url('admin.php?page=options-manager&amp;download=site'), 'thesis-download-site');
        ?>
">Download Site Options</a></p>
			</div>
			<div class="module_subsection">
				<h4><?php 
        _e('Design Options', 'thesis');
        ?>
</h4>
				<p class="add_extra_margin"><a class="action_button" href="<?php 
        echo wp_nonce_url(admin_url('admin.php?page=options-manager&amp;download=design'), 'thesis-download-design');
        ?>
">Download Design Options</a></p>
			</div>
			<div class="module_subsection">
				<h4><?php 
        _e('All Options', 'thesis');
        ?>
</h4>
				<p><a class="action_button" href="<?php 
        echo wp_nonce_url(admin_url('admin.php?page=options-manager&amp;download=all'), 'thesis-download-all');
        ?>
">Download All Options</a></p>
			</div>
		</div>
		<div class="options_module negative" id="default-thesis-options">
			<h3><?php 
        _e('Restore Default Options', 'thesis');
        ?>
</h3>
			<div class="module_subsection">
				<h4><?php 
        _e('Site Options', 'thesis');
        ?>
</h4>
				<p class="add_extra_margin"><a class="action_button" href="<?php 
        echo wp_nonce_url(admin_url('admin.php?page=options-manager&amp;restore=site'), 'thesis-restore-site');
        ?>
" onclick="return confirm_choice('default', 'Site');">Restore Default Site Options</a></p>
			</div>
			<div class="module_subsection">
				<h4><?php 
        _e('Design Options', 'thesis');
        ?>
</h4>
				<p class="add_extra_margin"><a class="action_button" href="<?php 
        echo wp_nonce_url(admin_url('admin.php?page=options-manager&amp;restore=design'), 'thesis-restore-design');
        ?>
" onclick="return confirm_choice('default', 'Design');">Restore Default Design Options</a></p>
			</div>
			<div class="module_subsection">
				<h4><?php 
        _e('All Options', 'thesis');
        ?>
</h4>
				<p><a class="action_button" href="<?php 
        echo wp_nonce_url(admin_url('admin.php?page=options-manager&amp;restore=all'), 'thesis-restore-all');
        ?>
" onclick="return confirm_choice('default', 'All');">Restore All Default Options</a></p>
			</div>
		</div>
	</div>
	<div class="options_column">
		<div class="options_module positive" id="upload-thesis-options">
			<h3><?php 
        _e('Upload Options', 'thesis');
        ?>
</h3>
			<div class="module_subsection">
				<h4><?php 
        _e('Site Options', 'thesis');
        ?>
</h4>
				<form method="post" enctype="multipart/form-data">
					<?php 
        wp_nonce_field('thesis-upload-site', '_wpnonce-thesis-upload-site');
        ?>
					<input type="hidden" name="upload" value="site" />
					<p class="form_input">
						<input type="file" class="text_input" name="file" id="options-file" />
						<label for="file">upload <strong>Thesis Site Options</strong> file</label>
					</p>
					<p class="upload_button"><input type="submit" value="Upload" onclick="return confirm_choice('upload', 'Site');" /></p>
				</form>
			</div>
			<div class="module_subsection">
				<h4><?php 
        _e('Design Options', 'thesis');
        ?>
</h4>
				<form method="post" enctype="multipart/form-data">
					<?php 
        wp_nonce_field('thesis-upload-design', '_wpnonce-thesis-upload-design');
        ?>
					<input type="hidden" name="upload" value="design" />
					<p class="form_input">
						<input type="file" class="text_input" name="file" id="design-options-file" />
						<label for="file">upload <strong>Thesis Design Options</strong> file</label>
					</p>
					<p class="upload_button"><input type="submit" value="Upload" onclick="return confirm_choice('upload', 'Design');" /></p>
				</form>
			</div>
			<div class="module_subsection">
				<h4><?php 
        _e('All Options', 'thesis');
        ?>
</h4>
				<form method="post" enctype="multipart/form-data">
					<?php 
        wp_nonce_field('thesis-upload-all', '_wpnonce-thesis-upload-all');
        ?>
					<input type="hidden" name="upload" value="all" />
					<p class="form_input">
						<input type="file" class="text_input" name="file" id="all-options-file" />
						<label for="file">upload <strong>Thesis All Options</strong> file</label>
					</p>
					<p class="upload_button"><input type="submit" value="Upload" onclick="return confirm_choice('upload', 'All');" /></p>
				</form>
			</div>
		</div>
	</div>
<?php 
        echo "</div>\n";
    }