You are here

function navbar_page_alter in Navbar 7

Implements hook_page_alter().

File

./navbar.module, line 109
Administration navbar for quick access to top level administration items.

Code

function navbar_page_alter(&$page) {
  $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);
  }
  drupal_add_js(array(
    'currentPath' => $current_path,
    'currentPathIsAdmin' => $current_path_is_admin,
  ), 'setting');
}