Ticket #9758: 9758.diff
| File 9758.diff, 1.9 KB (added by Denis-de-Bernardy, 3 years ago) |
|---|
-
wp-includes/functions.php
3099 3099 * 3100 3100 */ 3101 3101 function wp_timezone_choice($selectedzone) { 3102 $continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific', 'Etc');3102 $continents = array(esc_attr__('Africa'), esc_attr__('America'), esc_attr__('Antarctica'), esc_attr__('Arctic'), esc_attr__('Asia'), esc_attr__('Atlantic'), esc_attr__('Australia'), esc_attr__('Europe'), esc_attr__('Indian'), esc_attr__('Pacific'), esc_attr__('Etc')); 3103 3103 3104 3104 $all = timezone_identifiers_list(); 3105 3105 … … 3114 3114 $i++; 3115 3115 } 3116 3116 3117 asort($zonen); 3117 usort($zonen, create_function( 3118 '$a, $b', ' 3119 if ( $a["continent"] == $b["continent"] && $a["city"] == $b["city"] ) 3120 return strnatcasecmp($a["subcity"], $b["subcity"]); 3121 elseif ( $a["continent"] == $b["continent"] ) 3122 return strnatcasecmp($a["city"], $b["city"]); 3123 else 3124 return strnatcasecmp($a["continent"], $b["continent"]); 3125 ')); 3126 3118 3127 $structure = ''; 3119 3128 $pad = ' '; 3120 3129 … … 3138 3147 if ( !empty($subcity) ) { 3139 3148 $city = $city . '/'. $subcity; 3140 3149 } 3141 $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".str_replace('_',' ',$city)."</option>\n"; //Timezone 3150 $display = str_replace('_',' ',$city); 3151 if ( $continent == esc_attr__('Etc') ) 3152 $display = strtr($display, '+-', '-+'); 3153 $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".$display."</option>\n"; //Timezone 3142 3154 } else { 3143 3155 $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">".$continent."</option>\n"; //Timezone 3144 3156 }
