1 block.admin.inc block_custom_block_delete($form, &$form_state, $delta)

Form constructor for the custom block deletion form.

Parameters

array $form: An associative array containing the structure of a portion of the form.

array $form_state: A keyed array containing the current state of the form.

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

See also

block_menu()

block_custom_block_delete_submit()

File

core/modules/block/block.admin.inc, line 273
Admin page callbacks for the Block module.

Code

function block_custom_block_delete($form, &$form_state, $delta) {
  $custom_block = block_custom_block_load($delta);
  $form['info'] = array('#type' => 'hidden', '#value' => $custom_block['info']);
  $form['delta'] = array('#type' => 'hidden', '#value' => $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'));
}