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:
parent
32cb0a9ae9
commit
25e659472d
@ -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
Block a user