On this page
function overlay_block_list_alter
overlay_block_list_alter(&$blocks)
Implements hook_block_list_alter().
File
- modules/overlay/overlay.module, line 449
- Displays the Drupal administration interface in an overlay.
Code
function overlay_block_list_alter(&$blocks) {
// If we are limiting rendering to a subset of page regions, hide all blocks
// which appear in regions not on that list. Note that overlay_page_alter()
// does a more comprehensive job of preventing unwanted regions from being
// displayed (regardless of whether they contain blocks or not), but the
// reason for duplicating effort here is performance; we do not even want
// these blocks to be built if they are not going to be displayed.
if ($regions_to_render = overlay_get_regions_to_render()) {
foreach ($blocks as $bid => $block) {
if (!in_array($block->region, $regions_to_render)) {
unset($blocks[$bid]);
}
}
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!overlay!overlay.module/function/overlay_block_list_alter/7.x