You are here

function dlike_token_info in Drupal like (Flag counter) 8

Implements hook_token_info().

File

./dlike.tokens.inc, line 13
Token for Dlike.

Code

function dlike_token_info() {
  $types = array();
  $tokens = array();

  // Flag tokens.
  $types['flagcount'] = array(
    'name' => t('Flags count'),
    'description' => t('Tokens related to flag count (dlike) module.'),
  );
  $tokens['flagcount']['count'] = array(
    'name' => t('Count'),
    'description' => t('Number of times the flag has been flagged.'),
    'needs-data' => 'flag',
  );
  return array(
    'types' => $types,
    'tokens' => $tokens,
  );
}