Allow sidebar names to be passed to dynamic_sidebar(). fixes #4258 for 2.3
git-svn-id: http://svn.automattic.com/wordpress/trunk@5474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b0d60f0351
commit
1fbb89b1a0
|
@ -188,6 +188,12 @@ function dynamic_sidebar($index = 1) {
|
|||
$index = "sidebar-$index";
|
||||
} else {
|
||||
$index = sanitize_title($index);
|
||||
foreach ( $wp_registered_sidebars as $key => $value ) {
|
||||
if ( sanitize_title($value['name']) == $index ) {
|
||||
$index = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||
|
|
Loading…
Reference in New Issue