=')) $menu[30] = array('', 'read', 'separator-thesis', '', 'wp-menu-separator'); add_menu_page(__('Thesis', 'thesis'), __('Thesis', 'thesis'), 'edit_themes', 'thesis-options', array('thesis_site_options', 'options_page'), THESIS_IMAGES_FOLDER . '/icon-swatch.png', 31); #wp add_submenu_page('thesis-options', __('Site Options', 'thesis'), __('Site Options', 'thesis'), 'edit_themes', 'thesis-options', array('thesis_site_options', 'options_page')); #wp add_submenu_page('thesis-options', __('Design Options', 'thesis'), __('Design Options', 'thesis'), 'edit_themes', 'thesis-design-options', array('thesis_design_options', 'options_page')); #wp add_submenu_page('thesis-options', __('Page Options', 'thesis'), __('Page Options', 'thesis'), 'edit_themes', 'thesis-pages', array('thesis_page_options', 'options_page')); #wp add_submenu_page('thesis-options', __('Custom File Editor', 'thesis'), __('Custom File Editor', 'thesis'), 'edit_themes', 'thesis-file-editor', array('thesis_custom_editor', 'options_page')); #wp add_submenu_page('thesis-options', __('Manage Options', 'thesis'), __('Manage Options', 'thesis'), 'edit_themes', 'options-manager', array('thesis_options_manager', 'options_page')); #wp } 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 } } /*---:[ random admin file functions that will probably have a new home at some point as Thesis grows ]:---*/ function thesis_version_indicator($depth = 1) { $indent = str_repeat("\t", $depth); echo "$indent" . sprintf(__('You are rocking Thesis version %1$s', 'thesis'), thesis_version()) . "\n"; } function thesis_options_title($title, $switch = true, $depth = 1) { $indent = str_repeat("\t", $depth); $master_switch = ($switch) ? ' +' : ''; echo "$indent

$title$master_switch

\n"; } function thesis_options_nav($depth = 1) { $indent = str_repeat("\t", $depth); echo "$indent\n"; } function thesis_options_status_check($depth = 1) { $indent = str_repeat("\t", $depth); if ($_GET['updated']) { echo "$indent
\n"; echo "$indent\t

" . __('Options updated!', 'thesis') . ' ' . __('Check out your site →', 'thesis') . "

\n"; echo "$indent
\n"; } elseif ($_GET['upgraded']) { echo "$indent
\n"; echo "$indent\t

" . sprintf(__('Nicely done—Thesis %1$s is ready to rock. Take a moment to browse around the options panels and check out the new awesomeness, or simply check out your site now.', 'thesis'), thesis_version(), get_bloginfo('url') . '/') . "

\n"; echo "$indent
\n"; } } function thesis_is_css_writable() { if (file_exists(THESIS_CUSTOM)) { $location = '/thesis/custom/layout.css'; $folder = false; } elseif (file_exists(TEMPLATEPATH . '/custom-sample')) { $location = '/thesis/custom-sample/layout.css'; $folder = "
\n\t

" . __('Attention! In order to take advantage of all the controls that Thesis offers, you need to change the name of your custom-sample folder to custom.', 'thesis') . "

\n
\n"; } if (!is_writable(THESIS_LAYOUT_CSS)) echo "
\n\t

" . __('Attention!', 'thesis') . ' ' . sprintf(__('Your ' . $location . ' file is not writable by the server, and in order to work the full extent of its magic, Thesis needs to be able to write to this file. All you have to do is set your layout.css file permissions to 666, and you\'ll be good to go. After setting your file permissions, you should head to the Design Options page and hit the save button.', 'thesis'), get_bloginfo('wpurl') . '/wp-admin/admin.php?page=thesis-design-options') . "

\n
\n"; if ($folder) echo $folder; } function thesis_massage_code($code) { echo htmlentities(stripslashes($code), ENT_COMPAT); } function thesis_save_button_text() { global $thesis_site; echo ($thesis_site->save_button_text) ? trim(wptexturize($thesis_site->save_button_text)) : __('Big Ass Save Button', 'thesis'); }