function simple_cookie_compliance_has_cookie in Simple Cookie Compliance 6
Menu callback for AHAH additions.
1 string reference to 'simple_cookie_compliance_has_cookie'
- simple_cookie_compliance_menu in ./
simple_cookie_compliance.module - Implements hook_menu().
File
- ./
simple_cookie_compliance.module, line 152 - All the necessary functions for configuring and output.
Code
function simple_cookie_compliance_has_cookie() {
$GLOBALS['conf']['cache'] = 0;
$data = FALSE;
// Check the cookie.
if (isset($_COOKIE['simple_cookie_compliance_dismissed'])) {
$data = $_COOKIE['simple_cookie_compliance_dismissed'] ? TRUE : FALSE;
}
// $data = 'test';
drupal_json(array(
'status' => TRUE,
'cookie' => $data,
));
exit;
}