function pathauto_entity_uninstall in Pathauto Entity 7
Implements hook_uninstall().
File
- ./
pathauto_entity.install, line 6
Code
function pathauto_entity_uninstall() {
module_load_include('module', 'pathauto_entity');
$entities = pathauto_entity_available_entity_types();
if (isset($entities)) {
foreach ($entities as $type => $status) {
// Remove all variables.
$results = db_select('variable', 'v')
->fields('v', array(
'name',
))
->condition('name', 'pathauto_' . $type . '_%', 'LIKE')
->execute();
foreach ($results as $result) {
variable_del($result->name);
}
}
}
// Remove all variables.
$results = db_select('variable', 'v')
->fields('v', array(
'name',
))
->condition('name', 'pathauto_entity_%', 'LIKE')
->execute();
foreach ($results as $result) {
variable_del($result->name);
}
}