aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-23 00:07:36 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-23 00:07:36 +0000
commit05cd3a5f331d271a0a93d2bee69fdd70494f32d6 (patch)
treee12bac760250e97669229a15e41c528fc62a79a6 /mod
parent250e367c61b55ee4399e2b4ee49b940512b24b53 (diff)
downloadelgg-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')
-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) {