function overlay_paths_admin_paths in Overlay Paths 7
Implements hook_admin_paths().
To make paths appear in the overlay, we need to declare them as an admin path. This will of course mean that Drupal tries to make them use the admin theme too, but we undo that in overlay_paths_custom_theme().
Parameters
$mode: Defaults to TRUE. Not passed in when invoked as a hook, but FALSE may be passed in to obtain paths that are explicitly set to NOT appear in the overlay.
1 call to overlay_paths_admin_paths()
- overlay_paths_get_overlay_patterns in ./
overlay_paths.module - Get a pattern of non-administrative overlay paths.
File
- ./
overlay_paths.module, line 43 - The overlay paths module.
Code
function overlay_paths_admin_paths($mode = TRUE) {
$paths =& drupal_static(__FUNCTION__);
if (!isset($paths[$mode])) {
$paths[$mode] = array();
foreach (overlay_paths_get_overlay_paths() as $path => $v) {
if ($v !== FALSE && $mode || !$mode && $v === FALSE) {
$paths[$mode][$path] = TRUE;
}
}
}
return $paths[$mode];
}