Skip to content

Instantly share code, notes, and snippets.

@BeardedGinger
Created January 17, 2014 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BeardedGinger/a7e6978c8dcdaac87bfb to your computer and use it in GitHub Desktop.
Save BeardedGinger/a7e6978c8dcdaac87bfb to your computer and use it in GitHub Desktop.
Trying to add this "12:30 pm" time format for the time field within the Meta Box plugin. Current code below outputs "18:00" References http://www.deluxeblogtips.com/meta-box/define-fields/ http://trentrichardson.com/examples/timepicker/#basic_examples
$meta_boxes[] = array(
'id' => 'location-info',
'title' => 'Location Information',
'pages' => array( 'locations' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
// Hours
array(
'name' => 'Hours',
'id' => $prefix . 'location_hours',
'type' => 'time',
'js_options' => array(
'timeFormat' => 'hh:mm tt'
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment