Skip to content

Commit

Permalink
Don't show the same time or date format twice on the General Settings…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
nacin committed Oct 25, 2012
1 parent 6346dfe commit f513019
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wp-admin/options-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ function options_general_add_js() {
<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;

Expand Down Expand Up @@ -263,11 +263,11 @@ function options_general_add_js() {
<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;

Expand Down

0 comments on commit f513019

Please sign in to comment.