Skip to content

Commit cc5c5b8

Browse files
Date/Time: Add d.m.Y to date format presets on General Settings screen.
This gives users another option when selecting how dates are displayed on their site. This change is relevant for better localization, providing more date format choices for users in regions where this format is common. The `array_unique()` call ensures that if this format was already added by a plugin or theme, it won't be duplicated. Follow-up to [9131], [22299], [28820], [28848]. Props Daedalon, pbearne, fierevere, im3dabasia1, SergeyBiryukov. Fixes #55685. git-svn-id: https://develop.svn.wordpress.org/trunk@59475 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ad9505b commit cc5c5b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wp-admin/options-general.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,12 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
476476
* Filters the default date formats.
477477
*
478478
* @since 2.7.0
479-
* @since 4.0.0 Added ISO date standard YYYY-MM-DD format.
479+
* @since 4.0.0 Replaced the `Y/m/d` format with `Y-m-d` (ISO date standard YYYY-MM-DD).
480+
* @since 6.8.0 Added the `d.m.Y` format.
480481
*
481482
* @param string[] $default_date_formats Array of default date formats.
482483
*/
483-
$date_formats = array_unique( apply_filters( 'date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y' ) ) );
484+
$date_formats = array_unique( apply_filters( 'date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y', 'd.m.Y' ) ) );
484485

485486
$custom = true;
486487

0 commit comments

Comments
 (0)