You are here

function theme_countries_number in Countries 7

Same name and namespace in other branches
  1. 8 countries.module \theme_countries_number()
  2. 7.2 countries.module \theme_countries_number()
4 theme calls to theme_countries_number()
countries_admin_import_form in ./countries.admin.inc
Menu callback to update the database from the CSV file.
countries_admin_overview in ./countries.admin.inc
Menu callback; Displays a list of all countries.
countries_field_formatter_view in ./countries.module
Implements hook_field_formatter_view().
countries_tokens in ./countries.tokens.inc
Implements hook_tokens().

File

./countries.module, line 592

Code

function theme_countries_number($variables) {
  if (isset($variables['country']) && !empty($variables['country']->numcode)) {
    return sprintf("%03s", $variables['country']->numcode);
  }
  return '';
}