function contactinfo_token_info in Contact Info 7
Implements hook_token_info().
File
- ./
contactinfo.tokens.inc, line 11 - Token support for the Contact Info module.
Code
function contactinfo_token_info() {
$type = array(
'name' => t('Contact information'),
'description' => t("Tokens for this site's contact information."),
);
$tokens['type'] = array(
'name' => t('Contact information type'),
'description' => t('Either "Personal" or "Organization/Business".'),
);
$tokens['given-name'] = array(
'name' => t('First Name'),
'description' => t("Site contact person's first name."),
);
$tokens['family-name'] = array(
'name' => t('Last Name'),
'description' => t("Site contact person's last name."),
);
$tokens['org'] = array(
'name' => t('Organization/Business Name'),
'description' => t('The name of the organization or business.'),
);
$tokens['tagline'] = array(
'name' => t('Tagline'),
'description' => t('A short tagline.'),
);
$tokens['adr-street-address'] = array(
'name' => t('Street Address'),
'description' => t('The street address portion of the contact address.'),
);
$tokens['adr-extended-address'] = array(
'name' => t('Extended Address'),
'description' => t('The extended address portion of the contact address.'),
);
$tokens['adr-locality'] = array(
'name' => t('City'),
'description' => t('The city portion of the contact address.'),
);
$tokens['adr-region'] = array(
'name' => t('State/Province'),
'description' => t('The state or province portion of the contact address.'),
);
$tokens['adr-postal-code'] = array(
'name' => t('Postal Code'),
'description' => t('The postal code portion of the contact address.'),
);
$tokens['adr-country-name'] = array(
'name' => t('Country'),
'description' => t('The country name portion of the contact address.'),
);
$tokens['location-longitude'] = array(
'name' => t('Longitude'),
'description' => t('Longitude, in full decimal format (like -121.629562).'),
);
$tokens['location-latitude'] = array(
'name' => t('Latitude'),
'description' => t('Latitude, in full decimal format (like 38.827382).'),
);
$tokens['phone-voice'] = array(
'name' => t('Voice Phone Number(s)'),
'description' => t('Voice phone numbers, separated by commas.'),
);
$tokens['phone-fax'] = array(
'name' => t('Fax Number(s)'),
'description' => t('Fax numbers, separated by commas.'),
);
$tokens['email'] = array(
'name' => t('Email'),
'description' => t("This site's contact email address."),
);
return array(
'types' => array(
'contactinfo' => $type,
),
'tokens' => array(
'contactinfo' => $tokens,
),
);
}