function poll_token_info

Implements hook_token_info().

File

drupal/modules/poll/poll.tokens.inc, line 11
Builds placeholder replacement tokens for values specific to Poll nodes.

Code

function poll_token_info() {
  $node['poll-votes'] = array(
    'name' => t("Poll votes"),
    'description' => t("The number of votes that have been cast on a poll."),
  );
  $node['poll-winner'] = array(
    'name' => t("Poll winner"),
    'description' => t("The winning poll answer."),
  );
  $node['poll-winner-votes'] = array(
    'name' => t("Poll winner votes"),
    'description' => t("The number of votes received by the winning poll answer."),
  );
  $node['poll-winner-percent'] = array(
    'name' => t("Poll winner percent"),
    'description' => t("The percentage of votes received by the winning poll answer."),
  );
  $node['poll-duration'] = array(
    'name' => t("Poll duration"),
    'description' => t("The length of time the poll is set to run."),
  );
  return array(
    'tokens' => array(
      'node' => $node,
    ),
  );
}