function popup_onload_check_path in Popup On Load 7
Same name and namespace in other branches
- 8 popup_onload.module \popup_onload_check_path()
Checks whether the current path is included in popup settings.
1 call to popup_onload_check_path()
- popup_onload_init in ./
popup_onload.module - Implements hook_init().
File
- ./
popup_onload.module, line 92 - Contains main popup_onload hooks and functions.
Code
function popup_onload_check_path() {
global $theme_key;
$pages = variable_get(POPUP_ONLOAD_VAR_INCLUDE_PATHS, '');
if (!empty($pages)) {
$pages = drupal_strtolower($pages);
// Further processing came from the blocks module.
// Convert the Drupal path to lowercase.
$path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
// Compare the lowercase internal and lowercase path alias (if any).
$page_match = drupal_match_path($path, $pages);
if ($path != $_GET['q']) {
$page_match = $page_match || drupal_match_path($_GET['q'], $pages);
}
}
else {
$page_match = (bool) ($theme_key != variable_get('admin_theme', ''));
}
return $page_match;
}