Allow sidebar names to be passed to dynamic_sidebar(). fixes #4258 for 2.2
git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e9a0c47a63
commit
f45b44194e
|
@ -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