aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index e0970ef91..c2cc9cff8 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -496,12 +496,18 @@
if (!($entity instanceof ElggEntity)) return false;
- $comments = list_annotations($entity->getGUID(),'generic_comment');
-
- //display the comment form
- $comments .= elgg_view('comments/forms/edit',array('entity' => $entity));
-
- return $comments;
+ if ($comments = trigger_plugin_hook('comments',$entity->getType(),array('entity' => $entity),false)) {
+
+ return $comments;
+
+ } else {
+ $comments = list_annotations($entity->getGUID(),'generic_comment');
+
+ //display the comment form
+ $comments .= elgg_view('comments/forms/edit',array('entity' => $entity));
+
+ return $comments;
+ }
}