Skip to content

Commit

Permalink
date/time format from user settings
Browse files Browse the repository at this point in the history
  • Loading branch information
franz-josef-kaiser committed Mar 30, 2012
1 parent e745c74 commit cb11e9c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inc/classes/meta-box.php
Expand Up @@ -472,12 +472,15 @@ static function normalize( $meta_box )
$clone = (isset($field['clone']) ? $field['clone'] : false);
$multiple = in_array( $field['type'], array( 'checkbox_list', 'file', 'image' ) ) ;
$std = $multiple ? array() : '';
$format = 'date' === $field['type'] ? 'yy-mm-dd' : ( 'time' === $field['type'] ? 'hh:mm' : '' );
$format = 'date' === $field['type']
? get_option( 'date_format' )
: ( 'time' === $field['type'] ? get_option( 'time_format' ) : '' )
;


$field = wp_parse_args( $field, array(
'multiple' => $multiple,
'clone' => $clone,
'clone' => $clone,
'std' => $std,
'desc' => '',
'format' => $format
Expand Down

0 comments on commit cb11e9c

Please sign in to comment.