You are here

function notifications_ui_node_options in Notifications 6.3

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. 7 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_block in notifications_ui/notifications_ui.module
Implementation of hook_block()
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()
notifications_ui_nodeapi in notifications_ui/notifications_ui.module
Display a button + js overlay

File

notifications_ui/notifications_ui.module, line 554
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
  $defaults = variable_get('notifications_ui_node', array(
    'links',
  ));
  if ($type && variable_get('notifications_ui_per_type', 0)) {
    $settings = variable_get('notifications_node_ui_' . $type, $defaults);
  }
  else {
    $settings = $defaults;
  }
  if ($option) {
    return in_array($option, $settings, TRUE) ? TRUE : FALSE;
  }
  else {
    return $settings;
  }
}