You are here

function themekey_redirect_preprocess_themekey_redirect_domain_selector_links in ThemeKey 7.3

File

themekey_redirect/themekey_redirect.module, line 371
Define rules to redirect the user to a different domain. The common use-case is to setup sub-domains for mobile sites. In this case you can configure ThemeKey Redirect to detect mobile clients and redirect the user accordingly. In ThemeKey itself you…

Code

function themekey_redirect_preprocess_themekey_redirect_domain_selector_links(&$vars) {
  $vars['links_rendered'] = array();
  foreach ($vars['links'] as $url => $link) {
    if (themekey_redirect_check_different_url($url)) {
      $vars['links_rendered'][] = l(t($link), $url . str_replace('themekey_redirect=active', '', request_uri()), array(
        'query' => array(
          'themekey_redirect' => 'avoid',
        ),
      ));
    }
  }
}