function menu_token_replace in Menu Token 5
Make token replacements in menu items.
2 calls to menu_token_replace()
- menu_token_footer in ./
menu_token.module - Implementation of hook_footer().
- menu_token_menu in ./
menu_token.module - Implementation of hook_menu().
File
- ./
menu_token.module, line 85
Code
function menu_token_replace() {
global $_menu;
$token_enabled = variable_get('menu_token_enabled', array());
// Override paths
foreach ($token_enabled as $mid => $path) {
$_menu['items'][$mid]['path'] = token_replace_multiple($path);
// Force drupal to refresh menu tree with tokenized version,
menu_get_item($mid, NULL, TRUE);
}
}