aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-13 19:36:02 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-13 19:36:02 +0000
commit2ed63907f64ac88a060a718cb8598fb66a6e9356 (patch)
tree7120d973f583d7528fbc6bdb1af4ce22e1cdfbaa /engine/lib/elgglib.php
parent50162dc73197e20c7d3f9c2c80ecf5ecbb4f37f0 (diff)
downloadelgg-2ed63907f64ac88a060a718cb8598fb66a6e9356.tar.gz
elgg-2ed63907f64ac88a060a718cb8598fb66a6e9356.tar.bz2
Added granular view hook view:$view_name instead of a monolithic display:view hook.
git-svn-id: http://code.elgg.org/elgg/trunk@5724 36083f99-b078-4883-b0ff-0f9b5a30f544
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;
}