You are here

function theme_authcache_p13n_setting__authcache_esi in Authenticated User Page Caching (Authcache) 7.2

Theme for personalized Drupal.setting retrieved using an ESI include.

File

modules/authcache_esi/authcache_esi.module, line 65
Authcache ESI markup generator.

Code

function theme_authcache_p13n_setting__authcache_esi($variables) {
  $url = $variables['url'];
  if ($url) {
    drupal_add_http_header('X-Authcache-Do-ESI', 1);
    drupal_add_js(drupal_get_path('module', 'authcache_p13n') . '/authcache_p13n.js');
    drupal_add_js(drupal_get_path('module', 'authcache_esi') . '/authcache_esi.js');
    $attrs = array(
      'src' => url($url['path'], $url['options']),
    );
    return '<iframe class="authcache-esi-settings" src="about:blank"><esi:include ' . drupal_attributes($attrs) . '/></iframe>';
  }
}