function languageicons_link_add in Language Icons 6
Same name and namespace in other branches
- 8 languageicons.module \languageicons_link_add()
- 6.2 languageicons.module \languageicons_link_add()
- 7 languageicons.module \languageicons_link_add()
Add language icon to link.
The language icon may be a different language as the destination page, can be passed in 'language_icon'.
2 calls to languageicons_link_add()
- languageicons_link_alter in ./
languageicons.module - Implementation of hook_link_alter().
- languageicons_translation_link_alter in ./
languageicons.module - Implementation of hook_translation_link_alter().
File
- ./
languageicons.module, line 105 - Icons for language links.
Code
function languageicons_link_add(&$link, $title = NULL) {
$language = isset($link['language_icon']) ? $link['language_icon'] : $link['language'];
$title = $title ? $title : $link['title'];
if ($icon = theme('languageicons_icon', $language, $title)) {
$link['title'] = theme('languageicons_place', $link['title'], $icon);
$link['html'] = TRUE;
}
}