Don't show the same time or date format twice on the General Settings page. This can occur if a translated format is the same as an existing default format. fixes #21060.

git-svn-id: http://core.svn.wordpress.org/trunk@22299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-10-25 20:15:47 +00:00
parent 6346dfe407
commit f5130199fa

View File

@ -230,12 +230,12 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
<fieldset><legend class="screen-reader-text"><span><?php _e('Date Format') ?></span></legend> <fieldset><legend class="screen-reader-text"><span><?php _e('Date Format') ?></span></legend>
<?php <?php
$date_formats = apply_filters( 'date_formats', array( $date_formats = array_unique( apply_filters( 'date_formats', array(
__('F j, Y'), __('F j, Y'),
'Y/m/d', 'Y/m/d',
'm/d/Y', 'm/d/Y',
'd/m/Y', 'd/m/Y',
) ); ) ) );
$custom = true; $custom = true;
@ -263,11 +263,11 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
<fieldset><legend class="screen-reader-text"><span><?php _e('Time Format') ?></span></legend> <fieldset><legend class="screen-reader-text"><span><?php _e('Time Format') ?></span></legend>
<?php <?php
$time_formats = apply_filters( 'time_formats', array( $time_formats = array_unique( apply_filters( 'time_formats', array(
__('g:i a'), __('g:i a'),
'g:i A', 'g:i A',
'H:i', 'H:i',
) ); ) ) );
$custom = true; $custom = true;