function opening_hours_field_extra_fields in Opening hours 7
Implements hook_field_extra_fields().
Define opening hours as an extra field for display in view modes.
File
- ./
opening_hours.module, line 702 - Opening hours module.
Code
function opening_hours_field_extra_fields() {
$extra = array();
$node_types = node_type_get_types();
foreach ($node_types as $node_type) {
// We only provide the extra fields on the enabled node types.
if (variable_get('opening_hours_enabled_' . $node_type->type, FALSE)) {
$extra['node'][$node_type->type] = array(
'display' => array(
'opening_hours_week' => array(
'label' => t('Opening hours'),
'description' => t('Opening hours'),
'weight' => 0,
'visible' => FALSE,
),
),
);
}
}
return $extra;
}