You are here

function authcache_menu_preprocess_menu_link in Authenticated User Page Caching (Authcache) 7.2

Implements hook_preprocess_menu_item().

File

modules/authcache_menu/authcache_menu.module, line 269
Authcache support for menu, tabs and local actions.

Code

function authcache_menu_preprocess_menu_link(&$variables) {
  if (authcache_page_is_cacheable() && !empty($variables['element']['#localized_options']['authcache'])) {
    $variables['element']['#localized_options']['html'] = TRUE;
    $variables['element']['#title'] = theme('authcache_p13n_fragment', array(
      'fragment' => 'menu-item-title',
      'param' => $variables['element']['#href'],
    ));
  }
  unset($variables['element']['#localized_options']['authcache']);
}