function dashboard_block_info_alter
Implements hook_block_info_alter().
File
-
modules/
dashboard/ dashboard.module, line 101
Code
function dashboard_block_info_alter(&$blocks, $theme, $code_blocks) {
$admin_theme = variable_get('admin_theme');
if ($admin_theme && $theme == $admin_theme || !$admin_theme && $theme == variable_get('theme_default', 'bartik')) {
foreach ($blocks as $module => &$module_blocks) {
foreach ($module_blocks as $delta => &$block) {
// Make administrative blocks that are not already in use elsewhere
// available for the dashboard.
if (empty($block['status']) && (empty($block['region']) || $block['region'] == BLOCK_REGION_NONE) && !empty($code_blocks[$module][$delta]['properties']['administrative'])) {
$block['status'] = 1;
$block['region'] = 'dashboard_inactive';
}
}
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.