block_box_delete_submit

Definition

block_box_delete_submit($form_id, $form_values)
modules/block/block.module, line 535

Description

Deletion of custom blocks.

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 = %d", $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';
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.