function _notifications_content_node_options in Notifications 6
Same name and namespace in other branches
- 5 notifications_content/notifications_content.module \_notifications_content_node_options()
- 6.2 notifications_content/notifications_content.module \_notifications_content_node_options()
- 6.3 notifications_content/notifications_content.module \_notifications_content_node_options()
Subscribe / unsubscribe options to specific node.
1 call to _notifications_content_node_options()
- notifications_content_notifications in notifications_content/
notifications_content.module - Implementation of hook_notifications()
File
- notifications_content/
notifications_content.module, line 552 - Subscriptions to content events
Code
function _notifications_content_node_options($account, $node) {
$options = array();
// Thread
if (notifications_content_type_enabled($node->type, 'thread')) {
$options[] = array(
'name' => t('This post'),
'type' => 'thread',
'fields' => array(
'nid' => $node->nid,
),
);
}
// Content type
if (notifications_content_type_enabled($node->type, 'nodetype')) {
$options[] = array(
'name' => t('Posts of type @type', array(
'@type' => node_get_types('name', $node->type),
)),
'type' => 'nodetype',
'fields' => array(
'type' => $node->type,
),
);
}
// Author
if (notifications_content_type_enabled($node->type, 'author')) {
$options[] = array(
'name' => t('Posts by @name', array(
'@name' => $node->name,
)),
'type' => 'author',
'fields' => array(
'author' => $node->uid,
),
);
}
return $options;
}