You are here

function piwik_token_info in Piwik Web Analytics 7.2

Same name and namespace in other branches
  1. 8 piwik.tokens.inc \piwik_token_info()

Implements hook_token_info().

File

./piwik.tokens.inc, line 11
Builds placeholder replacement tokens for user-related data.

Code

function piwik_token_info() {
  $user['piwik-role-names'] = array(
    'name' => t('User role names'),
    'description' => t('The role names the user account is a member of as comma separated list.'),
    'needs-data' => 'user',
  );
  $user['piwik-role-ids'] = array(
    'name' => t('User role ids'),
    'description' => t('The role ids the user account is a member of as comma separated list.'),
    'needs-data' => 'user',
  );
  return array(
    'tokens' => array(
      'user' => $user,
    ),
  );
}