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.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 764c230bf..0cb696e1d 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -289,9 +289,17 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
$content = ob_get_clean();
// Plugin hook
- $content = trigger_plugin_hook('display', 'view',
+ $content = trigger_plugin_hook('view', $view_orig,
array('view' => $view_orig, 'vars' => $vars), $content);
+ // backward compatibility with less grandular hook will be gone in 2.0
+ $content_tmp = trigger_plugin_hook('display', 'view', array('view' => $view_orig, 'vars' => $vars), $content);
+
+ if ($content_tmp != $content) {
+ $content = $content_tmp;
+ elgg_deprecated_notice('The display:view plugin hook is deprecated by view:view_name or view:all', 1.8);
+ }
+
// Return $content
return $content;
}