function cpn_field_extra_fields in Code per Node 7
Implements hook_field_extra_fields().
File
- ./
cpn.module, line 932 - Primary hook implementations.
Code
function cpn_field_extra_fields() {
$extra = array();
foreach (array_keys(node_type_get_names()) as $type) {
if (variable_get('cpn_css_enabled_' . $type, FALSE) || variable_get('cpn_js_enabled_' . $type, FALSE)) {
$extra['node'][$type]['form']['cpn'] = array(
'label' => t('Code Per Node'),
'description' => t('Custom CSS and/or JS fields.'),
'weight' => 5,
);
}
}
return $extra;
}