aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-21 21:53:49 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-21 21:53:49 +0000
commit33d589650db886fa580aa5bd47672a71bb4fc4c0 (patch)
treee60b2121cd9f93fe58fd83eb8f452b7a87cd5c5c /views
parentd67eacb232fdb8c9c68deb35c0dad3007c877718 (diff)
downloadelgg-33d589650db886fa580aa5bd47672a71bb4fc4c0.tar.gz
elgg-33d589650db886fa580aa5bd47672a71bb4fc4c0.tar.bz2
Registering new plugin hooks to extend the owner block profile menu.
git-svn-id: http://code.elgg.org/elgg/trunk@6130 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/page_elements/owner_block.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php
index 311d27767..7ddc7e55a 100644
--- a/views/default/page_elements/owner_block.php
+++ b/views/default/page_elements/owner_block.php
@@ -45,7 +45,19 @@ if(is_plugin_enabled('profile')) {
$location = elgg_view('output/tags', array('value' => $owner->location));
$display .= "<p class=\"profile_info location\">$location</p>";
-
+
+ // Trigger owner block menu
+ $params = array('owner' => $owner);
+ $links = trigger_plugin_hook('profile_menu', 'profile', $params, array());
+ if (is_array($links) && !empty($links)) {
+ $display .= '<div><ul>';
+ foreach ($links as $link) {
+ $display .= "<li><a href=\"{$link['href']}\">{$link['text']}</a></li>";
+ }
+ $display .= '</ul></div>';
+ }
+
+ // Allow plugins to extend the owner block contents
$display .= elgg_view('owner_block/profile_extend');
// close owner_block_content