Ticket #1458: theme_switch_sidebar.patch

File theme_switch_sidebar.patch, 876 bytes (added by chrisdolan, 7 years ago)

Addition to themes/*/sidebar.php to add Theme Switcher support

  • wp-content/themes/classic/sidebar.php

     
    2424         <?php wp_get_archives('type=monthly'); ?> 
    2525        </ul> 
    2626 </li> 
     27<?php if (function_exists('wp_theme_switcher')) { ?> 
     28 <li><?php _e('Themes:'); ?> 
     29     <?php wp_theme_switcher(); ?> 
     30 </li> 
     31<?php } ?> 
    2732 <li id="meta"><?php _e('Meta:'); ?> 
    2833        <ul> 
    2934                <?php wp_register(); ?> 
  • wp-content/themes/default/sidebar.php

     
    5454 
    5555                        <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>                          
    5656                                <?php get_links_list(); ?> 
    57                                  
     57 
     58                                <?php if (function_exists('wp_theme_switcher')) { ?> 
     59                                <li><h2>Themes</h2> 
     60                                        <?php wp_theme_switcher(); ?> 
     61                                </li> 
     62                                <?php } ?> 
     63 
    5864                                <li><h2>Meta</h2> 
    5965                                <ul> 
    6066                                        <?php wp_register(); ?>