コード例 #1
0
ファイル: core.php プロジェクト: nottombrown/vlab
function mystique_list_categories($args = array())
{
    global $wp_query;
    $categories =& get_categories($args);
    $walker = new mystique_CategoryWalker();
    if (!empty($categories)) {
        echo $walker->walk($categories, 0, array('count' => false, 'current_category' => $wp_query->get_queried_object_id()));
    }
}
コード例 #2
0
ファイル: theme-settings.php プロジェクト: nottombrown/vlab
function mystique_theme_settings()
{
    global $is_IE;
    if (!current_user_can('switch_themes')) {
        wp_die(__('You are not authorised to perform this operation.', 'mystique'));
    }
    ?>

  <div id="mystique-settings" class="wrap clear-block">
   <form action="<?php 
    echo admin_url('admin-post.php?action=mystique_update');
    ?>
" method="post" enctype="multipart/form-data">

   <div class="clear-block">
     <?php 
    screen_icon();
    ?>
<h2 class="alignleft"><?php 
    _e('Mystique settings', 'mystique');
    ?>
</h2>
     <p class="controls alignleft"><input type="submit" class="button-primary" name="submit" value="<?php 
    _e("Save Changes", "mystique");
    ?>
" /><input type="submit" class="button-primary" name="reset" value="<?php 
    _e("Reset to Defaults", "mystique");
    ?>
" onclick="if(confirm('<?php 
    _e("Reset all theme settings to the default values? Are you sure?", "mystique");
    ?>
')) return true; else return false;" /></p>
   </div>

   <?php 
    wp_nonce_field('theme-settings');
    ?>

   <?php 
    mystique_check_update();
    ?>

   <?php 
    if (isset($_GET['updated'])) {
        ?>
   <div class="updated fade below-h2">
    <p><?php 
        printf(__('Settings saved. %s', 'mystique'), '<a href="' . user_trailingslashit(get_bloginfo('url')) . '">' . __('View site', 'mystique') . '</a>');
        ?>
</p>
   </div>
   <?php 
    } elseif (isset($_GET['error'])) {
        $errors = array(1 => __("Please upload a valid image file!", "mystique"), 2 => __("The file you uploaded doesn't seem to be a valid JPEG, PNG or GIF image", "mystique"), 3 => __("The image could not be saved on your server", "mystique"));
        ?>
   <div class="error fade below-h2">
    <p><?php 
        printf(__('Error: %s', 'mystique'), $errors[$_GET['error']]);
        ?>
</p>
   </div>
   <?php 
    }
    ?>

   <!-- tabbed content -->
   <div id="mystique-settings-tabs">

    <div class="clear-block">
     <ul class="subsubsub">
      <li class="design"><a href='#tab-design'><?php 
    _e("Design", "mystique");
    ?>
</a></li> |
      <li class="content"><a href='#tab-content'><?php 
    _e("Content", "mystique");
    ?>
</a></li> |
      <li class="nav"><a href='#tab-navigation'><?php 
    _e("Navigation", "mystique");
    ?>
</a></li> |
      <li class="seo"><a href='#tab-seo'><?php 
    _e("SEO", "mystique");
    ?>
</a></li> |
      <li class="ads"><a href='#tab-ads'><?php 
    _e("Ads", "mystique");
    ?>
</a></li> |
      <li class="adv"><a href='#tab-advanced'><?php 
    _e("Advanced", "mystique");
    ?>
</a></li> |
      <li class="usercss"><a href='#tab-css'><?php 
    _e("User CSS", "mystique");
    ?>
</a></li> |
     </ul>
    </div>

    <!-- sections -->
    <div class="sections wrap metabox-holder">

     <div class="section" id="tab-design">

      <?php 
    if ($is_IE) {
        ?>
      <p><?php 
        _e("The design settings panel is not yet supported by Internet Explorer. Sorry :(", "mystique");
        ?>
</p>
      <?php 
    } else {
        ?>

      <div id="themepreview-wrap"><div class="clear-block"><div class="loading"><?php 
        _e("Loading site preview...", "mystique");
        ?>
</div></div></div>

      <table class="form-table">
       <?php 
        $layout = get_mystique_option('layout');
        ?>
       <tr>
        <th scope="row"><p><?php 
        _e("Layout style", "mystique");
        ?>
<span><?php 
        _e("Use page templates if you want to apply these only to specific pages", "mystique");
        ?>
</span></p></th>
        <td id="layout-settings" class="clear-block">
         <div class="layout-box">
          <label for="layout-settings-col-1" class="layout col-1 <?php 
        echo mystique_selected_class('col-1', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-1" value="col-1" <?php 
        checked('col-1', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-2-left" class="layout col-2-left <?php 
        echo mystique_selected_class('col-2-left', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-2-left" value="col-2-left" <?php 
        checked('col-2-left', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-2-right" class="layout col-2-right <?php 
        echo mystique_selected_class('col-2-right', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-2-right" value="col-2-right" <?php 
        checked('col-2-right', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3" class="layout col-3 <?php 
        echo mystique_selected_class('col-3', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3" value="col-3" <?php 
        checked('col-3', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3-left" class="layout col-3-left <?php 
        echo mystique_selected_class('col-3-left', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3-left" value="col-3-left" <?php 
        checked('col-3-left', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3-right" class="layout col-3-right <?php 
        echo mystique_selected_class('col-3-right', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3-right" value="col-3-right" <?php 
        checked('col-3-right', $layout);
        ?>
/>
         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Color scheme", "mystique");
        ?>
</p></th>
        <td id="color-scheme">

         <div class="color-box">
          <label for="color-box-green" class="color_scheme green"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-green" value="green" <?php 
        checked('green', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-blue" class="color_scheme blue"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-blue" value="blue" <?php 
        checked('blue', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-red" class="color_scheme red"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-red" value="red" <?php 
        checked('red', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-grey" class="color_scheme grey"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-grey" value="grey" <?php 
        checked('grey', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Page (content) width", "mystique");
        ?>
<span><?php 
        _e("Note that fluid pages can be hard to read on large resolutions.", "mystique");
        ?>
</span></p></th>
        <td>

         <label for="opt_page_width_fixed"><input name="page_width" type="radio" id="opt_page_width_fixed" class="radio" value="fixed" <?php 
        checked('fixed', get_mystique_option('page_width'));
        ?>
 /><?php 
        printf(__("Fixed (%s)", "mystique"), '<a href="http://960.gs/" target="_blank">960gs</a>');
        ?>
</label>
         <label for="opt_page_width_fluid"><input name="page_width" type="radio" id="opt_page_width_fluid" class="radio" value="fluid" <?php 
        checked('fluid', get_mystique_option('page_width'));
        ?>
 /><?php 
        _e("Fluid (100%)/Custom", "mystique");
        ?>
</label>

        </td>
       </tr>

       <tr id="dimension_controls"<?php 
        if (get_mystique_option('layout') == 'col-1') {
            ?>
 class="hidden"<?php 
        }
        ?>
>
        <th scope="row"><p><?php 
        _e("Column sizes", "mystique");
        ?>
<span><?php 
        _e("(With 10 pixel padding between them)", "mystique");
        ?>
</span></p></th>
        <td>
         <div id="slider"></div>
         <?php 
        $dimensions = get_mystique_option('dimensions');
        foreach ($dimensions as $layout_size => $layout_types) {
            foreach ($layout_types as $layout => $values) {
                echo '<input type="hidden" id="opt_dimensions_' . $layout_size . '_' . $layout . '" name="dimensions_' . $layout_size . '_' . $layout . '" value="' . $values . '" />' . PHP_EOL;
            }
        }
        ?>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Font style", "mystique");
        ?>
</p></th>
        <td>
          <?php 
        $font_styles = font_styles();
        ?>

          <select name="font_style" id="opt_font_style">
           <?php 
        foreach ($font_styles as $entry => $name) {
            ?>
           <option value="<?php 
            echo $entry;
            ?>
" <?php 
            selected($entry, get_mystique_option('font_style'));
            ?>
 style='font-size:100%; font-family: <?php 
            echo $font_styles[$entry]['code'];
            ?>
;'><?php 
            echo $font_styles[$entry]['desc'];
            ?>
</option>
           <?php 
        }
        ?>
         </select>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Background color", "mystique");
        ?>
<span><?php 
        _e("Leave Black (#000000) to keep the default background", "mystique");
        ?>
</span></p></th>
        <td>

           <div class="color-selector clear-block" id="opt_background_color">
             <div class="preview" style="background-color: #<?php 
        echo wp_specialchars(get_mystique_option('background_color'));
        ?>
">
               <input name="background_color" type="hidden" value="<?php 
        echo wp_specialchars(get_mystique_option('background_color'));
        ?>
" />
             </div>
           </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Custom logo image", "mystique");
        ?>
<span><?php 
        _e("Show a logo image instead of text; Upload the graphic file from your computer", "mystique");
        ?>
</span></p></th>
        <td>
          <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>
           <input type="file" name="file-logo" id="file-logo" />
           <?php 
            if (get_mystique_option('logo')) {
                ?>
           <button type="submit" class="button" name="remove-logo" value="0"><?php 
                _e("Remove current image", "mystique");
                ?>
</button>
           <div class="clear-block">
            <div class="image-preview"><img src="<?php 
                echo get_mystique_option('logo');
                ?>
" style="padding:10px;" /></div>
           </div>
           <?php 
            }
            ?>
         <?php 
        } else {
            ?>
         <p class="error" style="padding: 4px;"><?php 
            printf(__("Directory %s doesn't have write permissions - can't upload!", "mystique"), '<strong>' . get_upload_dir('basedir') . '</strong>');
            ?>
</p><p><?php 
            _e("Check your upload path in Settings/Misc or CHMOD this directory to 755/777.<br />Contact your host if you don't know how", "mystique");
            ?>
</p>
         <?php 
        }
        ?>
         <input type="hidden" name="logo" value="<?php 
        echo get_mystique_option('logo');
        ?>
">
         <input type="hidden" name="logo_size" value="<?php 
        echo get_mystique_option('logo_size');
        ?>
">
        </td>
       </tr>


       <tr>
        <th scope="row"><p><?php 
        _e("Custom background image", "mystique");
        ?>
<span><?php 
        _e("Upload a new background/header image to replace the default one", "mystique");
        ?>
</span></p></th>
        <td>
         <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>
           <input type="file" name="file-background" id="file-background" />
           <?php 
            if (get_mystique_option('background')) {
                ?>
           <button type="submit" class="button" name="remove-background" value="0"><?php 
                _e("Remove current image", "mystique");
                ?>
</button>
           <div class="clear-block">
            <div class="image-preview"><img src="<?php 
                echo get_mystique_option('background');
                ?>
" style="padding:10px;" /></div>
           </div>
           <?php 
            }
            ?>
         <?php 
        } else {
            ?>
         <p class="error" style="padding: 4px;"><?php 
            printf(__("Directory %s doesn't have write permissions - can't upload!", "mystique"), '<strong>' . get_upload_dir('basedir') . '</strong>');
            ?>
</p><p><?php 
            _e("Check your upload path in Settings/Misc or CHMOD this directory to 755/777.<br />Contact your host if you don't know how", "mystique");
            ?>
</p>
         <?php 
        }
        ?>
         <input type="hidden" name="background" value="<?php 
        echo get_mystique_option('background');
        ?>
">
        </td>
       </tr>

      </table>
     <?php 
    }
    ?>
     </div>

     <div class="section" id="tab-content">
      <table class="form-table">

       <tr>
        <th scope="row"><p><?php 
    _e("Posts (single)", "mystique");
    ?>
<span><?php 
    _e("How much information do you want to show on the single post page?", "mystique");
    ?>
</span></p></th>
        <td>
         <label for="opt_single_tags">
           <input name="post_single_tags" id="opt_single_tags" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_tags'));
    ?>
 /> <?php 
    _e("Tags", "mystique");
    ?>
         </label>
         <label for="opt_single_meta">
           <input name="post_single_meta" id="opt_single_meta" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_meta'));
    ?>
 /> <?php 
    _e("Meta", "mystique");
    ?>
         </label>
         <label for="opt_single_share">
          <input name="post_single_share" id="opt_single_share" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_share'));
    ?>
 /> <?php 
    _e("Share", "mystique");
    ?>
         </label>
         <label for="opt_single_author">
           <input name="post_single_author" id="opt_single_author" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_author'));
    ?>
 /> <?php 
    _e("About the author", "mystique");
    ?>
         </label>
         <label for="opt_single_print">
          <input name="post_single_print" id="opt_single_print" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_print'));
    ?>
 /> <?php 
    _e("Print link", "mystique");
    ?>
         </label>
         <label for="opt_single_related">
           <input name="post_single_related" id="opt_single_related" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_related'));
    ?>
 /> <?php 
    _e("Related posts", "mystique");
    ?>
         </label>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Post previews", "mystique");
    ?>
<span><?php 
    _e("How much info do you want to show on blog/category/archive/search pages?", "mystique");
    ?>
</span></p></th>
        <td>
         <label for="opt_post_title">
           <input name="post_title" id="opt_post_title" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_title'));
    ?>
 /> <?php 
    _e("Title", "mystique");
    ?>
         </label>
         <label for="opt_post_info">
           <input name="post_info" id="opt_post_info" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_info'));
    ?>
 /> <?php 
    _e("Info bar", "mystique");
    ?>
         </label>
         <label for="opt_post_tags">
          <input name="post_tags" id="opt_post_tags" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_tags'));
    ?>
 /> <?php 
    _e("Tags");
    ?>
         </label>
         <label for="opt_post_content" style="margin-right: 0;">
          <input name="post_content" id="opt_post_content" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_content'));
    ?>
 /> <?php 
    _e("Content", "mystique");
    ?>
         </label>
         <select name="post_content_length" id="opt_post_content_length"<?php 
    if (!get_mystique_option('post_content')) {
        ?>
 disabled="disabled"<?php 
    }
    ?>
>
           <option value="50" <?php 
    selected('50', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 50 words, filtered', 'mystique');
    ?>
</option>
           <option value="100" <?php 
    selected('100', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 100 words, filtered', 'mystique');
    ?>
</option>
           <option value="200" <?php 
    selected('200', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 200 words, filtered', 'mystique');
    ?>
</option>
           <option value="f" <?php 
    selected('f', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('full', 'mystique');
    ?>
</option>
           <option value="ff" <?php 
    selected('ff', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('full, filtered', 'mystique');
    ?>
</option>
           <option value="e" <?php 
    selected('e', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('excerpt', 'mystique');
    ?>
</option>
         </select>
        </td>
       </tr>

       <tr>
         <th scope="row"><p><?php 
    _e("Auto generate thumbnails", "mystique");
    ?>
<span><?php 
    _e("Get the 1st image attached to a post, if no thumbnail is set manually", "mystique");
    ?>
</span></p></th>
         <td><input name="post_thumb_auto" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_thumb_auto'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Post thumbnail size", "mystique");
    ?>
<span><?php 
    printf(__("Note that this only works for images you upload from now on, older images will be browser-resized. You should use the %s plugin to create missing image sizes", "mystique"), '<a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/" target="_blank">Regenerate Thumbnails</a>');
    ?>
</span></p></th>
        <td>
         <select name="post_thumb">
          <?php 
    $wpsize = get_option('thumbnail_size_w') . ' x ' . get_option('thumbnail_size_h');
    ?>
          <option value="48x48" <?php 
    selected('48x48', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Very small: 48 x 48', 'mystique');
    ?>
</option>
          <option value="64x64" <?php 
    selected('64x64', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Small: 64 x 64', 'mystique');
    ?>
</option>
          <option value="80x80" <?php 
    selected('80x80', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Medium: 80 x 80', 'mystique');
    ?>
</option>
          <option value="100x100" <?php 
    selected('100x100', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Larger: 100 x 100', 'mystique');
    ?>
</option>
          <option value="<?php 
    echo str_replace(" ", "", $wpsize);
    ?>
" <?php 
    selected(str_replace(" ", "", $wpsize), get_mystique_option('post_thumb'));
    ?>
><?php 
    printf(__("WP's Media setting: %s", "mystique"), $wpsize);
    ?>
</option>
         </select>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_content");
    ?>

       <tr>
        <th scope="row"><p><?php 
    _e("Footer content", "mystique");
    ?>
<span><?php 
    if (current_user_can('unfiltered_html')) {
        _e("You can post HTML code", 'mystique');
    } else {
        _e("Only some HTML tags and attributes are allowed", 'mystique');
    }
    ?>
</span></p></th>
        <td>
         <textarea id="opt_footer_content" rows="8" cols="60" name="footer_content" class="code"><?php 
    echo wp_specialchars(get_mystique_option('footer_content'));
    ?>
</textarea>
         <br />
         <?php 
    printf(__("Use the following short codes for convenient adjustments: <br />%s", 'mystique'), '<code>[rss]</code> <code>[copyright]</code> <code>[credit]</code> <code>[ad code=#]</code> <code>[wp-link]</code> <code>[theme-link]</code> <code>[login-link]</code> <code>[blog-title]</code> <code>[xhtml]</code> <code>[css]</code> <code>[top]</code> <code>[page-rank]</code>.');
    ?>
        </td>
       </tr>

      </table>
     </div>

     <div class="section" id="tab-navigation">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Top navigation shows", "mystique");
    ?>
</p></th>
        <td class="clear-block">
         <select name="navigation" id="opt_navigation" class="alignleft">
          <option value="0" <?php 
    selected('0', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Nothing (disabled)', 'mystique');
    ?>
</option>
          <option value="pages" <?php 
    selected('pages', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Pages', 'mystique');
    ?>
</option>
          <option value="categories" <?php 
    selected('categories', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Categories', 'mystique');
    ?>
</option>
          <option value="links" <?php 
    selected('links', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Links', 'mystique');
    ?>
</option>
          <?php 
    if (WP_VERSION > 2.9) {
        ?>
<option value="menus" <?php 
        selected('menus', get_mystique_option('navigation'));
        ?>
><?php 
        _e('Custom Menus', 'mystique');
        ?>
</option><?php 
    }
    ?>
         </select>
         <div class="hidden alignleft inline opt_links">
          <?php 
    $taxonomy = 'link_category';
    $args = '';
    $terms = get_terms($taxonomy, $args);
    if ($terms) {
        ?>
             <?php 
        _e("from category", "mystique");
        ?>
             <select name="navigation_links">
             <?php 
        foreach ($terms as $term) {
            if ($term->count > 0) {
                ?>
               <option value="<?php 
                echo $term->name;
                ?>
" <?php 
                selected($term->name, get_mystique_option('navigation_links'));
                ?>
><?php 
                echo $term->name;
                ?>
 (<?php 
                printf(__("%s links", "mystique"), $term->count);
                ?>
)</option>
              <?php 
            }
        }
        ?>
             </select>
             <?php 
    } else {
        ?>
             <p class="error"><?php 
        _e("No links found", "mystique");
        ?>
</p>
           <?php 
    }
    ?>
         </div>
        </td>
       </tr>

       <tr id="nav-list" <?php 
    if (!get_mystique_option('navigation')) {
        ?>
class="hidden"<?php 
    }
    ?>
>
        <th scope="row"><p><?php 
    _e("Exclude from navigation", "mystique");
    ?>
<span><?php 
    _e("Check the items you wish to hide from the main menu", "mystique");
    ?>
</span></p></th>
        <td>

          <?php 
    if (get_option('show_on_front') != 'page') {
        ?>
          <ul class="nav-exclude">
            <li><input name="exclude_home" id="opt_exclude_home" class="checkbox" type="checkbox" value="1" <?php 
        checked('1', get_mystique_option('exclude_home'));
        ?>
 /><label> <a href="<?php 
        echo get_settings('home');
        ?>
"><?php 
        _e('Home', 'mystique');
        ?>
</a> </label></li>
          </ul>
          <?php 
    }
    ?>


          <?php 
    $categories =& get_categories(array('hide_empty' => false));
    $exclude_categories = explode(',', get_mystique_option('exclude_categories'));
    $walker = new mystique_CategoryWalker('checkbox', 'ul', $exclude_categories);
    if (!empty($categories)) {
        ?>
             <ul class="hidden nav-exclude" id="category-list">
              <?php 
        echo $walker->walk($categories, 0, array('checkboxes' => true, 'count' => true));
        ?>
             </ul>
           <?php 
    }
    ?>

          <?php 
    $pages =& get_pages('sort_column=post_parent,menu_order');
    $exclude_pages = explode(',', get_mystique_option('exclude_pages'));
    $walker = new mystique_PageWalker('checkbox', 'ul', $exclude_pages);
    if (!empty($pages)) {
        ?>
             <ul class="hidden nav-exclude" id="page-list">
              <?php 
        echo $walker->walk($pages, 0, array(), 0);
        ?>
             </ul>
           <?php 
    }
    ?>

        </td>
       </tr>
       <?php 
    do_action("mystique_admin_navigation");
    ?>

      </table>
     </div>

     <div class="section" id="tab-seo">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Additional site optimization for search engines", "mystique");
    ?>
<span><?php 
    _e("Uncheck if you are using a SEO plugin!", "mystique");
    ?>
</span></p></th>
        <td><input name="seo" type="checkbox" class="checkbox" id="opt_seo" value="1" <?php 
    checked('1', get_mystique_option('seo'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"></th>
        <td>
         <h3><?php 
    _e("What does this do?", "mystique");
    ?>
</h3>
         <ul style="list-style: disc">
          <li><em><?php 
    printf(__('enables canonical URLs for comments (duplicate content fix, only needed on wp < 2.9)', 'mystique'));
    ?>
</em></li>
          <li><em><?php 
    printf(__('generates unique titles for posts with multiple comment pages (prevents duplicate titles)', 'mystique'));
    ?>
</em></li>
          <li><em><?php 
    printf(__('generates a unique meta description tag for each page (no meta keywords; why? -<a %s>useless</a>)', 'mystique'), 'href="http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html" target="_blank"');
    ?>
 </em></li>
         </ul>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_seo");
    ?>

      </table>
     </div>

     <div class="section" id="tab-ads">
      <table class="form-table">

       <tr>
        <th scope="row">
         <p><?php 
    printf(__("Advertisment blocks", "mystique"), $i);
    ?>
<span><?php 
    printf(__('Use the %s short code to insert these ads into posts, text widgets or footer', 'mystique'), '<code>[ad]</code>');
    ?>
<br /><br><?php 
    if (!current_user_can('unfiltered_html')) {
        _e("Only some HTML tags and attributes are allowed", 'mystique');
    }
    ?>
</span></p><br />
         <p><span><?php 
    _e("Example:", "mystique");
    ?>
</span></p>
         <p><code>[ad code=4 align=center]</code></p>
        </th>
        <td class="clear-block">
         <?php 
    for ($i = 1; $i <= 6; $i++) {
        ?>
         <div class="ad-code clear-block">
          <label for="opt_ad_code_<?php 
        echo $i;
        ?>
"><?php 
        printf(__("Ad code #%s:", "mystique"), $i);
        ?>
</label><br />
          <textarea rows="8" cols="40" name="ad_code_<?php 
        echo $i;
        ?>
" id="opt_ad_code_<?php 
        echo $i;
        ?>
" class="code"><?php 
        echo wp_specialchars(get_mystique_option('ad_code_' . $i));
        ?>
</textarea>

         </div>
         <?php 
    }
    ?>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_ads");
    ?>

      </table>
     </div>

     <div class="section" id="tab-advanced">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Use jQuery", "mystique");
    ?>
<span><?php 
    _e("For testing purposes only. Only uncheck if you know what you're doing!", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_jquery" name="jquery" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('jquery'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Enable AJAX for comments", "mystique");
    ?>
<span><?php 
    _e("Navigate trough comment pages and post comments without refreshing (faster load, but may be incompatible with some plugins)", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_ajax_comments" name="ajax_comments" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('ajax_comments'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Enable theme built-in lightbox on all image links", "mystique");
    ?>
<span><?php 
    _e("Uncheck if you prefer a lightbox plugin", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_lightbox" name="lightbox" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('lightbox'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Remove Mystique settings from the database after theme switch", "mystique");
    ?>
<span><?php 
    _e("Only check if you're planning to remove and change the theme", "mystique");
    ?>
</span></p></th>      <td>
         <input name="remove_settings" id="opt_remove_settings" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('remove_settings'));
    ?>
 />
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_advanced");
    ?>

      </table>

      <?php 
    if (current_user_can('edit_themes')) {
        // disable this option for users that can't edit themes (usually on wpmu)
        ?>
      <hr />
      <table class="form-table">

       <tr>
        <th scope="row">
         <p><?php 
        _e("User functions", "mystique");
        ?>
<span><?php 
        _e("PHP code to add to the theme functions. Useful if you have plugins that require you to change the theme's functions.php file", "mystique");
        ?>
</span></p>
       </th>
        <td>
         <textarea rows="16" cols="60" name="functions" id="opt_functions" class="code"><?php 
        echo wp_specialchars(get_mystique_option('functions'));
        ?>
</textarea>
        </td>
       </tr>

      </table>
      <?php 
    }
    ?>
     </div>

     <div class="section" id="tab-css">
      <table class="form-table">

       <tr>
        <th scope="row"><p><?php 
    _e("CSS to add, or modify theme styles", "mystique");
    ?>
<span><?php 
    printf(__("Check %s to see existing theme classes and properties", "mystique"), '<a href="' . get_bloginfo('stylesheet_url') . '">style.css</a>');
    ?>
</span></p>
        </th>
        <td valign="top">
         <textarea rows="30" cols="80" name="user_css" id="opt_user_css" class="code"><?php 
    echo wp_specialchars(get_mystique_option('user_css'));
    ?>
</textarea>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_user_css");
    ?>

      </table>
     </div>


    </div>
    <!-- /sections -->

   </div>
   <!-- /tabbed content -->

   </form>

   <div class="support">
    <form class="alignleft" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="4605915" /> <input alt="Donate" name="submit" src="<?php 
    echo THEME_URL;
    ?>
/admin/images/pp.gif" type="image" /></form>
    <a href="http://digitalnature.ro/projects/mystique"><strong>Mystique</strong></a> is a free theme designed by <a href="http://digitalnature.ro">digitalnature</a>.<br />You can support the development of more free resources by donating.
   </div>

  </div>
  <?php 
}