You are here

function esi_admin_menu_output_alter in ESI: Edge Side Includes 6.2

Same name and namespace in other branches
  1. 7.3 esi.module \esi_admin_menu_output_alter()

Implementation of hook_admin_menu_output_alter().

Add in a cache flush for esi.

File

./esi.module, line 207
Adds support for ESI (Edge-Side-Include) integration, allowing blocks to be\ delivered by ESI, with support for per-block cache times.

Code

function esi_admin_menu_output_alter(&$content) {
  if (!empty($content['icon']['icon']['flush-cache']['#access']) && !empty($content['icon']['icon']['flush-cache']['requisites']) && empty($content['icon']['icon']['flush-cache']['esi'])) {
    $content['icon']['icon']['flush-cache']['esi'] = $content['icon']['icon']['flush-cache']['requisites'];
    $content['icon']['icon']['flush-cache']['esi']['#title'] = t('ESI: cache_page');
    $content['icon']['icon']['flush-cache']['esi']['#href'] = 'admin_menu/flush-cache/esi';
  }
}