function languageicons_link_add in Language Icons 7
Same name and namespace in other branches
- 8 languageicons.module \languageicons_link_add()
- 6.2 languageicons.module \languageicons_link_add()
- 6 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'.
1 call to languageicons_link_add()
File
- ./
languageicons.module, line 85 - 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'];
$icon = theme('languageicons_icon', array(
'language' => $language,
'title' => check_plain($title),
));
if ($icon) {
$link['title'] = theme('languageicons_place', array(
'text' => check_plain($link['title']),
'icon' => $icon,
));
$link['html'] = TRUE;
}
}