Changeset 13701
- Timestamp:
- 03/14/2010 12:12:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r13700 r13701 482 482 parse_str($args, $args); 483 483 484 $n = count($wp_registered_sidebars);485 484 for ( $i = 1; $i <= $number; $i++ ) { 486 485 $_args = $args; … … 492 491 493 492 // Custom specified ID's are suffixed if they exist already. 494 // Automatically generated sidebar names need to be suffixed regardless .493 // Automatically generated sidebar names need to be suffixed regardless starting at -0 495 494 if ( isset($args['id']) ) { 496 495 $_args['id'] = $args['id']; 496 $n = 2; // Start at -2 for conflicting custom ID's 497 497 while ( isset($wp_registered_sidebars[$_args['id']]) ) 498 498 $_args['id'] = $args['id'] . '-' . $n++; 499 499 } else { 500 $n = count($wp_registered_sidebars); 500 501 do { 501 $_args['id'] = 'sidebar-' . $n++;502 $_args['id'] = 'sidebar-' . ++$n; 502 503 } while ( isset($wp_registered_sidebars[$_args['id']]) ); 503 504 }
Note: See TracChangeset
for help on using the changeset viewer.