function hybridauth_token_info in HybridAuth Social Login 7.2
Implements hook_token_info().
1 call to hybridauth_token_info()
- _hybridauth_rules_data_properties in ./
hybridauth.rules.inc - Rules data properties for HybridAuth data type.
1 string reference to 'hybridauth_token_info'
- _hybridauth_rules_data_properties in ./
hybridauth.rules.inc - Rules data properties for HybridAuth data type.
File
- ./
hybridauth.tokens.inc, line 10 - Builds placeholder replacement tokens for HybridAuth-related data.
Code
function hybridauth_token_info() {
$types = array();
$types['hybridauth'] = array(
'name' => t('HybridAuth data'),
'description' => t('Information about the user from HybridAuth library.'),
'needs-data' => 'user',
);
/*$types['hybridauth2'] = array(
'name' => t('HybridAuth data'),
'description' => t('Information about the user from HybridAuth library.'),
'needs-data' => 'user',
);*/
$tokens = array();
$tokens['user']['hybridauth'] = array(
'name' => t('HybridAuth information'),
'description' => t('Information from HybridAuth library.'),
'type' => 'hybridauth',
);
foreach (hybridauth_fields_list() as $key => $value) {
$tokens['hybridauth'][$key] = array(
'name' => $value,
'description' => $value . ' ' . t('provided by HybridAuth library.'),
);
/*$tokens['hybridauth2'][$key] = array(
'name' => $value,
'description' => $value . ' ' . t('provided by HybridAuth library.'),
);*/
}
/*foreach (hybridauth_providers_list() as $key => $value) {
$tokens['hybridauth'][$key] = array(
'name' => $value,
'description' => $value . t(' information through HybridAuth library.'),
'type' => 'hybridauth2',
);
}*/
return array(
'types' => $types,
'tokens' => $tokens,
);
}