function node_comment_block_preprocess_node in Node Comment Block 7.2
Same name and namespace in other branches
- 7 node_comment_block.module \node_comment_block_preprocess_node()
Implements hook_preprocess_HOOK().
File
- ./
node_comment_block.module, line 90 - Moves the comments for a node into a block.
Code
function node_comment_block_preprocess_node(&$variables) {
$node = $variables['node'];
if ($node->comment !== 0 && $variables['view_mode'] == 'full') {
if (isset($variables['content']['comments'])) {
unset($variables['content']['comments']);
drupal_add_css(drupal_get_path('module', 'node_comment_block') . '/node-comment-block.css');
}
}
}