WordPress.org

Make WordPress Core

Changeset 5348


Ignore:
Timestamp:
04/30/07 02:35:28 (11 years ago)
Author:
rob1n
Message:

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-includes/widgets.php

    r5342 r5348  
    4545    $defaults = array( 
    4646        'name' => sprintf(__('Sidebar %d'), count($wp_registered_sidebars) + 1 ), 
    47         'id' => "sidebar-$i", 
    4847        'before_widget' => '<li id="%1$s" class="widget %2$s">', 
    4948        'after_widget' => "</li>\n", 
     
    5453    $sidebar = array_merge($defaults, $args); 
    5554 
     55    if ( ! isset($sidebar['id']) ) $sidebar['id'] = sanitize_title($sidebar['name']); 
    5656    $wp_registered_sidebars[$sidebar['id']] = $sidebar; 
    5757 
  • trunk/wp-includes/widgets.php

    r5341 r5348  
    4545    $defaults = array( 
    4646        'name' => sprintf(__('Sidebar %d'), count($wp_registered_sidebars) + 1 ), 
    47         'id' => "sidebar-$i", 
    4847        'before_widget' => '<li id="%1$s" class="widget %2$s">', 
    4948        'after_widget' => "</li>\n", 
     
    5453    $sidebar = array_merge($defaults, $args); 
    5554 
     55    if ( ! isset($sidebar['id']) ) $sidebar['id'] = sanitize_title($sidebar['name']); 
    5656    $wp_registered_sidebars[$sidebar['id']] = $sidebar; 
    5757 
Note: See TracChangeset for help on using the changeset viewer.