mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user