Ticket #9794: 9794.2.diff
File 9794.2.diff, 1.6 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
3106 3106 * 3107 3107 */ 3108 3108 function wp_timezone_choice($selectedzone) { 3109 static $mo_loaded = false; 3110 3109 3111 $continents = array('Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific', 'Etc'); 3110 3112 3113 // Load translations for continents and cities 3114 if ( ! $mo_loaded ) { 3115 $locale = get_locale(); 3116 $mofile = WP_LANG_DIR . "/continents-cities-$locale.mo"; 3117 load_textdomain('default', $mofile); 3118 $mo_loaded = true; 3119 } 3120 3111 3121 $all = timezone_identifiers_list(); 3112 3122 3113 3123 $i = 0; … … 3123 3133 3124 3134 usort($zonen, create_function( 3125 3135 '$a, $b', ' 3126 if ( $a["continent"] == $b["continent"] && $a["city"] == $b["city"] ) 3127 return strnatcasecmp($a["subcity"], $b["subcity"]); 3128 elseif ( $a["continent"] == $b["continent"] ) 3129 return strnatcasecmp($a["city"], $b["city"]); 3136 $a_continent = translate($a["continent"]); 3137 $b_continent = translate($b["continent"]); 3138 $a_city = translate($a["city"]); 3139 $b_city = translate($b["city"]); 3140 $a_subcity = translate($a["subcity"]); 3141 $b_subcity = translate($b["subcity"]); 3142 if ( $a_continent == $b_continent && $a_city == $b_city ) 3143 return strnatcasecmp($a_subcity, $b_subcity); 3144 elseif ( $a_continent == $b_continent ) 3145 return strnatcasecmp($a_city, $b_city); 3130 3146 else 3131 return strnatcasecmp($a ["continent"], $b["continent"]);3147 return strnatcasecmp($a_continent, $b_continent); 3132 3148 ')); 3133 3149 3134 3150 $structure = '';