function menu_block_uninstall in Menu Block 7.3
Same name and namespace in other branches
- 5.2 menu_block.install \menu_block_uninstall()
- 5 menu_block.install \menu_block_uninstall()
- 6.2 menu_block.install \menu_block_uninstall()
- 7.2 menu_block.install \menu_block_uninstall()
Implements hook_uninstall().
File
- ./
menu_block.install, line 10 - Provides install, upgrade and un-install functions for menu_block.
Code
function menu_block_uninstall() {
// Delete menu block variables.
drupal_load('module', 'menu_block');
$variable_keys = array_keys(menu_block_default_config());
foreach (variable_get('menu_block_ids', array()) as $delta) {
foreach ($variable_keys as $key) {
variable_del("menu_block_{$delta}_{$key}");
}
}
variable_del('menu_block_ids');
variable_del('menu_block_suppress_core');
variable_del('menu_block_menu_order');
// Remove block configurations.
foreach (array(
'block',
'block_node_type',
'block_role',
) as $table) {
if (db_table_exists($table)) {
db_delete($table)
->condition('module', 'menu_block')
->execute();
}
}
}