You are here

function user_dashboard_system_info_alter in UserDashboard 7

Implements hook_system_info_alter().

Add regions to each theme to store the dashboard blocks.

File

./user_dashboard.module, line 392
The User Dashboard module forks Drupal 7's awesome Dashboard module to provide an individual dashboard for each user on the site.

Code

function user_dashboard_system_info_alter(&$info, $file, $type) {
  if ($type == 'theme') {

    // Add the dashboard regions (the "inactive" region should always appear
    // last in the list, for usability reasons).
    $info['regions'] += _user_dashboard_region_descriptions();

    // Indicate that these regions are intended to be displayed whenever the
    // dashboard is displayed in an overlay. This information is provided for
    // any module that might need to use it, not just the core Overlay module.
    $info['overlay_regions'] = !empty($info['overlay_regions']) ? array_merge($info['overlay_regions'], _user_dashboard_regions()) : _user_dashboard_regions();
  }
}