You are here

function _popup_descriptions_enabled in Popup 8

Same name and namespace in other branches
  1. 7 modules/popup_descriptions/includes/popup_descriptions.util.inc \_popup_descriptions_enabled()
  2. 7.x modules/popup_descriptions/includes/popup_descriptions.util.inc \_popup_descriptions_enabled()

Tests whether an element's description should pop up

1 call to _popup_descriptions_enabled()
_popup_descriptions_apply_popup_description in modules/popup_descriptions/includes/popup_descriptions.util.inc
Applies popup behaviour to the description of a form element

File

modules/popup_descriptions/includes/popup_descriptions.util.inc, line 151

Code

function _popup_descriptions_enabled($element) {
  $mode = variable_get('description-popup-mode', 'specific');
  switch ($mode) {
    case 'specific':
      return _popup_descriptions_enabled_id($element) || _popup_descriptions_enabled_path();
    case 'all':
      return TRUE;
  }
  return FALSE;
}