function shortcut_themes_installed in Drupal 10
Same name and namespace in other branches
- 8 core/modules/shortcut/shortcut.module \shortcut_themes_installed()
- 9 core/modules/shortcut/shortcut.module \shortcut_themes_installed()
Implements hook_themes_installed().
File
- core/
modules/ shortcut/ shortcut.module, line 376 - Allows users to manage customizable lists of shortcut links.
Code
function shortcut_themes_installed($theme_list) {
// Theme settings are not configuration entities and cannot depend on modules
// so to set a module-specific setting, we need to set it with logic.
foreach ([
'seven',
'claro',
] as $theme) {
if (in_array($theme, $theme_list, TRUE)) {
\Drupal::configFactory()
->getEditable("{$theme}.settings")
->set('third_party_settings.shortcut.module_link', TRUE)
->save(TRUE);
}
}
}