function options_page() { global $thesis_site, $thesis_data; $head = $thesis_site->head; $javascript = $thesis_site->javascript; $nav = $thesis_site->nav; $home = $thesis_site->home; $publishing = $thesis_site->publishing; $custom = $thesis_site->custom; $rtl = get_bloginfo('text_direction') == 'rtl' ? ' rtl' : ''; #wp echo "<script>jQuery.noConflict();function charCount(ctrlId, counterId){jQuery(counterId).val(jQuery(ctrlId).val().trim().length);}</script>\n"; echo "<div id=\"thesis_options\" class=\"wrap{$rtl}\">\n"; thesis_version_indicator(); thesis_options_title(__('Thesis Site Options', 'thesis')); thesis_options_nav(); thesis_options_status_check(); if (version_compare($thesis_site->version, thesis_version()) < 0) { ?> <form id="upgrade_needed" action="<?php echo admin_url('admin-post.php?action=thesis_upgrade'); ?> " method="post"> <h3><?php _e('Oooh, Exciting!', 'thesis'); ?> </h3> <p><?php _e('It’s time to upgrade your Thesis, which means there’s new awesomeness in your immediate future. Click the button below to fast-track your way to the awesomeness!', 'thesis'); ?> </p> <p><input type="submit" class="upgrade_button" id="teh_upgrade" name="upgrade" value="<?php _e('Upgrade Thesis', 'thesis'); ?> " /></p> </form> <?php } else { thesis_is_css_writable(); ?> <form class="thesis" action="<?php echo admin_url('admin-post.php?action=thesis_options'); ?> " method="post"> <div class="options_column"> <div class="options_module" id="document-head"> <h3><?php _e('Document Head', 'thesis'); ?> <code><head></code></h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Title Tag Settings', 'thesis'); ?> <code><title></code></h4> <div class="more_info"> <p><?php _e('As far as <acronym title="Search Engine Optimization">SEO</acronym> is concerned, this is the single most important element on your site. For all pages except the home page, Thesis will construct your <code><title></code> tags automatically according to the settings below, but you can override these settings by adding a custom <code><title></code> to any post or page via the post editing screen.', 'thesis'); ?> </p> <ul class="add_margin"> <li><input type="checkbox" id="head[title][branded]" name="head[title][branded]" value="1" <?php if ($head['title']['branded']) { echo 'checked="checked" '; } ?> /><label for="head[title][branded]"><?php _e('Append site name to page titles', 'thesis'); ?> </label></li> </ul> <p class="form_input add_margin"> <input type="text" class="text_input short" id="head[title][separator]" name="head[title][separator]" value="<?php echo $head['title']['separator'] ? urldecode($head['title']['separator']) : __('—', 'thesis'); ?> " /> <label for="head[title][separator]"><?php _e('Character separator in titles', 'thesis'); ?> </label> </p> <p class="tip"><?php printf(__('You can set your home page <code><title></code> tag in the Home Page SEO box on this page. For categories and tags, visit the <a href="%1$s">edit category</a> and <a href="%2$s">edit tag</a> pages within WordPress.', 'thesis'), admin_url('edit-tags.php?taxonomy=category'), admin_url('edit-tags.php')); ?> </p> </div> </div> <div class="module_subsection" id="robots-meta"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Robots Meta Tags', 'thesis'); ?> <code><meta></code></h4> <div class="more_info"> <div class="mini_module indented_module" id="robots-noindex"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Noindex', 'thesis'); ?> <code>noindex</code></h5> <div class="more_info"> <p><?php _e('Adding the <code>noindex</code> robot meta tag is a great way to fine-tune your site’s <acronym title="Search Engine Optimization">SEO</acronym> by streamlining the amount of pages that get indexed by the search engines. The options below will help you prevent the indexing of “bloat” pages that do nothing but dilute your search results and keep you from ranking as well as you should.', 'thesis'); ?> </p> <ul> <?php foreach ($head['meta']['robots']['noindex'] as $page_type => $value) { $checked = $value ? 'checked="checked" ' : ''; echo "\t\t\t\t\t\t\t\t\t" . '<li><input type="checkbox" id="head[meta][robots][noindex][' . $page_type . ']" name="head[meta][robots][noindex][' . $page_type . ']" value="1" ' . $checked . '/><label for="head[meta][robots][noindex][' . $page_type . ']">' . sprintf(__('<code>noindex</code> %s pages', 'thesis'), $page_type) . '</label></li>' . "\n"; } ?> </ul> </div> </div> <div class="mini_module indented_module" id="robots-nofollow"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Nofollow', 'thesis'); ?> <code>nofollow</code></h5> <div class="more_info"> <p><?php _e('The <code>nofollow</code> robot meta tag is another useful tool for nailing down your site’s <acronym title="Search Engine Optimization">SEO</acronym>. Links from pages with the <code>nofollow</code> meta tag won’t pass any juice.', 'thesis'); ?> </p> <ul> <?php foreach ($head['meta']['robots']['nofollow'] as $page_type => $value) { $checked = $value ? 'checked="checked" ' : ''; echo "\t\t\t\t\t\t\t\t\t" . '<li><input type="checkbox" id="head[meta][robots][nofollow][' . $page_type . ']" name="head[meta][robots][nofollow][' . $page_type . ']" value="1" ' . $checked . '/><label for="head[meta][robots][nofollow][' . $page_type . ']">' . sprintf(__('Add <code>nofollow</code> to %s pages', 'thesis'), $page_type) . '</label></li>' . "\n"; } ?> </ul> </div> </div> <div class="mini_module indented_module" id="robots-noarchive"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Noarchive', 'thesis'); ?> <code>noarchive</code></h5> <div class="more_info"> <p><?php _e('The <code>noarchive</code> robot meta tag prevents search engines and Internet archive services from saving cached versions of pages on your site. Generally, people use this to protect their privacy, but there are certainly times when having access to archived versions of your pages might prove useful.', 'thesis'); ?> </p> <ul> <?php foreach ($head['meta']['robots']['noarchive'] as $page_type => $value) { $checked = $value ? 'checked="checked" ' : ''; echo "\t\t\t\t\t\t\t\t\t" . '<li><input type="checkbox" id="head[meta][robots][noarchive][' . $page_type . ']" name="head[meta][robots][noarchive][' . $page_type . ']" value="1" ' . $checked . '/><label for="head[meta][robots][noarchive][' . $page_type . ']">' . sprintf(__('Add <code>noarchive</code> to %s pages', 'thesis'), $page_type) . '</label></li>' . "\n"; } ?> </ul> </div> </div> <div class="mini_module indented_module" id="robots-noodp"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Directory Tags', 'thesis'); ?> <code>noodp</code> <code>noydir</code></h5> <div class="more_info"> <p><?php _e('Using the <code>noodp</code> robot meta tag will prevent search engines from displaying Open Directory Project (DMOZ) listings in your meta descriptions. The <code>noydir</code> tag is pretty much the same, except that it only affects the Yahoo! Directory. Both of these options are sitewide.', 'thesis'); ?> </p> <ul> <li><input type="checkbox" id="head[meta][robots][noodp]" name="head[meta][robots][noodp]" value="1" <?php if ($head['meta']['robots']['noodp']) { echo 'checked="checked" '; } ?> /><label for="head[meta][robots][noodp]"><?php _e('Add <code>noodp</code> to your site', 'thesis'); ?> </label></li> <li><input type="checkbox" id="head[meta][robots][noydir]" name="head[meta][robots][noydir]" value="1" <?php if ($head['meta']['robots']['noydir']) { echo 'checked="checked" '; } ?> /><label for="head[meta][robots][noydir]"><?php _e('Add <code>noydir</code> to your site', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Canonical <acronym title="Uniform Resource Locator">URL</acronym>s', 'thesis'); ?> </h4> <ul class="more_info"> <li><input type="checkbox" id="head[links][canonical]" name="head[links][canonical]" value="1" <?php if ($head['links']['canonical']) { echo 'checked="checked" '; } ?> /><label for="head[links][canonical]"><?php _e('Add canonical <acronym title="Uniform Resource Locator">URL</acronym>s to your site', 'thesis'); ?> </label></li> </ul> </div> <div class="module_subsection" id="syndication"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Syndication/Feed <acronym title="Uniform Resource Locator">URL</acronym>', 'thesis'); ?> </h4> <div class="more_info"> <p><?php printf(__('If you’re using a service like <a href="%s">Feedburner</a> to manage your <acronym title="Really Simple Syndication">RSS</acronym> feed, you should enter the <acronym title="Uniform Resource Locator">URL</acronym> of your feed in the box below. If you’d prefer to use the default WordPress feed, simply leave this box blank.', 'thesis'), 'http://www.feedburner.com/'); ?> </p> <p class="form_input"> <input type="text" class="text_input" id="head[feed][url]" name="head[feed][url]" value="<?php if ($head['feed']['url']) { echo stripslashes($head['feed']['url']); } ?> " /> <label for="head[feed][url]"><?php _e('Feed <acronym title="Uniform Resource Locator">URL</acronym> (including ‘http://’)', 'thesis'); ?> </label> </p> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Additional Scripts', 'thesis'); ?> </h4> <div class="more_info"> <p><?php printf(__('If you need to add scripts to your document <code><head></code>, you should enter them in the box below; however, if you’re adding stat-tracking code, you should add that to the <a href="%s">Stats and Scripts section below</a>.', 'thesis'), '#javascript-options'); ?> </p> <p class="form_input"> <label for="head[scripts]"><?php _e('Additional <code><head></code> scripts (code)', 'thesis'); ?> </label> <textarea class="scripts" id="head[scripts]" name="head[scripts]"><?php if ($head['scripts']) { echo $thesis_data->o_htmlentities($head['scripts']); } ?> </textarea> </p> </div> </div> </div> <div class="options_module" id="javascript-options"> <h3><?php _e('Stats Software/Scripts', 'thesis'); ?> </h3> <div class="module_subsection" id="javascript-scripts"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Stat and Tracking Scripts', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('If you’ve got a stat-tracking script (from, say, Mint or Google Analytics), you’ll want to place it here. Anything you add here will be served after the <acronym title="HyperText Markup Language">HTML</acronym> on <em>every page of your site</em>. This is the preferred position because it prevents the scripts from interrupting the page load.', 'thesis'); ?> </p> <p class="form_input"> <label for="javascript[scripts]"><?php _e('Tracking scripts (include <code><script></code> tags!)', 'thesis'); ?> </label> <textarea class="scripts" id="javascript[scripts]" name="javascript[scripts]"><?php if ($javascript['scripts']) { echo $thesis_data->o_htmlentities($javascript['scripts']); } ?> </textarea> </p> </div> </div> </div> <div class="options_module" id="home-page-options"> <h3><?php _e('Custom Stylesheet Options', 'thesis'); ?> </h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Enable Stylesheet', 'thesis'); ?> </h4> <div class="more_info"> <p class="add_margin"><?php _e('The only reason to deselect this option is to reduce the total number of <code>http</code> requests your site makes because this will improve your page load speed. If you’re not using your custom stylesheet, then you may consider deselecting this option.', 'thesis'); ?> </p> <?php if (!file_exists(THESIS_CUSTOM)) { echo "\t\t\t\t\t\t<p class=\"tip add_margin\">" . __('Your custom stylesheet <strong>will not work</strong> until you rename your <code>/custom-sample</code> folder to <code>/custom</code>.', 'thesis') . "</p>\n"; } ?> <ul> <li><input type="checkbox" id="custom[stylesheet]" name="custom[stylesheet]" value="1" <?php if ($custom['stylesheet']) { echo 'checked="checked" '; } ?> /><label for="custom[stylesheet]"><?php _e('Enable custom stylesheet', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> <div class="options_column"> <div class="options_module button_module"> <?php wp_nonce_field('thesis-update-site', '_wpnonce-thesis-update-site'); ?> <input type="submit" class="save_button" id="options_submit" name="submit" value="<?php thesis_save_button_text(); ?> " /> </div> <div class="options_module" id="thesis-nav-menu"> <h3><?php _e('Navigation Menu', 'thesis'); ?> </h3> <?php global $wp_version; if (version_compare($wp_version, '3', '>=')) { ?> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Select Menu Type', 'thesis'); ?> </h4> <div class="more_info"> <ul id="nav_switch"> <li><input type="radio" name="nav[type]" value="wp" <?php if ($nav['type'] == 'wp') { echo 'checked="checked" '; } ?> /><label><?php _e('WordPress nav menu', 'thesis'); ?> <a href="<?php echo admin_url("nav-menus.php"); ?> " target="_blank">[?]</a></label></li> <li><input type="radio" name="nav[type]" value="thesis" <?php if ($nav['type'] == 'thesis') { echo 'checked="checked" '; } ?> /><label><?php _e('Thesis nav menu', 'thesis'); ?> </label></li> </ul> </div> </div> <?php } ?> <div id="thesis_nav_controls"> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Pages', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('Start by selecting the pages you want to include in your nav menu. Next, drag and drop the pages to change their display order (topmost item displays first), and if you <em>really</em> want to get crazy, you can even edit the display text on each item. <strong>Try it!</strong>', 'thesis'); ?> </p> <p><?php _e('Thesis features automatic dropdown menus, so if you have nested pages or categories, you’ll save space <em>and</em> gain style points with your slick new nav menu!', 'thesis'); ?> </p> <ul id="nav_pages" class="sortable add_margin"> <?php $pages =& get_pages('sort_column=post_parent,menu_order'); $active_pages = array(); if ($nav['pages']) { foreach ($nav['pages'] as $id => $nav_page) { $active_page = get_page($id); if (post_exists($active_page->post_title)) { $checked = $nav_page['show'] ? ' checked="checked"' : ''; $link_text = $nav['pages'][$id]['text'] != '' ? $thesis_data->o_htmlspecialchars($nav['pages'][$id]['text'], true) : $active_page->post_title; echo "\t\t\t\t\t\t\t<li><input class=\"checkbox\" type=\"checkbox\" id=\"nav[pages][{$id}][show]\" name=\"nav[pages][{$id}][show]\" value=\"1\"{$checked} /><input type=\"text\" class=\"text_input\" id=\"nav[pages][{$id}][text]\" name=\"nav[pages][{$id}][text]\" value=\"{$link_text}\" /></li>\n"; $active_pages[] = $id; } } } if ($pages) { foreach ($pages as $page) { if (!in_array($page->ID, $active_pages)) { $link_text = $nav['pages'][$page->ID]['text'] != '' ? $thesis_data->o_htmlentities($nav['pages'][$page->ID]['text'], true) : $page->post_title; echo "\t\t\t\t\t\t\t<li><input class=\"checkbox\" type=\"checkbox\" id=\"nav[pages][{$page->ID}][show]\" name=\"nav[pages][{$page->ID}][show]\" value=\"1\" /><input type=\"text\" class=\"text_input\" id=\"nav[pages][{$page->ID}][text]\" name=\"nav[pages][{$page->ID}][text]\" value=\"{$link_text}\" /></li>\n"; } } } ?> </ul> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Categories', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('If you’d like to include category pages in your nav menu, simply select the appropriate categories from the list below (you can select more than one).', 'thesis'); ?> </p> <p class="form_input"> <select class="select_multiple" id="nav[categories]" name="nav[categories][]" multiple="multiple" size="1"> <option value="0"><?php _e('No category page links', 'thesis'); ?> </option> <?php $categories =& get_categories('type=post&orderby=name&hide_empty=0'); if ($categories) { $nav_category_pages = explode(',', $nav['categories']); foreach ($categories as $category) { $selected = in_array($category->cat_ID, $nav_category_pages) ? ' selected="selected"' : ''; echo "\t\t\t\t\t\t\t\t<option value=\"{$category->cat_ID}\"{$selected}>{$category->cat_name}</option>\n"; } } ?> </select> </p> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Add More Links', 'thesis'); ?> </h4> <div class="more_info"> <p><?php printf(__('You can insert additional navigation links on the <a href="%1$s">Manage Links</a> page. To ensure that things go smoothly, you should first <a href="%2$s">create a link category</a> solely for your navigation menu, and then make sure you place your new links in that category. Once you’ve done that, you can select your category below to include it in your nav menu.', 'thesis'), get_bloginfo('wpurl') . '/wp-admin/link-manager.php', get_bloginfo('wpurl') . '/wp-admin/edit-link-categories.php#addcat'); ?> </p> <p class="form_input"> <select id="nav[links]" name="nav[links]" size="1"> <option value="0"><?php _e('No additional links', 'thesis'); ?> </option> <?php $link_categories =& get_categories('type=link&hide_empty=0'); if ($link_categories) { foreach ($link_categories as $link_category) { $selected = $nav['links'] == $link_category->cat_ID ? ' selected="selected"' : ''; echo "\t\t\t\t\t\t\t\t<option value=\"{$link_category->cat_ID}\"{$selected}>{$link_category->cat_name}</option>\n"; } } ?> </select> </p> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Home Link', 'thesis'); ?> </h4> <div class="control_box more_info"> <ul class="control"> <li><input type="checkbox" id="nav[home][show]" name="nav[home][show]" value="1" <?php if ($nav['home']['show']) { echo 'checked="checked" '; } ?> /><label for="nav[home][show]"><?php _e('Show home link in nav menu', 'thesis'); ?> </label></li> </ul> <div class="dependent"> <p class="form_input add_margin"> <input type="text" id="nav[home][text]" name="nav[home][text]" value="<?php echo $thesis_data->o_htmlspecialchars(thesis_home_link_text(), true); ?> " /> <label for="nav[home][text]"><?php _e('home link text', 'thesis'); ?> </label> </p> <ul> <li><input type="checkbox" id="nav[home][nofollow]" name="nav[home][nofollow]" value="1" <?php if ($nav['home']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="nav[home][nofollow]"><?php _e('Add <code>nofollow</code> to home link', 'thesis'); ?> </label></li> </ul> </div> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Feed Link', 'thesis'); ?> </h4> <div class="control_box more_info"> <ul class="control"> <li><input type="checkbox" id="nav[feed][show]" name="nav[feed][show]" value="1" <?php if ($nav['feed']['show']) { echo 'checked="checked" '; } ?> /><label for="nav[feed][show]"><?php _e('Show feed link in nav menu', 'thesis'); ?> </label></li> </ul> <div class="dependent"> <p class="form_input add_margin"> <input type="text" class="text_input" id="nav[feed][text]" name="nav[feed][text]" value="<?php echo $thesis_data->o_htmlspecialchars(thesis_feed_link_text(), true); ?> " /> <label for="nav[feed][text]"><?php _e('Change your feed link text', 'thesis'); ?> </label> </p> <ul> <li><input type="checkbox" id="nav[feed][nofollow]" name="nav[feed][nofollow]" value="1" <?php if ($nav['feed']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="nav[feed][nofollow]"><?php _e('Add <code>nofollow</code> to feed link', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> </div> <div class="options_module" id="home-page-options"> <h3><?php _e('Home Page <acronym title="Search Engine Optimization">SEO</acronym>', 'thesis'); ?> </h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Document Head', 'thesis'); ?> <code><head></code></h4> <div class="more_info"> <p class="form_input add_margin"> <input type="text" class="text_input" id="home_head_title" name="home[head][title]" value="<?php if ($home['head']['title']) { echo $thesis_data->o_htmlspecialchars($home['head']['title'], false, true); } ?> " /> <script>jQuery('#home_head_title').keyup(function(){charCount('#home_head_title', '#length_home_title');});</script> <label for="home[head][title]"><?php _e('home page <code><title></code> tag', 'thesis'); ?> <input type="text" readonly="readonly" class="counter" id="length_home_title" size="3" maxlength="3" value="0"></label> </p> <p class="form_input add_margin"> <textarea class="scripts" id="home_head_description" name="home[head][meta][description]"><?php if ($home['head']['meta']['description']) { echo $thesis_data->o_htmlspecialchars($home['head']['meta']['description'], false, true); } ?> </textarea> <script>jQuery('#home_head_description').keyup(function(){charCount('#home_head_description', '#length_home_description');});</script> <label for="home[head][meta][description]"><?php _e('home page <code><meta></code> description', 'thesis'); ?> <input type="text" readonly="readonly" class="counter" id="length_home_description" size="3" maxlength="3" value="0"></label> </p> <p class="form_input add_margin"> <input type="text" class="text_input" id="home[head][meta][keywords]" name="home[head][meta][keywords]" value="<?php if ($home['head']['meta']['keywords']) { echo $thesis_data->o_htmlspecialchars($home['head']['meta']['keywords'], false, true); } ?> " /> <label for="home[head][meta][keywords]"><?php _e('home page <code><meta></code> keywords', 'thesis'); ?> </label> </p> <ul> <li><input type="checkbox" id="home[head][meta][robots][noindex]" name="home[head][meta][robots][noindex]" value="1" <?php if ($home['head']['meta']['robots']['noindex']) { echo 'checked="checked" '; } ?> /><label for="home[head][meta][robots][noindex]"><?php _e('<code>noindex</code> this page', 'thesis'); ?> </label></li> <li><input type="checkbox" id="home[head][meta][robots][nofollow]" name="home[head][meta][robots][nofollow]" value="1" <?php if ($home['head']['meta']['robots']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="home[head][meta][robots][nofollow]"><?php _e('<code>nofollow</code> this page', 'thesis'); ?> </label></li> <li><input type="checkbox" id="home[head][meta][robots][noarchive]" name="home[head][meta][robots][noarchive]" value="1" <?php if ($home['head']['meta']['robots']['noarchive']) { echo 'checked="checked" '; } ?> /><label for="home[head][meta][robots][noarchive]"><?php _e('<code>noarchive</code> this page', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> <div class="options_column"> <div class="options_module" id="publishing-tools"> <h3><?php _e('Publishing Tools', 'thesis'); ?> </h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Windows Live Writer', 'thesis'); ?> </h4> <div class="more_info"> <ul> <li><input type="checkbox" id="publishing[wlw]" name="publishing[wlw]" value="1" <?php if ($publishing['wlw']) { echo 'checked="checked" '; } ?> /><label for="publishing[wlw]"><?php _e('Enable support for Windows Live Writer', 'thesis'); ?> </label></li> </ul> </div> </div> </div> <div class="options_module" id="save_button_control"> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Change Save Button Text', 'thesis'); ?> </h4> <p class="form_input more_info"> <input type="text" id="save_button_text" name="save_button_text" value="<?php if ($thesis_site->save_button_text) { echo $thesis_data->o_htmlspecialchars($thesis_site->save_button_text); } ?> " /> <label for="save_button_text"><?php _e('not recommended (heh)', 'thesis'); ?> </label> </p> </div> </div> </div> </form> <?php } ?> </div> <?php }
function options_page() { global $thesis_site, $thesis_design; $head = $thesis_site->head; $javascript = $thesis_site->javascript; $nav = $thesis_site->nav; $comments = $thesis_site->comments; $display = $thesis_site->display; ?> <div id="thesis_options" class="wrap<?php if (get_bloginfo('text_direction') == 'rtl') { echo ' rtl'; } ?> "> <?php thesis_version_indicator(); thesis_options_title(__('Thesis Site Options', 'thesis')); thesis_options_nav(); thesis_options_status_check(); if (version_compare($thesis_site->version, thesis_version()) != 0) { ?> <form id="upgrade_needed" action="<?php echo admin_url('admin-post.php?action=thesis_upgrade'); ?> " method="post"> <h3><?php _e('Oooh, Exciting!', 'thesis'); ?> </h3> <p><?php _e('It’s time to upgrade your Thesis, which means there’s new awesomeness in your immediate future. Click the button below to fast-track your way to the awesomeness!', 'thesis'); ?> </p> <p><input type="submit" class="upgrade_button" id="teh_upgrade" name="upgrade" value="<?php _e('Upgrade Thesis', 'thesis'); ?> " /></p> </form> <?php } else { thesis_is_css_writable(); ?> <form class="thesis" action="<?php echo admin_url('admin-post.php?action=thesis_options'); ?> " method="post"> <div class="options_column"> <div class="options_module" id="document-head"> <h3><?php _e('Document Head', 'thesis'); ?> <code><head></code></h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Title Tag Settings', 'thesis'); ?> <code><title></code></h4> <div class="more_info"> <p><?php _e('As far as <acronym title="Search Engine Optimization">SEO</acronym> is concerned, this is the single most important element on your site. For all pages except the home page, Thesis will construct your <code><title></code> tags automatically according to the settings below, but you can override these settings by adding a custom <code><title></code> to any post or page via the post editing screen.', 'thesis'); ?> </p> <ul class="add_margin"> <li><input type="checkbox" id="head[title][branded]" name="head[title][branded]" value="1" <?php if ($head['title']['branded']) { echo 'checked="checked" '; } ?> /><label for="head[title][branded]"><?php _e('Append site name to page titles', 'thesis'); ?> </label></li> </ul> <p class="form_input add_margin"> <input type="text" class="text_input short" id="head[title][separator]" name="head[title][separator]" value="<?php echo $head['title']['separator'] ? urldecode($head['title']['separator']) : '—'; ?> " /> <label for="head[title][separator]"><?php _e('Character separator in titles', 'thesis'); ?> </label> </p> <p class="tip"><?php printf(__('To set the <code><title></code> tags on your home page, category pages, or tag pages, visit the new <a href="%s">Page Options screen</a>.', 'thesis'), admin_url('admin.php?page=thesis-pages')); ?> </p> </div> </div> <div class="module_subsection" id="robots-meta"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Robots Meta Tags', 'thesis'); ?> <code><meta></code></h4> <div class="more_info"> <div class="mini_module indented_module" id="robots-noindex"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Noindex Tag', 'thesis'); ?> <code>noindex</code></h5> <div class="more_info"> <p><?php _e('Adding the <code>noindex</code> robot meta tag is a great way to fine-tune your site’s <acronym title="Search Engine Optimization">SEO</acronym> by streamlining the amount of pages that get indexed by the search engines. The options below will help you prevent the indexing of “bloat” pages that do nothing but dilute your search results and keep you from ranking as well as you should.', 'thesis'); ?> </p> <ul> <?php foreach ($head['meta']['robots']['noindex'] as $page_type => $value) { $checked = $value ? 'checked="checked" ' : ''; echo "\t\t\t\t\t\t\t\t\t" . '<li><input type="checkbox" id="head[meta][robots][noindex][' . $page_type . ']" name="head[meta][robots][noindex][' . $page_type . ']" value="1" ' . $checked . '/><label for="head[meta][robots][noindex][' . $page_type . ']">' . sprintf(__('Add <code>noindex</code> to %s pages', 'thesis'), $page_type) . '</label></li>' . "\n"; } ?> </ul> </div> </div> <div class="mini_module indented_module" id="robots-nofollow"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Nofollow Tag', 'thesis'); ?> <code>nofollow</code></h5> <div class="more_info"> <p><?php _e('The <code>nofollow</code> robot meta tag is another useful tool for nailing down your site’s <acronym title="Search Engine Optimization">SEO</acronym>. Links from pages with the <code>nofollow</code> meta tag won’t pass any juice.', 'thesis'); ?> </p> <ul> <?php foreach ($head['meta']['robots']['nofollow'] as $page_type => $value) { $checked = $value ? 'checked="checked" ' : ''; echo "\t\t\t\t\t\t\t\t\t" . '<li><input type="checkbox" id="head[meta][robots][nofollow][' . $page_type . ']" name="head[meta][robots][nofollow][' . $page_type . ']" value="1" ' . $checked . '/><label for="head[meta][robots][nofollow][' . $page_type . ']">' . sprintf(__('Add <code>nofollow</code> to %s pages', 'thesis'), $page_type) . '</label></li>' . "\n"; } ?> </ul> </div> </div> <div class="mini_module indented_module" id="robots-noarchive"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Noarchive Tag', 'thesis'); ?> <code>noarchive</code></h5> <div class="more_info"> <p><?php _e('The <code>noarchive</code> robot meta tag prevents search engines and Internet archive services from saving cached versions of pages on your site. Generally, people use this to protect their privacy, but there are certainly times when having access to archived versions of your pages might prove useful.', 'thesis'); ?> </p> <ul> <?php foreach ($head['meta']['robots']['noarchive'] as $page_type => $value) { $checked = $value ? 'checked="checked" ' : ''; echo "\t\t\t\t\t\t\t\t\t" . '<li><input type="checkbox" id="head[meta][robots][noarchive][' . $page_type . ']" name="head[meta][robots][noarchive][' . $page_type . ']" value="1" ' . $checked . '/><label for="head[meta][robots][noarchive][' . $page_type . ']">' . sprintf(__('Add <code>noarchive</code> to %s pages', 'thesis'), $page_type) . '</label></li>' . "\n"; } ?> </ul> </div> </div> <div class="mini_module indented_module" id="robots-noodp"> <h5 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Directory Tags', 'thesis'); ?> <code>noodp</code> <code>noydir</code></h5> <div class="more_info"> <p><?php _e('Using the <code>noodp</code> robot meta tag will prevent search engines from displaying Open Directory Project (DMOZ) listings in your meta descriptions. The <code>noydir</code> tag is pretty much the same, except that it only affects the Yahoo! Directory. Both of these options are sitewide.', 'thesis'); ?> </p> <ul> <li><input type="checkbox" id="head[meta][robots][noodp]" name="head[meta][robots][noodp]" value="1" <?php if ($head['meta']['robots']['noodp']) { echo 'checked="checked" '; } ?> /><label for="head[meta][robots][noodp]"><?php _e('Add <code>noodp</code> to your site', 'thesis'); ?> </label></li> <li><input type="checkbox" id="head[meta][robots][noydir]" name="head[meta][robots][noydir]" value="1" <?php if ($head['meta']['robots']['noydir']) { echo 'checked="checked" '; } ?> /><label for="head[meta][robots][noydir]"><?php _e('Add <code>noydir</code> to your site', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Canonical <acronym title="Uniform Resource Locator">URL</acronym>s', 'thesis'); ?> </h4> <ul class="more_info"> <li><input type="checkbox" id="head[links][canonical]" name="head[links][canonical]" value="1" <?php if ($head['links']['canonical']) { echo 'checked="checked" '; } ?> /><label for="head[links][canonical]"><?php _e('Add canonical <acronym title="Uniform Resource Locator">URL</acronym>s to your site', 'thesis'); ?> </label></li> </ul> </div> <div class="module_subsection" id="syndication"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Syndication/Feed <acronym title="Uniform Resource Locator">URL</acronym>', 'thesis'); ?> </h4> <div class="more_info"> <p><?php printf(__('If you’re using a service like <a href="%s">Feedburner</a> to manage your <acronym title="Really Simple Syndication">RSS</acronym> feed, you should enter the <acronym title="Uniform Resource Locator">URL</acronym> of your feed in the box below. If you’d prefer to use the default WordPress feed, simply leave this box blank.', 'thesis'), 'http://www.feedburner.com/'); ?> </p> <p class="form_input"> <input type="text" class="text_input" id="head[feed][url]" name="head[feed][url]" value="<?php if ($head['feed']['url']) { echo $head['feed']['url']; } ?> " /> <label for="head[feed][url]"><?php _e('Feed <acronym title="Uniform Resource Locator">URL</acronym> (including ‘http://’)', 'thesis'); ?> </label> </p> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Additional Scripts', 'thesis'); ?> </h4> <div class="more_info"> <p><?php printf(__('If you need to add scripts to your document <code><head></code>, you should enter them in the box below; however, if you’re adding stat-tracking code, you should add that to the <a href="%s">Stats and Scripts section below</a>.', 'thesis'), '#javascript-options'); ?> </p> <p class="form_input"> <label for="head[scripts]"><?php _e('Additional <code><head></code> scripts (code)', 'thesis'); ?> </label> <textarea class="scripts" id="head[scripts]" name="head[scripts]"><?php if ($head['scripts']) { thesis_massage_code($head['scripts']); } ?> </textarea> </p> </div> </div> </div> <div class="options_module" id="javascript-options"> <h3><?php _e('Stats Software/Scripts', 'thesis'); ?> </h3> <div class="module_subsection" id="javascript-scripts"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Stat and Tracking Scripts', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('If you’ve got a stat-tracking script (from, say, Mint or Google Analytics), you’ll want to place it here. Anything you add here will be served after the <acronym title="HyperText Markup Language">HTML</acronym> on <em>every page of your site</em>. This is the preferred position because it prevents the scripts from interrupting the page load.', 'thesis'); ?> </p> <p class="form_input"> <label for="javascript[scripts]"><?php _e('Tracking scripts (include <code><script></code> tags!)', 'thesis'); ?> </label> <textarea class="scripts" id="javascript[scripts]" name="javascript[scripts]"><?php if ($javascript['scripts']) { thesis_massage_code($javascript['scripts']); } ?> </textarea> </p> </div> </div> </div> </div> <div class="options_column"> <div class="options_module" id="display-options"> <h3><?php _e('Display Options', 'thesis'); ?> </h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Header', 'thesis'); ?> </h4> <ul class="more_info"> <li><input type="checkbox" id="display[header][title]" name="display[header][title]" value="1" <?php if ($display['header']['title']) { echo 'checked="checked" '; } ?> /><label for="display[header][title]"><?php _e('Show site name in header', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[header][tagline]" name="display[header][tagline]" value="1" <?php if ($display['header']['tagline']) { echo 'checked="checked" '; } ?> /><label for="display[header][tagline]"><?php _e('Show site tagline in header', 'thesis'); ?> </label></li> </ul> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Bylines', 'thesis'); ?> </h4> <div class="more_info"> <div class="control_box"> <ul class="control no_margin"> <li><input type="checkbox" id="display[byline][author][show]" name="display[byline][author][show]" value="1" <?php if ($display['byline']['author']['show']) { echo 'checked="checked" '; } ?> /><label for="display[byline][author][show]"><?php _e('Show author name in <strong>post</strong> byline', 'thesis'); ?> </label></li> </ul> <ul class="dependent"> <li><input type="checkbox" id="display[byline][author][link]" name="display[byline][author][link]" value="1" <?php if ($display['byline']['author']['link']) { echo 'checked="checked" '; } ?> /><label for="display[byline][author][link]"><?php _e('Link author names to archives', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[byline][author][nofollow]" name="display[byline][author][nofollow]" value="1" <?php if ($display['byline']['author']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="display[byline][author][nofollow]"><?php _e('Add <code>nofollow</code> to author links', 'thesis'); ?> </label></li> </ul> </div> <ul> <li><input type="checkbox" id="display[byline][date][show]" name="display[byline][date][show]" value="1" <?php if ($display['byline']['date']['show']) { echo 'checked="checked" '; } ?> /><label for="display[byline][date][show]"><?php _e('Show published-on date in <strong>post</strong> byline', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[byline][page][author]" name="display[byline][page][author]" value="1" <?php if ($display['byline']['page']['author']) { echo 'checked="checked" '; } ?> /><label for="display[byline][page][author]"><?php _e('Show author name in <strong>page</strong> byline', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[byline][page][date]" name="display[byline][page][date]" value="1" <?php if ($display['byline']['page']['date']) { echo 'checked="checked" '; } ?> /><label for="display[byline][page][date]"><?php _e('Show published-on date in <strong>page</strong> byline', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[byline][num_comments][show]" name="display[byline][num_comments][show]" value="1" <?php if ($display['byline']['num_comments']['show']) { echo 'checked="checked" '; } ?> /><label for="display[byline][num_comments][show]"><?php _e('Show number of comments in byline', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[byline][categories][show]" name="display[byline][categories][show]" value="1" <?php if ($display['byline']['categories']['show']) { echo 'checked="checked" '; } ?> /><label for="display[byline][categories][show]"><?php _e('Show <strong>post</strong> categories', 'thesis'); ?> </label></li> </ul> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Posts', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('The display setting you select below only affects your <strong>features</strong>; teasers (if you’re using them) are always displayed in excerpt format.', 'thesis'); ?> </p> <ul class="add_margin"> <li><input type="radio" name="display[posts][excerpts]" value="0" <?php if (!$display['posts']['excerpts']) { echo 'checked="checked" '; } ?> /><label><?php _e('Display full post content', 'thesis'); ?> </label></li> <li><input type="radio" name="display[posts][excerpts]" value="1" <?php if ($display['posts']['excerpts']) { echo 'checked="checked" '; } ?> /><label><?php _e('Display post excerpts', 'thesis'); ?> </label></li> </ul> <p class="label_note"><?php _e('“Read More” link', 'thesis'); ?> </p> <p><?php _e('This is the clickthrough text on home and archive pages that appears on any post where you use the <code><!--more--></code> tag:', 'thesis'); ?> </p> <p class="form_input add_margin"> <input type="text" class="text_input" id="display[posts][read_more_text]" name="display[posts][read_more_text]" value="<?php echo thesis_read_more_text(); ?> " /> <label for="display[posts][read_more_text]"><?php _e('clickthrough text', 'thesis'); ?> </label> </p> <p class="label_note"><?php _e('Single entry pages', 'thesis'); ?> </p> <ul> <li><input type="checkbox" id="display[posts][nav]" name="display[posts][nav]" value="1" <?php if ($display['posts']['nav']) { echo 'checked="checked" '; } ?> /><label for="display[posts][nav]"><?php _e('Show previous/next post links', 'thesis'); ?> </label></li> </ul> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Archives', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('Select a display format for your archive pages:', 'thesis'); ?> </p> <ul> <li><input type="radio" name="display[archives][style]" value="titles" <?php if ($display['archives']['style'] == 'titles') { echo 'checked="checked" '; } ?> /><label><?php _e('Titles only', 'thesis'); ?> </label></li> <li><input type="radio" name="display[archives][style]" value="teasers" <?php if ($display['archives']['style'] == 'teasers') { echo 'checked="checked" '; } ?> /><label><?php _e('Everything’s a teaser!', 'thesis'); ?> </label></li> <li><input type="radio" name="display[archives][style]" value="content" <?php if ($display['archives']['style'] == 'content') { echo 'checked="checked" '; } ?> /><label><?php _e('Same as your home page', 'thesis'); ?> </label></li> <li><input type="radio" name="display[archives][style]" value="excerpts" <?php if ($display['archives']['style'] == 'excerpts') { echo 'checked="checked" '; } ?> /><label><?php _e('Post excerpts', 'thesis'); ?> </label></li> </ul> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Comments', 'thesis'); ?> </h4> <div class="more_info"> <ul> <li><input type="checkbox" id="comments[disable_pages]" name="comments[disable_pages]" value="1" <?php if ($comments['disable_pages']) { echo 'checked="checked" '; } ?> /><label for="comments[disable_pages]"><?php _e('Disable comments on all <strong>pages</strong>', 'thesis'); ?> </label></li> <li><input type="checkbox" id="comments[show_closed]" name="comments[show_closed]" value="1" <?php if ($comments['show_closed']) { echo 'checked="checked" '; } ?> /><label for="comments[show_closed]"><?php _e('If comments are closed, display a message', 'thesis'); ?> </label></li> </ul> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Tagging', 'thesis'); ?> </h4> <ul class="more_info"> <li><input type="checkbox" id="display[tags][single]" name="display[tags][single]" value="1" <?php if ($display['tags']['single']) { echo 'checked="checked" '; } ?> /><label for="display[tags][single]"><?php _e('Show tags on single entry pages', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[tags][index]" name="display[tags][index]" value="1" <?php if ($display['tags']['index']) { echo 'checked="checked" '; } ?> /><label for="display[tags][index]"><?php _e('Show tags on index and archives pages', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[tags][nofollow]" name="display[tags][nofollow]" value="1" <?php if ($display['tags']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="display[tags][nofollow]"><?php _e('Add <code>nofollow</code> to tag links', 'thesis'); ?> </label></li> </ul> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Sidebars', 'thesis'); ?> </h4> <ul class="more_info"> <li><input type="checkbox" id="display[sidebars][default_widgets]" name="display[sidebars][default_widgets]" value="1" <?php if ($display['sidebars']['default_widgets']) { echo 'checked="checked" '; } ?> /><label for="display[sidebars][default_widgets]"><?php _e('Show default sidebar widgets', 'thesis'); ?> </label></li> </ul> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Administration', 'thesis'); ?> </h4> <div class="more_info"> <ul> <li><input type="checkbox" id="display[admin][edit_post]" name="display[admin][edit_post]" value="1" <?php if ($display['admin']['edit_post']) { echo 'checked="checked" '; } ?> /><label for="display[admin][edit_post]"><?php _e('Show edit post links', 'thesis'); ?> </label></li> <li><input type="checkbox" id="display[admin][link]" name="display[admin][link]" value="1" <?php if ($display['admin']['link']) { echo 'checked="checked" '; } ?> /><label><?php _e('Show admin link in footer', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> <div class="options_column"> <div class="options_module button_module"> <input type="submit" class="save_button" id="options_submit" name="submit" value="<?php thesis_save_button_text(); ?> " /> </div> <div class="options_module" id="thesis-nav-menu"> <h3><?php _e('Navigation Menu', 'thesis'); ?> </h3> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Pages', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('Start by selecting the pages you want to include in your nav menu. Next, drag and drop the pages to change their display order (topmost item displays first), and if you <em>really</em> want to get crazy, you can even edit the display text on each item. <strong>Try it!</strong>', 'thesis'); ?> </p> <p><?php _e('Thesis features automatic dropdown menus, so if you have nested pages or categories, you’ll save space <em>and</em> gain style points with your slick new nav menu!', 'thesis'); ?> </p> <ul id="nav_pages" class="sortable add_margin"> <?php $pages =& get_pages('sort_column=post_parent,menu_order'); $active_pages = array(); if ($nav['pages']) { foreach ($nav['pages'] as $id => $nav_page) { $active_page = get_page($id); if (post_exists($active_page->post_title)) { $checked = $nav_page['show'] ? ' checked="checked"' : ''; $link_text = $nav['pages'][$id]['text'] != '' ? $nav['pages'][$id]['text'] : $active_page->post_title; echo "\t\t\t\t\t\t\t<li><input class=\"checkbox\" type=\"checkbox\" id=\"nav[pages][{$id}][show]\" name=\"nav[pages][{$id}][show]\" value=\"1\"{$checked} /><input type=\"text\" class=\"text_input\" id=\"nav[pages][{$id}][text]\" name=\"nav[pages][{$id}][text]\" value=\"{$link_text}\" /></li>\n"; $active_pages[] = $id; } } } if ($pages) { foreach ($pages as $page) { if (!in_array($page->ID, $active_pages)) { $link_text = $nav['pages'][$page->ID]['text'] != '' ? $nav['pages'][$page->ID]['text'] : $page->post_title; echo "\t\t\t\t\t\t\t<li><input class=\"checkbox\" type=\"checkbox\" id=\"nav[pages][{$page->ID}][show]\" name=\"nav[pages][{$page->ID}][show]\" value=\"1\" /><input type=\"text\" class=\"text_input\" id=\"nav[pages][{$page->ID}][text]\" name=\"nav[pages][{$page->ID}][text]\" value=\"{$link_text}\" /></li>\n"; } } } ?> </ul> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Categories', 'thesis'); ?> </h4> <div class="more_info"> <p><?php _e('If you’d like to include category pages in your nav menu, simply select the appropriate categories from the list below (you can select more than one).', 'thesis'); ?> </p> <p class="form_input"> <select class="select_multiple" id="nav[categories]" name="nav[categories][]" multiple="multiple" size="1"> <option value="0"><?php _e('No category page links', 'thesis'); ?> </option> <?php $categories =& get_categories('type=post&orderby=name&hide_empty=0'); if ($categories) { $nav_category_pages = explode(',', $nav['categories']); foreach ($categories as $category) { $selected = in_array($category->cat_ID, $nav_category_pages) ? ' selected="selected"' : ''; echo "\t\t\t\t\t\t\t\t<option value=\"{$category->cat_ID}\"{$selected}>{$category->cat_name}</option>\n"; } } ?> </select> </p> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Add More Links', 'thesis'); ?> </h4> <div class="more_info"> <p><?php printf(__('You can insert additional navigation links on the <a href="%1$s">Manage Links</a> page. To ensure that things go smoothly, you should first <a href="%2$s">create a link category</a> solely for your navigation menu, and then make sure you place your new links in that category. Once you’ve done that, you can select your category below to include it in your nav menu.', 'thesis'), get_bloginfo('wpurl') . '/wp-admin/link-manager.php', get_bloginfo('wpurl') . '/wp-admin/edit-link-categories.php#addcat'); ?> </p> <p class="form_input"> <select id="nav[links]" name="nav[links]" size="1"> <option value="0"><?php _e('No additional links', 'thesis'); ?> </option> <?php $link_categories =& get_categories('type=link&hide_empty=0'); if ($link_categories) { foreach ($link_categories as $link_category) { $selected = $nav['links'] == $link_category->cat_ID ? ' selected="selected"' : ''; echo "\t\t\t\t\t\t\t\t<option value=\"{$link_category->cat_ID}\"{$selected}>{$link_category->cat_name}</option>\n"; } } ?> </select> </p> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Home Link', 'thesis'); ?> </h4> <div class="control_box more_info"> <ul class="control"> <li><input type="checkbox" id="nav[home][show]" name="nav[home][show]" value="1" <?php if ($nav['home']['show']) { echo 'checked="checked" '; } ?> /><label for="nav[home][show]"><?php _e('Show home link in nav menu', 'thesis'); ?> </label></li> </ul> <div class="dependent"> <p class="form_input add_margin"> <input type="text" id="nav[home][text]" name="nav[home][text]" value="<?php echo thesis_home_link_text(); ?> " /> <label for="nav[home][text]"><?php _e('home link text', 'thesis'); ?> </label> </p> <ul> <li><input type="checkbox" id="nav[home][nofollow]" name="nav[home][nofollow]" value="1" <?php if ($nav['home']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="nav[home][nofollow]"><?php _e('Add <code>nofollow</code> to home link', 'thesis'); ?> </label></li> </ul> </div> </div> </div> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Feed Link in Nav Menu', 'thesis'); ?> </h4> <div class="control_box more_info"> <ul class="control"> <li><input type="checkbox" id="nav[feed][show]" name="nav[feed][show]" value="1" <?php if ($nav['feed']['show']) { echo 'checked="checked" '; } ?> /><label for="nav[feed][show]"><?php _e('Show feed link in nav menu', 'thesis'); ?> </label></li> </ul> <div class="dependent"> <p class="form_input add_margin"> <input type="text" class="text_input" id="nav[feed][text]" name="nav[feed][text]" value="<?php echo thesis_feed_link_text(); ?> " /> <label for="nav[feed][text]"><?php _e('Change your feed link text', 'thesis'); ?> </label> </p> <ul> <li><input type="checkbox" id="nav[feed][nofollow]" name="nav[feed][nofollow]" value="1" <?php if ($nav['feed']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="nav[feed][nofollow]"><?php _e('Add <code>nofollow</code> to feed link', 'thesis'); ?> </label></li> </ul> </div> </div> </div> </div> <div class="options_module" id="save_button_control"> <div class="module_subsection"> <h4 class="module_switch"><a href="" title="<?php _e('Show/hide additional information', 'thesis'); ?> "><span class="pos">+</span><span class="neg">–</span></a><?php _e('Change Save Button Text', 'thesis'); ?> </h4> <p class="form_input more_info"> <input type="text" id="save_button_text" name="save_button_text" value="<?php if ($thesis_site->save_button_text) { echo $thesis_site->save_button_text; } ?> " /> <label for="save_button_text"><?php _e('not recommended (heh)', 'thesis'); ?> </label> </p> </div> </div> </div> </form> <?php } ?> </div> <?php }
function thesis_nav_menu() { global $thesis_site, $wp_query; #wp $current['id'] = !is_archive() ? $wp_query->queried_object_id : false; #wp $home_text = trim(wptexturize(thesis_home_link_text())); #wp $home_nofollow = $thesis_site->nav['home']['nofollow'] ? ' rel="nofollow"' : ''; if ($current['id'] && $wp_query->post->ancestors) { $current['ancestors'] = $wp_query->post->ancestors; } echo "<ul class=\"menu\">\n"; thesis_hook_first_nav_item(); if ($thesis_site->nav['home']['show'] || $_GET['template']) { #wp if (is_front_page()) { #wp $current_page = get_query_var('paged'); #wp $is_current = $current_page <= 1 ? ' current' : ''; } else { $is_current = is_home() && is_front_page() ? ' current' : ''; } #wp echo "<li class=\"tab tab-home{$is_current}\"><a href=\"" . get_bloginfo('url') . "\"{$home_nofollow}>{$home_text}</a></li>\n"; #wp } if ($thesis_site->nav['pages']) { foreach ($thesis_site->nav['pages'] as $id => $nav_page) { if ($nav_page['show']) { $nav_items[] = $id; $page_data[$id] = get_page($id); #wp $parents[$id] = $page_data[$id]->post_parent != 0 ? $page_data[$id]->post_parent : 0; } } if (is_array($nav_items)) { foreach ($nav_items as $id) { if (!$parents[$id]) { $nav_array[] = thesis_nav_array($id, $nav_items, $current); } } } if (is_array($nav_array)) { thesis_output_nav($nav_array, $page_data); } } if ($thesis_site->nav['categories']) { wp_list_categories('title_li=&include=' . $thesis_site->nav['categories']); } #wp if ($thesis_site->nav['links']) { $nav_links = get_bookmarks('category=' . $thesis_site->nav['links']); #wp foreach ($nav_links as $nav_link) { if ($nav_link->link_description) { $title = ' title="' . $nav_link->link_description . '"'; } if ($nav_link->link_rel) { $rel = ' rel="' . $nav_link->link_rel . '"'; } if ($nav_link->link_target) { $target = ' target="' . $nav_link->link_target . '"'; } echo '<li><a href="' . $nav_link->link_url . '"' . $title . $rel . $target . '>' . $nav_link->link_name . "</a></li>\n"; } } if ($thesis_site->nav['feed']['show'] || $_GET['template']) { #wp $feed_title = get_bloginfo('name') . ' RSS Feed'; #wp $feed_nofollow = $thesis_site->nav['feed']['nofollow'] ? ' rel="nofollow"' : ''; echo "<li class=\"rss\"><a href=\"" . thesis_feed_url() . "\" title=\"{$feed_title}\"{$feed_nofollow}>" . trim(wptexturize(thesis_feed_link_text())) . "</a></li>\n"; #wp } thesis_hook_last_nav_item(); echo "</ul>\n"; }
<div class="control_box more_info"> <ul class="control"> <li><input type="checkbox" id="nav[home][show]" name="nav[home][show]" value="1" <?php if ($nav['home']['show']) { echo 'checked="checked" '; } ?> /><label for="nav[home][show]"><?php _e('Show home link in nav menu', 'thesis'); ?> </label></li> </ul> <div class="dependent"> <p class="form_input add_margin"> <input type="text" id="nav[home][text]" name="nav[home][text]" value="<?php echo thesis_home_link_text(); ?> " /> <label for="nav[home][text]"><?php _e('home link text', 'thesis'); ?> </label> </p> <ul> <li><input type="checkbox" id="nav[home][nofollow]" name="nav[home][nofollow]" value="1" <?php if ($nav['home']['nofollow']) { echo 'checked="checked" '; } ?> /><label for="nav[home][nofollow]"><?php _e('Add <code>nofollow</code> to home link', 'thesis');