Skip to content

Commit

Permalink
This diff adds d.m.Y (day.month.year) as a supported date format in…
Browse files Browse the repository at this point in the history
… WordPress's general settings. This gives users another option when selecting how dates are displayed on their site. The `array_unique` call ensures that if this format was already added by a plugin or theme, it won't be duplicated. This change is relevant if you are concerned with internationalization or providing more date format choices for users in regions where this format is common.
  • Loading branch information
Paul Bearne committed Nov 25, 2024
1 parent 75c587f commit 0f6b001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-admin/options-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
*
* @param string[] $default_date_formats Array of default date formats.
*/
$date_formats = array_unique( apply_filters( 'date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y' ) ) );
$date_formats = array_unique( apply_filters( 'date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y', 'd.m.Y' ) ) );

$custom = true;

Expand Down

0 comments on commit 0f6b001

Please sign in to comment.