Make WordPress Core

Ticket #29205: 29205.diff

File 29205.diff, 1.1 KB (added by ryanduff, 9 years ago)
  • wp-includes/functions.php

     
    41924192
    41934193        // Do manual UTC offsets
    41944194        $structure[] = '<optgroup label="'. esc_attr__( 'Manual Offsets' ) .'">';
    4195         $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
    4196                 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);
     4195        $offset_range = array (-12, -11, -10, -9.5, -9, -8, -7, -6, -5, -4.5, -4, -3.5, -3, -2, -1,
     4196                0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 8, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
     4197
     4198        // Validate selected value and reset to UTC+0 if invalid
     4199        $sanitized_selected_zone = str_replace( 'UTC', '', $selected_zone );
     4200        if ( ! in_array( $sanitized_selected_zone, $offset_range ) ) {
     4201                $selected_zone = 'UTC+0';
     4202        }
     4203
    41974204        foreach ( $offset_range as $offset ) {
    41984205                if ( 0 <= $offset )
    41994206                        $offset_name = '+' . $offset;