You are here

function subuser_switch_translated_menu_link_alter in Subuser 8

Same name and namespace in other branches
  1. 7.2 switch/subuser_switch.module \subuser_switch_translated_menu_link_alter()

Implements hook_translated_menu_link_alter().

File

switch/subuser_switch.module, line 144
Provides primary Drupal hook implementations.

Code

function subuser_switch_translated_menu_link_alter(&$item, $map) {

  // If currently running as a child user change the "Log out" link to
  // "Log out (return)".
  if ($item['href'] == 'user/logout' && !empty($_SESSION['subuser_parent'])) {
    $item['title'] = t('Log out (return)');
    $item['href'] = 'subuser/switch/' . $_SESSION['subuser_parent'];
  }
}