Allow sidebar names to be passed to dynamic_sidebar(). fixes #4258 for 2.3

git-svn-id: https://develop.svn.wordpress.org/trunk@5474 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-05-14 05:13:39 +00:00
parent 32cb0a9ae9
commit 25e659472d
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();