function answers_core_comment_links_alter in Answers 2.0.x
Same name and namespace in other branches
- 1.0.x modules/core/answers_core.module \answers_core_comment_links_alter()
Implements hook_comment_links_alter().
File
- modules/
core/ answers_core.module, line 124 - Hook implementation code for the Answers core module.
Code
function answers_core_comment_links_alter(array &$links, CommentInterface $comment, array &$context) {
$comment_type = $comment
->bundle();
$answers_types = [
'answers_answer',
'answers_question_comment',
'answers_comment',
];
if (in_array($comment_type, $answers_types)) {
unset($links['comment']['#links']['comment-reply']);
}
}