function advanced_forum_preprocess_comment_wrapper in Advanced Forum 7.2
Same name and namespace in other branches
- 5 advanced_forum.module \advanced_forum_preprocess_comment_wrapper()
- 6.2 includes/theme.inc \advanced_forum_preprocess_comment_wrapper()
- 6 advanced_forum.module \advanced_forum_preprocess_comment_wrapper()
Preprocess comment wrapper.
File
- includes/
theme.inc, line 517 - Holds theme functions and template preprocesses. Other style related functions are in style.inc
Code
function advanced_forum_preprocess_comment_wrapper(&$variables) {
$variables['reply_link'] = '';
if (advanced_forum_is_styled($variables['node'], FALSE, 'comment-wrapper')) {
advanced_forum_add_template_suggestions("advanced_forum_comment_wrapper", $variables);
$form_on_seperate_page = variable_get('comment_form_location_' . $variables['node']->type, COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_SEPARATE_PAGE;
$comments_locked = $variables['node']->comment != COMMENT_NODE_OPEN;
if ($form_on_seperate_page || $comments_locked) {
// If the post is locked or the comment form is on a seperate page,
// build the reply/locked link / button.
$variables['reply_link'] = theme('advanced_forum_reply_link', array(
'node' => $variables['node'],
));
}
}
}