function _popup_descriptions_enabled_id in Popup 7
Same name and namespace in other branches
- 8 modules/popup_descriptions/includes/popup_descriptions.util.inc \_popup_descriptions_enabled_id()
- 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);
}