registered sidebars with capital letter in the ID don't get loaded
|Reported by:||wjm||Owned by:|
if you use register_sidebar() and set ID to have a capital letter, it will be displayed in the widgets section but its widgets won't get loaded.
register_sidebar(array( 'name' => 'RightSideBar', 'id' => 'Rsidebar', ));
it won't work but
register_sidebar(array( 'name' => 'RightSideBar', 'id' => 'rsidebar', ));
... will work.
This has to do with dynamic_sidebar() using sanitize_title() to sanitize the id,
the thing is that sanitize_title() (which calls sanitize_title_with_dashes()) will turn every upper case to a lower case, and later it will look in $wp_registered_sidebars for the key which is non-existant.
This patch sanitizes the sidebar ID at the time of registering it,
'id' => 'Rsidebar',
'id' => 'rsidebar',
registers the same sidebar.