function pmpapi_pull_uninstall in Public Media Platform API Integration 7
Implements hook_uninstall().
File
- pmpapi_pull/
pmpapi_pull.install, line 18 - Install, update and uninstall functions for the pmpapi_pull module.
Code
function pmpapi_pull_uninstall() {
variable_del('pmpapi_pull_pull_active');
variable_del('pmpapi_pull_pull_user');
variable_del('pmpapi_pull_last_validity_check');
module_load_include('module', 'pmpapi_pull');
module_load_include('module', 'pmpapi');
foreach (pmpapi_pull_get_entities() as $entity_type => $entity) {
$bundles = $entity['bundles'];
if ($bundles) {
foreach ($bundles as $bundle_name => $bundle) {
$uname = $entity_type . '__' . $bundle_name;
variable_del('pmpapi_pull_' . $uname . '_profile');
foreach (pmpapi_get_profile_list() as $profile) {
variable_del('pmpapi_pull_mapping_' . $uname . '_' . $profile);
}
}
}
}
}