You are here

function phone_country_info in Phone 7

Get a country meta info

Parameters

string $countrycode:

Return value

array Returns a array containing country metadata

2 calls to phone_country_info()
phone_field_validate in ./phone.module
Implements hook_field_validate().
phone_supported_countrycode in ./phone.module
Country supported or not by the module ?

File

./phone.module, line 322

Code

function phone_country_info($countrycode = NULL) {
  static $i;
  $countrycode = trim($countrycode);
  if (phone_countries($countrycode) !== FALSE) {
    $phone_info_function = 'phone_' . $countrycode . '_metadata';
    module_load_include('inc', 'phone', 'include/phone.' . $countrycode);
    if (function_exists($phone_info_function)) {
      return $phone_info_function();
    }
  }

  //Country not taken into account yet
  return FALSE;
}