Ticket #5615: wordpress-general-template.diff

File wordpress-general-template.diff, 0.7 kB (added by AaronCampbell, 4 months ago)
  • trunk/wp-includes/general-template.php

    old new  
    2020} 
    2121 
    2222 
    23 function get_sidebar() { 
     23function get_sidebar($name=null) { 
    2424        do_action( 'get_sidebar' ); 
    25         if ( file_exists( TEMPLATEPATH . '/sidebar.php') ) 
     25        if ( isset($name) && file_exists( TEMPLATEPATH . "/sidebar-{$name}.php") ) 
     26                load_template( TEMPLATEPATH . "/sidebar-{$name}.php"); 
     27        elseif ( file_exists( TEMPLATEPATH . '/sidebar.php') ) 
    2628                load_template( TEMPLATEPATH . '/sidebar.php'); 
    2729        else 
    2830                load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');