function fullcalendar_date_fields in FullCalendar 6.2
Same name and namespace in other branches
- 6 fullcalendar.module \fullcalendar_date_fields()
- 7 fullcalendar.module \fullcalendar_date_fields()
Filters the date fields.
Parameters
$fields: Array of possible date fields.
Return value
Array of valid date fields.
2 calls to fullcalendar_date_fields()
- template_preprocess_fullcalendar_fields in theme/
theme.inc - Prepares variables for template file invoked for row type.
- _fullcalendar_parse_fields in ./
fullcalendar.module - Helper function to resolve field_name and field_label.
File
- ./
fullcalendar.module, line 312 - Provides a views style plugin for FullCalendar
Code
function fullcalendar_date_fields($fields) {
foreach ($fields as $id => $field_name) {
switch ($id) {
case 'created':
case 'changed':
case 'access':
case 'login':
case 'timestamp':
case 'gcal':
break;
default:
$field = content_fields(str_replace('_value', '', $id));
if (!in_array($field['type'], array(
'date',
'datestamp',
'datetime',
))) {
unset($fields[$id]);
}
}
}
return $fields;
}