Setup Expiry Days For Cookie Law Notification Up To 30 Days

Dear Friends,



To change the expiry days for Cookie Law notification up to 30 days or a custom number of days please follow:



#add file
app/addons/my_changes/controllers/frontend/init.pre.php




#with content

```php

/*
* © 2015 Hungryweb
*
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT
* IN THE "HW-LICENSE.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.
*
* @website: www.hungryweb.net
* @support: support@hungryweb.net
*
*/
use Tygh\Registry;
if ( !defined('BOOTSTRAP') ) { die('Access denied'); }

if (Registry::get('settings.Security.uk_cookies_law') == 'Y') {
if (!empty($_REQUEST['cookies_accepted']) && $_REQUEST['cookies_accepted'] == 'Y') {
$cookie_session_days = 30;
setcookie("uk_cookies_law", 1, time() + (3600 * 24 * $cookie_session_days), "/");
}
if (!empty($_COOKIE["uk_cookies_law"]) ) {
$_SESSION['cookies_accepted'] = true;
//fn_delete_notification('uk_cookies_law');
}
}
```


#to change days, please 30 to any number of days you need
```php
$cookie_session_days = 30;
```

PS: Add-on "My Changes" is required to be active in order for this to work


[color=#282828][font=arial, verdana, tahoma, sans-serif]Keep on smiling,[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]---[/font][/color]
[color=#282828][font=arial, verdana, tahoma, sans-serif]Valentin[/font][/color]
[color=#808080][font=arial, verdana, tahoma, sans-serif][size=2]part of hungryweb.net[/size][/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif] [/font][/color]

folder-structure-and-file.zip