You are here

function addressfield_phone_token_info_alter in Address Field Phone 7

Implements hook_token_info_alter().

Adds in additional tokens for phone fields.

File

./addressfield_phone.module, line 166
Add additional phone fields to addressfield.

Code

function addressfield_phone_token_info_alter(&$data) {
  $address_field =& $data['tokens']['address-field'];
  $address_field['phone-number'] = array(
    'name' => t('Phone number'),
    'description' => t('The phone number value.'),
  );
  $address_field['phone-number-extension'] = array(
    'name' => t('Phone number extension'),
    'description' => t('The phone number extension value.'),
  );
  $address_field['mobile-number'] = array(
    'name' => t('Mobile number'),
    'description' => t('The mobile number value.'),
  );
  $address_field['fax-number'] = array(
    'name' => t('Fax number'),
    'description' => t('The fax number value.'),
  );
  return $data;
}