function bartik_preprocess_block
Same name in other branches
- 7.x themes/bartik/template.php \bartik_preprocess_block()
- 8.9.x core/themes/bartik/bartik.theme \bartik_preprocess_block()
Implements hook_preprocess_HOOK() for block.html.twig.
File
-
core/
themes/ bartik/ bartik.theme, line 93
Code
function bartik_preprocess_block(&$variables) {
// Add a clearfix class to system branding blocks.
if ($variables['plugin_id'] == 'system_branding_block') {
$variables['attributes']['class'][] = 'clearfix';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.