8.5.x statistics.tokens.inc statistics_token_info()
8.0.x statistics.tokens.inc statistics_token_info()
8.1.x statistics.tokens.inc statistics_token_info()
8.2.x statistics.tokens.inc statistics_token_info()
8.3.x statistics.tokens.inc statistics_token_info()
8.4.x statistics.tokens.inc statistics_token_info()
8.6.x statistics.tokens.inc statistics_token_info()
7.x statistics.tokens.inc statistics_token_info()

Implements hook_token_info().

File

modules/statistics/statistics.tokens.inc, line 11
Builds placeholder replacement tokens for node visitor statistics.

Code

function statistics_token_info() {
  $node['total-count'] = array(
    'name' => t("Number of views"),
    'description' => t("The number of visitors who have read the node."),
  );
  $node['day-count'] = array(
    'name' => t("Views today"),
    'description' => t("The number of visitors who have read the node today."),
  );
  $node['last-view'] = array(
    'name' => t("Last view"),
    'description' => t("The date on which a visitor last read the node."),
    'type' => 'date',
  );
  return array(
    'tokens' => array(
      'node' => $node,
    ),
  );
}