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:
ryan 2007-05-14 05:12:52 +00:00
parent e9a0c47a63
commit f45b44194e
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();