function domain_theme_color_submit in Domain Access 7.3
Same name and namespace in other branches
- 7.2 domain_theme/domain_theme.admin.inc \domain_theme_color_submit()
Custom submit handler.
If the theme is saved as 'default', we have to be sure not to delete existing color directories. This section is copied from color.module.
See also
color_form_submit()
1 string reference to 'domain_theme_color_submit'
- domain_theme_form_alter in domain_theme/
domain_theme.module - Implements hook_form_alter().
File
- domain_theme/
domain_theme.admin.inc, line 361 - Include file to handle theme configuration screen
Code
function domain_theme_color_submit($form, &$form_state) {
$theme = $form_state['values']['theme'];
$info = $form_state['values']['info'];
// Resolve palette.
$palette = $form_state['values']['palette'];
if ($form_state['values']['scheme'] != '') {
foreach ($palette as $key => $color) {
if (isset($info['schemes'][$form_state['values']['scheme']]['colors'][$key])) {
$palette[$key] = $info['schemes'][$form_state['values']['scheme']]['colors'][$key];
}
}
$palette += $info['schemes']['default']['colors'];
}
if (implode(',', color_get_palette($theme, TRUE)) == implode(',', $palette)) {
$form_state['values']['palette']['domain_default'] = 'xyz';
}
}