Inicio › API reference ›
hook_translated_menu_link_alter
hooks/core.php, line 371
- Versions
- hooks
hook_translated_menu_link_alter(&$item, $map)
Alter a menu link after it's translated, but before it's rendered.
This hook may be used, for example, to add a page-specific query string. For performance reasons, only links that have $item['options']['alter'] == TRUE will be passed into this hook. The $item['options']['alter'] flag should generally be set using hook_menu_link_alter().
Parameters
$item Associative array defining a menu link after _menu_link_translate()
$map Associative array containing the menu $map (path parts and/or objects).
Valor de retorno
None.
Código
<?php
function hook_translated_menu_link_alter(&$item, $map) {
if ($item['href'] == 'devel/cache/clear') {
$item['localized_options']['query'] = drupal_get_destination();
}
}
?> 
Comentarios recientes
hace 17 horas 50 mins
hace 1 día 10 horas
hace 1 semana 21 horas
hace 14 semanas 4 días
hace 19 semanas 19 horas
hace 20 semanas 2 días
hace 20 semanas 5 días
hace 20 semanas 5 días
hace 21 semanas 2 días
hace 22 semanas 1 día