function twitter_block_delete_submit in Twitter Block 7
Same name and namespace in other branches
- 7.2 twitter_block.admin.inc \twitter_block_delete_submit()
Form submission handler for twitter_block_delete().
See also
File
- ./
twitter_block.admin.inc, line 142 - Admin page callbacks for the Twitter Block module.
Code
function twitter_block_delete_submit($form, &$form_state) {
db_delete('twitter_block')
->condition('bid', $form_state['values']['bid'])
->execute();
db_delete('block')
->condition('module', 'twitter_block')
->condition('delta', $form_state['values']['bid'])
->execute();
db_delete('block_role')
->condition('module', 'twitter_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;
}