function authcache_preprocess_toolbar in Authenticated User Page Caching (Authcache) 7.2
Implements hook_preprocess_toolbar().
Related topics
File
- ./
authcache.module, line 429 - Authenticated User Page Caching (and anonymous users, too!)
Code
function authcache_preprocess_toolbar(&$variables) {
if (isset($variables['toolbar']['toolbar_user']['#links']['account'])) {
$message = t('User name in toolbar. Enable Authcache User module or implement custom code capable of retrieving the user name.');
authcache_element_suspect($variables['toolbar']['toolbar_user'], $message);
}
foreach (element_children($variables['toolbar']['toolbar_drawer']) as $key) {
if (isset($variables['toolbar']['toolbar_drawer'][$key]['shortcuts']) && function_exists('shortcut_set_switch_access') && shortcut_set_switch_access()) {
$message = t('Switchable shortcut set in toolbar. Enable Authcache Menu or implement custom code capable of detecting when caching shortcuts is acceptable.');
authcache_element_suspect($variables['toolbar']['toolbar_drawer'][$key]['shortcuts'], $message);
}
}
}