function escape_admin_page_alter in Escape Admin 7
Implements hook_page_alter().
File
- ./
escape_admin.module, line 6
Code
function escape_admin_page_alter(&$page) {
if (module_exists('toolbar')) {
$page['page_top']['toolbar']['#pre_render'][] = 'escape_admin_toolbar_pre_render';
}
$current_path = current_path();
$current_path_is_admin = FALSE;
// The function path_is_admin() is not available on update.php pages.
if (!defined('MAINTENANCE_MODE')) {
$current_path_is_admin = path_is_admin($current_path);
}
//if (drupal_is_front_page()) {
//$current_path = '';
//}
drupal_add_js(array(
'currentPath' => $current_path,
'currentPathIsAdmin' => $current_path_is_admin,
), 'setting');
}