Get named sidebars. Props AaronCampbell. fixes #5615
git-svn-id: http://svn.automattic.com/wordpress/trunk@6609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f56d2616d3
commit
8c55d60d5b
|
@ -20,9 +20,11 @@ function get_footer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function get_sidebar() {
|
function get_sidebar( $name = null ) {
|
||||||
do_action( 'get_sidebar' );
|
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');
|
load_template( TEMPLATEPATH . '/sidebar.php');
|
||||||
else
|
else
|
||||||
load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');
|
load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');
|
||||||
|
|
Loading…
Reference in New Issue