You are here

function regions_system_info_alter in Regions 7

Same name and namespace in other branches
  1. 6 regions.module \regions_system_info_alter()

Implements hook_system_info_alter().

File

./regions.module, line 87
Add regions to the screen that are cross-theme compliant

Code

function regions_system_info_alter(&$info, $file, $type) {
  if (isset($info['regions'])) {
    $list = module_invoke_all('define_regions');

    // Add the regions into the definition typically only provided by the theme
    // layer.
    if (count($list) > 0) {
      $info['original_regions'] = $info['regions'];
    }
    foreach ($list as $machine_name => $region) {
      $info['regions'] += array(
        $machine_name => $region['title'],
      );
    }
  }
}