function date_repeat_fields in Date 7
Same name and namespace in other branches
- 5.2 date/date.module \date_repeat_fields()
- 6.2 date/date.module \date_repeat_fields()
1 call to date_repeat_fields()
File
- ./
date.module, line 75
Code
function date_repeat_fields($entity, $entity_type = 'node') {
$bundle = '';
switch ($entity_type) {
case 'node':
$bundle = $entity->type;
break;
}
$type = field_info_instances($entity_type, $bundle);
$fields = array();
foreach ($type as $field_name => $field) {
$field = field_info_field($field_name);
if (in_array($field['type'], array(
'date',
'datestamp',
'datetime',
)) && $field['settings']['repeat']) {
$fields[] = $field_name;
}
}
return $fields;
}