You are here

function cookiebot_preprocess_menu_link in Cookiebot - Cookie consent, Cookie monitoring and Cookie control 7

Implements hook_preprocess_HOOK() for menu_link().

File

./cookiebot.module, line 226
The Cookiebot main module file.

Code

function cookiebot_preprocess_menu_link(&$variables) {
  if (empty($variables['element']['#href']) || $variables['element']['#href'] !== '<cookiebot-renew>') {
    return;
  }
  $variables['element']['#href'] = '/';
  $variables['element']['#localized_options']['attributes']['class'][] = 'cookiebot-renew';
}