Could hook_translated_menu_link_alter() be implemented to simply alter a menu link before it is rendered?

Clearly, hook_translated_menu_link() is only invoked for menu items that have been flagged from hook_menu_link_alter() as altered; if a module uses hook_translated_menu_link() to alter a menu item before it is rendered, it needs to implement hook_menu_link_alter() too.


Take a look at Devel, it uses hook_translated_menu_link() along with hook_menu_link_alter() to add a destination query to the end of a few of the links.


  • Line #331 - devel_menu_link_alter()

  • Line #342 - devel_translated_menu_link_alter()

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.