function dashboard_block_info_alter
dashboard_block_info_alter(&$blocks, $theme, $code_blocks)
Implements hook_block_info_alter().
File
- modules/dashboard/dashboard.module, line 101
- Provides a dashboard page in the administrative interface.
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'; } } } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!dashboard!dashboard.module/function/dashboard_block_info_alter/7.x