aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire
diff options
context:
space:
mode:
Diffstat (limited to 'mod/thewire')
-rw-r--r--mod/thewire/start.php16
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) {