function lazy_is_path_allowed in Lazy-load 7
Is path allowed?
Return value
bool Returns true if current path is not listed in disabled pages.
2 calls to lazy_is_path_allowed()
- theme_lazy_image in ./
lazy.module - Returns HTML for an image.
- _filter_lazy_process in ./
lazy.module - Implements callback_filter_process().
File
- ./
lazy.module, line 212 - Module file for Lazy-load.
Code
function lazy_is_path_allowed() {
$pages = drupal_strtolower(variable_get('lazy_disabled_paths'));
// 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);
}
return !$page_match;
}