Created
May 29, 2015 10:37
-
-
Save kalinchernev/8269f628da81ae402bca to your computer and use it in GitHub Desktop.
Small helper feature revert all components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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