hook_translated_menu_link_alter
developer/hooks/core.php, строка 365
- Версии
- 6
hook_translated_menu_link_alter(&$item, $map)
Позволяет изменять уже переведенную ссылку меню перед отображением.
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()
.
Параметры
$item
Associative array defining a menu link after _menu_link_translate()
$map
Associative array containing the menu $map
(path parts and/or objects).
Возвращаемое значение
Нет.
Связанные темы
Код
<?php
function hook_translated_menu_link_alter(&$item, $map) {
if ($item['href'] == 'devel/cache/clear') {
$item['localized_options']['query'] = drupal_get_destination();
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии