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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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(); } } |
Please login to continue.