Output final optgroup. Props hakre. fixes #10292 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@11677 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-07-01 17:59:19 +00:00
parent 02f0eee9eb
commit 914d0b1487
1 changed files with 2 additions and 2 deletions

View File

@ -3222,7 +3222,7 @@ function _wp_timezone_choice_usort_callback( $a, $b ) {
/**
* 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 ) {
@ -3320,7 +3320,7 @@ function wp_timezone_choice( $selected_zone ) {
$structure[] = '<option ' . $selected . 'value="' . esc_attr( $value ) . '">' . esc_html( $display ) . "</option>";
// 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>';
}
}