Community Documentation

block_box_delete_submit

5 block.module block_box_delete_submit($form_id, $form_values)
6 block.admin.inc block_box_delete_submit($form, &$form_state)

Deletion of custom blocks.

File

modules/block/block.module, line 535
Controls the boxes that are displayed around the main content.

Code

<?php
function block_box_delete_submit($form_id, $form_values) {
  db_query('DELETE FROM {boxes} WHERE bid = %d', $form_values['bid']);
  db_query("DELETE FROM {blocks} WHERE module = 'block' AND delta = '%s'", $form_values['bid']);
  drupal_set_message(t('The block %name has been removed.', array('%name' => $form_values['info'])));
  cache_clear_all();
  return 'admin/build/block';
}
?>
Login or register to post comments