function comment_perm_nodeapi in Comment Permissions 6
Implementation of hook_nodeapi().
File
- ./
comment_perm.module, line 136 - Module to control commenting permissions by role and by node type.
Code
function comment_perm_nodeapi(&$node, $op, $arg = 0) {
switch ($op) {
case 'alter':
if (variable_get('comment_perm_hide_comments', 0) && !comment_perm_access($node)) {
$node->comment = COMMENT_NODE_DISABLED;
}
break;
}
}