function _popup_descriptions_enabled_path in Popup 7
Same name and namespace in other branches
- 8 modules/popup_descriptions/includes/popup_descriptions.util.inc \_popup_descriptions_enabled_path()
- 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 : current_path();
$path_alias = drupal_lookup_path('alias', $path);
$patterns = variable_get('description-popup-paths');
if (drupal_match_path($path, $patterns) || drupal_match_path($path_alias, $patterns)) {
return TRUE;
}
}