2 * Implements hook_block_view_alter().
4 function {{ machine_name }}_block_view_alter(&$data, $block) {
5 // Remove the contextual links on all blocks that provide them.
6 if (is_array($data['content']) && isset($data['content']['#contextual_links'])) {
7 unset($data['content']['#contextual_links']);
9 // Add a theme wrapper function defined by the current module to all blocks
10 // provided by the "somemodule" module.
11 if (is_array($data['content']) && $block->module == 'somemodule') {
12 $data['content']['#theme_wrappers'][] = 'mymodule_special_block';