function bartik_preprocess_html

Implements hook_preprocess_HOOK() for html.tpl.php.

Adds body classes if certain regions have content.

File

drupal/core/themes/bartik/template.php, line 13
Functions to support theming in the Bartik theme.

Code

function bartik_preprocess_html(&$variables) {
  if (!empty($variables['page']['featured'])) {
    $variables['attributes']['class'][] = 'featured';
  }
  if (!empty($variables['page']['triptych_first']) || !empty($variables['page']['triptych_middle']) || !empty($variables['page']['triptych_last'])) {
    $variables['attributes']['class'][] = 'triptych';
  }
  if (!empty($variables['page']['footer_firstcolumn']) || !empty($variables['page']['footer_secondcolumn']) || !empty($variables['page']['footer_thirdcolumn']) || !empty($variables['page']['footer_fourthcolumn'])) {
    $variables['attributes']['class'][] = 'footer-columns';
  }
}