function navigation_block_alter

Same name in other branches
  1. 11.x core/modules/navigation/navigation.module \navigation_block_alter()

Implements hook_block_alter().

File

core/modules/navigation/navigation.module, line 197

Code

function navigation_block_alter(&$definitions) : void {
    $hidden = [
        'navigation_user',
        'navigation_shortcuts',
        'navigation_menu',
    ];
    foreach ($hidden as $block_id) {
        if (isset($definitions[$block_id])) {
            $definitions[$block_id]['_block_ui_hidden'] = TRUE;
        }
    }
}

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