function template_preprocess_authcache_p13n_setting in Authenticated User Page Caching (Authcache) 7.2
Preprocess a placeholder for a personalized setting.
Related topics
File
- modules/
authcache_p13n/ authcache_p13n.module, line 217 - Provides methods for serving personalized content fragments.
Code
function template_preprocess_authcache_p13n_setting(&$variables) {
$setting = $variables['setting'];
$param = $variables['param'];
$clients = $variables['clients'];
$client = authcache_p13n_client_get_preferred('setting', $setting, $clients);
if ($client && strlen($setting)) {
_authcache_p13n_array_unique_recursive($param);
$url = authcache_p13n_request_get_callback('setting/' . $setting, $param);
}
if (!empty($url)) {
$variables['theme_hook_suggestions'][] = 'authcache_p13n_setting__' . $client;
$variables['theme_hook_suggestions'][] = 'authcache_p13n_setting__' . $client . '__' . preg_replace('/_{2,}/', '_', preg_replace('/[^0-9a-z]/i', '_', $setting));
$variables['client'] = $client;
$variables['url'] = $url;
}
}