function hybridauth_providers_list in HybridAuth Social Login 6.2
Same name and namespace in other branches
- 7.2 hybridauth.module \hybridauth_providers_list()
Internal functions.
10 calls to hybridauth_providers_list()
- hybridauth_admin_settings in ./
hybridauth.admin.inc - @file Administrative pages forms and functions for the HybridAuth module.
- hybridauth_get_config in ./
hybridauth.module - hybridauth_get_enabled_providers in ./
hybridauth.module - hybridauth_get_provider_name in ./
hybridauth.module - Returns auth provider name by provider ID.
- hybridauth_provider_load in ./
hybridauth.module - Menu argument loader.
File
- ./
hybridauth.module, line 325 - Main file for the HybridAuth module.
Code
function hybridauth_providers_list() {
static $providers;
if (!isset($providers)) {
$raw_providers = array(
//core providers
'AOL' => t('AOL'),
'Facebook' => t('Facebook'),
'Foursquare' => t('Foursquare'),
'Google' => t('Google'),
'LinkedIn' => t('LinkedIn'),
'Live' => t('Windows Live'),
'MySpace' => t('MySpace'),
'OpenID' => t('OpenID'),
'Twitter' => t('Twitter'),
'Yahoo' => t('Yahoo'),
//additional providers
'px500' => t('500px'),
'Disqus' => t('Disqus'),
'FamilySearch' => t('FamilySearch'),
'Geni' => t('Geni'),
'GitHub' => t('GitHub'),
'Goodreads' => t('Goodreads'),
//'Gowalla' => t('Gowalla'), //RIP
'Identica' => t('Identica'),
'Instagram' => t('Instagram'),
'LastFM' => t('LastFM'),
'Mailru' => t('Mail.ru'),
'Murmur' => t('Murmur'),
'MyHeritage' => t('MyHeritage'),
'Odnoklassniki' => t('Odnoklassniki'),
'Pixnet' => t('Pixnet'),
'Plurk' => t('Plurk'),
'QQ' => t('QQ'),
'Sina' => t('Sina'),
'Skyrock' => t('Skyrock'),
'Steam' => t('Steam'),
'Tumblr' => t('Tumblr'),
'TwitchTV' => t('Twitch.tv'),
'Viadeo' => t('Viadeo'),
'Vimeo' => t('Vimeo'),
'Vkontakte' => t('VKontakte'),
'Yandex' => t('Yandex'),
);
foreach (hybridauth_providers_files() as $name => $file) {
if (!array_key_exists($name, $raw_providers)) {
$raw_providers[$name] = $name;
}
}
$providers = array();
$weights = array();
foreach ($raw_providers as $provider_id => $provider_name) {
$weights[$provider_id] = variable_get('hybridauth_provider_' . $provider_id . '_weight', 0);
}
asort($weights);
foreach ($weights as $provider_id => $weight) {
$providers[$provider_id] = $raw_providers[$provider_id];
}
}
return $providers;
}