Bring back old behavior for sidebar ID's. Props filosofo. see #4169

git-svn-id: http://svn.automattic.com/wordpress/trunk@5348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-04-30 02:35:28 +00:00
parent 9ddfc38833
commit a50e0e4c41
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,6 @@ function register_sidebar($args = array()) {
$defaults = array( $defaults = array(
'name' => sprintf(__('Sidebar %d'), count($wp_registered_sidebars) + 1 ), 'name' => sprintf(__('Sidebar %d'), count($wp_registered_sidebars) + 1 ),
'id' => "sidebar-$i",
'before_widget' => '<li id="%1$s" class="widget %2$s">', 'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => "</li>\n", 'after_widget' => "</li>\n",
'before_title' => '<h2 class="widgettitle">', 'before_title' => '<h2 class="widgettitle">',
@ -53,6 +52,7 @@ function register_sidebar($args = array()) {
$sidebar = array_merge($defaults, $args); $sidebar = array_merge($defaults, $args);
if ( ! isset($sidebar['id']) ) $sidebar['id'] = sanitize_title($sidebar['name']);
$wp_registered_sidebars[$sidebar['id']] = $sidebar; $wp_registered_sidebars[$sidebar['id']] = $sidebar;
return $sidebar['id']; return $sidebar['id'];