simplify.install in Simplify 7.2
Same filename and directory in other branches
Install, update and uninstall functions for the Simplify module.
File
simplify.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Simplify module.
*/
/**
* Implement hook_uninstall().
*/
function simplify_uninstall() {
$node_types = node_type_get_types();
// Add general node to list of node types (all nodes)
array_unshift($node_types, array(
'type' => 'node',
));
foreach ($node_types as $key => $value) {
simplify_uninstall_variable_del((array) $value);
}
}
/**
* Delete variables.
*/
function simplify_uninstall_variable_del($node_type) {
$node_type_type = $node_type['type'];
$simplify_node_type = $node_type_type == 'node' ? '' : '_' . $node_type_type;
variable_del('simplify' . $simplify_node_type . '_node_hide_filter');
variable_del('simplify' . $simplify_node_type . '_node_hide_menu');
variable_del('simplify' . $simplify_node_type . '_node_hide_revision_information');
variable_del('simplify' . $simplify_node_type . '_node_hide_path');
variable_del('simplify' . $simplify_node_type . '_node_hide_comment_settings');
variable_del('simplify' . $simplify_node_type . '_node_hide_author');
variable_del('simplify' . $simplify_node_type . '_node_hide_options');
}
Functions
Name | Description |
---|---|
simplify_uninstall | Implement hook_uninstall(). |
simplify_uninstall_variable_del | Delete variables. |