function esi_block__restore_context in ESI: Edge Side Includes 7.3
Restore the original context that was used when a block was displayed.
1 call to esi_block__restore_context()
- esi_block__esi_block_prepare in modules/
esi_block/ esi_block.esi.inc - Prepare an ESI block for rendering. Defined in hook_esi_component_info().
File
- modules/
esi_block/ esi_block.esi.inc, line 52 - ESI handlers for ESI Block.
Code
function esi_block__restore_context($block) {
// Restore the theme.
global $theme;
$theme = $block->theme;
// Restore the page context.
if (!empty($block->esi_page_context)) {
$_SERVER['REQUEST_URI'] = $block->esi_page_context;
$_GET['q'] = $block->esi_page_context;
drupal_static_reset('drupal_get_destination');
}
}