You are here

function countryicons_get_icon_path in Country Icons 7

Same name and namespace in other branches
  1. 6.2 countryicons.module \countryicons_get_icon_path()
  2. 6 countryicons.module \countryicons_get_icon_path()
  3. 7.2 countryicons.module \countryicons_get_icon_path()

Get the path to an icon.

Parameters

$code: A two letter ISO3166 country code.

$iconset: The icon set to use ('shiny' is the default).

Return value

A string containing an absolute path to the image file.

File

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

Code

function countryicons_get_icon_path($code, $iconset = 'shiny') {
  $iconsetinfo = countryicons_get_iconset($iconset);
  return base_path() . str_replace('*', $code, $iconsetinfo['path']);
}