function mailchimp_ecommerce_page_attachments in Mailchimp E-Commerce 8
Implements hook_page_attachments().
File
- ./
mailchimp_ecommerce.module, line 11 - Mailchimp eCommerce core functionality.
Code
function mailchimp_ecommerce_page_attachments(array &$attachments) {
$campaign_id = filter_input(INPUT_GET, 'mc_cid', FILTER_SANITIZE_STRING);
if (!empty($campaign_id)) {
$_SESSION['mc_cid'] = $campaign_id;
$_SESSION['mc_landing_site'] = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
}
}