function fbconnect_get_config in Facebook Connect 8.2
Same name and namespace in other branches
- 5 fbconnect.module \fbconnect_get_config()
- 6.2 fbconnect.module \fbconnect_get_config()
- 6 fbconnect.module \fbconnect_get_config()
- 7.2 fbconnect.module \fbconnect_get_config()
Get fbconnect config parameter.
Return value
array
15 calls to fbconnect_get_config()
- facebook_client in ./
fbconnect.module - Get the Facebook client object for easy access.
- facebook_get_access_token in ./
fbconnect.module - Get the Facebook access token object for easy access.
- FbconnectTestCase::tearDown in tests/
fbconnect.test - FbconnectTestCase::_createFbTestUser in tests/
fbconnect.test - fbconnect_appearance_settings in ./
fbconnect.admin.inc
File
- ./
fbconnect.module, line 165 - @todo.
Code
function fbconnect_get_config() {
global $base_url;
static $config;
if (!$config) {
if (module_exists('i18n')) {
global $language;
$switch_code = variable_get('fbconnect_language_code_' . $language->language, '');
if ($switch_code) {
$config['language_code'] = $switch_code;
}
}
$config['user_pictures'] = variable_get('fbconnect_pic_allow', 'allow');
$config['language_code'] = variable_get('fbconnect_language_code', 'en_US');
$config['app_id'] = variable_get('fbconnect_appid', NULL);
$config['secret_api_key'] = variable_get('fbconnect_skey', NULL);
$config['debug'] = variable_get('fbconnect_debug', FALSE);
if (variable_get('fbconnect_ssl', FALSE)) {
$config['connect_js'] = "'https://connect.facebook.net/{$config['language_code']}/sdk.js'";
}
else {
$config['connect_js'] = "document.location.protocol + '//connect.facebook.net/{$config['language_code']}/sdk.js'";
}
$config['loginout_mode'] = variable_get('fbconnect_loginout_mode', 'manual');
$config['invite_name'] = variable_get('fbconnect_invite_name', variable_get('site_name', $base_url));
$config['fast_reg_mode'] = variable_get('fbconnect_fast_reg', NULL);
$config['fast_reg_autoname'] = variable_get('fbconnect_fast_reg_autoname', 1);
// Allow third party modules to change settings.
drupal_alter('fbconnect_config', $config);
}
if ($config['app_id'] && $config['secret_api_key']) {
return $config;
}
}