function date_popup_formats in Date 7.2
Same name and namespace in other branches
- 5.2 date_popup/date_popup.module \date_popup_formats()
- 6.2 date_popup/date_popup.module \date_popup_formats()
- 6 date_popup/date_popup.module \date_popup_formats()
- 7.3 date_popup/date_popup.module \date_popup_formats()
- 7 date_popup/date_popup.module \date_popup_formats()
Format options array.
@todo Remove any formats not supported by the widget, if any.
1 call to date_popup_formats()
- _date_field_widget_settings_form in ./
date_admin.inc - Helper function for date_field_widget_settings_form().
File
- date_popup/
date_popup.module, line 693 - A module to enable jQuery calendar and time entry popups.
Code
function date_popup_formats() {
// Load short date formats.
$formats = system_get_date_formats('short');
// Load custom date formats.
if ($formats_custom = system_get_date_formats('custom')) {
$formats = array_merge($formats, $formats_custom);
}
$formats = str_replace('i', 'i:s', array_keys($formats));
$formats = drupal_map_assoc($formats);
return $formats;
}