1 system.module system_header_block($settings)

Output the content for the header block.

See also

system_block_view()

File

core/modules/system/system.module, line 3409
Configuration system that lets administrators modify the workings of the site.

Code

function system_header_block($settings) {
  $settings += array(
    'menu' => 'user-menu',
    'logo' => TRUE,
    'site_name' => TRUE,
    'site_slogan' => TRUE,
  );

  $menu = $settings['menu'] ? menu_navigation_links($settings['menu']) : NULL;
  $site_config = config('system.core');
  $variables['logo'] = $settings['logo'] ? backdrop_get_logo() : NULL;
  $variables['logo_attributes'] = $settings['logo'] ? array_diff_key(backdrop_get_logo_info(), array('path' => '')) : array();
  $variables['site_name'] = $settings['site_name'] ? check_plain($site_config->getTranslated('site_name')) : '';
  $variables['site_slogan'] = $settings['site_slogan'] ? filter_xss_admin($site_config->getTranslated('site_slogan')) : '';
  $variables['menu'] = $menu ? theme('links__header_menu', array('links' => $menu)) : NULL;

  return theme('header', $variables);
}