| 1 | Index: wp-includes/widgets.php
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- wp-includes/widgets.php (revision 5342)
|
|---|
| 4 | +++ wp-includes/widgets.php (working copy)
|
|---|
| 5 | @@ -44,7 +44,6 @@
|
|---|
| 6 |
|
|---|
| 7 | $defaults = array(
|
|---|
| 8 | 'name' => sprintf(__('Sidebar %d'), count($wp_registered_sidebars) + 1 ),
|
|---|
| 9 | - 'id' => "sidebar-$i",
|
|---|
| 10 | 'before_widget' => '<li id="%1$s" class="widget %2$s">',
|
|---|
| 11 | 'after_widget' => "</li>\n",
|
|---|
| 12 | 'before_title' => '<h2 class="widgettitle">',
|
|---|
| 13 | @@ -53,6 +52,7 @@
|
|---|
| 14 |
|
|---|
| 15 | $sidebar = array_merge($defaults, $args);
|
|---|
| 16 |
|
|---|
| 17 | + if ( ! isset($sidebar['id']) ) $sidebar['id'] = sanitize_title($sidebar['name']);
|
|---|
| 18 | $wp_registered_sidebars[$sidebar['id']] = $sidebar;
|
|---|
| 19 |
|
|---|
| 20 | return $sidebar['id'];
|
|---|