Version Description
- New feature: accept policy & close cookie bar on scroll (an option available under Italian law)
- New feature: if cookie bar is set to header it is fixed to the top of the screen (using CSS "position:fixed")
Download this release
Release Info
Developer | richardashby |
Plugin | Cookie Law / GDPR Info |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.4
- admin/cli-admin-page.php +29 -7
- admin/cli-admin.php +4 -0
- cookie-law-info.php +1 -1
- css/cli-admin-style.css +4 -1
- js/cookielawinfo.js +24 -1
- php/functions.php +2 -0
- readme.txt +7 -2
admin/cli-admin-page.php
CHANGED
@@ -212,8 +212,8 @@ function cookielawinfo_print_admin_page() {
|
|
212 |
</td>
|
213 |
</tr>
|
214 |
|
215 |
-
<!--
|
216 |
-
<tr valign="top">
|
217 |
<th scope="row"><label for="show_once_yn_field">Auto-hide cookie bar after delay?</label></th>
|
218 |
<td>
|
219 |
<input type="radio" id="show_once_yn_yes" name="show_once_yn_field" class="styled" value="true" <?php echo ( $the_options['show_once_yn'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
@@ -227,6 +227,29 @@ function cookielawinfo_print_admin_page() {
|
|
227 |
<span class="cli-plugin-example">Specify milliseconds (not seconds) e.g. <em>8000 = 8 seconds</em></span>
|
228 |
</td>
|
229 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
</table>
|
232 |
|
@@ -570,19 +593,18 @@ function cookielawinfo_print_admin_page() {
|
|
570 |
<p>It's time for a completely new version! Cookie Law Info will always be free but there will also be a PRO version for those who want a bit more. You can <a href="http://cookielawinfo.com/cookie-law-info-2-0/">read about it here</a>. For both versions, you can sign up to the BETA version and be the first to try it out. It's completely free of charge and you could even win a free PRO version!</p>
|
571 |
<br />
|
572 |
|
|
|
|
|
|
|
|
|
573 |
<h3>Help</h3>
|
574 |
<ul>
|
575 |
-
<li><a href="http://cookielawinfo.com/wordpress-plugin/">Plugin Homepage</a></li>
|
576 |
<li><a href="http://cookielawinfo.com/support/">Help and Support</a></li>
|
577 |
<li><a href="http://wordpress.org/support/plugin/cookie-law-info/">Report a Bug</a></li>
|
578 |
<li><a href="http://cookielawinfo.com/contact/">Suggest a Feature</a></li>
|
579 |
<li><a href="http://cookielawinfo.com">About the law</a></li>
|
580 |
</ul>
|
581 |
<br />
|
582 |
-
|
583 |
-
<h3>Like this plugin?</h3>
|
584 |
-
<p>If you find this plugin useful please show your support and rate it <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">★★★★★</a> on <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">WordPress.org</a> - much appreciated! :)</p>
|
585 |
-
<br />
|
586 |
|
587 |
<div>
|
588 |
<form action="http://cookielawinfo.us5.list-manage.com/subscribe/post?u=b32779d828ef2e37e68e1580d&id=71af66b86e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
|
212 |
</td>
|
213 |
</tr>
|
214 |
|
215 |
+
<!-- SHOW ONCE / TIMER -->
|
216 |
+
<tr valign="top" class="hr-top">
|
217 |
<th scope="row"><label for="show_once_yn_field">Auto-hide cookie bar after delay?</label></th>
|
218 |
<td>
|
219 |
<input type="radio" id="show_once_yn_yes" name="show_once_yn_field" class="styled" value="true" <?php echo ( $the_options['show_once_yn'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
227 |
<span class="cli-plugin-example">Specify milliseconds (not seconds) e.g. <em>8000 = 8 seconds</em></span>
|
228 |
</td>
|
229 |
</tr>
|
230 |
+
|
231 |
+
<!-- NEW: CLOSE ON SCROLL -->
|
232 |
+
<tr valign="top" class="hr-top">
|
233 |
+
<th scope="row"><label for="scroll_close_field">Auto-hide cookie bar if the user scrolls?</label></th>
|
234 |
+
<td>
|
235 |
+
<input type="radio" id="scroll_close_yes" name="scroll_close_field" class="styled" value="true" <?php echo ( $the_options['scroll_close'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
236 |
+
<input type="radio" id="scroll_close_no" name="scroll_close_field" class="styled" value="false" <?php echo ( $the_options['scroll_close'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
237 |
+
</td>
|
238 |
+
</tr>
|
239 |
+
<tr valign="top" class="hr-bottom">
|
240 |
+
<th scope="row"><label for="scroll_close_reload_field">Reload after "scroll accept" event?</label></th>
|
241 |
+
<td>
|
242 |
+
<!-- <input type="text" name="scroll_close_reload_field" value="<?php echo $the_options['scroll_close_reload'] ?>" />
|
243 |
+
<span class="cli-plugin-example">If the user accepts, do you want to reload the page? This feature is mostly for Italian users who have to deal with a very specific interpretation of the cookie law.</span>
|
244 |
+
-->
|
245 |
+
|
246 |
+
|
247 |
+
<input type="radio" id="scroll_close_reload_yes" name="scroll_close_reload_field" class="styled" value="true" <?php echo ( $the_options['scroll_close_reload'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
248 |
+
<input type="radio" id="scroll_close_reload_no" name="scroll_close_reload_field" class="styled" value="false" <?php echo ( $the_options['scroll_close_reload'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
249 |
+
|
250 |
+
|
251 |
+
</td>
|
252 |
+
</tr>
|
253 |
|
254 |
</table>
|
255 |
|
593 |
<p>It's time for a completely new version! Cookie Law Info will always be free but there will also be a PRO version for those who want a bit more. You can <a href="http://cookielawinfo.com/cookie-law-info-2-0/">read about it here</a>. For both versions, you can sign up to the BETA version and be the first to try it out. It's completely free of charge and you could even win a free PRO version!</p>
|
594 |
<br />
|
595 |
|
596 |
+
<h3>Like this plugin?</h3>
|
597 |
+
<p>If you find this plugin useful please show your support and rate it <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">★★★★★</a> on <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">WordPress.org</a> - much appreciated! :)</p>
|
598 |
+
<br />
|
599 |
+
|
600 |
<h3>Help</h3>
|
601 |
<ul>
|
|
|
602 |
<li><a href="http://cookielawinfo.com/support/">Help and Support</a></li>
|
603 |
<li><a href="http://wordpress.org/support/plugin/cookie-law-info/">Report a Bug</a></li>
|
604 |
<li><a href="http://cookielawinfo.com/contact/">Suggest a Feature</a></li>
|
605 |
<li><a href="http://cookielawinfo.com">About the law</a></li>
|
606 |
</ul>
|
607 |
<br />
|
|
|
|
|
|
|
|
|
608 |
|
609 |
<div>
|
610 |
<form action="http://cookielawinfo.us5.list-manage.com/subscribe/post?u=b32779d828ef2e37e68e1580d&id=71af66b86e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
|
admin/cli-admin.php
CHANGED
@@ -57,6 +57,8 @@ function cookielawinfo_get_default_settings() {
|
|
57 |
'notify_position_horizontal' => 'right', // left | right
|
58 |
'notify_position_vertical' => 'bottom', // 'top' = header | 'bottom' = footer
|
59 |
'notify_message' => addslashes ( 'This website uses cookies to improve your experience. We\'ll assume you\'re ok with this, but you can opt-out if you wish.[cookie_button] [cookie_link]' ),
|
|
|
|
|
60 |
'showagain_background' => '#fff',
|
61 |
'showagain_border' => '#000',
|
62 |
'showagain_text' => addslashes ( 'Privacy & Cookies Policy' ),
|
@@ -271,6 +273,8 @@ function cookielawinfo_sanitise($key, $value) {
|
|
271 |
case 'button_1_as_button':
|
272 |
case 'button_2_new_win':
|
273 |
case 'button_2_as_button':
|
|
|
|
|
274 |
case 'show_once_yn':
|
275 |
if ( $value == 'true' || $value === true ) {
|
276 |
$ret = true;
|
57 |
'notify_position_horizontal' => 'right', // left | right
|
58 |
'notify_position_vertical' => 'bottom', // 'top' = header | 'bottom' = footer
|
59 |
'notify_message' => addslashes ( 'This website uses cookies to improve your experience. We\'ll assume you\'re ok with this, but you can opt-out if you wish.[cookie_button] [cookie_link]' ),
|
60 |
+
'scroll_close' => false,
|
61 |
+
'scroll_close_reload' => false,
|
62 |
'showagain_background' => '#fff',
|
63 |
'showagain_border' => '#000',
|
64 |
'showagain_text' => addslashes ( 'Privacy & Cookies Policy' ),
|
273 |
case 'button_1_as_button':
|
274 |
case 'button_2_new_win':
|
275 |
case 'button_2_as_button':
|
276 |
+
case 'scroll_close':
|
277 |
+
case 'scroll_close_reload':
|
278 |
case 'show_once_yn':
|
279 |
if ( $value == 'true' || $value === true ) {
|
280 |
$ret = true;
|
cookie-law-info.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/extend/plugins/cookie-law-info/description/
|
|
5 |
Description: A simple way of 'implied consent' to show your website complies with the EU Cookie Law, which came into force on 26 May 2012.
|
6 |
Author: Richard Ashby
|
7 |
Author URI: http://cookielawinfo.com/
|
8 |
-
Version: 1.
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
5 |
Description: A simple way of 'implied consent' to show your website complies with the EU Cookie Law, which came into force on 26 May 2012.
|
6 |
Author: Richard Ashby
|
7 |
Author URI: http://cookielawinfo.com/
|
8 |
+
Version: 1.4
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
css/cli-admin-style.css
CHANGED
@@ -99,4 +99,7 @@
|
|
99 |
.cli-plugin-container div.pad-5, .cli-plugin-left-col div.pad-5, .cli-plugin-right-col div.pad-5 { padding: 5px; }
|
100 |
.cli-plugin-container div.pad-10, .cli-plugin-left-col div.pad-10, .cli-plugin-right-col div.pad-10 { padding: 10px; }
|
101 |
.width-60 { width: 60%; }
|
102 |
-
.width-100 { width: 100%; }
|
|
|
|
|
|
99 |
.cli-plugin-container div.pad-5, .cli-plugin-left-col div.pad-5, .cli-plugin-right-col div.pad-5 { padding: 5px; }
|
100 |
.cli-plugin-container div.pad-10, .cli-plugin-left-col div.pad-10, .cli-plugin-right-col div.pad-10 { padding: 10px; }
|
101 |
.width-60 { width: 60%; }
|
102 |
+
.width-100 { width: 100%; }
|
103 |
+
|
104 |
+
.hr-top { border-top: 1px solid #ccc; }
|
105 |
+
.hr-bottom { border-bottom: 1px solid #ccc; }
|
js/cookielawinfo.js
CHANGED
@@ -76,6 +76,7 @@ function cli_show_cookiebar(p) {
|
|
76 |
if ( settings.notify_position_vertical == "top" ) {
|
77 |
if ( settings.border_on ) {
|
78 |
hdr_args['border-bottom'] = '4px solid ' + l1hs(settings.border);
|
|
|
79 |
}
|
80 |
showagain_args.top = '0';
|
81 |
}
|
@@ -162,6 +163,10 @@ function cli_show_cookiebar(p) {
|
|
162 |
|
163 |
// action event listeners to capture "accept/continue" events:
|
164 |
jQuery("#cookie_action_close_header").click(function() {
|
|
|
|
|
|
|
|
|
165 |
// Set cookie then hide header:
|
166 |
Cookie.set(ACCEPT_COOKIE_NAME, 'yes', ACCEPT_COOKIE_EXPIRE);
|
167 |
|
@@ -173,7 +178,25 @@ function cli_show_cookiebar(p) {
|
|
173 |
}
|
174 |
cached_showagain_tab.slideDown(settings.animate_speed_show);
|
175 |
return false;
|
176 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
function displayHeader() {
|
179 |
if (settings.notify_animate_show) {
|
76 |
if ( settings.notify_position_vertical == "top" ) {
|
77 |
if ( settings.border_on ) {
|
78 |
hdr_args['border-bottom'] = '4px solid ' + l1hs(settings.border);
|
79 |
+
hdr_args['position'] = 'fixed';
|
80 |
}
|
81 |
showagain_args.top = '0';
|
82 |
}
|
163 |
|
164 |
// action event listeners to capture "accept/continue" events:
|
165 |
jQuery("#cookie_action_close_header").click(function() {
|
166 |
+
accept_close();
|
167 |
+
});
|
168 |
+
|
169 |
+
function accept_close() {
|
170 |
// Set cookie then hide header:
|
171 |
Cookie.set(ACCEPT_COOKIE_NAME, 'yes', ACCEPT_COOKIE_EXPIRE);
|
172 |
|
178 |
}
|
179 |
cached_showagain_tab.slideDown(settings.animate_speed_show);
|
180 |
return false;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Soprattutto per gli italiani :)
|
185 |
+
* If the visitor scrolls then under Italian law you have implied consent
|
186 |
+
* Please note that this is not the law in other EU states, this is the Italian interpretation of the law
|
187 |
+
*/
|
188 |
+
function closeOnScroll() {
|
189 |
+
if (window.pageYOffset > 100 && !Cookie.read(ACCEPT_COOKIE_NAME)) {
|
190 |
+
accept_close();
|
191 |
+
if (settings.scroll_close_reload) {
|
192 |
+
location.reload();
|
193 |
+
}
|
194 |
+
window.removeEventListener("scroll", closeOnScroll, false);
|
195 |
+
}
|
196 |
+
}
|
197 |
+
if (settings.scroll_close === true) {
|
198 |
+
window.addEventListener("scroll", closeOnScroll, false);
|
199 |
+
}
|
200 |
|
201 |
function displayHeader() {
|
202 |
if (settings.notify_animate_show) {
|
php/functions.php
CHANGED
@@ -50,6 +50,8 @@ function cookielawinfo_get_json_settings() {
|
|
50 |
'notify_div_id' => $settings['notify_div_id'],
|
51 |
'notify_position_horizontal' => $settings['notify_position_horizontal'],
|
52 |
'notify_position_vertical' => $settings['notify_position_vertical'],
|
|
|
|
|
53 |
'showagain_tab' => $settings['showagain_tab'],
|
54 |
'showagain_background' => $settings['showagain_background'],
|
55 |
'showagain_border' => $settings['showagain_border'],
|
50 |
'notify_div_id' => $settings['notify_div_id'],
|
51 |
'notify_position_horizontal' => $settings['notify_position_horizontal'],
|
52 |
'notify_position_vertical' => $settings['notify_position_vertical'],
|
53 |
+
'scroll_close' => $settings['scroll_close'],
|
54 |
+
'scroll_close_reload' => $settings['scroll_close_reload'],
|
55 |
'showagain_tab' => $settings['showagain_tab'],
|
56 |
'showagain_background' => $settings['showagain_background'],
|
57 |
'showagain_border' => $settings['showagain_border'],
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://cookielawinfo.com/donate
|
|
4 |
Tags: eu cookie law, cookie law, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 4.2.2
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -18,7 +18,7 @@ This plugin uses implied consent, adding a subtle banner to your website either
|
|
18 |
You can fully customise the style so it fits in with your existing website- change the colours, fonts, styles, the position on the page and even how it behaves when you click "accept".
|
19 |
|
20 |
|
21 |
-
You can choose to make the cookie bar disappear after a few seconds (completely configurable).
|
22 |
|
23 |
|
24 |
It also has a Cookie Audit module so you can easily show what cookies your site uses and display them neatly in a table on your Privacy & Cookies Policy page.
|
@@ -36,6 +36,7 @@ Features:
|
|
36 |
|
37 |
* Fully customisable to look just like your own website's style: customise the colours, styles and fonts
|
38 |
* Put the cookie bar in either the header or the footer
|
|
|
39 |
* (Optional) automatically close the cookie bar after a delay (delay is configurable)
|
40 |
* (Optional) cookie bar can be permanently dismissed or accessible through a "show again" tab
|
41 |
* (Optional) "show again" tab is fully customisable including position shown on page and styles
|
@@ -140,6 +141,10 @@ See http://cookielawinfo.com for more information on what is required.
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
|
|
|
|
|
|
|
|
143 |
= 1.3.2 =
|
144 |
* Bug fix: changed filename from wpml.xml to wpml-config.xml
|
145 |
|
4 |
Tags: eu cookie law, cookie law, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 4.2.2
|
7 |
+
Stable tag: 1.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
18 |
You can fully customise the style so it fits in with your existing website- change the colours, fonts, styles, the position on the page and even how it behaves when you click "accept".
|
19 |
|
20 |
|
21 |
+
You can choose to make the cookie bar disappear after a few seconds (completely configurable) or to accept on scroll (an option available under Italian law).
|
22 |
|
23 |
|
24 |
It also has a Cookie Audit module so you can easily show what cookies your site uses and display them neatly in a table on your Privacy & Cookies Policy page.
|
36 |
|
37 |
* Fully customisable to look just like your own website's style: customise the colours, styles and fonts
|
38 |
* Put the cookie bar in either the header or the footer
|
39 |
+
* (Optional) accept cookie policy if the user scrolls
|
40 |
* (Optional) automatically close the cookie bar after a delay (delay is configurable)
|
41 |
* (Optional) cookie bar can be permanently dismissed or accessible through a "show again" tab
|
42 |
* (Optional) "show again" tab is fully customisable including position shown on page and styles
|
141 |
|
142 |
== Changelog ==
|
143 |
|
144 |
+
= 1.4 =
|
145 |
+
* New feature: accept policy & close cookie bar on scroll (an option available under Italian law)
|
146 |
+
* New feature: if cookie bar is set to header it is fixed to the top of the screen (using CSS "position:fixed")
|
147 |
+
|
148 |
= 1.3.2 =
|
149 |
* Bug fix: changed filename from wpml.xml to wpml-config.xml
|
150 |
|