function block_custom_block_delete in Drupal 7
Form constructor for the custom block deletion form.
Parameters
$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
block_custom_block_delete_submit()
1 string reference to 'block_custom_block_delete'
- block_menu in modules/
block/ block.module - Implements hook_menu().
File
- modules/
block/ block.admin.inc, line 621 - Admin page callbacks for the block module.
Code
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'));
}