--- a/wp/wp-includes/customize/class-wp-customize-date-time-control.php Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-includes/customize/class-wp-customize-date-time-control.php Mon Oct 14 18:28:13 2019 +0200
@@ -81,11 +81,11 @@
public function json() {
$data = parent::json();
- $data['maxYear'] = intval( $this->max_year );
- $data['minYear'] = intval( $this->min_year );
- $data['allowPastDate'] = (bool) $this->allow_past_date;
+ $data['maxYear'] = intval( $this->max_year );
+ $data['minYear'] = intval( $this->min_year );
+ $data['allowPastDate'] = (bool) $this->allow_past_date;
$data['twelveHourFormat'] = (bool) $this->twelve_hour_format;
- $data['includeTime'] = (bool) $this->include_time;
+ $data['includeTime'] = (bool) $this->include_time;
return $data;
}
@@ -96,7 +96,7 @@
* @since 4.9.0
*/
public function content_template() {
- $data = array_merge( $this->json(), $this->get_month_choices() );
+ $data = array_merge( $this->json(), $this->get_month_choices() );
$timezone_info = $this->get_timezone_info();
$date_format = get_option( 'date_format' );
@@ -189,6 +189,8 @@
* @since 4.9.0
* @see touch_time()
*
+ * @global WP_Locale $wp_locale
+ *
* @return array
*/
public function get_month_choices() {
@@ -198,7 +200,7 @@
$month_text = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
/* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
- $months[ $i ]['text'] = sprintf( __( '%1$s-%2$s' ), $i, $month_text );
+ $months[ $i ]['text'] = sprintf( __( '%1$s-%2$s' ), $i, $month_text );
$months[ $i ]['value'] = $i;
}
return array(
@@ -214,7 +216,7 @@
* @return array abbr and description.
*/
public function get_timezone_info() {
- $tz_string = get_option( 'timezone_string' );
+ $tz_string = get_option( 'timezone_string' );
$timezone_info = array();
if ( $tz_string ) {
@@ -225,9 +227,9 @@
}
if ( $tz ) {
- $now = new DateTime( 'now', $tz );
- $formatted_gmt_offset = sprintf( 'UTC%s', $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 ) );
- $tz_name = str_replace( '_', ' ', $tz->getName() );
+ $now = new DateTime( 'now', $tz );
+ $formatted_gmt_offset = sprintf( 'UTC%s', $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 ) );
+ $tz_name = str_replace( '_', ' ', $tz->getName() );
$timezone_info['abbr'] = $now->format( 'T' );
/* translators: 1: timezone name, 2: timezone abbreviation, 3: gmt offset */
@@ -236,7 +238,7 @@
$timezone_info['description'] = '';
}
} else {
- $formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) );
+ $formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) );
$timezone_info['abbr'] = sprintf( 'UTC%s', $formatted_gmt_offset );
/* translators: %s: UTC offset */