| 6 menu_example.module | _menu_example_simple_title_callback($base_string) |
| 7 menu_example.module | _menu_example_simple_title_callback($base_string) |
| 8 menu_example.module | _menu_example_simple_title_callback($base_string) |
Title callback to rewrite the '/user' menu link.
Parameters
$base_string: string to be prepended to current user's name.
Related topics
1 string reference to '_menu_example_simple_title_callback'
File
- menu_example/
menu_example.module, line 414 - Demonstrates uses of the Menu APIs in Drupal, including hook_menu(), hook_menu_alter(), and hook_menu_link_alter().
Code
function _menu_example_simple_title_callback($base_string) {
global $user;
$username = !empty($user->name) ? $user->name : t('anonymous');
return $base_string . ' ' . $username;
}
Login or register to post comments