EU Cookie Law - Version 2.13

Version Description

24.04.2018 = * Fixed bug with WordPress default Youtube embeds. Thanks to @rfmcomposer + @bitmed * Added better php check to block cookies in our faq - improvement by @rfmcomposer

Download this release

Release Info

Developer Milmor
Plugin Icon 128x128 EU Cookie Law
Version 2.13
Comparing to
See all releases

Code changes from version 2.8.5 to 2.13

Files changed (6) hide show
  1. class-admin.php +65 -64
  2. class-frontend.php +75 -53
  3. eu-cookie-law.php +1 -1
  4. js/scripts.js +1 -1
  5. readme.txt +58 -25
  6. wpml-config.xml +1 -0
class-admin.php CHANGED
@@ -32,20 +32,21 @@ function peadig_eucookie_options() {
32
  <img src="<?php echo plugins_url('img/peadig.png',__FILE__); ?>" />
33
  </a>
34
  </div>
35
- <h2>EU Cookie Law &bull; <?php echo get_option( 'ecl_version_number' ); ?>
36
  <a href="//wordpress.org/plugins/eu-cookie-law/changelog/" target="_blank" class="add-new-h2">
37
- <?php _e('Changelog', 'eu-cookie-law'); ?>
38
  </a>
39
  <a href="//wordpress.org/support/view/plugin-reviews/eu-cookie-law" target="_blank" class="add-new-h2">
40
- <?php _e('Rate us', 'eu-cookie-law'); ?> ★★★★★
41
  </a>
42
  <a href="//translate.wordpress.org/projects/wp-plugins/eu-cookie-law" target="_blank" class="add-new-h2">
43
- <?php _e('Translate', 'eu-cookie-law'); ?>
44
  </a>
45
  <a href="//wordpress.org/support/plugin/eu-cookie-law" target="_blank" class="add-new-h2">
46
- <?php _e('Support', 'eu-cookie-law'); ?>
47
  </a>
48
- </h2>
 
49
  <form method="post" action="options.php">
50
  <?php settings_fields('peadig_eucookie_options'); ?>
51
  <?php
@@ -53,96 +54,96 @@ function peadig_eucookie_options() {
53
  $options = get_option('peadig_eucookie');
54
  ?>
55
  <table class="form-table">
56
- <tr valign="top"><th scope="row"><label for="enabled"><?php _e('Activate'); ?></label></th>
57
  <td><input id="enabled" name="peadig_eucookie[enabled]" type="checkbox" value="1" <?php checked('1', $options['enabled']); ?> /></td>
58
  </tr>
59
- <tr valign="top"><th scope="row"><label for="autoblock"><?php _e('Auto Block', 'eu-cookie-law'); ?></label></th>
60
  <td><input id="autoblock" name="peadig_eucookie[autoblock]" type="checkbox" value="1" <?php checked('1', $options['autoblock']); ?> /><br>
61
- <small><?php _e('This function will automatically block iframes, embeds and scripts in your post, pages and widgets.', 'eu-cookie-law'); ?></small></td>
62
  </tr>
63
- <tr valign="top"><th scope="row"><label for="tinymcebutton"><?php _e('Enable TinyMCE Button', 'eu-cookie-law'); ?></label></th>
64
  <td><input id="tinymcebutton" name="peadig_eucookie[tinymcebutton]" type="checkbox" value="1" <?php checked('1', $options['tinymcebutton']); ?> /><br>
65
- <small><?php _e('Click here if you want to turn on the TinyMCE button for manual insertion of EU Cookie Law shortcodes while editing contents.', 'eu-cookie-law'); ?></small></td>
66
  </tr>
67
  <tr valign="top"><th scope="row"><label for="lengthnum">
68
- <?php _e('Cookie acceptance length', 'eu-cookie-law'); ?></label></th>
69
- <td><input id="lengthnum" type="text" name="peadig_eucookie[lengthnum]" value="<?php echo $options['lengthnum']; ?>" size="5" />
70
  <select name="peadig_eucookie[length]">
71
  <option value="days"<?php if ($options['length'] == 'days') { echo ' selected="selected"'; } ?>>
72
- <?php _e('days', 'eu-cookie-law'); ?></option>
73
  <option value="weeks"<?php if ($options['length'] == 'weeks') { echo ' selected="selected"'; } ?>>
74
- <?php _e('weeks', 'eu-cookie-law'); ?></option>
75
  <option value="months"<?php if ($options['length'] == 'months') { echo ' selected="selected"'; } ?>>
76
- <?php _e('months', 'eu-cookie-law'); ?></option>
77
  </select><br>
78
- <small><?php _e('Once the user clicks accept the bar will disappear. You can set how long this will apply for before the bar reappears to the user.', 'eu-cookie-law'); ?> <?php _e('Set "0" for SESSION cookie.', 'eu-cookie-law'); ?></small>
79
  </td>
80
  </tr>
81
- <tr valign="top"><th scope="row"><label for="scrollconsent"><?php _e('Scroll Consent', 'eu-cookie-law'); ?></label></th>
82
  <td><input id="scrollconsent" name="peadig_eucookie[scrollconsent]" type="checkbox" value="1" <?php checked('1', $options['scrollconsent']); ?> /><br>
83
- <small><?php _e('Click here if you want to consider scrolling as cookie acceptation. Users should be informed about this...', 'eu-cookie-law'); ?></small></td>
84
  </tr>
85
- <tr valign="top"><th scope="row"><label for="navigationconsent"><?php _e('Navigation Consent', 'eu-cookie-law'); ?></label></th>
86
  <td><input id="navigationconsent" name="peadig_eucookie[navigationconsent]" type="checkbox" value="1" <?php checked('1', $options['navigationconsent']); ?> /><br>
87
- <small><?php _e('Click here if you want to consider continuing navigation as cookie acceptation. Users should be informed about this...', 'eu-cookie-law'); ?></small></td>
88
  </tr>
89
- <tr valign="top"><th scope="row"><label for="networkshare"><?php _e('Share Cookie across Network', 'eu-cookie-law'); ?><br>(BETA)</label></th>
90
  <td><input id="networkshare" name="peadig_eucookie[networkshare]" type="checkbox" value="1" <?php checked('1', $options['networkshare']); ?> /><br>
91
- <small><?php _e('Click here if you want to share euCookie across your network (subdomains or multisite)', 'eu-cookie-law'); ?></small></td>
92
  </tr>
93
  <tr valign="top"><th scope="row"><label for="networkshareurl">
94
- <?php _e('Network Domain', 'eu-cookie-law'); ?></label></th>
95
- <td><input id="networkshareurl" type="text" name="peadig_eucookie[networkshareurl]" value="<?php echo $options['networkshareurl']; ?>" size="40" /></td>
96
  </tr>
97
  </table>
98
  <hr>
99
- <h3 class="title"><?php _e('Appearance'); ?></h3>
100
  <table class="form-table">
101
- <tr valign="top"><th scope="row"><label for="position"><?php _e('Position', 'eu-cookie-law'); ?></label></th>
102
  <td>
103
  <select name="peadig_eucookie[position]">
104
  <option value="bottomright"<?php if ($options['position'] == 'bottomright') { echo ' selected="selected"'; } ?>>
105
- <?php _e('Bottom Right', 'eu-cookie-law'); ?></option>
106
  <option value="topright"<?php if ($options['position'] == 'topright') { echo ' selected="selected"'; } ?>>
107
- <?php _e('Top Right', 'eu-cookie-law'); ?></option>
108
  <option value="topcenter"<?php if ($options['position'] == 'topcenter') { echo ' selected="selected"'; } ?>>
109
- <?php _e('Top Center', 'eu-cookie-law'); ?></option>
110
  <option value="bottomleft"<?php if ($options['position'] == 'bottomleft') { echo ' selected="selected"'; } ?>>
111
- <?php _e('Bottom Left', 'eu-cookie-law'); ?></option>
112
  <option value="topleft"<?php if ($options['position'] == 'topleft') { echo ' selected="selected"'; } ?>>
113
- <?php _e('Top Left', 'eu-cookie-law'); ?></option>
114
  <option value="bottomcenter"<?php if ($options['position'] == 'bottomcenter') { echo ' selected="selected"'; } ?>>
115
- <?php _e('Bottom Center', 'eu-cookie-law'); ?></option>
116
  </select>
117
  </td>
118
  </tr>
119
  <tr valign="top"><th scope="row"><label for="backgroundcolor">
120
- <?php _e('Background Color', 'eu-cookie-law'); ?></label></th>
121
  <td><input id="backgroundcolor" type="text" name="peadig_eucookie[backgroundcolor]" value="<?php echo $options['backgroundcolor']; ?>" class="color-field" data-default-color="#000000"/></td>
122
  </tr>
123
  <tr valign="top"><th scope="row"><label for="fontcolor">
124
- <?php _e('Font Color', 'eu-cookie-law'); ?></label></th>
125
  <td><input id="fontcolor" type="text" name="peadig_eucookie[fontcolor]" value="<?php echo $options['fontcolor']; ?>" class="color-field" data-default-color="#ffffff"/></td>
126
  </tr>
127
  </table>
128
  <hr>
129
- <h3 class="title"><?php _e('Content'); ?></h3>
130
  <table class="form-table">
131
  <tr valign="top"><th scope="row"><label for="barmessage">
132
- <?php _e('Bar Message', 'eu-cookie-law'); ?></label></th>
133
- <td><input class="i18n-multilingual-display" id="barmessage" type="text" name="peadig_eucookie[barmessage]" value="<?php echo $options['barmessage']; ?>" size="100" /></td>
134
  </tr>
135
  <tr valign="top"><th scope="row"><label for="barlink">
136
- <?php _e('More Info Text', 'eu-cookie-law'); ?></label></th>
137
- <td><input id="barlink" type="text" name="peadig_eucookie[barlink]" value="<?php echo $options['barlink']; ?>" /></td>
138
  </tr>
139
  <tr valign="top"><th scope="row"><label for="barbutton">
140
- <?php _e('Accept Text', 'eu-cookie-law'); ?></label></th>
141
- <td><input id="barbutton" type="text" name="peadig_eucookie[barbutton]" value="<?php echo $options['barbutton']; ?>" /></td>
142
  </tr>
143
  <tr valign="top"><th scope="row"><label for="boxlinkid">
144
- <?php _e('Bar Link', 'eu-cookie-law'); ?><br/><small>
145
- <?php _e('Use this field if you want to link a page instead of showing the popup', 'eu-cookie-law'); ?></small></label></th>
146
  <td>
147
  <?php
148
  $args = array(
@@ -152,7 +153,7 @@ function peadig_eucookie_options() {
152
  'echo' => 0,
153
  'name' => 'peadig_eucookie[boxlinkid]',
154
  'id' => 'boxlinkid',
155
- 'show_option_none' => '* '.__('Custome Message'),
156
  'show_option_no_change' => null,
157
  'option_none_value' => null,
158
  ); ?>
@@ -169,26 +170,26 @@ function peadig_eucookie_options() {
169
 
170
  </tr>
171
  <tr valign="top"><th scope="row"><label for="customurl">
172
- <?php _e('Custom URL'); ?></label></th>
173
- <td><input id="customurl" type="text" name="peadig_eucookie[customurl]" value="<?php echo $options['customurl']; ?>" />
174
- <small> <?php _e('Enter the destination URL'); ?></small></td>
175
  </tr>
176
  <tr valign="top"><th scope="row"><label for="closelink">
177
- <?php _e('"Close Popup" Text', 'eu-cookie-law'); ?></label></th>
178
- <td><input id="closelink" type="text" name="peadig_eucookie[closelink]" value="<?php echo $options['closelink']; ?>" /></td>
179
  </tr>
180
  <tr valign="top"><th scope="row"><label for="boxcontent">
181
- <?php _e('Popup Box Content', 'eu-cookie-law'); ?><br>
182
- <small><?php _e('Use this to add a popup that informs your users about your cookie policy', 'eu-cookie-law'); ?></small></label></th>
183
  <td>
184
- <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[boxcontent]' id='boxcontent' rows='9' ><?php echo $options['boxcontent']; ?></textarea>
185
  </td>
186
  </tr>
187
  <tr valign="top"><th scope="row"><label for="bhtmlcontent">
188
- <?php _e('Blocked code message', 'eu-cookie-law'); ?><br>
189
- <small><?php _e('This is the message that will be displayed for locked-code areas', 'eu-cookie-law'); ?></small></label></th>
190
  <td>
191
- <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[bhtmlcontent]' id='bhtmlcontent' rows='9' ><?php echo $options['bhtmlcontent']; ?></textarea>
192
  </td>
193
  </tr>
194
  <tr>
@@ -198,25 +199,25 @@ function peadig_eucookie_options() {
198
  <table class="form-table">
199
  </tr>
200
  <tr valign="top"><th scope="row"><label for="cc-cookieenabled">
201
- <?php _e('Cookie enabled message', 'eu-cookie-law'); ?><br>
202
- <small><?php _e('This is the message that will be displayed when cookie are enabled', 'eu-cookie-law'); ?></small></label></th>
203
  <td>
204
- <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[cc-cookieenabled]' id='cc-cookieenabled' rows='9' ><?php echo $options['cc-cookieenabled']; ?></textarea><br>
205
 
206
- <label style="font-size:0.9em;font-weight:bold;" for="cc-disablecookie"><?php _e('"Disable Cookie" Text', 'eu-cookie-law'); ?></label>
207
  <input id="cc-disablecookie" type="text" name="peadig_eucookie[cc-disablecookie]" value="<?php echo $options['cc-disablecookie']; ?>" />
208
  </td>
209
  </tr>
210
  <tr valign="top"><th scope="row"><label for="cc-cookiedisabled">
211
- <?php _e('Cookie disabled message', 'eu-cookie-law'); ?><br>
212
- <small><?php _e('This is the message that will be displayed when cookie are not accepted', 'eu-cookie-law'); ?></small></label></th>
213
  <td>
214
- <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[cc-cookiedisabled]' id='cc-cookiedisabled' rows='9' ><?php echo $options['cc-cookiedisabled']; ?></textarea>
215
  </td>
216
  </tr>
217
  </table>
218
  <p class="submit">
219
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
220
  </p>
221
  </form>
222
  </div>
32
  <img src="<?php echo plugins_url('img/peadig.png',__FILE__); ?>" />
33
  </a>
34
  </div>
35
+ <h1>EU Cookie Law
36
  <a href="//wordpress.org/plugins/eu-cookie-law/changelog/" target="_blank" class="add-new-h2">
37
+ <?php esc_html_e('Changelog', 'eu-cookie-law'); ?>
38
  </a>
39
  <a href="//wordpress.org/support/view/plugin-reviews/eu-cookie-law" target="_blank" class="add-new-h2">
40
+ <?php esc_html_e('Rate us', 'eu-cookie-law'); ?> ★★★★★
41
  </a>
42
  <a href="//translate.wordpress.org/projects/wp-plugins/eu-cookie-law" target="_blank" class="add-new-h2">
43
+ <?php esc_html_e('Translate', 'eu-cookie-law'); ?>
44
  </a>
45
  <a href="//wordpress.org/support/plugin/eu-cookie-law" target="_blank" class="add-new-h2">
46
+ <?php esc_html_e('Support', 'eu-cookie-law'); ?>
47
  </a>
48
+ </h1>
49
+
50
  <form method="post" action="options.php">
51
  <?php settings_fields('peadig_eucookie_options'); ?>
52
  <?php
54
  $options = get_option('peadig_eucookie');
55
  ?>
56
  <table class="form-table">
57
+ <tr valign="top"><th scope="row"><label for="enabled"><?php esc_html_e('Activate'); ?></label></th>
58
  <td><input id="enabled" name="peadig_eucookie[enabled]" type="checkbox" value="1" <?php checked('1', $options['enabled']); ?> /></td>
59
  </tr>
60
+ <tr valign="top"><th scope="row"><label for="autoblock"><?php esc_html_e('Auto Block', 'eu-cookie-law'); ?></label></th>
61
  <td><input id="autoblock" name="peadig_eucookie[autoblock]" type="checkbox" value="1" <?php checked('1', $options['autoblock']); ?> /><br>
62
+ <small><?php esc_html_e('This function will automatically block iframes, embeds and scripts in your post, pages and widgets.', 'eu-cookie-law'); ?></small></td>
63
  </tr>
64
+ <tr valign="top"><th scope="row"><label for="tinymcebutton"><?php esc_html_e('Enable TinyMCE Button', 'eu-cookie-law'); ?></label></th>
65
  <td><input id="tinymcebutton" name="peadig_eucookie[tinymcebutton]" type="checkbox" value="1" <?php checked('1', $options['tinymcebutton']); ?> /><br>
66
+ <small><?php esc_html_e('Click here if you want to turn on the TinyMCE button for manual insertion of EU Cookie Law shortcodes while editing contents.', 'eu-cookie-law'); ?></small></td>
67
  </tr>
68
  <tr valign="top"><th scope="row"><label for="lengthnum">
69
+ <?php esc_html_e('Cookie acceptance length', 'eu-cookie-law'); ?></label></th>
70
+ <td><input id="lengthnum" type="text" name="peadig_eucookie[lengthnum]" value="<?php echo absint( $options['lengthnum'] ); ?>" size="5" />
71
  <select name="peadig_eucookie[length]">
72
  <option value="days"<?php if ($options['length'] == 'days') { echo ' selected="selected"'; } ?>>
73
+ <?php esc_html_e('days', 'eu-cookie-law'); ?></option>
74
  <option value="weeks"<?php if ($options['length'] == 'weeks') { echo ' selected="selected"'; } ?>>
75
+ <?php esc_html_e('weeks', 'eu-cookie-law'); ?></option>
76
  <option value="months"<?php if ($options['length'] == 'months') { echo ' selected="selected"'; } ?>>
77
+ <?php esc_html_e('months', 'eu-cookie-law'); ?></option>
78
  </select><br>
79
+ <small><?php esc_html_e('Once the user clicks accept the bar will disappear. You can set how long this will apply for before the bar reappears to the user.', 'eu-cookie-law'); ?> <?php esc_html_e('Set "0" for SESSION cookie.', 'eu-cookie-law'); ?></small>
80
  </td>
81
  </tr>
82
+ <tr valign="top"><th scope="row"><label for="scrollconsent"><?php esc_html_e('Scroll Consent', 'eu-cookie-law'); ?></label></th>
83
  <td><input id="scrollconsent" name="peadig_eucookie[scrollconsent]" type="checkbox" value="1" <?php checked('1', $options['scrollconsent']); ?> /><br>
84
+ <small><?php esc_html_e('Click here if you want to consider scrolling as cookie acceptation. Users should be informed about this...', 'eu-cookie-law'); ?></small></td>
85
  </tr>
86
+ <tr valign="top"><th scope="row"><label for="navigationconsent"><?php esc_html_e('Navigation Consent', 'eu-cookie-law'); ?></label></th>
87
  <td><input id="navigationconsent" name="peadig_eucookie[navigationconsent]" type="checkbox" value="1" <?php checked('1', $options['navigationconsent']); ?> /><br>
88
+ <small><?php esc_html_e('Click here if you want to consider continuing navigation as cookie acceptation. Users should be informed about this...', 'eu-cookie-law'); ?></small></td>
89
  </tr>
90
+ <tr valign="top"><th scope="row"><label for="networkshare"><?php esc_html_e('Share Cookie across Network', 'eu-cookie-law'); ?></label></th>
91
  <td><input id="networkshare" name="peadig_eucookie[networkshare]" type="checkbox" value="1" <?php checked('1', $options['networkshare']); ?> /><br>
92
+ <small><?php esc_html_e('Click here if you want to share euCookie across your network (subdomains or multisite)', 'eu-cookie-law'); ?></small></td>
93
  </tr>
94
  <tr valign="top"><th scope="row"><label for="networkshareurl">
95
+ <?php esc_html_e('Network Domain', 'eu-cookie-law'); ?></label></th>
96
+ <td><input id="networkshareurl" type="text" name="peadig_eucookie[networkshareurl]" value="<?php echo esc_attr( $options['networkshareurl'] ); ?>" size="40" /></td>
97
  </tr>
98
  </table>
99
  <hr>
100
+ <h3 class="title"><?php esc_html_e('Appearance'); ?></h3>
101
  <table class="form-table">
102
+ <tr valign="top"><th scope="row"><label for="position"><?php esc_html_e('Position', 'eu-cookie-law'); ?></label></th>
103
  <td>
104
  <select name="peadig_eucookie[position]">
105
  <option value="bottomright"<?php if ($options['position'] == 'bottomright') { echo ' selected="selected"'; } ?>>
106
+ <?php esc_html_e('Bottom Right', 'eu-cookie-law'); ?></option>
107
  <option value="topright"<?php if ($options['position'] == 'topright') { echo ' selected="selected"'; } ?>>
108
+ <?php esc_html_e('Top Right', 'eu-cookie-law'); ?></option>
109
  <option value="topcenter"<?php if ($options['position'] == 'topcenter') { echo ' selected="selected"'; } ?>>
110
+ <?php esc_html_e('Top Center', 'eu-cookie-law'); ?></option>
111
  <option value="bottomleft"<?php if ($options['position'] == 'bottomleft') { echo ' selected="selected"'; } ?>>
112
+ <?php esc_html_e('Bottom Left', 'eu-cookie-law'); ?></option>
113
  <option value="topleft"<?php if ($options['position'] == 'topleft') { echo ' selected="selected"'; } ?>>
114
+ <?php esc_html_e('Top Left', 'eu-cookie-law'); ?></option>
115
  <option value="bottomcenter"<?php if ($options['position'] == 'bottomcenter') { echo ' selected="selected"'; } ?>>
116
+ <?php esc_html_e('Bottom Center', 'eu-cookie-law'); ?></option>
117
  </select>
118
  </td>
119
  </tr>
120
  <tr valign="top"><th scope="row"><label for="backgroundcolor">
121
+ <?php esc_html_e('Background Color', 'eu-cookie-law'); ?></label></th>
122
  <td><input id="backgroundcolor" type="text" name="peadig_eucookie[backgroundcolor]" value="<?php echo $options['backgroundcolor']; ?>" class="color-field" data-default-color="#000000"/></td>
123
  </tr>
124
  <tr valign="top"><th scope="row"><label for="fontcolor">
125
+ <?php esc_html_e('Font Color', 'eu-cookie-law'); ?></label></th>
126
  <td><input id="fontcolor" type="text" name="peadig_eucookie[fontcolor]" value="<?php echo $options['fontcolor']; ?>" class="color-field" data-default-color="#ffffff"/></td>
127
  </tr>
128
  </table>
129
  <hr>
130
+ <h3 class="title"><?php esc_html_e('Content'); ?></h3>
131
  <table class="form-table">
132
  <tr valign="top"><th scope="row"><label for="barmessage">
133
+ <?php esc_html_e('Bar Message', 'eu-cookie-law'); ?></label></th>
134
+ <td><input class="i18n-multilingual-display" id="barmessage" type="text" name="peadig_eucookie[barmessage]" value="<?php echo esc_attr( $options['barmessage'] ); ?>" size="100" /></td>
135
  </tr>
136
  <tr valign="top"><th scope="row"><label for="barlink">
137
+ <?php esc_html_e('More Info Text', 'eu-cookie-law'); ?></label></th>
138
+ <td><input id="barlink" type="text" name="peadig_eucookie[barlink]" value="<?php echo esc_attr( $options['barlink'] ); ?>" /></td>
139
  </tr>
140
  <tr valign="top"><th scope="row"><label for="barbutton">
141
+ <?php esc_html_e('Accept Text', 'eu-cookie-law'); ?></label></th>
142
+ <td><input id="barbutton" type="text" name="peadig_eucookie[barbutton]" value="<?php echo esc_attr( $options['barbutton'] ); ?>" /></td>
143
  </tr>
144
  <tr valign="top"><th scope="row"><label for="boxlinkid">
145
+ <?php esc_html_e('Bar Link', 'eu-cookie-law'); ?><br/><small>
146
+ <?php esc_html_e('Use this field if you want to link a page instead of showing the popup', 'eu-cookie-law'); ?></small></label></th>
147
  <td>
148
  <?php
149
  $args = array(
153
  'echo' => 0,
154
  'name' => 'peadig_eucookie[boxlinkid]',
155
  'id' => 'boxlinkid',
156
+ 'show_option_none' => '* '.__('Custom Message'),
157
  'show_option_no_change' => null,
158
  'option_none_value' => null,
159
  ); ?>
170
 
171
  </tr>
172
  <tr valign="top"><th scope="row"><label for="customurl">
173
+ <?php esc_html_e('Custom URL'); ?></label></th>
174
+ <td><input id="customurl" type="text" name="peadig_eucookie[customurl]" value="<?php echo esc_attr( $options['customurl'] ); ?>" />
175
+ <small> <?php esc_html_e('Enter the destination URL'); ?></small></td>
176
  </tr>
177
  <tr valign="top"><th scope="row"><label for="closelink">
178
+ <?php esc_html_e('"Close Popup" Text', 'eu-cookie-law'); ?></label></th>
179
+ <td><input id="closelink" type="text" name="peadig_eucookie[closelink]" value="<?php echo esc_attr( $options['closelink'] ); ?>" /></td>
180
  </tr>
181
  <tr valign="top"><th scope="row"><label for="boxcontent">
182
+ <?php esc_html_e('Popup Box Content', 'eu-cookie-law'); ?><br>
183
+ <small><?php esc_html_e('Use this to add a popup that informs your users about your cookie policy', 'eu-cookie-law'); ?></small></label></th>
184
  <td>
185
+ <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[boxcontent]' id='boxcontent' rows='9' ><?php echo esc_textarea( $options['boxcontent'] ); ?></textarea>
186
  </td>
187
  </tr>
188
  <tr valign="top"><th scope="row"><label for="bhtmlcontent">
189
+ <?php esc_html_e('Blocked code message', 'eu-cookie-law'); ?><br>
190
+ <small><?php esc_html_e('This is the message that will be displayed for locked-code areas', 'eu-cookie-law'); ?></small></label></th>
191
  <td>
192
+ <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[bhtmlcontent]' id='bhtmlcontent' rows='9' ><?php echo esc_textarea( $options['bhtmlcontent'] ); ?></textarea>
193
  </td>
194
  </tr>
195
  <tr>
199
  <table class="form-table">
200
  </tr>
201
  <tr valign="top"><th scope="row"><label for="cc-cookieenabled">
202
+ <?php esc_html_e('Cookie enabled message', 'eu-cookie-law'); ?><br>
203
+ <small><?php esc_html_e('This is the message that will be displayed when cookie are enabled', 'eu-cookie-law'); ?></small></label></th>
204
  <td>
205
+ <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[cc-cookieenabled]' id='cc-cookieenabled' rows='9' ><?php echo esc_textarea( $options['cc-cookieenabled'] ); ?></textarea><br>
206
 
207
+ <label style="font-size:0.9em;font-weight:bold;" for="cc-disablecookie"><?php esc_html_e('"Disable Cookie" Text', 'eu-cookie-law'); ?></label>
208
  <input id="cc-disablecookie" type="text" name="peadig_eucookie[cc-disablecookie]" value="<?php echo $options['cc-disablecookie']; ?>" />
209
  </td>
210
  </tr>
211
  <tr valign="top"><th scope="row"><label for="cc-cookiedisabled">
212
+ <?php esc_html_e('Cookie disabled message', 'eu-cookie-law'); ?><br>
213
+ <small><?php esc_html_e('This is the message that will be displayed when cookie are not accepted', 'eu-cookie-law'); ?></small></label></th>
214
  <td>
215
+ <textarea style='font-size: 90%; width:95%;' name='peadig_eucookie[cc-cookiedisabled]' id='cc-cookiedisabled' rows='9' ><?php echo esc_textarea( $options['cc-cookiedisabled'] ); ?></textarea>
216
  </td>
217
  </tr>
218
  </table>
219
  <p class="submit">
220
+ <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
221
  </p>
222
  </form>
223
  </div>
class-frontend.php CHANGED
@@ -2,16 +2,17 @@
2
 
3
  $euCookieSet = 0;
4
 
5
- add_action( 'send_headers', 'eucookie_headers' );
6
- function eucookie_headers() {
7
  if ( isset($_GET['nocookie']) ) {
8
  setcookie('euCookie', '', 1, '/');
9
  global $euCookieSet;
10
  $euCookieSet = 0;
 
 
11
  }
12
- }
13
 
14
- function eucookie_scripts() {
15
 
16
  global $euCookieSet;
17
  global $deleteCookieUrlCheck;
@@ -20,7 +21,8 @@ function eucookie_scripts() {
20
  $euCookieSet = 1;
21
  }
22
 
23
- if ( isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider|mshot/i', $_SERVER['HTTP_USER_AGENT']) ) {
 
24
  $euCookieSet = 1;
25
  }
26
 
@@ -47,8 +49,39 @@ function eucookie_scripts() {
47
  );
48
  wp_localize_script('eucookielaw-scripts','eucookielaw_data',$eclData);
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
- add_action('wp_head', 'eucookie_scripts');
52
 
53
  function ecl_get_cookie_domain() {
54
 
@@ -89,11 +122,9 @@ function get_expire_timer() {
89
  return $multi * eucookie_option('lengthnum');
90
  }
91
 
92
- function peadig_eucookie_bar() {
93
 
94
- if ( cookie_accepted() ) {
95
- return;
96
- }
97
 
98
  $target = '';
99
  if ( eucookie_option('boxlinkid') == 'C') {
@@ -105,30 +136,18 @@ function peadig_eucookie_bar() {
105
  } else {
106
  $link = '#';
107
  }
108
- ?>
109
- <!-- Eu Cookie Law <?php echo get_option( 'ecl_version_number' ); ?> -->
110
- <div
111
- class="pea_cook_wrapper pea_cook_<?php echo eucookie_option('position'); ?>"
112
- style="
113
- color:<?php echo ecl_frontstyle('fontcolor'); ?>;
114
- background-color: rgba(<?php echo ecl_frontstyle('backgroundcolor'); ?>,0.85);
115
- ">
116
- <p><?php echo eucookie_option('barmessage'); ?> <a style="color:<?php echo eucookie_option('fontcolor'); ?>;" href="<?php echo $link; ?>" <?php echo $target; ?>id="fom"><?php echo eucookie_option('barlink'); ?></a> <button id="pea_cook_btn" class="pea_cook_btn" href="#"><?php echo eucookie_option('barbutton'); ?></button></p>
117
- </div>
118
- <div class="pea_cook_more_info_popover">
119
- <div
120
- class="pea_cook_more_info_popover_inner"
121
- style="
122
- color:<?php echo ecl_frontstyle('fontcolor'); ?>;
123
- background-color: rgba(<?php echo ecl_frontstyle('backgroundcolor'); ?>,0.9);
124
- ">
125
- <p><?php echo eucookie_option('boxcontent'); ?></p>
126
- <p><a style="color:<?php echo eucookie_option('fontcolor'); ?>;" href="#" id="pea_close"><?php echo eucookie_option('closelink'); ?></a></p>
127
- </div>
128
- </div>
129
- <?php
130
- }
131
- add_action('wp_footer', 'peadig_eucookie_bar', 1000);
132
 
133
  function generate_cookie_notice_text($height, $width, $text) {
134
  return '<div class="eucookie" style="color:'.ecl_frontstyle('fontcolor').'; background: rgba('.ecl_frontstyle('backgroundcolor').',0.85) url(\''.plugins_url('img/block.png', __FILE__).'\') no-repeat; background-position: -30px -20px; width:'.$width.';height:'.$height.';"><span>'.$text.'</span></div><div class="clear"></div>';
@@ -137,7 +156,8 @@ function generate_cookie_notice_text($height, $width, $text) {
137
  function generate_cookie_notice($height, $width) {
138
  return generate_cookie_notice_text($height, $width, eucookie_option('bhtmlcontent') );
139
  }
140
- function eu_cookie_shortcode( $atts, $content = null ) {
 
141
  extract(shortcode_atts(
142
  array(
143
  'height' => '',
@@ -153,39 +173,41 @@ function eu_cookie_shortcode( $atts, $content = null ) {
153
  if (!$height) { $height = pulisci($content,'height='); }
154
  return generate_cookie_notice($height, $width);
155
  }
156
- }
157
- add_shortcode( 'cookie', 'eu_cookie_shortcode' );
158
 
159
- function ecl_callback($buffer) { return ecl_erase_light($buffer); }
160
 
161
- add_filter( 'the_content', 'ecl_erase', 11);
162
- add_filter( 'widget_text','ecl_erase', 11 );
163
 
164
- function ecl_buffer_start() { ob_start("ecl_callback"); }
165
- function ecl_buffer_end() { ob_end_flush(); }
 
 
 
 
166
 
167
  add_action('wp_head', 'ecl_buffer_start');
168
  add_action('wp_footer', 'ecl_buffer_end');
169
 
170
  function ecl_erase($content) {
171
- if ( !cookie_accepted() &&
172
- eucookie_option('autoblock') &&
173
- !(get_post_field( 'eucookielaw_exclude', get_the_id() ) && current_filter() == 'the_content')
174
  ) {
 
175
  $content = preg_replace('#<iframe.*?\/iframe>|<object.*?\/object>|<embed.*?>#is', generate_cookie_notice('auto', '100%'), $content);
176
  $content = preg_replace('#<script.(?:(?!eucookielaw_exclude).)*?\/script>#is', '', $content);
177
- }
178
- return $content;
179
- }
180
-
181
- function ecl_erase_light($content) {
182
- if ( !cookie_accepted() && eucookie_option('autoblock') ) {
183
  $content = preg_replace('#<!cookie_start.*?\!cookie_end>#is', generate_cookie_notice('auto', '100%'), $content);
184
  $content = preg_replace('#<div id=\"disqus_thread\".*?\/div>#is', generate_cookie_notice('auto', '100%'), $content);
185
  }
186
  return $content;
187
  }
188
 
 
 
 
 
 
 
189
  add_filter( 'widget_text', 'do_shortcode');
190
 
191
  function pulisci($content,$ricerca){
@@ -245,8 +267,8 @@ function eu_cookie_list_shortcode( $atts ) {
245
  echo '<h3>Active Cookies</h3>
246
  <table style="width:100%; word-break:break-all;">
247
  <tr>
248
- <th>Nome</th>
249
- <th>Valore</th>
250
  </tr>';
251
  foreach ($_COOKIE as $key=>$val) {
252
 
2
 
3
  $euCookieSet = 0;
4
 
5
+ add_action( 'send_headers', function() {
 
6
  if ( isset($_GET['nocookie']) ) {
7
  setcookie('euCookie', '', 1, '/');
8
  global $euCookieSet;
9
  $euCookieSet = 0;
10
+ wp_redirect( esc_url( remove_query_arg( 'nocookie' ) ) );
11
+ exit();
12
  }
13
+ });
14
 
15
+ add_action('wp_head', function() {
16
 
17
  global $euCookieSet;
18
  global $deleteCookieUrlCheck;
21
  $euCookieSet = 1;
22
  }
23
 
24
+
25
+ if ( ecl_isSearchEngine() ) {
26
  $euCookieSet = 1;
27
  }
28
 
49
  );
50
  wp_localize_script('eucookielaw-scripts','eucookielaw_data',$eclData);
51
 
52
+ });
53
+
54
+ function ecl_isSearchEngine(){
55
+ $engines = array(
56
+ 'google',
57
+ 'googlebot',
58
+ 'yahoo',
59
+ 'facebook',
60
+ 'twitter',
61
+ 'slurp',
62
+ 'search.msn.com',
63
+ 'nutch',
64
+ 'simpy',
65
+ 'bot',
66
+ 'aspseek',
67
+ 'crawler',
68
+ 'msnbot',
69
+ 'libwww-perl',
70
+ 'fast',
71
+ 'baidu',
72
+ );
73
+
74
+ if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
75
+ return false;
76
+ }
77
+ $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
78
+ foreach ( $engines as $engine ) {
79
+ if (stripos($ua, $engine) !== false) {
80
+ return true;
81
+ }
82
+ return false;
83
+ }
84
  }
 
85
 
86
  function ecl_get_cookie_domain() {
87
 
122
  return $multi * eucookie_option('lengthnum');
123
  }
124
 
125
+ add_action('wp_footer', function() {
126
 
127
+ if ( cookie_accepted() ) { return; }
 
 
128
 
129
  $target = '';
130
  if ( eucookie_option('boxlinkid') == 'C') {
136
  } else {
137
  $link = '#';
138
  }
139
+
140
+ $return = '<!-- Eu Cookie Law '.get_option( 'ecl_version_number' ).' -->';
141
+ $return .= '<div class="pea_cook_wrapper pea_cook_'.eucookie_option('position').'" style="color:'.ecl_frontstyle('fontcolor').';background:rgb('.ecl_frontstyle('backgroundcolor').');background: rgba('.ecl_frontstyle('backgroundcolor').',0.85);">';
142
+ $return .= '<p>'.eucookie_option('barmessage').' <a style="color:'.eucookie_option('fontcolor').';" href="'.$link.'" '.$target.'id="fom">'.eucookie_option('barlink').'</a> <button id="pea_cook_btn" class="pea_cook_btn" href="#">'.eucookie_option('barbutton').'</button></p>';
143
+ $return .= '</div>';
144
+ echo apply_filters( 'eu_cookie_law_frontend_banner', $return );
145
+
146
+ $return = '<div class="pea_cook_more_info_popover"><div class="pea_cook_more_info_popover_inner" style="color:'.ecl_frontstyle('fontcolor').';background-color: rgba('.ecl_frontstyle('backgroundcolor').',0.9);">';
147
+ $return .= '<p>'.eucookie_option('boxcontent').'</p><p><a style="color:'.eucookie_option('fontcolor').';" href="#" id="pea_close">'.eucookie_option('closelink').'</a></p>';
148
+ $return .= '</div></div>';
149
+ echo apply_filters( 'eu_cookie_law_frontend_popup', $return );
150
+ }, 1000);
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
  function generate_cookie_notice_text($height, $width, $text) {
153
  return '<div class="eucookie" style="color:'.ecl_frontstyle('fontcolor').'; background: rgba('.ecl_frontstyle('backgroundcolor').',0.85) url(\''.plugins_url('img/block.png', __FILE__).'\') no-repeat; background-position: -30px -20px; width:'.$width.';height:'.$height.';"><span>'.$text.'</span></div><div class="clear"></div>';
156
  function generate_cookie_notice($height, $width) {
157
  return generate_cookie_notice_text($height, $width, eucookie_option('bhtmlcontent') );
158
  }
159
+
160
+ add_shortcode( 'cookie', function ( $atts, $content = null ) {
161
  extract(shortcode_atts(
162
  array(
163
  'height' => '',
173
  if (!$height) { $height = pulisci($content,'height='); }
174
  return generate_cookie_notice($height, $width);
175
  }
176
+ } );
 
177
 
 
178
 
179
+ //add_filter( 'the_content', 'ecl_erase', 11);
180
+ //add_filter( 'widget_text','ecl_erase', 11 );
181
 
182
+ function ecl_buffer_start() { ob_start(); }
183
+ function ecl_buffer_end() {
184
+ $contents = ecl_erase(ob_get_contents());
185
+ ob_end_clean();
186
+ echo $contents;
187
+ }
188
 
189
  add_action('wp_head', 'ecl_buffer_start');
190
  add_action('wp_footer', 'ecl_buffer_end');
191
 
192
  function ecl_erase($content) {
193
+ if ( !cookie_accepted() && eucookie_option('autoblock') &&
194
+ !(get_post_field( 'eucookielaw_exclude', get_the_id() ) )
 
195
  ) {
196
+
197
  $content = preg_replace('#<iframe.*?\/iframe>|<object.*?\/object>|<embed.*?>#is', generate_cookie_notice('auto', '100%'), $content);
198
  $content = preg_replace('#<script.(?:(?!eucookielaw_exclude).)*?\/script>#is', '', $content);
 
 
 
 
 
 
199
  $content = preg_replace('#<!cookie_start.*?\!cookie_end>#is', generate_cookie_notice('auto', '100%'), $content);
200
  $content = preg_replace('#<div id=\"disqus_thread\".*?\/div>#is', generate_cookie_notice('auto', '100%'), $content);
201
  }
202
  return $content;
203
  }
204
 
205
+ //Compatibility for Jetpack InfiniteScroll
206
+ add_filter( 'infinite_scroll_js_settings', 'ecl_infinite_scroll_js_settings' );
207
+ function ecl_infinite_scroll_js_settings($js_settings) {
208
+ return array_merge ( $js_settings, array( 'eucookielaw_exclude' => 1) );
209
+ }
210
+
211
  add_filter( 'widget_text', 'do_shortcode');
212
 
213
  function pulisci($content,$ricerca){
267
  echo '<h3>Active Cookies</h3>
268
  <table style="width:100%; word-break:break-all;">
269
  <tr>
270
+ <th>'.__('Name', 'eu-cookie-law').'</th>
271
+ <th>'.__('Value', 'eu-cookie-law').'</th>
272
  </tr>';
273
  foreach ($_COOKIE as $key=>$val) {
274
 
eu-cookie-law.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: EU Cookie Law
4
  Plugin URI: https://wordpress.org/plugins/eu-cookie-law/
5
  Description: EU Cookie Law informs users that your site uses cookies, with option to lock scripts before consent. Light + Customizable style.
6
- Version: 2.8.5
7
  Author: Alex Moss, Marco Milesi, Peadig, Shane Jones
8
  Author URI: https://wordpress.org/plugins/eu-cookie-law/
9
  Contributors: alexmoss, Milmor, peer, ShaneJones
3
  Plugin Name: EU Cookie Law
4
  Plugin URI: https://wordpress.org/plugins/eu-cookie-law/
5
  Description: EU Cookie Law informs users that your site uses cookies, with option to lock scripts before consent. Light + Customizable style.
6
+ Version: 2.13
7
  Author: Alex Moss, Marco Milesi, Peadig, Shane Jones
8
  Author URI: https://wordpress.org/plugins/eu-cookie-law/
9
  Contributors: alexmoss, Milmor, peer, ShaneJones
js/scripts.js CHANGED
@@ -48,7 +48,7 @@ jQuery(document).ready(function($){
48
  function euCookieConsent() {
49
  createCookie();
50
  if (autoBlock == 1) {
51
- window.location = window.location.pathname;
52
  }
53
  }
54
 
48
  function euCookieConsent() {
49
  createCookie();
50
  if (autoBlock == 1) {
51
+ window.location = window.location;
52
  }
53
  }
54
 
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === EU Cookie Law ===
2
  Contributors: alexmoss, Milmor, pleer, ShaneJones
3
- Version: 2.8.5
4
  Stable tag: trunk
5
  Author: Alex Moss, Marco Milesi, Peadig, Shane Jones
6
  Author URI: https://profiles.wordpress.org/milmor/
7
  Tags: eu cookie, cookies, law, analytics, european, italia, garante, privacy, eu cookie law, italy, cookie, consent, europe
8
- Requires at least: 3.8
9
- Tested up to: 4.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -23,6 +23,7 @@ https://www.youtube.com/watch?v=6f2qxC3GZJ8
23
  Demo: [www.sanpellegrinoterme.gov.it](http://www.sanpellegrinoterme.gov.it)
24
 
25
  = Features =
 
26
  * **Customizable banner** (color, position, strings)
27
  * Consent by **Clicking, Scrolling and Navigation**
28
  * Set your page, popup or custom URL for Cookie Policy
@@ -31,10 +32,9 @@ Demo: [www.sanpellegrinoterme.gov.it](http://www.sanpellegrinoterme.gov.it)
31
  * Compatible with **mobile** themes and plugins
32
  * Compatible with **multilanguage** plugins
33
  * Certified for **WPML**
34
- * 2-layer cookie prevention
35
  * Shortcode to **revoke cookie consent**
36
  * Shortcode to show a list of cookies
37
- * Compatible with Disqus
38
 
39
  = Advanced Features =
40
  * Block scripts if cookies are not accepted
@@ -46,7 +46,7 @@ Simply install the plugin and follow the instructions on the Settings page.
46
 
47
  = Cookie block =
48
  You can lock cookies using `[cookie]` and `[/cookie]` shortcodes in every post, page and widget. You can use php functions too:
49
- `if ( function_exists('cookie_accepted') && cookie_accepted() ) {
50
  // Your code
51
  }`
52
 
@@ -64,10 +64,9 @@ Thanks to: [Gerard Weijer](http://gerardweijer.nl), [Karsten Höfner](http://www
64
 
65
  = Contributions =
66
 
67
- * Italian community [Porte Aperte sul Web](http://www.porteapertesulweb.it) for beta-testing and ideas.
68
  * This plugin was originally developed by [Peadig](http://peadig.com/wordpress-plugins/eu-cookie-law/).
69
 
70
-
71
  == Installation ==
72
 
73
  This section describes how to install the plugin and get it working.
@@ -81,26 +80,27 @@ This section describes how to install the plugin and get it working.
81
 
82
  = Shortcodes available =
83
 
84
- You can lock parts of code in posts, pages and widget with these shortcode:
85
  `[cookie] ... [/cookie]`
86
  Parameters:
87
  `[cookie height="100px" width="100%" text="Hi <b>WordPress</b>"] //My code [/cookie]`
88
 
89
- To display a box (in pages/posts) with ability to revoke consent (if cookies accepted) or accept cookies (if not done yet):
90
  `[cookie-control]`
91
 
92
- You can also create your own link that revokes cookie consent. Just append **?nocookie=1** to your url.
93
  Ex. wordpress.org/**?nocookie=1** or wordpress.org/something/**?nocookie=1**
94
 
95
  To display a list of active cookies on user client:
96
  `[cookie-list]`
97
 
98
  = PHP Functions available =
99
- You can easily verify if cookies consent has been set with:
100
  `if ( function_exists('cookie_accepted') && cookie_accepted() ) {
101
  // Your code
102
  }`
103
- However this will only hide wrapped code. If you want to display an info box, in php you have:
 
104
  `generate_cookie_notice($height, $width);
105
  generate_cookie_notice_text($height, $width, $text);
106
 
@@ -109,22 +109,21 @@ if ( function_exists('cookie_accepted') && cookie_accepted() ) {
109
  } else {
110
  generate_cookie_notice($height, $width);
111
  }`
112
- (if you omit `$text` then the default one will be used)
113
 
114
- Please note that **cookie_accepted** returns true if Eu Cookie Law plugin is set to disabled in settings panel.
115
 
116
- If you think that we should provide more shortcodes, functions, or enhance what we already provide, please let us know in [our forum](https://wordpress.org/support/plugin/eu-cookie-law).
117
 
118
- = Auto block (sperimental*) =
119
  The plugin offers an exclusive function that allows you to block **iframes, embeds, objects and scripts** in posts, pages and widgets. This can be activated in the plugin options panel because is disabled by default.
120
 
121
- If you want to exclude a page from being filtered, you can set custom post field name **eucookielaw_exclude** to **1**. To do this, enable "Custom Fields" in "Screen Options". Then in the "Custom Fields" box enter the name, the value, and hit "Add Custom Field".
122
 
123
- If you want to exclude a <script> from being filtered, you can type between <script> and </script> the string **eucookielaw_exclude**. This can be achieved either by adding class="eucookielaw_exclude" or with an html comment.
 
124
 
125
  = Cache =
126
- We are working to get the plugin fully compatible with most cache plugins.
127
- At the moment using a cache service could create conflicts with the plugin.
128
 
129
  **WP Super Cache** (sperimental*): open the file wp-content/advanced-cache.php and add the following immediately after <?php opening:
130
  `if ( !isset( $_COOKIE['euCookie'] ) ){ return; }`
@@ -135,16 +134,14 @@ if ( !isset( $_COOKIE['euCookie'] ) ){ return; }
135
 
136
  function wpcache_broken_message() {`
137
 
138
- * = some features in this page are marked with "sperimental". It means that we are testing these functions. We highly suggest you to check this page regularly if you are using one of these.
139
-
140
  = WPML =
141
- EU Cookie Law fully supports WPML plugin. All of the front-end strings are translatable to every language using WPML's String Translation module.
142
 
143
  WPML’s String Translation module is part of the Multilingual CMS package. To enable it, you first need to download and install it from your WPML.org account > Downloads section.
144
 
145
  Then, go to **WPML->String Translation** and use the display filter, at the top of the String Translation page, to determine which strings to display.
146
 
147
- Click on the translations link to open the translation editor and adjust the strings as you want. Be sure to click on translation is complete after you translate. Incomplete translations will not appear in the site.
148
 
149
  == Screenshots ==
150
 
@@ -160,6 +157,42 @@ Click on the translations link to open the translation editor and adjust the str
160
 
161
  == Changelog ==
162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  = 2.8.5 31.12.2015 =
164
  * Full switch to translate.wordpress.org
165
  * That's all for 2015. Thank you everyone for using EU Cookie Law and Happy New Year from Peadig and WPGov!
1
  === EU Cookie Law ===
2
  Contributors: alexmoss, Milmor, pleer, ShaneJones
3
+ Version: 2.13
4
  Stable tag: trunk
5
  Author: Alex Moss, Marco Milesi, Peadig, Shane Jones
6
  Author URI: https://profiles.wordpress.org/milmor/
7
  Tags: eu cookie, cookies, law, analytics, european, italia, garante, privacy, eu cookie law, italy, cookie, consent, europe
8
+ Requires at least: 4.4
9
+ Tested up to: 4.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
23
  Demo: [www.sanpellegrinoterme.gov.it](http://www.sanpellegrinoterme.gov.it)
24
 
25
  = Features =
26
+ * **GDPR** compliance under review
27
  * **Customizable banner** (color, position, strings)
28
  * Consent by **Clicking, Scrolling and Navigation**
29
  * Set your page, popup or custom URL for Cookie Policy
32
  * Compatible with **mobile** themes and plugins
33
  * Compatible with **multilanguage** plugins
34
  * Certified for **WPML**
 
35
  * Shortcode to **revoke cookie consent**
36
  * Shortcode to show a list of cookies
37
+ * Compatible with Disqus and Jetpack InfiniteScroll
38
 
39
  = Advanced Features =
40
  * Block scripts if cookies are not accepted
46
 
47
  = Cookie block =
48
  You can lock cookies using `[cookie]` and `[/cookie]` shortcodes in every post, page and widget. You can use php functions too:
49
+ `if ( !function_exists('cookie_accepted') || cookie_accepted() ) {
50
  // Your code
51
  }`
52
 
64
 
65
  = Contributions =
66
 
67
+ * Italian community [Porte Aperte sul Web](http://www.porteapertesulweb.it)
68
  * This plugin was originally developed by [Peadig](http://peadig.com/wordpress-plugins/eu-cookie-law/).
69
 
 
70
  == Installation ==
71
 
72
  This section describes how to install the plugin and get it working.
80
 
81
  = Shortcodes available =
82
 
83
+ You can block code in posts, pages and widget by wrapping it with these shortcode:
84
  `[cookie] ... [/cookie]`
85
  Parameters:
86
  `[cookie height="100px" width="100%" text="Hi <b>WordPress</b>"] //My code [/cookie]`
87
 
88
+ To display the button to revoke consent (if cookies accepted) or accept cookies:
89
  `[cookie-control]`
90
 
91
+ You can also revoke consent by adding **?nocookie=1** parameter to your url.
92
  Ex. wordpress.org/**?nocookie=1** or wordpress.org/something/**?nocookie=1**
93
 
94
  To display a list of active cookies on user client:
95
  `[cookie-list]`
96
 
97
  = PHP Functions available =
98
+ You can check the consent with:
99
  `if ( function_exists('cookie_accepted') && cookie_accepted() ) {
100
  // Your code
101
  }`
102
+
103
+ If you want to display the cookie-block message:
104
  `generate_cookie_notice($height, $width);
105
  generate_cookie_notice_text($height, $width, $text);
106
 
109
  } else {
110
  generate_cookie_notice($height, $width);
111
  }`
 
112
 
113
+ Please note that **cookie_accepted** returns true if you disable it in the settings panel, if you excluded the current page or if you are a search engine :)
114
 
115
+ If you think that we should enhance something let us know in the [forum](https://wordpress.org/support/plugin/eu-cookie-law).
116
 
117
+ = Auto block =
118
  The plugin offers an exclusive function that allows you to block **iframes, embeds, objects and scripts** in posts, pages and widgets. This can be activated in the plugin options panel because is disabled by default.
119
 
120
+ To exclude a page from the filter set a custom post field **eucookielaw_exclude** to **1**. Just enable "Custom Fields" in "Screen Options" and in the "Custom Fields" box type the name, the value, and hit "Add Custom Field".
121
 
122
+ If you want to exclude a script, you can type between `<script>` and `</script>` the string **eucookielaw_exclude**.
123
+ Ex. add **class="eucookielaw_exclude"** or a comment.
124
 
125
  = Cache =
126
+ We are working to improve cache compatibility. As for now, conflicts may occur.
 
127
 
128
  **WP Super Cache** (sperimental*): open the file wp-content/advanced-cache.php and add the following immediately after <?php opening:
129
  `if ( !isset( $_COOKIE['euCookie'] ) ){ return; }`
134
 
135
  function wpcache_broken_message() {`
136
 
 
 
137
  = WPML =
138
+ This plugin is officially certified for WPML. You can translate every string with WPML's String Translation module.
139
 
140
  WPML’s String Translation module is part of the Multilingual CMS package. To enable it, you first need to download and install it from your WPML.org account > Downloads section.
141
 
142
  Then, go to **WPML->String Translation** and use the display filter, at the top of the String Translation page, to determine which strings to display.
143
 
144
+ Click on the translations link to open the translation editor and adjust the strings as you want. Be sure to click on "translation is complete"" after you translate. Incomplete translations will not appear in the site.
145
 
146
  == Screenshots ==
147
 
157
 
158
  == Changelog ==
159
 
160
+ = 2.13 24.04.2018 =
161
+ * **Fixed** bug with WordPress default Youtube embeds. Thanks to @rfmcomposer + @bitmed
162
+ * **Added** better php check to block cookies in our faq - improvement by @rfmcomposer
163
+
164
+ = 2.12 23.04.2018 =
165
+ * **GDPR**: we are working to give You the best plugin to comply GDPR. Expect news soon! Please note that we already have a shortcode you can use to let users revoke the consent (see faq) and the accept button could already be considered as an "active consent" with 1) cookie block enabled 2) scroll and navigation consent disabled
166
+ * **Fixed** typo
167
+
168
+ = 2.11 24.11.2017 =
169
+ * Checked and confirmed WP 4.9 compatibility
170
+
171
+ = 2.10 05.01.2017 =
172
+ * **Added** filter eu_cookie_law_frontend_banner to change banner design with WordPress actions
173
+ * **Added** filter eu_cookie_law_frontend_popup to change popup box design with WordPress actions
174
+ * **Fixed** problem with "nocookie" url parameter in cookie-control shortcode causing bugs in accept/revoke (#reported by Carlo Di Somma, Web Napoli Agency)
175
+ * **Enhanced** performance
176
+
177
+ = 2.9.4 18.12.2016 =
178
+ * Minor changes and WP 4.7 compatibility check
179
+
180
+ = 2.9.3 06.07.2016 =
181
+ * Minor changes and WP 4.6 compatibility check
182
+
183
+ = 2.9.2 03.04.2016 =
184
+ * Merged ac1d558 6937c2a daca37c thanks to [@stephenharris](https://profiles.wordpress.org/stephenharris/) on [git](https://github.com/WPGov/eu-cookie-law)
185
+ * Updated wpml-config.xml
186
+
187
+ = 2.9.1 31.01.2016 =
188
+ * Added custom filter to exclude Jetpack InfiniteScroll
189
+
190
+ = 2.9 30.01.2016 =
191
+ * Improved auto block system
192
+ * Better exclusion of search engines from the block
193
+ * Better cache compatibility
194
+ * Performance improvements
195
+
196
  = 2.8.5 31.12.2015 =
197
  * Full switch to translate.wordpress.org
198
  * That's all for 2015. Thank you everyone for using EU Cookie Law and Happy New Year from Peadig and WPGov!
wpml-config.xml CHANGED
@@ -4,6 +4,7 @@
4
  <key name="barmessage"/>
5
  <key name="barlink"/>
6
  <key name="barbutton"/>
 
7
  <key name="closelink"/>
8
  <key name="boxcontent"/>
9
  <key name="bhtmlcontent"/>
4
  <key name="barmessage"/>
5
  <key name="barlink"/>
6
  <key name="barbutton"/>
7
+ <key name="boxlinkid"/>
8
  <key name="closelink"/>
9
  <key name="boxcontent"/>
10
  <key name="bhtmlcontent"/>