equal
deleted
inserted
replaced
79 * @return array |
79 * @return array |
80 */ |
80 */ |
81 public function json() { |
81 public function json() { |
82 $data = parent::json(); |
82 $data = parent::json(); |
83 |
83 |
84 $data['maxYear'] = intval( $this->max_year ); |
84 $data['maxYear'] = (int) $this->max_year; |
85 $data['minYear'] = intval( $this->min_year ); |
85 $data['minYear'] = (int) $this->min_year; |
86 $data['allowPastDate'] = (bool) $this->allow_past_date; |
86 $data['allowPastDate'] = (bool) $this->allow_past_date; |
87 $data['twelveHourFormat'] = (bool) $this->twelve_hour_format; |
87 $data['twelveHourFormat'] = (bool) $this->twelve_hour_format; |
88 $data['includeTime'] = (bool) $this->include_time; |
88 $data['includeTime'] = (bool) $this->include_time; |
89 |
89 |
90 return $data; |
90 return $data; |
243 ); |
243 ); |
244 } else { |
244 } else { |
245 $timezone_info['description'] = ''; |
245 $timezone_info['description'] = ''; |
246 } |
246 } |
247 } else { |
247 } else { |
248 $formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) ); |
248 $formatted_gmt_offset = $this->format_gmt_offset( (int) get_option( 'gmt_offset', 0 ) ); |
249 |
249 |
250 $timezone_info['description'] = sprintf( |
250 $timezone_info['description'] = sprintf( |
251 /* translators: 1: UTC abbreviation and offset, 2: UTC offset. */ |
251 /* translators: 1: UTC abbreviation and offset, 2: UTC offset. */ |
252 __( 'Your timezone is set to %1$s (Coordinated Universal Time %2$s).' ), |
252 __( 'Your timezone is set to %1$s (Coordinated Universal Time %2$s).' ), |
253 '<abbr>UTC</abbr>' . $formatted_gmt_offset, |
253 '<abbr>UTC</abbr>' . $formatted_gmt_offset, |