function dashboard_form_block_admin_configure_alter

Implements hook_form_FORM_ID_alter().

1 call to dashboard_form_block_admin_configure_alter()

File

drupal/modules/dashboard/dashboard.module, line 392
Provides a dashboard page in the administrative interface.

Code

function dashboard_form_block_admin_configure_alter(&$form, &$form_state) {
  global $theme_key;
  drupal_theme_initialize();

  // Hide the dashboard regions from the region select list on the block
  // configuration form, for all themes except the current theme (since the
  // other themes do not display the dashboard).
  // @todo This assumes the current page is being displayed using the same
  //   theme that the dashboard is displayed in.
  $dashboard_regions = dashboard_region_descriptions();
  foreach (element_children($form['regions']) as $region_name) {
    $region =& $form['regions'][$region_name];
    if ($region_name != $theme_key && isset($region['#options'])) {
      $region['#options'] = array_diff_key($region['#options'], $dashboard_regions);
    }
  }
}