aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/bookmarks/start.php4
-rw-r--r--mod/thewire/start.php16
2 files changed, 17 insertions, 3 deletions
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index fa837c1d2..b4a4ef46b 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -51,9 +51,7 @@ function bookmarks_init() {
));
}
// Register granular notification for this type
- if (is_callable('register_notification_object')) {
- register_notification_object('object', 'bookmarks', elgg_echo('bookmarks:new'));
- }
+ register_notification_object('object', 'bookmarks', elgg_echo('bookmarks:new'));
// Listen to notification events and supply a more useful message
elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'bookmarks_notify_message');
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) {