mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Use a for loop where it's more appropriate. Fixes #5234 props darkdragon and DD32.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5e0cf58bfb
commit
5fb4d6ab00
@ -18,9 +18,7 @@ function register_sidebars($number = 1, $args = array()) {
|
||||
if ( is_string($args) )
|
||||
parse_str($args, $args);
|
||||
|
||||
$i = 1;
|
||||
|
||||
while ( $i <= $number ) {
|
||||
for ( $i=1; $i <= $number; $i++ ) {
|
||||
$_args = $args;
|
||||
if ( $number > 1 ) {
|
||||
$_args['name'] = isset($args['name']) ? $args['name'] : sprintf(__('Sidebar %d'), $i);
|
||||
@ -29,7 +27,6 @@ function register_sidebars($number = 1, $args = array()) {
|
||||
}
|
||||
$_args['id'] = isset($args['id']) ? $args['id'] : "sidebar-$i";
|
||||
register_sidebar($_args);
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user