function system_preprocess_block

Same name in other branches
  1. 9 core/modules/system/system.module \system_preprocess_block()
  2. 8.9.x core/modules/system/system.module \system_preprocess_block()
  3. 10 core/modules/system/system.module \system_preprocess_block()
  4. 11.x core/modules/system/system.module \system_preprocess_block()

Implements hook_preprocess_block().

File

modules/system/system.module, line 2135

Code

function system_preprocess_block(&$variables) {
    // System menu blocks should get the same class as menu module blocks.
    if ($variables['block']->module == 'system' && in_array($variables['block']->delta, array_keys(menu_list_system_menus()))) {
        $variables['classes_array'][] = 'block-menu';
    }
}

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