You are here

function esi_context_module_implements_alter in ESI: Edge Side Includes 7.3

Implements hook_module_implements_alter(). The hook_page_alter implementation in esi_context must run before the hook in esi_block.

File

modules/esi_context/esi_context.module, line 12
ESI integration for the context module.

Code

function esi_context_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'page_alter') {
    $index_context = array_search('esi_context', array_keys($implementations));
    unset($implementations[$index_context]);
    $index_block = array_search('esi_block', array_keys($implementations));
    $implementations = array_slice($implementations, 0, $index_block) + array(
      'esi_context' => FALSE,
    ) + array_slice($implementations, $index_block);
  }
}