You are here

function overlay_paths_is_overlay in Overlay Paths 7

Return whether $path should be rendered in an overlay or not.

1 call to overlay_paths_is_overlay()
overlay_paths_init in ./overlay_paths.module
Implements hook_init().

File

./overlay_paths.module, line 109
The overlay paths module.

Code

function overlay_paths_is_overlay($path) {

  // returns TRUE if current path is returned by a hook_overlay_path, or
  // is an admin path that wasn't returned by a hook_overlay_path equal to FALSE
  $return = drupal_match_path($path, overlay_paths_get_overlay_patterns()) || drupal_match_path(drupal_get_path_alias($path), overlay_paths_get_overlay_patterns()) || path_is_admin($path) && !drupal_match_path($path, overlay_paths_get_overlay_patterns(FALSE));
  return $return;
}