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:
ryan 2007-05-14 05:13:39 +00:00
parent b0d60f0351
commit 1fbb89b1a0
1 changed files with 6 additions and 0 deletions

View File

@ -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();