function theme_languageicons_icon in Language Icons 6.2
Same name and namespace in other branches
- 6 languageicons.module \theme_languageicons_icon()
- 7 languageicons.module \theme_languageicons_icon()
Theme language icon.
This function can be overridden for no language icons.
@seealso theme_image()
1 theme call to theme_languageicons_icon()
- languageicons_link_add in ./
languageicons.module - Add language icon to link.
File
- ./
languageicons.module, line 115 - Icons for language links.
Code
function theme_languageicons_icon($language, $title = NULL) {
if ($path = variable_get('languageicons_path', drupal_get_path('module', 'languageicons') . '/flags/*.png')) {
$src = str_replace('*', $language->language, check_plain($path));
$title = $title ? $title : $language->native;
$attributes = array(
'class' => 'language-icon',
);
if ($size = check_plain(variable_get('languageicons_size', '16x12'))) {
list($width, $height) = explode('x', $size);
$attributes += array(
'width' => $width,
'height' => $height,
);
}
return theme('image', $src, $title, $title, $attributes, FALSE);
}
}