You are here

function block_box_delete in Drupal 6

Same name and namespace in other branches
  1. 4 modules/block.module \block_box_delete()
  2. 5 modules/block/block.module \block_box_delete()

Menu callback; confirm deletion of custom blocks.

1 string reference to 'block_box_delete'
block_menu in modules/block/block.module
Implementation of hook_menu().

File

modules/block/block.admin.inc, line 328
Admin page callbacks for the block module.

Code

function block_box_delete(&$form_state, $bid = 0) {
  $box = block_box_get($bid);
  $form['info'] = array(
    '#type' => 'hidden',
    '#value' => $box['info'],
  );
  $form['bid'] = array(
    '#type' => 'hidden',
    '#value' => $bid,
  );
  return confirm_form($form, t('Are you sure you want to delete the block %name?', array(
    '%name' => $box['info'],
  )), 'admin/build/block', '', t('Delete'), t('Cancel'));
}