function features_modules_disabled in Features 7
Same name and namespace in other branches
- 7.2 features.module \features_modules_disabled()
Implements hook_modules_disabled().
File
- ./
features.module, line 283 - Module file for the features module, which enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together statisfy a certain use-case.
Code
function features_modules_disabled($modules) {
// Go through all modules and gather features that can be disabled.
$items = array();
foreach ($modules as $module) {
if ($feature = features_load_feature($module)) {
$items[$module] = array_keys($feature->info['features']);
}
}
if (!empty($items)) {
_features_restore('disable', $items);
// Rebuild the list of features includes.
features_include(TRUE);
}
}