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:
parent
7ff116f14a
commit
c67b1d88a0
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user