1 menu_example.module _menu_example_simple_title_callback($base_string)

Title callback to rewrite the '/user' menu link.

Parameters

string $base_string: string to be prepended to current user's name.

Related topics

File

modules/examples/menu_example/menu_example.module, line 477
Hook implementations for the Menu Example module.

Code

function _menu_example_simple_title_callback($base_string) {
  global $user;
  $username = !empty($user->name) ? $user->name : t('anonymous');
  return $base_string . ' ' . $username;
}