function claro_system_module_invoked_theme_registry_alter

Same name and namespace in other branches
  1. 9 core/themes/claro/claro.theme \claro_system_module_invoked_theme_registry_alter()
  2. 10 core/themes/claro/claro.theme \claro_system_module_invoked_theme_registry_alter()

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 1824

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';
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.