You are here

function _popup_descriptions_enabled_path in Popup 8

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

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

2 calls to _popup_descriptions_enabled_path()
_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 197

Code

function _popup_descriptions_enabled_path($path = FALSE) {
  if (!variable_get('description-popup-path')) {
    return FALSE;
  }
  $path = $path ? $path : $_GET['q'];
  static $paths = FALSE;
  if (!$paths) {
    $paths = preg_split('/[\\n\\r]+/', variable_get('description-popup-paths'));
  }
  return in_array($path, $paths);
}