function overlay_page_alter

Implements hook_page_alter().

File

modules/overlay/overlay.module, line 302

Code

function overlay_page_alter(&$page) {
    // If we are limiting rendering to a subset of page regions, deny access to
    // all other regions so that they will not be processed.
    if ($regions_to_render = overlay_get_regions_to_render()) {
        $skipped_regions = array_diff(element_children($page), $regions_to_render);
        foreach ($skipped_regions as $skipped_region) {
            $page[$skipped_region]['#access'] = FALSE;
        }
    }
    $mode = overlay_get_mode();
    if ($mode == 'child') {
        // Add the overlay wrapper before the html wrapper.
        array_unshift($page['#theme_wrappers'], 'overlay');
    }
    elseif ($mode == 'parent' && ($message = overlay_disable_message())) {
        $page['page_top']['disable_overlay'] = $message;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.