function social_content_get_settings in Social Content 7
Get the settings for a social_content_type.
Parameters
object $social_content_type: The social content type object.
Return value
array An array of settings.
6 calls to social_content_get_settings()
- social_content_cron in ./
social_content.module - Implements hook_cron().
- social_content_cronapi in ./
social_content.module - Implements hook_cronapi().
- social_content_form in ./
social_content.admin.inc - Form handler for social content type settings.
- social_content_import_run_form_submit in ./
social_content.admin.inc - Submit handler for social_content_import_run_form().
- social_content_instagram_token_generator_form in modules/
instagram/ social_content_instagram.admin.inc - @file Social Content administration area for Instagram.
File
- ./
social_content.module, line 113 - Social Content module.
Code
function social_content_get_settings($social_content_type) {
$settings =& drupal_static(__FUNCTION__);
if (!$settings || !isset($settings[$social_content_type['name']])) {
$defaults = array(
'limit' => 200,
'auto_publish' => 1,
'enabled' => 0,
);
if (isset($social_content_type['additional_settings']) && is_array($social_content_type['additional_settings'])) {
$defaults += $social_content_type['additional_settings'];
}
$social_content_settings = variable_get('social_content_' . $social_content_type['name'], array());
$social_content_settings += $defaults;
drupal_alter('social_content_settings', $social_content_settings, $social_content_type);
$settings[$social_content_type['name']] = $social_content_settings;
}
return $settings[$social_content_type['name']];
}