Get named sidebars. Props AaronCampbell. fixes #5615
git-svn-id: https://develop.svn.wordpress.org/trunk@6609 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d1b9e73996
commit
c606c5bc63
@ -20,9 +20,11 @@ function get_footer() {
|
||||
}
|
||||
|
||||
|
||||
function get_sidebar() {
|
||||
function get_sidebar( $name = null ) {
|
||||
do_action( 'get_sidebar' );
|
||||
if ( file_exists( TEMPLATEPATH . '/sidebar.php') )
|
||||
if ( isset($name) && file_exists( TEMPLATEPATH . "/sidebar-{$name}.php") )
|
||||
load_template( TEMPLATEPATH . "/sidebar-{$name}.php");
|
||||
elseif ( file_exists( TEMPLATEPATH . '/sidebar.php') )
|
||||
load_template( TEMPLATEPATH . '/sidebar.php');
|
||||
else
|
||||
load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');
|
||||
|
Loading…
Reference in New Issue
Block a user