Skip to content

Instantly share code, notes, and snippets.

@kalinchernev
Created May 29, 2015 10:37
Show Gist options
  • Save kalinchernev/8269f628da81ae402bca to your computer and use it in GitHub Desktop.
Save kalinchernev/8269f628da81ae402bca to your computer and use it in GitHub Desktop.
Small helper feature revert all components
/**
* Helper to revert all components within a feature.
* @param $feature_machine_name
*/
function _feature_revert_all($feature_machine_name) {
$feature = features_get_features($feature_machine_name);
$components = array_keys($feature->info['features']);
features_revert(array($feature_machine_name => $components));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment