aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-27 14:20:22 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-27 14:20:22 +0000
commit4c94f8809f1131e2d8e073518195b6b65b26aceb (patch)
tree461af7e0e4414871c519acdef84ce397fa534325 /engine/lib/users.php
parent543e50d2aabfbd3c116cbb670018c66fae535955 (diff)
downloadelgg-4c94f8809f1131e2d8e073518195b6b65b26aceb.tar.gz
elgg-4c94f8809f1131e2d8e073518195b6b65b26aceb.tar.bz2
improved menu creation for on demand menus and integrated hover menu items into profile owner block
git-svn-id: http://code.elgg.org/elgg/trunk@7724 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 353575307..a87b241a2 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1493,17 +1493,17 @@ function elgg_user_hover_menu($hook, $type, $return, $params) {
$url = elgg_add_action_tokens_to_url($url);
$item = new ElggMenuItem('addfriend', $text, $url);
$item->setSection('action');
- elgg_register_menu_item('user_hover', $item);
+ $return[] = $item;
} else {
$url = "pg/profile/$user->username/edit";
$item = new ElggMenuItem('profile:edit', elgg_echo('profile:edit'), $url);
$item->setSection('action');
- elgg_register_menu_item('user_hover', $item);
+ $return[] = $item;
$url = "pg/avatar/edit/$user->username";
$item = new ElggMenuItem('avatar:edit', elgg_echo('avatar:edit'), $url);
$item->setSection('action');
- elgg_register_menu_item('user_hover', $item);
+ $return[] = $item;
}
}
@@ -1532,14 +1532,16 @@ function elgg_user_hover_menu($hook, $type, $return, $params) {
$url = elgg_add_action_tokens_to_url($url);
$item = new ElggMenuItem($action, elgg_echo($action), $url);
$item->setSection('admin');
- elgg_register_menu_item('user_hover', $item);
+ $return[] = $item;
}
$url = "pg/profile/$user->username/edit";
$item = new ElggMenuItem('profile:edit', elgg_echo('profile:edit'), $url);
$item->setSection('admin');
- elgg_register_menu_item('user_hover', $item);
+ $return[] = $item;
}
+
+ return $return;
}
/**
@@ -1566,8 +1568,10 @@ function elgg_user_admin_menu($hook, $type, $return, $params) {
$url = "action/admin/user/$action?guid={$user->guid}";
$url = elgg_add_action_tokens_to_url($url);
$item = new ElggMenuItem($action, elgg_echo($action), $url);
- elgg_register_menu_item('user_admin', $item);
+ $return[] = $item;
}
+
+ return $return;
}
/**