function simple_cookie_compliance_js in Simple Cookie Compliance 6
Menu callback for AHAH additions.
1 string reference to 'simple_cookie_compliance_js'
- simple_cookie_compliance_menu in ./
simple_cookie_compliance.module - Implements hook_menu().
File
- ./
simple_cookie_compliance.module, line 137 - All the necessary functions for configuring and output.
Code
function simple_cookie_compliance_js() {
// Set the cookie with the expiration time defined in module settings.
$default_expiration_time = _simple_cookie_compliance_default_expiration_time();
$expiration_time = $_SERVER['REQUEST_TIME'] + variable_get('simple_cookie_compliance_expiration_time', $default_expiration_time);
setcookie('simple_cookie_compliance_dismissed', 1, $expiration_time, '/');
drupal_json(array(
'status' => TRUE,
'data' => '',
));
exit;
}