theme_get_setting($setting_name, $refresh = FALSE)
drupal/includes/theme.inc, line 278
Retrieve a setting for the current theme. This function is designed for use from within themes & engines to determine theme settings made in the admin interface.
Caches values for speed (use $refresh = TRUE to refresh cache)
$setting_name The name of the setting to be retrieved.
$refresh Whether to reload the cache of settings.
The value of the requested setting, NULL if the setting does not exist.
function theme_get_setting($setting_name, $refresh = FALSE) {
global $theme_key;
static $settings;
if (empty($settings) || $refresh) {
$settings = theme_get_settings($theme_key);
$themes = list_themes();
$theme_object = $themes[$theme_key];
if ($settings['mission'] == '') {
$settings['mission'] = variable_get('site_mission', '');
}
if (!$settings['toggle_mission']) {
$settings['mission'] = '';
}
if ($settings['toggle_logo']) {
if ($settings['default_logo']) {
$settings['logo'] = dirname($theme_object->filename) .'/logo.png';
}
elseif ($settings['logo_path']) {
$settings['logo'] = $settings['logo_path'];
}
}
if (!$settings['toggle_primary_links']) {
$settings['primary_links'] = '';
}
if (!$settings['toggle_secondary_links']) {
$settings['secondary_links'] = '';
}
}
return isset($settings[$setting_name]) ? $settings[$setting_name] : NULL;
}