You are here

function features_modules_disabled in Features 7.2

Same name and namespace in other branches
  1. 7 features.module \features_modules_disabled()

Implements hook_modules_disabled().

File

./features.module, line 388
Main *.module file for the 'features' module.

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);
  }
}