function Popup_announcement_block::delete_block in Pop-up announcement 7
Delete block
File
- ./
popup_announcement.module, line 363 - Primarily Drupal hooks and custom functions for creating block with pop-up announcement.
Class
- Popup_announcement_block
- Class for work with block with announcements
Code
function delete_block($bid) {
$bs = $this
->get_blocks();
unset($bs[$bid]);
variable_set('popup_announcement_blocks', $bs);
// @todo: travel in debugger when uninstalling module -> find how to delete old blocks more pretty!
db_delete('block')
->condition('delta', 'popup_announcement_' . $bid)
->execute();
block_flush_caches();
// @todo: realy need it here?
}