You are here

function claro_system_module_invoked_theme_registry_alter in Drupal 9

Called by system.module via its hook_theme_registry_alter().

If the active theme is not Claro, but Claro is the admin theme, this alters the registry so Claro's toolbar templates are used.

See also

system_theme_registry_alter()

1 call to claro_system_module_invoked_theme_registry_alter()
system_theme_registry_alter in core/modules/system/system.module
Implements hook_theme_registry_alter().

File

core/themes/claro/claro.theme, line 1669
Functions to support theming in the Claro theme.

Code

function claro_system_module_invoked_theme_registry_alter(array &$theme_registry) {
  foreach ([
    'toolbar',
    'menu__toolbar',
  ] as $registry_item) {
    if (isset($theme_registry[$registry_item])) {
      $theme_registry[$registry_item]['path'] = 'core/themes/claro/templates/navigation';
    }
  }
}