function subscriptions_ui_field_extra_fields in Subscriptions 7
Same name and namespace in other branches
- 2.0.x subscriptions_ui/subscriptions_ui.module \subscriptions_ui_field_extra_fields()
Implements hook_field_extra_fields().
Enables CCK (admin/content/types/CONTENT_TYPE/fields) to configure the position of the Subscribe fieldset within the node.
Return value
array
File
- ./
subscriptions_ui.module, line 451 - Provides a user interface for Subscriptions.
Code
function subscriptions_ui_field_extra_fields() {
$extra = array();
if (variable_get('subscriptions_form_in_block', 0)) {
$types = db_query("SELECT type FROM {block_node_type} WHERE module = :module AND delta = :delta", array(
':module' => 'subscriptions_ui',
':delta' => 0,
))
->fetchCol();
if (empty($types)) {
$types = array_keys(node_type_get_types());
}
foreach ($types as $type) {
$extra['node'][$type]['display']['subscriptions_ui'] = array(
'label' => t('Subscribe'),
'description' => t('!Subscriptions_UI module form.', array(
'!Subscriptions_UI' => 'Subscriptions UI',
)),
'weight' => 100,
);
}
}
return $extra;
}