Same filename and directory in other branches
- 5.x themes/garland/template.php
- 7.x themes/garland/template.php
File
themes/garland/template.php
View source
<?php
function phptemplate_body_class($left, $right) {
if ($left != '' && $right != '') {
$class = 'sidebars';
}
else {
if ($left != '') {
$class = 'sidebar-left';
}
if ($right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="' . $class . '"';
}
}
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>';
}
}
function phptemplate_preprocess_page(&$vars) {
$vars['tabs2'] = menu_secondary_local_tasks();
if (module_exists('color')) {
_color_page_alter($vars);
}
}
function garland_preprocess_comment_wrapper(&$vars) {
if ($vars['content'] && $vars['node']->type != 'forum') {
$vars['content'] = '<h2 class="comments">' . t('Comments') . '</h2>' . $vars['content'];
}
}
function phptemplate_menu_local_tasks() {
return menu_primary_local_tasks();
}
function phptemplate_comment_submitted($comment) {
return t('!datetime — !username', array(
'!username' => theme('username', $comment),
'!datetime' => format_date($comment->timestamp),
));
}
function phptemplate_node_submitted($node) {
return t('!datetime — !username', array(
'!username' => theme('username', $node),
'!datetime' => format_date($node->created),
));
}
function phptemplate_get_ie_styles() {
global $language;
$iecss = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/fix-ie.css" />';
if ($language->direction == LANGUAGE_RTL) {
$iecss .= '<style type="text/css" media="all">@import "' . base_path() . path_to_theme() . '/fix-ie-rtl.css";</style>';
}
return $iecss;
}
Functions