1 template.php bartik_preprocess_layout(&$variables)

Prepares variables for layout template files.

See also

layout.tpl.php

File

core/themes/bartik/template.php, line 34
Contains a theme's functions to manipulate or override the default markup.

Code

function bartik_preprocess_layout(&$variables) {
  if ($variables['content']['header']) {
    $extra_header_classes = array();
    $extra_header_classes[] = theme_get_setting('main_menu_tabs');
    $legacy = array('one_column', 'two_column', 'two_column_flipped', 'three_three_four_column');
    if (in_array($variables['layout']->layout_template, $legacy)) {
      $extra_header_classes[] = 'l-header-inner';
    }
    $variables['content']['header'] = '<div class="' . implode(' ', $extra_header_classes) . '">' . $variables['content']['header'] . '</div>';
  }
}