function system_preprocess_toolbar
Same name in other branches
- 10 core/modules/system/system.module \system_preprocess_toolbar()
- 11.x core/modules/system/system.module \system_preprocess_toolbar()
Implements hook_preprocess_toolbar().
File
-
core/
modules/ system/ system.module, line 1321
Code
function system_preprocess_toolbar(array &$variables, $hook, $info) {
// When Claro is the admin theme, Claro overrides the active theme's if that
// active theme is not Claro. Because of these potential overrides, the
// toolbar cache should be invalidated any time the default or admin theme
// changes.
$variables['#cache']['tags'][] = 'config:system.theme';
// If Claro is the admin theme but not the active theme, still include Claro's
// toolbar preprocessing.
if (_system_is_claro_admin_and_not_active()) {
require_once DRUPAL_ROOT . '/core/themes/claro/claro.theme';
claro_preprocess_toolbar($variables, $hook, $info);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.