You are here

function notifications_ui_node_options in Notifications 7

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

Get settings value for content types

Parameters

$type: Content type to get settings for

$option: Optional option to check (each option can be enabled or disabled)

4 calls to notifications_ui_node_options()
notifications_ui_content_extra_fields in notifications_ui/notifications_ui.module
Implementation of hook hook_content_extra_fields().
notifications_ui_display_options in notifications_ui/notifications_ui.module
Check enabled option for object type / display type
notifications_ui_form_alter in notifications_ui/notifications_ui.module
Implementation of hook_form_alter()
notifications_ui_link in notifications_ui/notifications_ui.module
Implementation of hook_link()
1 string reference to 'notifications_ui_node_options'
notifications_ui_uninstall in notifications_ui/notifications_ui.install
Implementation of hook_uninstall()

File

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

Code

function notifications_ui_node_options($type = NULL, $option = NULL) {

  // We can use global options or per content type options. The default setting will be 'links' = 1
  $options = variable_get('notifications_ui_node_options', array(
    'links',
    'block',
  ));
  if ($type && variable_get('notifications_ui_per_type', 0)) {
    $options = variable_get('notifications_node_ui_' . $type, $options);
  }
  return $option ? in_array($option, $options, TRUE) : $options;
}