You are here

function hook_regions_blocks_alter in Regions 6

Same name and namespace in other branches
  1. 7 regions.api.php \hook_regions_blocks_alter()

Hook allowing other modules to alter any newly defined regions blocks array before the each block object is rendered by theme_block().

Parameters

array $blocks: A keyed array of block objects provided by core block and context modules.

string $region_name:

See also

_regions_blocks()

1 invocation of hook_regions_blocks_alter()
_regions_blocks in ./regions.module
Helper function to get a list of blocks per region, as provided by core block and context modules.

File

./regions.api.php, line 71
Hooks provided by Regions.

Code

function hook_regions_blocks_alter(&$blocks = array(), $region_name = NULL) {

  // Example to support HTML titles, with a safe but unorthodox workaround.
  foreach ($blocks as $key => $block) {
    $block->subject = filter_xss_admin(html_entity_decode($block->subject));
    $blocks[$key] = $block;
  }
}