Skip to content

Commit 61bde4a

Browse files
committed
Date/Time: Revert [60942].
The changes in [60942] aimed to add an indicator next to the default date and time formats for the site’s locale in General Settings. However, the changes do not take into account the fact that a user may have a different language than the site’s default selected as their preference. Props swissspidy, johnbillion, SergeyBiryukov, pbearne, desrosj, wildworks. See #64102. git-svn-id: https://develop.svn.wordpress.org/trunk@61193 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d304b78 commit 61bde4a

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

src/wp-admin/options-general.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -480,20 +480,11 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
480480

481481
foreach ( $date_formats as $format ) {
482482
echo "\t<label><input type='radio' name='date_format' value='" . esc_attr( $format ) . "'";
483-
484483
if ( get_option( 'date_format' ) === $format ) { // checked() uses "==" rather than "===".
485484
echo " checked='checked'";
486485
$custom = false;
487486
}
488-
489-
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span>' .
490-
'<code>' . esc_html( $format ) . '</code>';
491-
492-
if ( __( 'F j, Y' ) === $format ) {
493-
echo ' ' . __( '(Site language default)' );
494-
}
495-
496-
echo "</label><br />\n";
487+
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
497488
}
498489

499490
echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
@@ -534,20 +525,11 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
534525

535526
foreach ( $time_formats as $format ) {
536527
echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
537-
538528
if ( get_option( 'time_format' ) === $format ) { // checked() uses "==" rather than "===".
539529
echo " checked='checked'";
540530
$custom = false;
541531
}
542-
543-
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span>' .
544-
'<code>' . esc_html( $format ) . '</code>';
545-
546-
if ( __( 'g:i a' ) === $format ) {
547-
echo ' ' . __( '(Site language default)' );
548-
}
549-
550-
echo "</label><br />\n";
532+
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
551533
}
552534

553535
echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';

0 commit comments

Comments
 (0)