You are here

function imageblock_custom_block_delete in Image Block 7

Form builder for the image block deletion form.

Parameters

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

See also

imageblock_custom_block_delete_submit()

1 string reference to 'imageblock_custom_block_delete'
imageblock_menu in ./imageblock.module
Implements hook_menu().

File

./imageblock.admin.inc, line 133

Code

function imageblock_custom_block_delete($form, &$form_state, $delta) {
  $block = block_load('imageblock', $delta);
  $custom_block = block_imageblock_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 image block %name?', array(
    '%name' => $custom_block['info'],
  )), 'admin/structure/block', '', t('Delete'), t('Cancel'));
}