function themekey_features_graceful_rule_deletion in ThemeKey 7.3
Same name and namespace in other branches
- 7.2 themekey_features.module \themekey_features_graceful_rule_deletion()
Deletes all rules related to this feature, except that the administrator added childs
1 call to themekey_features_graceful_rule_deletion()
File
- ./
themekey_features.module, line 123
Code
function themekey_features_graceful_rule_deletion($module) {
module_load_include('inc', 'themekey', 'themekey_build');
$rules = themekey_load_rules();
$delete = TRUE;
while ($delete) {
$delete = FALSE;
foreach ($rules as $id => $rule) {
if ($rule['module'] == $module) {
try {
themekey_rule_del($id);
$delete = TRUE;
} catch (ThemeKeyRuleDeletionException $e) {
continue;
}
}
}
}
}