You are here

function extlink_extra_token_info in External Links Extra 7

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

Implements hook_token_info().

File

./extlink_extra.module, line 291
This module adds some extra functionality to the External Links module.

Code

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