function theme_blockify_site_name in Blockify 8
Same name and namespace in other branches
- 6 blockify.theme.inc \theme_blockify_site_name()
- 7 blockify.theme.inc \theme_blockify_site_name()
Returns the rendered site name.
1 theme call to theme_blockify_site_name()
- blockify_get_content in ./
blockify.module - Provides individual block content.
File
- ./
blockify.theme.inc, line 43 - Theme functions for the Blockify module.
Code
function theme_blockify_site_name($variables) {
$title = drupal_get_title();
$site_name = $variables['site_name'];
// If there is no page title set for this page, use an h1 for the site name.
$tag = $title !== '' ? 'span' : 'h1';
$link = array(
'#theme' => 'link',
'#path' => '<front>',
'#text' => '<span>' . $site_name . '</span>',
'#prefix' => '<' . $tag . ' id="site-name">',
'#suffix' => '</' . $tag . '>',
'#options' => array(
'attributes' => array(
'title' => t('Return to the !site_name home page', array(
'!site_name' => $site_name,
)),
'rel' => 'home',
),
'html' => TRUE,
),
);
return render($link);
}