update_fix_compatibility

update_fix_compatibility()

Disables any extensions that are incompatible with the current core version.

File

core/includes/update.inc, line 17
Drupal database update API.

Code

function update_fix_compatibility() {
  $extension_config = \Drupal::configFactory()->getEditable('core.extension');
  $save = FALSE;
  foreach (array('module', 'theme') as $type) {
    foreach ($extension_config->get($type) as $name => $weight) {
      if (update_check_incompatibility($name, $type)) {
        $extension_config->clear("$type.$name");
        $save = TRUE;
      }
    }
  }
  if ($save) {
    $extension_config->set('module', module_config_sort($extension_config->get('module')));
    $extension_config->save();
  }
}
doc_Drupal
2016-10-29 09:51:22
Comments
Leave a Comment

Please login to continue.