Output final optgroup. Props hakre. fixes #10292 for 2.8.1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.8@11678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d3dd8860e6
commit
69ce5e7ed7
|
@ -3222,7 +3222,7 @@ function _wp_timezone_choice_usort_callback( $a, $b ) {
|
||||||
/**
|
/**
|
||||||
* Gives a nicely formatted list of timezone strings // temporary! Not in final
|
* Gives a nicely formatted list of timezone strings // temporary! Not in final
|
||||||
*
|
*
|
||||||
* @param string $selectedzone - which zone should be the selected one
|
* @param $selected_zone string Selected Zone
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function wp_timezone_choice( $selected_zone ) {
|
function wp_timezone_choice( $selected_zone ) {
|
||||||
|
@ -3320,7 +3320,7 @@ function wp_timezone_choice( $selected_zone ) {
|
||||||
$structure[] = '<option ' . $selected . 'value="' . esc_attr( $value ) . '">' . esc_html( $display ) . "</option>";
|
$structure[] = '<option ' . $selected . 'value="' . esc_attr( $value ) . '">' . esc_html( $display ) . "</option>";
|
||||||
|
|
||||||
// Close continent optgroup
|
// Close continent optgroup
|
||||||
if ( !empty( $zone['city'] ) && isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent'] ) {
|
if ( !empty( $zone['city'] ) && ( !isset($zonen[$key + 1]) || (isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent']) ) ) {
|
||||||
$structure[] = '</optgroup>';
|
$structure[] = '</optgroup>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue