function dashboard_form_block_admin_configure_alter
Implements hook_form_FORM_ID_alter().
1 call to dashboard_form_block_admin_configure_alter()
- dashboard_form_block_add_block_form_alter in modules/
dashboard/ dashboard.module - Implements hook_form_FORM_ID_alter().
File
-
modules/
dashboard/ dashboard.module, line 392
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);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.