function subscriptions_ui_block_view in Subscriptions 7
Same name and namespace in other branches
- 2.0.x subscriptions_ui/subscriptions_ui.module \subscriptions_ui_block_view()
Implements hook_block_view().
Define the Subscriptions Interface block for node pages (depending on the Display Settings).
Parameters
int $delta:
Return value
array|null
File
- ./
subscriptions_ui.module, line 83 - Provides a user interface for Subscriptions.
Code
function subscriptions_ui_block_view($delta = 0) {
$arg2 = subscriptions_arg(2);
if (subscriptions_ui_can_subscribe() && variable_get('subscriptions_form_in_block', 0) && (!variable_get('subscriptions_form_link_only', 0) && (empty($arg2) || $arg2 == 'view') || variable_get('subscriptions_form_link_only', 0) && $arg2 == 'subscribe')) {
return array(
'subject' => t('Subscriptions'),
'content' => drupal_get_form('subscriptions_ui_node_form', menu_get_object()),
);
}
return NULL;
}