You are here

function scald_admin_context_confirm_delete_form_submit in Scald: Media Management made easy 7

Process scald_admin_context_confirm_delete_form form submission.

File

includes/scald.admin.inc, line 400

Code

function scald_admin_context_confirm_delete_form_submit($form, &$form_state) {
  $context = $form['#context'];
  $custom_contexts = variable_get('scald_custom_contexts', array());
  unset($custom_contexts[$context['name']]);
  variable_set('scald_custom_contexts', $custom_contexts);
  $config = scald_context_config_load($context['name']);
  scald_context_config_delete($config);
  $form_state['redirect'] = 'admin/structure/scald';
}