You are here

function theme_delta_blocks_site_name in Delta 7.3

Returns the rendered site name.

2 theme calls to theme_delta_blocks_site_name()
delta_blocks_get_content in delta_blocks/delta_blocks.module
Provides individual block content.
theme_delta_blocks_branding in delta_blocks/includes/delta_blocks.theme.inc
Returns the rendered branding.

File

delta_blocks/includes/delta_blocks.theme.inc, line 58
Theme functions for the Delta blocks module.

Code

function theme_delta_blocks_site_name($variables) {

  // If there is no page title set for this page, use a h1 for the site name.
  $tag = drupal_get_title() !== '' ? 'h2' : 'h1';
  $site_name = $variables['site_name'];
  if ($variables['site_name_linked']) {
    $options['html'] = TRUE;
    $options['attributes']['title'] = t('Return to the @name home page', array(
      '@name' => $variables['site_name'],
    ));
    $link = array(
      '#theme' => 'link',
      '#path' => '<front>',
      '#text' => '<span>' . $site_name . '</span>',
      '#options' => $options,
    );
    $site_name = render($link);
  }
  $attributes['class'] = array(
    'site-name',
  );
  if ($variables['site_name_hidden']) {
    $attributes['class'][] = 'element-invisible';
  }
  return '<' . $tag . drupal_attributes($attributes) . '>' . $site_name . '</' . $tag . '>';
}