function uc_store_token_info in Ubercart 8.4
Same name and namespace in other branches
- 7.3 uc_store/uc_store.tokens.inc \uc_store_token_info()
Implements hook_token_info().
File
- uc_store/
uc_store.tokens.inc, line 15 - Token hooks for the uc_store module.
Code
function uc_store_token_info() {
$type = [
'name' => t('Store information'),
'description' => t('Tokens for store-specific, but globally available, information.'),
];
$site['login-link'] = [
'name' => t('Login URL'),
'description' => t('A link to the site login page.'),
];
$site['logo'] = [
'name' => t('Logo'),
'description' => t('The image showing the site logo.'),
];
$store['name'] = [
'name' => t('Store name'),
'description' => t('The Ubercart store name.'),
];
$store['link'] = [
'name' => t('Store link'),
'description' => t('A link to the Ubercart store using the store name.'),
];
$store['email'] = [
'name' => t('Email'),
'description' => t('The Ubercart store e-mail address.'),
];
$store['phone'] = [
'name' => t('Phone number'),
'description' => t('The Ubercart store phone number.'),
];
$store['fax'] = [
'name' => t('Fax number'),
'description' => t('The Ubercart store fax number.'),
];
$store['address'] = [
'name' => t('Address'),
'description' => t('The Ubercart store mailing address.'),
];
$store['help-url'] = [
'name' => t('Help page URL'),
'description' => t('The URL to the store help page.'),
'type' => 'url',
];
return [
'types' => [
'store' => $type,
],
'tokens' => [
'site' => $site,
'store' => $store,
],
];
}