diff options
author | Nick Whitt <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-21 21:57:36 +0000 |
---|---|---|
committer | Nick Whitt <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-21 21:57:36 +0000 |
commit | 97a95773187706b3b0bf0e11dfa6f211dc2ac69a (patch) | |
tree | c02d687781e2223b850b762e16e0046a27559248 /start.php | |
parent | eb69bc49975628b38d504d75c5b2cedb0b914877 (diff) | |
download | elgg-97a95773187706b3b0bf0e11dfa6f211dc2ac69a.tar.gz elgg-97a95773187706b3b0bf0e11dfa6f211dc2ac69a.tar.bz2 |
Registering plugin hooks to extend owner block profile menu.
git-svn-id: http://code.elgg.org@6131 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -40,6 +40,9 @@ function videolist_init() { // Register entity type register_entity_type('object','videolist'); + + // Register profile menu hook + register_plugin_hook('profile_menu', 'profile', 'videolist_profile_menu'); } /** @@ -182,6 +185,17 @@ function videolist_object_notifications_intercept($hook, $entity_type, $returnva return null; } +function videolist_profile_menu($hook, $entity_type, $return_value, $params) { + global $CONFIG; + + $return_value[] = array( + 'text' => elgg_echo('videolist'), + 'href' => "{$CONFIG->url}pg/videolist/owned/{$params['owner']->username}", + ); + + return $return_value; +} + // Register a handler for adding videos register_elgg_event_handler('create', 'videolist', 'videolist_create_event_listener'); |