function notifications_ui_link in Notifications 6.3
Same name and namespace in other branches
- 5 notifications_ui/notifications_ui.module \notifications_ui_link()
- 6.4 notifications_ui/notifications_ui.module \notifications_ui_link()
- 6 notifications_ui/notifications_ui.module \notifications_ui_link()
- 6.2 notifications_ui/notifications_ui.module \notifications_ui_link()
- 7 notifications_ui/notifications_ui.module \notifications_ui_link()
Implementation of hook_link()
Add subscriptions links to nodes
File
- notifications_ui/
notifications_ui.module, line 346 - User Interface for subscriptions modules
Code
function notifications_ui_link($type, $node = NULL, $teaser = FALSE) {
global $user;
if ($type == 'node' && $user->uid && (notifications_ui_node_options($node->type, 'teaserlinks') && $teaser || notifications_ui_node_options($node->type, 'links') && !$teaser) && ($options = notifications_ui_subscribe_options($user, 'node', $node))) {
// Now we have the array of allowed options ready, build single links
return notifications_ui_build_links($options);
}
}