domain_theme_set_variables($theme)domain_theme/domain_theme.module, line 41
<?php
function domain_theme_set_variables($theme) {
global $conf;
if (!empty($theme['settings'])) {
$settings = domain_unserialize($theme['settings']);
$conf['theme_'. $theme['theme'] .'_settings'] = $settings;
// Account for color module.
$vars = array('palette', 'stylesheets', 'logo', 'files', 'screenshot');
// In some cases, where the domain uses the default color palette
// and the primary theme does not, we may only have the palette
// stored, in which case, we have to load that data and ignore the rest.
$palette_var = 'color_'. $theme['theme'] .'_palette';
if (!isset($settings[$palette_var])) {
if (isset($settings['palette'])) {
$conf[$palette_var] = $settings['palette'];
}
}
else {
foreach ($vars as $variable) {
$name = 'color_'. $theme['theme'] .'_'. $variable;
if (isset($settings[$name])) {
$conf[$name] = $settings[$name];
}
}
}
}
}
?>