diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-23 00:07:36 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-23 00:07:36 +0000 |
commit | 05cd3a5f331d271a0a93d2bee69fdd70494f32d6 (patch) | |
tree | e12bac760250e97669229a15e41c528fc62a79a6 /mod/thewire/start.php | |
parent | 250e367c61b55ee4399e2b4ee49b940512b24b53 (diff) | |
download | elgg-05cd3a5f331d271a0a93d2bee69fdd70494f32d6.tar.gz elgg-05cd3a5f331d271a0a93d2bee69fdd70494f32d6.tar.bz2 |
added an owner block link for the wire plugin
git-svn-id: http://code.elgg.org/elgg/trunk@8819 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/thewire/start.php')
-rw-r--r-- | mod/thewire/start.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 0b2265082..d10efb6ba 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -27,6 +27,9 @@ function thewire_init() { $item = new ElggMenuItem('thewire', elgg_echo('thewire'), 'thewire/all');
elgg_register_menu_item('site', $item);
+ // owner block menu
+ elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'thewire_owner_block_menu');
+
// remove edit and access and add thread, reply, view previous
elgg_register_plugin_hook_handler('register', 'menu:entity', 'thewire_setup_entity_menu_items');
@@ -412,6 +415,19 @@ function thewire_setup_entity_menu_items($hook, $type, $value, $params) { }
/**
+ * Add a menu item to an ownerblock
+ */
+function thewire_owner_block_menu($hook, $type, $return, $params) {
+ if (elgg_instanceof($params['entity'], 'user')) {
+ $url = "thewire/owner/{$params['entity']->username}";
+ $item = new ElggMenuItem('thewire', elgg_echo('item:object:thewire'), $url);
+ $return[] = $item;
+ }
+
+ return $return;
+}
+
+/**
* Runs unit tests for the wire
*/
function thewire_test($hook, $type, $value, $params) {
|