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:
westi 2007-10-19 16:32:56 +00:00
parent 5e0cf58bfb
commit 5fb4d6ab00

View File

@ -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;
}
}