function social_core_update_8009 in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.2 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.3 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.4 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.5 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.6 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.7 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 8.8 modules/social_features/social_core/social_core.install \social_core_update_8009()
- 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8009()
- 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8009()
- 10.1.x modules/social_features/social_core/social_core.install \social_core_update_8009()
Enable socialblue theme and make default if socialbase is current default.
File
- modules/
social_features/ social_core/ social_core.install, line 501 - Install, update and uninstall functions for the social_core module.
Code
function social_core_update_8009() {
$system_theme_settings = \Drupal::configFactory()
->get('system.theme')
->get('default');
if ($system_theme_settings === 'socialbase') {
$themes = [
'socialblue',
];
\Drupal::service('theme_handler')
->install($themes);
\Drupal::configFactory()
->getEditable('system.theme')
->set('default', 'socialblue')
->save();
// Ensure that the install profile's theme is used.
// @see _drupal_maintenance_theme()
\Drupal::service('theme.manager')
->resetActiveTheme();
\Drupal::messenger()
->addStatus(t('Installed socialblue theme and made this the default. Please check release notes.'));
}
else {
\Drupal::messenger()
->addStatus(t('Skipped installing socialblue theme. Please check release notes.'));
}
}