poll_token_info
function poll_token_info
poll_token_info()
Implements hook_token_info().
File
- 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), ); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!poll!poll.tokens.inc/function/poll_token_info/7.x