function 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.

Related topics

File

menu_example/menu_example.module, line 497

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';
    }
}