function domain_token_info in Domain Access 7.3
Same name and namespace in other branches
- 8 domain/domain.module \domain_token_info()
- 7.2 domain.tokens.inc \domain_token_info()
Implements hook_token_info().
1 call to domain_token_info()
- domain_get_tokens in ./
domain.module - Returns all domain module tokens in a human-readable array.
File
- ./
domain.tokens.inc, line 11 - Builds placeholder replacement tokens for domain-related data.
Code
function domain_token_info() {
// Domain token types.
$info['types']['domain'] = array(
'name' => t('Domains'),
'description' => t('Tokens related to domains.'),
'needs-data' => 'domain',
);
$info['types']['current-domain'] = array(
'name' => t('Current domain'),
'description' => t('Tokens related to the current domain.'),
'type' => 'domain',
);
$info['types']['default-domain'] = array(
'name' => t('Default domain'),
'description' => t('Tokens related to the default domain.'),
'type' => 'domain',
);
// Domain tokens.
$info['tokens']['domain']['id'] = array(
'name' => t('Domain id'),
'description' => t('The domain ID.'),
);
$info['tokens']['domain']['machine-name'] = array(
'name' => t('Domain machine name'),
'description' => t('The domain machine identifier.'),
);
$info['tokens']['domain']['path'] = array(
'name' => t('Domain path'),
'description' => t('The base url path for the domain.'),
);
$info['tokens']['domain']['name'] = array(
'name' => t('Domain name'),
'description' => t('The domain name.'),
);
$info['tokens']['domain']['url'] = array(
'name' => t('Domain URL'),
'description' => t('The domain\'s URL, lower-cased and with only alphanumeric characters.'),
);
$info['tokens']['domain']['hostname'] = array(
'name' => t('Domain hostname'),
'description' => t('The domain hostname.'),
);
$info['tokens']['domain']['subdomain'] = array(
'name' => t('Subdomain'),
'description' => t('The subdomain, lower-cased and with only alphanumeric characters. Only works with *.example.com formats'),
);
$info['tokens']['node']['domain'] = array(
'name' => t('Domain information'),
'description' => t('The domain associated with this content.'),
'type' => 'domain',
);
return $info;
}