blob: eedc9d8add48480d788d99c426882fa511be3fd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
/**
* Elgg log browser.
*
* @package ElggLogBrowser
*/
elgg_register_event_handler('init', 'system', 'logbrowser_init');
/**
* Initialize the log browser plugin.
*/
function logbrowser_init() {
elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'logbrowser_user_hover_menu');
elgg_register_admin_menu_item('administer', 'logbrowser', 'utilities');
}
/**
* Add to the user hover menu
*/
function logbrowser_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
$url = "admin/overview/logbrowser?user_guid={$user->guid}";
$item = new ElggMenuItem('logbrowser', elgg_echo('logbrowser:explore'), $url);
$item->setSection('admin');
$return[] = $item;
return $return;
}
|