You are here

function _disclaimer_js_settings in Disclaimer 7

Add needed js settings.

1 call to _disclaimer_js_settings()
_disclaimer_build_content in ./disclaimer.module
Generate disclaimer content.

File

./disclaimer.module, line 50
Create and show disclaimer for your site.

Code

function _disclaimer_js_settings() {
  $settings['disclaimer'] = array(
    'cookie_name' => variable_get('disclaimer_cookie_name', 'disclaimerShow'),
    'cookie_path' => variable_get('disclaimer_cookie_path', '/'),
    'cookie_domain' => variable_get('disclaimer_cookie_domain', $_SERVER['SERVER_NAME']),
    // Colorbox settings.
    'width' => variable_get('disclaimer_width', '80%'),
    'height' => variable_get('disclaimer_height', '80%'),
    'initialwidth' => variable_get('disclaimer_initialwidth', '300'),
    'initialheight' => variable_get('disclaimer_initialheight', '250'),
    'ageform' => variable_get('disclaimer_age_form', 0),
    'limit' => variable_get('disclaimer_age_limit', 18),
    'exiturl' => variable_get('disclaimer_exit_url', 'http://www.google.com'),
  );
  drupal_add_js($settings, 'setting');
}