diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f2f5de81be..aab4747222 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3114,7 +3114,16 @@ function wp_timezone_choice($selectedzone) { $i++; } - asort($zonen); + usort($zonen, create_function( + '$a, $b', ' + if ( $a["continent"] == $b["continent"] && $a["city"] == $b["city"] ) + return strnatcasecmp($a["subcity"], $b["subcity"]); + elseif ( $a["continent"] == $b["continent"] ) + return strnatcasecmp($a["city"], $b["city"]); + else + return strnatcasecmp($a["continent"], $b["continent"]); + ')); + $structure = ''; $pad = '   '; @@ -3138,7 +3147,10 @@ function wp_timezone_choice($selectedzone) { if ( !empty($subcity) ) { $city = $city . '/'. $subcity; } - $structure .= "\t\n"; //Timezone + $display = str_replace('_',' ',$city); + if ( $continent == 'Etc' ) + $display = strtr($display, '+-', '-+'); + $structure .= "\t\n"; //Timezone } else { $structure .= "\n"; //Timezone }