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: https://develop.svn.wordpress.org/trunk@22299 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-10-25 20:15:47 +00:00
parent 7ff116f14a
commit c67b1d88a0
1 changed files with 4 additions and 4 deletions

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>
<?php
$date_formats = apply_filters( 'date_formats', array(
$date_formats = array_unique( apply_filters( 'date_formats', array(
__('F j, Y'),
'Y/m/d',
'm/d/Y',
'd/m/Y',
) );
) ) );
$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>
<?php
$time_formats = apply_filters( 'time_formats', array(
$time_formats = array_unique( apply_filters( 'time_formats', array(
__('g:i a'),
'g:i A',
'H:i',
) );
) ) );
$custom = true;