function rules_categories_features_revert in Rules 6
Implementation of hook_features_revert() for rule categories.
Parameters
$module: name of module to revert content for
File
- rules/
rules.export.inc, line 124 - Provides export functionality and integrates with the features module.
Code
function rules_categories_features_revert($module = NULL) {
rules_include('rules_admin');
module_load_include('inc', 'rules_admin', 'rules_admin.export');
$rules_export = array();
rules_admin_export_by_category($rules_export, array(
$module,
));
// Delete Normal / Overridden rules items that are defined in code
foreach ($rules_export as $item_type => $items) {
foreach ($items as $item_name => $item) {
rules_item_delete($item_type, $item_name);
}
}
rules_clear_cache();
return TRUE;
}