aboutsummaryrefslogtreecommitdiff
path: root/mod/file/start.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 02:14:39 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 02:14:39 +0000
commit72c83e4904a13c0e07d0d328ccbd201d16a617cc (patch)
treecae9eee563d5dce2cf22896ecdfbdf516611abe0 /mod/file/start.php
parentabf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c (diff)
downloadelgg-72c83e4904a13c0e07d0d328ccbd201d16a617cc.tar.gz
elgg-72c83e4904a13c0e07d0d328ccbd201d16a617cc.tar.bz2
pulled user owner block menu out of profile plugin with new menu code
git-svn-id: http://code.elgg.org/elgg/trunk@7677 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/start.php')
-rw-r--r--mod/file/start.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index 227a5c33c..31362308c 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -60,6 +60,8 @@
// Register entity type
register_entity_type('object','file');
+ elgg_register_plugin_hook_handler('register', 'menu:user_ownerblock', 'file_user_ownerblock_menu');
+
// embed support
elgg_register_plugin_hook_handler('embed_get_sections', 'all', 'file_embed_get_sections');
elgg_register_plugin_hook_handler('embed_get_items', 'file', 'file_embed_get_items');
@@ -156,6 +158,14 @@
return null;
}
+/**
+ * Add a menu item to the user ownerblock
+ */
+function file_user_ownerblock_menu($hook, $type, $return, $params) {
+ $item = new ElggMenuItem('file', elgg_echo('file'), "pg/file/owner/{$params['user']->username}");
+ elgg_register_menu_item('user_ownerblock', $item);
+}
+
/**
* Returns an overall file type from the mimetype
*