function notifications_content_type_enabled in Notifications 6
Same name and namespace in other branches
- 6.4 notifications_content/notifications_content.module \notifications_content_type_enabled()
- 6.2 notifications_content/notifications_content.module \notifications_content_type_enabled()
- 6.3 notifications_content/notifications_content.module \notifications_content_type_enabled()
- 7 notifications_content/notifications_content.module \notifications_content_type_enabled()
Get subscription options for this content type
- All enabled options if ($option = NULL)
- TRUE / FALSE for a given $option
5 calls to notifications_content_type_enabled()
- notifications_content_comment in notifications_content/
notifications_content.module - Implementation of hook_comment().
- notifications_content_form_alter in notifications_content/
notifications_content.module - Implementation of hook_form_alter().
- notifications_content_nodeapi in notifications_content/
notifications_content.module - Implementation of hook_nodeapi()
- notifications_content_types in notifications_content/
notifications_content.module - Get content types available for subscriptions to content type
- _notifications_content_node_options in notifications_content/
notifications_content.module - Subscribe / unsubscribe options to specific node.
File
- notifications_content/
notifications_content.module, line 745 - Subscriptions to content events
Code
function notifications_content_type_enabled($type = NULL, $option = NULL) {
$defaults = variable_get('notifications_content_type', array());
if ($type && variable_get('notifications_content_per_type', 0)) {
$settings = variable_get('notifications_content_type_' . $type, $defaults);
}
else {
$settings = $defaults;
}
if ($option) {
return in_array($option, $settings, TRUE);
}
else {
return $settings;
}
}