Last active
August 29, 2015 14:05
-
-
Save acao/d709eaacb98081fae47a to your computer and use it in GitHub Desktop.
This file contains 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
<?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