From 2ae0f807cede486ee206e779c3d1cb8a7c20b8e5 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 6 Nov 2017 20:27:37 +0000 Subject: [PATCH] Customize: Fall back to ISO date format for date/time control inputs if year, month, or day are missing from the `date_format` option. Amends [42111]. Props dlh, westonruter. Fixes #42394. git-svn-id: https://develop.svn.wordpress.org/trunk@42117 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-customize-date-time-control.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/customize/class-wp-customize-date-time-control.php b/src/wp-includes/customize/class-wp-customize-date-time-control.php index c163ba1408..fdaa6837dc 100644 --- a/src/wp-includes/customize/class-wp-customize-date-time-control.php +++ b/src/wp-includes/customize/class-wp-customize-date-time-control.php @@ -100,14 +100,13 @@ class WP_Customize_Date_Time_Control extends WP_Customize_Control { $timezone_info = $this->get_timezone_info(); $date_format = get_option( 'date_format' ); - foreach ( array( 'Y', 'y', 'o' ) as $year_token ) { - $date_format = preg_replace( '/(?