function subscriptions_ui_can_subscribe in Subscriptions 6
Same name and namespace in other branches
- 5.2 subscriptions_ui.module \subscriptions_ui_can_subscribe()
- 7 subscriptions_ui.module \subscriptions_ui_can_subscribe()
- 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.
3 calls to subscriptions_ui_can_subscribe()
- subscriptions_ui_block in ./
subscriptions_ui.module - Implementation of hook_block().
- subscriptions_ui_link in ./
subscriptions_ui.module - Implementation of hook_link().
- subscriptions_ui_nodeapi in ./
subscriptions_ui.module - Implementation of hook_nodeapi().
File
- ./
subscriptions_ui.module, line 65 - 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;
}