You are here

function nd_build_mode_delete_form_submit in Node displays 6

Delete display.

File

includes/nd.buildmodes.inc, line 281
Manage build modes.

Code

function nd_build_mode_delete_form_submit($form, &$form_state) {
  $build_modes = variable_get('nd_build_modes', array());
  unset($build_modes[$form_state['values']['display']]);
  variable_set('nd_build_modes', $build_modes);
  drupal_set_message(t('Custom build mode %build_mode has been removed.', array(
    '%build_mode' => $form_state['values']['display'],
  )));
  $form_state['redirect'] = 'admin/content/types/nd/buildmodes';
  menu_rebuild();
}