function block_custom_block_delete

7.x block_custom_block_delete($form, &$form_state, $module, $delta)

Form constructor for the custom block deletion form.


$module: The name of the module that implements the block to be deleted. This should always equal 'block' since it only allows custom blocks to be deleted.

$delta: The unique ID of the block within the context of $module.

See also


1 string reference to 'block_custom_block_delete'
block_menu in drupal/modules/block/block.module
Implements hook_menu().


drupal/modules/block/, line 621
Admin page callbacks for the block module.


function block_custom_block_delete($form, &$form_state, $module, $delta) {
  $block = block_load($module, $delta);
  $custom_block = block_custom_block_get($block->delta);
  $form['info'] = array(
    '#type' => 'hidden',
    '#value' => $custom_block['info'] ? $custom_block['info'] : $custom_block['title'],
  $form['bid'] = array(
    '#type' => 'hidden',
    '#value' => $block->delta,

  return confirm_form($form, t('Are you sure you want to delete the block %name?', array('%name' => $custom_block['info'])), 'admin/structure/block', '', t('Delete'), t('Cancel'));