function subuser_translated_menu_link_alter in Subuser 6
Implementation of hook_translated_menu_link_alter().
If currently running as a child user change the "Log out" link to "Log out (return)".
File
- ./
subuser.module, line 84 - Allows users of a particular role to create sub user account in another role.
Code
function subuser_translated_menu_link_alter(&$item, $map) {
if ($item['href'] == 'logout' && isset($_SESSION['subuser_uid'])) {
$item['title'] = t('Log out (return)');
$item['href'] = 'subuser/switch/' . $_SESSION['subuser_uid'];
$item['localized_options']['query']['token'] = drupal_get_token('subuser/switch/' . $_SESSION['subuser_uid']);
}
}