Skip to content
Snippets Groups Projects
Commit 26826681 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#295895 by Michelle, JohnAlbin: Garland mistakenly used...

#295895 by Michelle, JohnAlbin: Garland mistakenly used phptemplate_comment_wrapper() to override comment-wrapper.tpl.php; should use a preprocess function instead to complement the core comment-wrapper.tpl.php
parent 5cbdb1ce
No related branches found
No related tags found
No related merge requests found
......@@ -37,18 +37,6 @@ function phptemplate_breadcrumb($breadcrumb) {
}
}
/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $node) {
if (!$content || $node->type == 'forum') {
return '<div id="comments">'. $content .'</div>';
}
else {
return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
}
}
/**
* Override or insert PHPTemplate variables into the templates.
*/
......@@ -61,6 +49,15 @@ function phptemplate_preprocess_page(&$vars) {
}
}
/**
* Add a "Comments" heading above comments except on forum pages.
*/
function garland_preprocess_comment_wrapper(&$vars) {
if ($vars['content'] && $vars['node']->type != 'forum') {
$vars['content'] = '<h2 class="comments">'. t('Comments') .'</h2>'. $vars['content'];
}
}
/**
* Returns the rendered local tasks. The default implementation renders
* them as tabs. Overridden to split the secondary tasks.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment