You are here

function uc_roles_token_info in Ubercart 7.3

Implements hook_token_info().

File

uc_roles/uc_roles.tokens.inc, line 11
Token hooks for the uc_roles module.

Code

function uc_roles_token_info() {
  $type = array(
    'name' => t('Role promotions'),
    'description' => t('Tokens related to purchased, temporary roles.'),
    'needs-data' => 'uc_role',
  );
  $tokens['expiration'] = array(
    'name' => t('Expiration'),
    'description' => t('The date the role will expire.'),
    'type' => 'date',
  );
  $tokens['name'] = array(
    'name' => t('Role'),
    'description' => t('The associated role name'),
  );
  return array(
    'types' => array(
      'uc_role' => $type,
    ),
    'tokens' => array(
      'uc_role' => $tokens,
    ),
  );
}