aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php36
1 files changed, 26 insertions, 10 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 3846c98b2..87f2ec278 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -636,16 +636,8 @@
}
if ($full) // Marcus Povey 20090616 : Speculative and low impact approach for fixing #964
{
- $annotations = trigger_plugin_hook('annotations:view', $entity_class, array(
- 'entity' => $entity,
- 'full' => $full,
-
- // We already know this, so pass it on.
- 'type' => $entity_type,
- 'subtype' => $subtype
- )
- );
-
+ $annotations = elgg_view_entity_annotations($entity, $full);
+
if ($annotations)
$contents .= $annotations;
}
@@ -785,6 +777,30 @@
}
/**
+ * Display a selective rendered list of annotations for a given entity.
+ *
+ * The list is produced as the result of the entity:annotate plugin hook and is designed to provide a
+ * more generic framework to allow plugins to extend the generic display of entities with their own annotation
+ * renderings.
+ *
+ * This is called automatically by the framework.
+ *
+ * @param ElggEntity $entity
+ * @param bool $full
+ */
+ function elgg_view_entity_annotations(ElggEntity $entity, $full = true)
+ {
+ $annotations = trigger_plugin_hook('entity:annotate', $entity_class,
+ array(
+ 'entity' => $entity,
+ 'full' => $full,
+ )
+ );
+
+ return $annotations;
+ }
+
+ /**
* Displays an internal layout for the use of a plugin canvas.
* Takes a variable number of parameters, which are made available
* in the views as $vars['area1'] .. $vars['areaN'].