WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/25/12 20:15:47 (2 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r22019 r22299  
    231231<?php 
    232232 
    233     $date_formats = apply_filters( 'date_formats', array( 
     233    $date_formats = array_unique( apply_filters( 'date_formats', array( 
    234234        __('F j, Y'), 
    235235        'Y/m/d', 
    236236        'm/d/Y', 
    237237        'd/m/Y', 
    238     ) ); 
     238    ) ) ); 
    239239 
    240240    $custom = true; 
     
    264264<?php 
    265265 
    266     $time_formats = apply_filters( 'time_formats', array( 
     266    $time_formats = array_unique( apply_filters( 'time_formats', array( 
    267267        __('g:i a'), 
    268268        'g:i A', 
    269269        'H:i', 
    270     ) ); 
     270    ) ) ); 
    271271 
    272272    $custom = true; 
Note: See TracChangeset for help on using the changeset viewer.