You are here

function _wysiwyg_system_theme_settings_submit in Wysiwyg 7.2

Submit callback for the theme settings form.

Removes the edited theme from the cache.

1 string reference to '_wysiwyg_system_theme_settings_submit'
wysiwyg_form_system_theme_settings_alter in ./wysiwyg.module
Implements hook_form_FORM_ID_alter().

File

./wysiwyg.module, line 809

Code

function _wysiwyg_system_theme_settings_submit($form, &$form_state) {
  $theme = NULL;
  if ($form_state['build_info']['form_id'] == 'system_theme_settings' && !empty($form_state['build_info']['args'])) {
    $theme = $form_state['build_info']['args'][0];
  }
  if ($theme !== NULL) {
    $cached = cache_get('wysiwyg_css');
    if ($cached && !empty($cached->data)) {
      $css = $cached->data;
      unset($css[$theme]);
      cache_set('wysiwyg_css', $css);
    }
  }
  wysiwyg_get_css($theme);
}