You are here

function toolbar_preprocess_html in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/toolbar/toolbar.module \toolbar_preprocess_html()
  2. 9 core/modules/toolbar/toolbar.module \toolbar_preprocess_html()

Implements hook_preprocess_html().

Add some page classes, so global page theming can adjust to the toolbar.

File

modules/toolbar/toolbar.module, line 143
Administration toolbar for quick access to top level administration items.

Code

function toolbar_preprocess_html(&$vars) {
  if (isset($vars['page']['page_top']['toolbar']) && user_access('access toolbar')) {
    $vars['classes_array'][] = 'toolbar';
    if (!_toolbar_is_collapsed()) {
      $vars['classes_array'][] = 'toolbar-drawer';
    }
  }
}