function languageicons_link_add in Language Icons 8
Same name and namespace in other branches
- 6.2 languageicons.module \languageicons_link_add()
- 6 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'.
1 call to languageicons_link_add()
File
- ./
languageicons.module, line 76 - Main functions and hook implementations for the Language Icons module.
Code
function languageicons_link_add(&$link, $title = NULL) {
$link['title'] = [
'#theme' => 'languageicons_link_content',
'#language' => isset($link['language_icon']) ? $link['language_icon'] : $link['language'],
'#text' => $link['title'],
'#title' => $title ? $title : $link['title'],
];
$link['html'] = TRUE;
}