function uniqueness_field_extra_fields in Uniqueness 7
Implements hook_field_extra_fields().
Allows the inline uniqueness field to be sorted on the manage fields page for any content type for which it is enabled.
File
- ./
uniqueness.module, line 95 - uniqueness.module
Code
function uniqueness_field_extra_fields() {
$extras = array();
if (in_array(UNIQUENESS_WIDGET_INLINE, variable_get('uniqueness_widgets', array(
UNIQUENESS_WIDGET_INLINE,
)))) {
// The inline widget is enabled
foreach (array_keys(node_type_get_types()) as $type) {
$v = variable_get('uniqueness_type_' . $type, array());
if (!empty($v)) {
$extras['node'][$type] = array(
'form' => array(
'uniqueness' => array(
'label' => filter_xss_admin(variable_get('uniqueness_default_title', t('Related content'))),
'description' => t('Uniqueness inline widget.'),
'weight' => 0,
),
),
);
}
}
}
return $extras;
}