diff options
Diffstat (limited to 'mod/blog')
-rw-r--r-- | mod/blog/start.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index fb9e7d6ef..3086d9087 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -38,6 +38,8 @@ function blog_init() { register_notification_object('object', 'blog', elgg_echo('blog:newpost')); elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'blog_notify_message'); + elgg_register_plugin_hook_handler('register', 'menu:user_ownerblock', 'blog_user_ownerblock_menu'); + // pingbacks //elgg_register_event_handler('create', 'object', 'blog_incoming_ping'); //elgg_register_plugin_hook_handler('pingback:object:subtypes', 'object', 'blog_pingback_subtypes'); @@ -231,6 +233,14 @@ function blog_url_handler($entity) { } /** + * Add a menu item to the user ownerblock + */ +function blog_user_ownerblock_menu($hook, $type, $return, $params) { + $item = new ElggMenuItem('blog', elgg_echo('blog'), "pg/blog/owner/{$params['user']->username}"); + elgg_register_menu_item('user_ownerblock', $item); +} + +/** * Register blogs with ECML. * * @param unknown_type $hook |