You are here

function themekey_redirect_add_js in ThemeKey 7.3

1 call to themekey_redirect_add_js()
themekey_redirect_init in themekey_redirect/themekey_redirect.module
Implements hook_init().

File

themekey_redirect/themekey_redirect.module, line 164
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_add_js() {
  drupal_add_library('system', 'jquery.cookie');
  drupal_add_js(array(
    'ThemeKeyRedirect' => array(
      'checkOnce' => variable_get('themekey_redirect_check_once', FALSE),
      'redirectOnce' => variable_get('themekey_redirect_redirect_once', FALSE),
    ),
  ), 'setting');
  drupal_add_js(drupal_get_path('module', 'themekey_redirect') . '/themekey_redirect.js');
}