function rabbit_hole_field_extra_fields in Rabbit Hole 7.2
Implements hook_field_extra_fields().
File
- ./
rabbit_hole.module, line 58 - Main module file for Rabbit Hole.
Code
function rabbit_hole_field_extra_fields() {
$extra = array();
// Get the modules that implements hook_rabbit_hole().
$modules = module_invoke_all('rabbit_hole');
// Add a form field for each bundle for every entity type that is controlled
// by Rabbit Hole.
foreach ($modules as $module => $info) {
$entity_info = entity_get_info($info['entity type']);
foreach ($entity_info['bundles'] as $bundle => $bundle_info) {
$extra[$info['entity type']][$bundle]['form'] = array(
'rabbit_hole' => array(
'label' => t('Rabbit Hole'),
'description' => t('Rabbit Hole configuration'),
'weight' => 0,
),
);
}
}
return $extra;
}