You are here

function cloud_zoom_admin_preset_delete_confirm_submit in Cloud Zoom 6

Delete preset confirm form submit hanlder

1 call to cloud_zoom_admin_preset_delete_confirm_submit()
cloud_zoom_admin_preset_revert_confirm_submit in ./cloud_zoom.admin.inc
Revert preset confirm form submit hanlder

File

./cloud_zoom.admin.inc, line 358
This file contains al the admin-only function

Code

function cloud_zoom_admin_preset_delete_confirm_submit(&$form, &$form_state) {

  // Get the preset
  $preset = $form['#original_preset'];

  // Delete the preset
  db_query("DELETE FROM {cloud_zoom_presets} WHERE name = '%s'", $preset['name']);

  // Wipe any caches and static storage
  cloud_zoom_get_settings(NULL, TRUE);
  drupal_rebuild_theme_registry();
  content_clear_type_cache();

  // Redirect to the admin overview page
  $form_state['redirect'] = 'admin/settings/cloudzoom';
}