You are here

function extlink_extra_token_info in External Links Extra 8

Same name and namespace in other branches
  1. 7 extlink_extra.module \extlink_extra_token_info()

Implements hook_token_info().

File

./extlink_extra.module, line 460

Code

function extlink_extra_token_info() {
  $types = [
    'name' => t('External Links'),
    'description' => t('Tokens related to the External Links module.'),
    'needs-data' => 'extlink',
  ];
  $extlinks['external-url'] = [
    'name' => t('External URL'),
    'description' => t('The URL of the external site that the user has just clicked.'),
  ];
  $extlinks['back-url'] = [
    'name' => t('Back URL'),
    'description' => t('The URL of the page the user was on when they clicked the external link.'),
  ];
  $extlinks['timer'] = [
    'name' => t('Timer'),
    'description' => t('Use this token to position the automatic redirect timer (if you are using it).'),
  ];
  return [
    'types' => [
      'extlink' => $types,
    ],
    'tokens' => [
      'extlink' => $extlinks,
    ],
  ];
}