function comment_og_link_alter in Comment OG 6
Same name and namespace in other branches
- 5 comment_og.module \comment_og_link_alter()
Implementation of hook_link_alter(). Removes comment link for non-members
File
- ./
comment_og.module, line 68
Code
function comment_og_link_alter(&$links, $node, $comment = NULL) {
$group = og_get_group_context();
if ($group) {
if ($node->comment && isset($node->og_groups)) {
if (!comment_og_access($group)) {
unset($links['comment_add']);
}
if ($comment) {
if (!comment_og_access($group)) {
unset($links['comment_reply']);
}
}
}
}
}