You are here

function notifications_ui_link in Notifications 7

Same name and namespace in other branches
  1. 5 notifications_ui/notifications_ui.module \notifications_ui_link()
  2. 6.4 notifications_ui/notifications_ui.module \notifications_ui_link()
  3. 6 notifications_ui/notifications_ui.module \notifications_ui_link()
  4. 6.2 notifications_ui/notifications_ui.module \notifications_ui_link()
  5. 6.3 notifications_ui/notifications_ui.module \notifications_ui_link()

Implementation of hook_link()

Add subscriptions links to nodes

File

notifications_ui/notifications_ui.module, line 186
User Interface for subscriptions modules

Code

function notifications_ui_link($type, $node = NULL, $teaser = FALSE) {
  if ($type == 'node' && notifications_ui_user_access() && ($teaser && notifications_ui_node_options($node->type, 'teaserlinks') || !$teaser && notifications_ui_node_options($node->type, 'links'))) {

    // Now we have the array of allowed options ready, build single links
    return notifications_option_subscribe_links('node', $node);
  }
}