function custom_block_delete_form_submit

Form submission handler for custom_block_delete_form().

File

drupal/core/modules/block/custom_block/custom_block.pages.inc, line 115
Provides page callbacks for custom blocks.

Code

function custom_block_delete_form_submit($form, &$form_state) {
  $block = $form_state['custom_block'];
  $block
    ->delete();
  drupal_set_message(t('Custom block %label has been deleted.', array(
    '%label' => $block
      ->label(),
  )));
  watchdog('custom_block', 'Custom block %label has been deleted.', array(
    '%label' => $block
      ->label(),
  ), WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/structure/block';
}