function menu_example_menu_link_alter
Same name in other branches
- 7.x-1.x menu_example/menu_example.module \menu_example_menu_link_alter()
Implements hook_menu_link_alter().
This code will get the chance to alter a menu link when it is being saved in the menu interface at admin/build/menu. Whatever we do here overrides anything the user/administrator might have been trying to do.
Parameters
$item: The menu item being saved.
$menu: The entire menu router table.
Related topics
File
-
menu_example/
menu_example.module, line 441
Code
function menu_example_menu_link_alter(&$item, $menu) {
// Force the link title to remain 'Clear Cache' no matter what the admin
// does with the web interface.
if ($item['link_path'] == 'devel/cache/clear') {
$item['link_title'] = 'Clear Cache';
}
}