function theme_countryicons_icon_sprite in Country Icons 6.2
Same name and namespace in other branches
- 6 countryicons.module \theme_countryicons_icon_sprite()
- 7.2 countryicons.theme.inc \theme_countryicons_icon_sprite()
- 7 countryicons.module \theme_countryicons_icon_sprite()
Theme a country icon with CSS sprite.
Parameters
$code: A two letter ISO3166 country code.
$iconset: The icon set to use.
Return value
A string containing a image tag rendered using a css sprite techniquie.
File
- ./
countryicons.theme.inc, line 50 - Theme functions for the countryicons module.
Code
function theme_countryicons_icon_sprite($code, $iconset) {
$iconset = countryicons_get_iconset($iconset);
if (!empty($iconset) && $iconset->css_sprite && !empty($code)) {
drupal_add_css($iconset->css_sprite);
return '<div class="countryicon-sprite iconset-' . $iconset->key . ' countrycode-' . drupal_strtolower($code) . '"></div>';
}
}