You are here

function webmaster_menu_overlay_child_initialize in Webmaster menu 7

Implementation of hook_overlay_child_initialize();

Push down the overlay to prevent webmaster menu covering the top of the overlay, also integrates with admin menu.

File

./webmaster_menu.module, line 108
Display a dropdown menu at the top of the window.

Code

function webmaster_menu_overlay_child_initialize() {
  global $user;
  $offset = 0;
  $show_webmaster_menu = webmaster_menu_enabled();
  if ($show_webmaster_menu) {
    $offset += 28;
  }
  if (user_access('access administration menu')) {
    $offset += 28;
  }
  if ($offset) {
    drupal_add_css('body.overlay { padding-top: ' . $offset . 'px!important; }', array(
      'type' => 'inline',
      'group' => CSS_THEME + 1,
    ));
  }
}