7.x dashboard.api.php hook_dashboard_regions_alter(&$regions)

Alter dashboard regions provided by modules.

Parameters

$regions: An array containing all dashboard regions, in the format provided by hook_dashboard_regions().

Related topics

1 invocation of hook_dashboard_regions_alter()
dashboard_region_descriptions in modules/dashboard/dashboard.module
Returns an array of dashboard region descriptions, keyed by region name.

File

modules/dashboard/dashboard.api.php, line 35
Hooks provided by the Dashboard module.

Code

function hook_dashboard_regions_alter(&$regions) {

  // Remove the sidebar region defined by the core dashboard module.
  unset($regions['dashboard_sidebar']);
}

Comments

8bitplateau’s picture

I can not get this hook working in module or theme.
It does get called in both but unsetting the region (as in example) has no affect.
using 7.21.

rterrein’s picture

you need to use the following code:

function hook_dashboard_regions_alter(&$regions) {
// Remove the sidebar region defined by the core dashboard module.
unset($regions['dashboard_sidebar']);
}