You are here

function subscriptions_ui_can_subscribe in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions_ui.module \subscriptions_ui_can_subscribe()
  2. 6 subscriptions_ui.module \subscriptions_ui_can_subscribe()
  3. 2.0.x subscriptions_ui/subscriptions_ui.module \subscriptions_ui_can_subscribe()

Returns TRUE on node/NID pages if the NID is not blocked and no other module wants to provide the UI.

Return value

bool

2 calls to subscriptions_ui_can_subscribe()
subscriptions_ui_block_view in ./subscriptions_ui.module
Implements hook_block_view().
subscriptions_ui_node_view in ./subscriptions_ui.module
Implements hook_node_view().

File

./subscriptions_ui.module, line 103
Provides a user interface for Subscriptions.

Code

function subscriptions_ui_can_subscribe() {
  global $user;
  $arg1 = subscriptions_arg(1, 'nid');
  return $user->uid && subscriptions_arg(0) == 'node' && is_numeric($arg1) && module_invoke('subscriptions_ui', 'get_permission_to_handle', $arg1, 'subscriptions_ui') !== FALSE;
}