You are here

function _popup_descriptions_enabled_id in Popup 8

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

Tests whether an element's description should pop up based on its id

2 calls to _popup_descriptions_enabled_id()
_popup_descriptions_apply_popup_admin in modules/popup_descriptions/includes/popup_descriptions.util.inc
Adds description popup admin links to the form element
_popup_descriptions_enabled in modules/popup_descriptions/includes/popup_descriptions.util.inc
Tests whether an element's description should pop up

File

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

Code

function _popup_descriptions_enabled_id($element) {
  if (!isset($element['#id'])) {
    return FALSE;
  }
  if (!variable_get('description-popup-id')) {
    return FALSE;
  }
  static $ids = FALSE;
  if (!$ids) {
    $ids = preg_split('/[\\n\\r]+/', variable_get('description-popup-ids'));
  }
  return in_array($element['#id'], $ids);
}