You are here

function closeblock_blocks_process in Close Block 6

Get blocks settings.

1 call to closeblock_blocks_process()
closeblock_preprocess_page in ./closeblock.module
Implements hook_preprocess_page().

File

includes/closeblock.api.inc, line 45

Code

function closeblock_blocks_process(&$vars) {
  global $theme;

  // Populate all block regions.
  $regions = system_region_list($theme);

  // Load all region content assigned via blocks.
  foreach (array_keys($regions) as $region) {

    // Prevent left and right regions from rendering blocks when 'show_blocks' == FALSE.
    if (!(!$vars['show_blocks'] && ($region == 'left' || $region == 'right'))) {
      if ($list = block_list($region)) {
        foreach ($list as $key => $block) {
          $output .= closeblock_ajax_settings($block);
        }
      }
    }
  }
  $vars['scripts'] = drupal_get_js();
}