You are here

function countryicons_get_icon_url in Country Icons 7.2

Same name and namespace in other branches
  1. 6.2 countryicons.module \countryicons_get_icon_url()

Get the URL to an icon.

Parameters

$code: A two letter ISO3166 country code.

$iconset: The icon set to use.

Return value

If icon exists a string containing the url to the image file, else NULL.

File

./countryicons.module, line 108
A collection of country icons, and an API for retrieving them.

Code

function countryicons_get_icon_url($code, $iconset) {
  $icon_path = countryicons_get_icon_path($code, $iconset);
  if (!empty($icon_path)) {
    return url($icon_path, array(
      'absolute' => TRUE,
    ));
  }
}