function node_field_field_extra_fields in Node Field 7.2
Implements hook_field_extra_fields().
File
- ./
node_field.module, line 152 - This module provide ability to add extra fields to any single node.
Code
function node_field_field_extra_fields() {
$items = [];
$options = variable_get('node_field_node_types', []);
foreach ($options as $option) {
if (empty($option)) {
continue;
}
$items['node'][$option] = [
'display' => [
'node_fields' => [
'label' => t('Node fields'),
'description' => t('Node fields'),
'weight' => 0,
],
],
'form' => [
'node_fields' => [
'label' => t('Node fields'),
'description' => t('Node fields'),
'visible' => TRUE,
'weight' => 0,
],
],
];
}
return $items;
}