function _menu_example_simple_title_callback in Examples for Developers 7
Same name and namespace in other branches
- 6 menu_example/menu_example.module \_menu_example_simple_title_callback()
Title callback to rewrite the '/user' menu link.
Parameters
string $base_string: string to be prepended to current user's name.
Related topics
1 string reference to '_menu_example_simple_title_callback'
- menu_example_menu in menu_example/
menu_example.module - Implements hook_menu().
File
- menu_example/
menu_example.module, line 474 - Module file for menu_example.
Code
function _menu_example_simple_title_callback($base_string) {
global $user;
$username = !empty($user->name) ? $user->name : t('anonymous');
return $base_string . ' ' . $username;
}