Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PrivacyWire.module
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class PrivacyWire extends WireData implements Module, ConfigurableModule
$privacyWireSettings->bots = ($this->checkForBots) ? "1" : "0";
$privacyWireSettings->customFunction = ($this->wire('sanitizer')->text($this->trigger_custom_js_function)) ?? "";
$privacyWireSettings->messageTimeout = ($this->messageTimeout && intval($this->messageTimeout) > 1) ? intval($this->messageTimeout) : 1500;
$privacyWireSettings->consentStorageDurationMonths = intval($this->consent_storage_duration_months ?? 0);
$privacyWireSettings->consentByClass = ($this->detect_consents_by_class) ? "1" : "0";
$privacyWireSettings->cookieGroups = [
'necessary' => $this->get("cookies_necessary_label{$this->lang}|cookies_necessary_label"),
Expand Down
15 changes: 15 additions & 0 deletions PrivacyWireConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ public function __construct()
'description' => $this->_("How many milliseconds should the consent saving confirmation be visible after the user makes a choice."),
'columnWidth' => 25,
],
[ // consent storage duration
'name' => 'consent_storage_duration_months',
'type' => 'select',
'label' => $this->_('Consent Storage Duration'),
'description' => $this->_("Choose how long a consent decision may remain stored in the browser before the banner is shown again."),
'options' => [
"0" => $this->_("Unlimited"),
"1" => $this->_("1 month"),
"3" => $this->_("3 months"),
"6" => $this->_("6 months"),
"12" => $this->_("12 months"),
],
'columnWidth' => 25,
],
],
],
[ // groups labels
Expand Down Expand Up @@ -400,6 +414,7 @@ public function getDefaults()
'textformatter_choose_label' => $this->_("Show or edit my Cookie Consent"),
'trigger_custom_js_function' => "",
'messageTimeout' => 1500,
'consent_storage_duration_months' => "0",
'add_basic_css_styling' => true,
'ask_consent_message' => $this->_("To load this element, it is required to consent to the following cookie category: {category}."),
'ask_content_button_label' => $this->_("Load {category} cookies"),
Expand Down
Loading
Loading