function poll_token_info in Poll 8
Implements hook_token_info().
File
- ./
poll.tokens.inc, line 13 - Builds placeholder replacement tokens for values specific to Poll nodes.
Code
function poll_token_info() {
$node['votes'] = array(
'name' => t("Poll votes"),
'description' => t("The number of votes that have been cast on a poll."),
);
$node['winner'] = array(
'name' => t("Poll winner"),
'description' => t("The winning poll answer."),
);
$node['winner-votes'] = array(
'name' => t("Poll winner votes"),
'description' => t("The number of votes received by the winning poll answer."),
);
$node['winner-percent'] = array(
'name' => t("Poll winner percent"),
'description' => t("The percentage of votes received by the winning poll answer."),
);
$node['duration'] = array(
'name' => t("Poll duration"),
'description' => t("The length of time the poll is set to run."),
);
return array(
'tokens' => array(
'poll' => $node,
),
);
}