function og_role_watchdog_menu_alter in Role Watchdog 6
Same name and namespace in other branches
- 6.2 modules/og_role_watchdog/og_role_watchdog.module \og_role_watchdog_menu_alter()
- 7.2 modules/og_role_watchdog/og_role_watchdog.module \og_role_watchdog_menu_alter()
- 7 modules/og_role_watchdog/og_role_watchdog.module \og_role_watchdog_menu_alter()
Implementation of hook_menu_alter
Modify the menu items defined by role_watchdog to substitute our own pages for the role history, role grants and role watchdog report pages.
File
- modules/
og_role_watchdog/ og_role_watchdog.module, line 46 - Logs changes to user roles.
Code
function og_role_watchdog_menu_alter(&$items) {
if (array_key_exists('admin/reports/role_watchdog', $items)) {
$items['admin/reports/role_watchdog']['page callback'] = 'og_role_watchdog_report';
$items['admin/reports/role_watchdog']['file'] = 'og_role_watchdog.pages.inc';
$items['admin/reports/role_watchdog']['module'] = 'og_role_watchdog';
}
if (array_key_exists('user/%user/track/role_history', $items)) {
$items['user/%user/track/role_history']['page callback'] = 'og_role_watchdog_history';
$items['user/%user/track/role_history']['file'] = 'og_role_watchdog.pages.inc';
$items['user/%user/track/role_history']['module'] = 'og_role_watchdog';
}
if (array_key_exists('user/%user/track/role_grants', $items)) {
$items['user/%user/track/role_grants']['page callback'] = 'og_role_watchdog_grants';
$items['user/%user/track/role_grants']['file'] = 'og_role_watchdog.pages.inc';
$items['user/%user/track/role_grants']['module'] = 'og_role_watchdog';
}
}