| Versions | |
|---|---|
| 4.7 – 5 | block_box_delete($bid = 0) |
| 6 | block_box_delete(&$form_state, $bid = 0) |
Menu callback; confirm deletion of custom blocks.
modules/
<?php
function block_box_delete($bid = 0) {
$box = block_box_get($bid);
$form['info'] = array(
'#type' => 'hidden',
'#value' => $box['info'] ? $box['info'] : $box['title'],
);
$form['bid'] = array(
'#type' => 'hidden',
'#value' => $bid,
);
return confirm_form('block_box_delete_confirm', $form, t('Are you sure you want to delete the block %name?', array('%name' => theme('placeholder', $box['info']))), 'admin/block', '', t('Delete'), t('Cancel'));
}
?>