function block_custom_block_delete_submit
Form submission handler for block_custom_block_delete().
See also
File
-
modules/
block/ block.admin.inc, line 635
Code
function block_custom_block_delete_submit($form, &$form_state) {
db_delete('block_custom')->condition('bid', $form_state['values']['bid'])
->execute();
db_delete('block')->condition('module', 'block')
->condition('delta', $form_state['values']['bid'])
->execute();
db_delete('block_role')->condition('module', 'block')
->condition('delta', $form_state['values']['bid'])
->execute();
drupal_set_message(t('The block %name has been removed.', array(
'%name' => $form_state['values']['info'],
)));
cache_clear_all();
$form_state['redirect'] = 'admin/structure/block';
return;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.