Skip to content

Instantly share code, notes, and snippets.

@acao
Last active August 29, 2015 14:05
Show Gist options
  • Save acao/d709eaacb98081fae47a to your computer and use it in GitHub Desktop.
Save acao/d709eaacb98081fae47a to your computer and use it in GitHub Desktop.
<?php
function example_update_N(){
// This manually enables the module using the same function features will use in the other example
features_module_enable('backup_migrate');
// Now you don't need to revert dependencies component because you've already enabled the module that you added.
$features['site_config'] = array('variable');
$features_rebuild($features);
$features_revert($features);
}
function example_update_N(){
// By reverting the dependencies component, you tell features to run features_module_enable() on any
// dependencies which are missing. Ta da!
$features['site_config'] = array('variable', 'dependencies');
$features_rebuild($features);
$features_revert($features);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment