function hook_ds_regions_alter in Display Suite 7
Alter the region layout before the regions are rendered.
This hook is invoked in ds_entity_variables().
Parameters
$layout: The region layout.
$entity: The entity which is being processed for rendering.
1 invocation of hook_ds_regions_alter()
- ds_entity_variables in ./
ds.module - Add variables to an entity.
File
- ./
ds.api.php, line 453 - Hooks provided by Display Suite module.
Code
function hook_ds_regions_alter(&$layout, $entity) {
// Move the first element of the footer region into the header region on the
// front page.
if ($entity->type == 'blog' && drupal_is_front_page()) {
$element = array_shift($layout['settings']['regions']['footer']);
$layout['settings']['regions']['header'][] = $element;
}
}