iubenda Cookie Solution for GDPR - Version 2.1.4-beta

Version Description

  • New: Multilingual support from AMP
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 iubenda Cookie Solution for GDPR
Version 2.1.4-beta
Comparing to
See all releases

Code changes from version 2.0.3 to 2.1.4-beta

css/admin.css CHANGED
@@ -42,6 +42,12 @@
42
  #iub_parser_engine_container > div:not(:last-child) {
43
  margin-bottom: 10px;
44
  }
 
 
 
 
 
 
45
  #iubenda-tabs .contextual-help-wrap {
46
  overflow: auto;
47
  margin: 0;
@@ -62,9 +68,18 @@
62
  #iubenda-tabs .help-tab-content {
63
  margin-right: 0;
64
  }
65
- #iubenda-tabs .help-tab-content textarea {
66
- margin-top: 18px;
67
- width: 100%;
 
 
 
 
 
 
 
 
 
68
  }
69
  #iubenda-tabs .postbox-container .widefat {
70
  border: none;
42
  #iub_parser_engine_container > div:not(:last-child) {
43
  margin-bottom: 10px;
44
  }
45
+ #iub_amp_options_container {
46
+ margin-top: 10px;
47
+ }
48
+ #iub_amp_options_container > div:not(:last-child) {
49
+ margin-bottom: 10px;
50
+ }
51
  #iubenda-tabs .contextual-help-wrap {
52
  overflow: auto;
53
  margin: 0;
68
  #iubenda-tabs .help-tab-content {
69
  margin-right: 0;
70
  }
71
+ #iubenda-tabs .help-tab-content .description {
72
+ margin-bottom: 10px;
73
+ }
74
+ #iubenda-tabs .help-tab-content .custom-script-field, #iubenda-tabs .help-tab-content .custom-iframe-field {
75
+ padding-bottom: 10px;
76
+ }
77
+ #iubenda-tabs .help-tab-content .custom-script-field input, #iubenda-tabs .help-tab-content .custom-iframe-field input {
78
+ vertical-align: middle;
79
+ }
80
+ #tab-panel-scripts, #tab-panel-iframes {
81
+ margin-top: 16px;
82
+ margin-bottom: 18px;
83
  }
84
  #iubenda-tabs .postbox-container .widefat {
85
  border: none;
includes/amp.php ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit;
5
+
6
+ /**
7
+ * iubenda_AMP class.
8
+ *
9
+ * @class iubenda_AMP
10
+ */
11
+ class iubenda_AMP {
12
+
13
+ /**
14
+ * Class constructor.
15
+ */
16
+ public function __construct() {
17
+ // actions
18
+ add_action( 'wp_head', array( $this, 'wp_head_amp' ), 100 );
19
+ add_action( 'wp_footer', array( $this, 'wp_footer_amp' ), 100 );
20
+ add_action( 'amp_post_template_css', array( $this, 'amp_post_template_css' ), 100 );
21
+ add_action( 'amp_post_template_footer', array( $this, 'wp_footer_amp' ), 100 );
22
+ add_action( 'amp_post_template_footer', array( $this, 'fix_analytics_amp_for_wp' ), 1 );
23
+
24
+ // filters
25
+ add_filter( 'amp_post_template_data', array( $this, 'amp_post_template_data' ), 100 );
26
+ add_filter( 'amp_analytics_entries', array( $this, 'fix_analytics_wp_amp' ), 10 );
27
+ }
28
+
29
+ /**
30
+ * Add scripts and CSS to WP AMP plugin in Transitional mode.
31
+ *
32
+ * @return mixed
33
+ */
34
+ public function wp_head_amp() {
35
+ if ( iubenda()->options['cs']['amp_support'] === false )
36
+ return;
37
+
38
+ if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() && ! function_exists( 'ampforwp_is_amp_endpoint' ) ) {
39
+ echo '
40
+ <script async custom-element="amp-consent" src="https://cdn.ampproject.org/v0/amp-consent-latest.js"></script>
41
+ <script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-latest.js"></script>';
42
+ /* optional geo support
43
+ echo '
44
+ <script async custom-element="amp-geo" src="https://cdn.ampproject.org/v0/amp-geo-0.1.js"></script>';
45
+ */
46
+ // CSS style
47
+ echo '
48
+ <style amp-custom>
49
+ .popupOverlay {
50
+ position:fixed;
51
+ top: 0;
52
+ bottom: 0;
53
+ left: 0;
54
+ right: 0;
55
+ }
56
+ amp-iframe {
57
+ margin: 0;
58
+ }
59
+ amp-consent.amp-active {
60
+ position:fixed;
61
+ top: 0;
62
+ bottom: 0;
63
+ left: 0;
64
+ right: 0;
65
+ }
66
+ </style>';
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Add AMP consent HTML to WP AMP plugin in Transitional mode.
72
+ *
73
+ * @return mixed
74
+ */
75
+ public function wp_footer_amp() {
76
+ if ( iubenda()->options['cs']['amp_support'] === false )
77
+ return;
78
+
79
+ if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() || ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) ) {
80
+
81
+ // get code
82
+ if ( iubenda()->multilang && ! empty( iubenda()->lang_current ) ) {
83
+ $code = iubenda()->options['cs']['code_' . iubenda()->lang_current];
84
+ } else {
85
+ $code = iubenda()->options['cs']['code_default'];
86
+ }
87
+
88
+ $configuration = iubenda()->parse_configuration( $code );
89
+
90
+ if ( empty( $configuration ) )
91
+ return;
92
+
93
+ // local file
94
+ if ( iubenda()->options['cs']['amp_source'] === 'local' ) {
95
+ // multilang support
96
+ if ( iubenda()->multilang && ! empty( iubenda()->lang_current ) )
97
+ $template_url = $this->get_amp_template_url( iubenda()->lang_current );
98
+ else
99
+ $template_url = $this->get_amp_template_url();
100
+ // remote file
101
+ } else {
102
+ // multilang support
103
+ if ( iubenda()->multilang && ! empty( iubenda()->lang_current ) )
104
+ $template_url = esc_url( isset( iubenda()->options['cs']['amp_template'][iubenda()->lang_current] ) ? iubenda()->options['cs']['amp_template'][iubenda()->lang_current] : '' );
105
+ else
106
+ $template_url = esc_url( iubenda()->options['cs']['amp_template'] );
107
+ }
108
+
109
+ if ( empty( $template_url ) )
110
+ return;
111
+
112
+ echo '
113
+ <amp-consent id="myUserConsent" layout="nodisplay">
114
+ <script type="application/json">
115
+ {
116
+ "consentInstanceId": "consent' . $configuration['siteId'] . '",
117
+ "consentRequired": true,
118
+ "promptUI": "myConsentFlow"
119
+ }
120
+ </script>
121
+ <div id="myConsentFlow" class="popupOverlay">
122
+ <amp-iframe
123
+ layout="fill"
124
+ sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
125
+ src="' . esc_url( $template_url ) . '">
126
+ <div placeholder>' . __( 'Loading', 'iubenda' ) . '</div>
127
+ </amp-iframe>
128
+ </div>
129
+ </amp-consent>';
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Add scripts to AMP for WP plugin and WP AMP plugin in Standard mode.
135
+ *
136
+ * @return mixed
137
+ */
138
+ public function amp_post_template_data( $data ) {
139
+ if ( iubenda()->options['cs']['amp_support'] === false )
140
+ return $data;
141
+
142
+ if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
143
+ $data['amp_component_scripts'] = array_merge( $data['amp_component_scripts'],
144
+ array( 'amp-consent' => 'https://cdn.ampproject.org/v0/amp-consent-latest.js' )
145
+ );
146
+ $data['amp_component_scripts'] = array_merge( $data['amp_component_scripts'],
147
+ array( 'amp-iframe' => 'https://cdn.ampproject.org/v0/amp-iframe-latest.js' )
148
+ );
149
+ }
150
+
151
+ return $data;
152
+ }
153
+
154
+ /**
155
+ * Add CSS to AMP for WP plugin and WP AMP plugin in Standard mode.
156
+ *
157
+ * @return mixed
158
+ */
159
+ public function amp_post_template_css( $data ) {
160
+ if ( iubenda()->options['cs']['amp_support'] === false )
161
+ return;
162
+
163
+ echo '
164
+ .popupOverlay {
165
+ position:fixed;
166
+ top: 0;
167
+ bottom: 0;
168
+ left: 0;
169
+ right: 0;
170
+ }
171
+ amp-iframe {
172
+ margin: 0;
173
+ }
174
+ amp-consent.amp-active {
175
+ position:fixed;
176
+ top: 0;
177
+ bottom: 0;
178
+ left: 0;
179
+ right: 0;
180
+ }';
181
+ }
182
+
183
+ /**
184
+ * Block analytics in AMP for WP plugin.
185
+ *
186
+ * @return mixed
187
+ */
188
+ public function fix_analytics_amp_for_wp( $data ) {
189
+ if ( iubenda()->options['cs']['amp_support'] === false )
190
+ return $data;
191
+
192
+ global $redux_builder_amp;
193
+
194
+ if ( $redux_builder_amp == null ) {
195
+ $redux_builder_amp = get_option( 'redux_builder_amp', true );
196
+ }
197
+
198
+ // trick to block the analytics using global $redux_builder_amp variable
199
+ if ( ! iubendaParser::consent_given() )
200
+ $redux_builder_amp = true;
201
+
202
+ return $data;
203
+ }
204
+
205
+ /**
206
+ * Block analytics in WP AMP plugin.
207
+ *
208
+ * @return mixed
209
+ */
210
+ public function fix_analytics_wp_amp( $analytics_entries ) {
211
+ if ( iubenda()->options['cs']['amp_support'] === false )
212
+ return $analytics_entries;
213
+
214
+ // block the analytics using the entries filter hook
215
+ if ( ! iubendaParser::consent_given() && ! empty( $analytics_entries ) && is_array( $analytics_entries ) ) {
216
+ foreach ( $analytics_entries as $id => $entry ) {
217
+ $entry['attributes'] = ! empty( $entry['attributes'] ) ? $entry['attributes'] : array();
218
+
219
+ $analytics_entries[$id]['attributes'] = array_merge( array( 'data-block-on-consent' => '_till_accepted' ), $entry['attributes'] );
220
+ }
221
+ }
222
+
223
+ return $analytics_entries;
224
+ }
225
+
226
+ /**
227
+ * Prepare HTML iframe template for the AMP.
228
+ *
229
+ * @return mixed
230
+ */
231
+ public function prepare_amp_template( $code ) {
232
+ $html = '';
233
+
234
+ $configuration_raw = iubenda()->parse_configuration( $code );
235
+
236
+ if ( ! empty( $configuration_raw ) ) {
237
+ // get script
238
+ $script_src = ! empty( $configuration_raw['script'] ) ? $configuration_raw['script'] : '//cdn.iubenda.com/cs/iubenda_cs.js';
239
+
240
+ // remove from configuration
241
+ if ( isset( $configuration_raw['script'] ) )
242
+ unset( $configuration_raw['script'] );
243
+
244
+ // encode array
245
+ $configuration = json_encode( $configuration_raw );
246
+
247
+ // remove quotes
248
+ $configuration = preg_replace( '/"([a-zA-Z]+[a-zA-Z0-9]*)":/', '$1:', $configuration );
249
+ // replace brackets
250
+ $configuration = str_replace( array( '{', '}' ), '', $configuration );
251
+
252
+ $html .= '<!DOCTYPE html>
253
+ <html lang="' . $configuration_raw['lang'] . '">
254
+ <head>
255
+ <meta charset="UTF-8">
256
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
257
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
258
+ <title>' . __( 'AMP Cookie Consent', 'iubenda' ) . '</title>
259
+ <script type="text/javascript">
260
+ var _iub = _iub || [];
261
+ _iub.csConfiguration = {
262
+ ';
263
+ // print configuration
264
+ $html .= $configuration . ',';
265
+ $html .= '
266
+ banner: {
267
+ position: \'float-bottom-center\',
268
+ acceptButtonDisplay: true,
269
+ customizeButtonDisplay: true,
270
+ rejectButtonDisplay: true,
271
+ backgroundOverlay: true
272
+ },
273
+ callback: {
274
+ onPreferenceExpressed: function(preference) {
275
+ var consentAction = \'reject\';
276
+ if (preference && preference.consent) {
277
+ consentAction = \'accept\';
278
+ }
279
+ console.log(\'send consent-response\', consentAction);
280
+ window.parent.postMessage({
281
+ type: \'consent-response\',
282
+ action: consentAction
283
+ }, \'*\');
284
+ }
285
+ }
286
+ };
287
+ </script>
288
+ <script async src="' . $script_src . '"></script>
289
+ </head>
290
+ <body></body>
291
+ </html>';
292
+ }
293
+
294
+ return $html;
295
+ }
296
+
297
+ /**
298
+ * Get local file template url;
299
+ *
300
+ * @return string
301
+ */
302
+ public function get_amp_template_url( $template_lang = '' ) {
303
+ $template_url = '';
304
+ $template_lang = ! empty( $template_lang ) && is_string( $template_lang ) ? $template_lang : '';
305
+
306
+ // get basic site host and template file data
307
+ $file_url = ! empty( $template_lang ) ? IUBENDA_PLUGIN_URL . '/templates/amp' . '-' . $template_lang . '.html' : IUBENDA_PLUGIN_URL . '/templates/amp.html';
308
+ // $file_url = 'https://cdn.iubenda.com/cs/test/cs-for-amp.html'; // debug only
309
+ $parsed_site = parse_url( home_url() );
310
+ $parsed_file = parse_url( $file_url );
311
+ $site_host = $parsed_site['host'] !== 'localhost' ? iubenda()->domain( $parsed_site['host'] ) : 'localhost';
312
+ $file_host = $parsed_file['host'] !== 'localhost' ? iubenda()->domain( $parsed_file['host'] ) : 'localhost';
313
+ $is_localhost = (bool) ( $site_host == 'localhost' );
314
+ $is_subdomain = ! $is_localhost ? (bool) ( $parsed_file['host'] !== $file_host ) : false;
315
+
316
+ // check if file host and server host match
317
+ // if not, we're good to go
318
+ if ( $site_host !== $file_host ) {
319
+ $template_url = $file_url;
320
+ // if are located on same host do additional tweaks
321
+ } else {
322
+ // all ok if we're on different subdomains
323
+ if ( $parsed_site['host'] !== $parsed_file['host'] )
324
+ $template_url = $file_url;
325
+ // same hosts, let's tweak the http/https
326
+ else {
327
+ $has_www = strpos( $parsed_file['host'], 'www.' ) === 0;
328
+
329
+ // add or remove www from url string to make iframe url pass AMP validation
330
+ $tweaked_host = ! $is_localhost && ! $is_subdomain ? ( ! $has_www ? 'www.' . $parsed_file['host'] : preg_replace( '/^www\./i', '', $parsed_file['host'] ) ) : $parsed_file['host'];
331
+
332
+ // generate new url
333
+ $tweaked_url = $parsed_file['scheme'] . '://' . $tweaked_host . ( isset( $parsed_file['port'] ) ? ':' . $parsed_file['port'] : '' ) . $parsed_file['path'] . ( ! empty( $parsed_file['query'] ) ? '?' . $parsed_file['query'] : '' );
334
+
335
+ // check if file url is valid
336
+ if ( $tweaked_url ) {
337
+ $template_url = $tweaked_url;
338
+ }
339
+ }
340
+ }
341
+
342
+ return $template_url;
343
+ }
344
+
345
+ /**
346
+ * Generate HTML iframe template for the AMP.
347
+ *
348
+ * @return mixed
349
+ */
350
+ public function generate_amp_template( $code, $lang = '' ) {
351
+ $template_dir = IUBENDA_PLUGIN_PATH . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;
352
+ $template_file = $template_dir . ( ! empty( $lang ) && in_array( $lang, array_keys( iubenda()->languages ) ) ? 'amp' . '-' . $lang . '.html' : 'amp.html' );
353
+ $html = $this->prepare_amp_template( $code );
354
+
355
+ // bail if the template was not created properly
356
+ if ( empty( $html ) )
357
+ return false;
358
+
359
+ $result = file_put_contents( $template_file, $html );
360
+
361
+ return (bool) $result;
362
+ }
363
+
364
+ }
includes/forms.php CHANGED
@@ -339,7 +339,7 @@ class iubenda_Forms {
339
  $args = wp_parse_args( $args, $defaults );
340
 
341
  // sanitize args
342
- $args['ID'] = ! empty( $args['ID'] ) ? (int) $args['ID'] : 0;
343
  $args['status'] = ! empty( $args['status'] ) && in_array( $args['status'], array_keys( $this->statuses ) ) ? $args['status'] : 'publish';
344
  $args['object_type'] = 'post';
345
  $args['object_id'] = ! empty( $args['object_id'] ) ? (int) $args['object_id'] : 0;
@@ -371,8 +371,8 @@ class iubenda_Forms {
371
  if ( ! $args['form_source'] || ! $args['form_fields'] )
372
  return false;
373
 
374
- $post = get_post( (int) $args['ID'] );
375
- $update = ! $post ? false : true;
376
 
377
  // insert new form
378
  if ( ! $update ) {
339
  $args = wp_parse_args( $args, $defaults );
340
 
341
  // sanitize args
342
+ $args['ID'] = ! empty( $args['ID'] ) ? absint( $args['ID'] ) : 0;
343
  $args['status'] = ! empty( $args['status'] ) && in_array( $args['status'], array_keys( $this->statuses ) ) ? $args['status'] : 'publish';
344
  $args['object_type'] = 'post';
345
  $args['object_id'] = ! empty( $args['object_id'] ) ? (int) $args['object_id'] : 0;
371
  if ( ! $args['form_source'] || ! $args['form_fields'] )
372
  return false;
373
 
374
+ $post = $args['ID'] !== 0 ? get_post( $args['ID'] ) : false;
375
+ $update = empty( $post ) ? false : true;
376
 
377
  // insert new form
378
  if ( ! $update ) {
includes/settings.php CHANGED
@@ -22,7 +22,7 @@ class iubenda_Settings {
22
  add_action( 'admin_init', array( $this, 'register_options' ) );
23
  add_action( 'admin_init', array( $this, 'update_plugin' ), 9 );
24
  add_action( 'admin_init', array( $this, 'admin_page_redirect' ), 20 );
25
- add_action( 'admin_init', array( $this, 'process_actions' ) );
26
  add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
27
  add_action( 'admin_notices', array( $this, 'settings_errors' ) );
28
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
@@ -45,7 +45,7 @@ class iubenda_Settings {
45
  'full_name' => __( 'string', 'iubenda' ),
46
  // 'verified' => __( 'boolean', 'iubenda' ),
47
  );
48
-
49
  $this->legal_notices = array(
50
  'privacy_policy',
51
  'cookie_policy',
@@ -67,6 +67,15 @@ class iubenda_Settings {
67
  )
68
  );
69
 
 
 
 
 
 
 
 
 
 
70
  $links = array(
71
  'en' => array(
72
  'iab' => 'https://www.iubenda.com/en/help/7440-enable-preference-management-iab-framework',
@@ -118,6 +127,7 @@ class iubenda_Settings {
118
  add_settings_field( 'iub_output_feed', __( 'RSS feed', 'iubenda' ), array( $this, 'iub_output_feed' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
119
  add_settings_field( 'iub_output_post', __( 'POST requests', 'iubenda' ), array( $this, 'iub_output_post' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
120
  add_settings_field( 'iub_menu_position', __( 'Menu position', 'iubenda' ), array( $this, 'iub_menu_position' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
 
121
  add_settings_field( 'iub_deactivation', __( 'Deactivation', 'iubenda' ), array( $this, 'iub_deactivation' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
122
 
123
  // forms list
@@ -313,13 +323,13 @@ class iubenda_Settings {
313
 
314
  // multilang support
315
  if ( ! empty( iubenda()->languages ) ) {
316
- foreach ( iubenda()->languages as $lang ) {
317
- $code = get_option( 'iubenda-code-' . $lang );
318
 
319
  if ( ! empty( $code ) ) {
320
- $options['code_' . $lang] = $code;
321
 
322
- delete_option( 'iubenda-code-' . $lang );
323
  }
324
  }
325
  }
@@ -341,6 +351,15 @@ class iubenda_Settings {
341
  }
342
 
343
  $tab_key = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'cs';
 
 
 
 
 
 
 
 
 
344
  ?>
345
  <div class="wrap">
346
 
@@ -382,6 +401,26 @@ class iubenda_Settings {
382
  </div>
383
 
384
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  // render custom notices
386
  $this->print_notices();
387
  ?>
@@ -514,18 +553,63 @@ class iubenda_Settings {
514
  </div>
515
  <div id="contextual-help-tabs-wrap-2" class="contextual-help-tabs-wrap">
516
  <div id="tab-panel-scripts" class="help-tab-content active">
517
- <textarea name="iubenda_cookie_law_solution[custom_scripts]" class="large-text" cols="50" rows="10">' . esc_textarea( implode( "\n", iubenda()->options['cs']['custom_scripts'] ) ) . '</textarea>
518
- <p class="description">' . __( 'Enter the list of custom scripts you’d like to block here (one per line)', 'iubenda' ) . '</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  </div>
520
  <div id="tab-panel-iframes" class="help-tab-content">
521
- <textarea name="iubenda_cookie_law_solution[custom_iframes]" class="large-text" cols="50" rows="10">' . esc_textarea( implode( "\n", iubenda()->options['cs']['custom_iframes'] ) ) . '</textarea>
522
- <p class="description">' . __( 'Enter the list of custom iframes you’d like to block here (one per line). ', 'iubenda' ) . '</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  </div>
524
  </div>
525
  </div>
526
  </div>';
527
  }
528
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  /**
530
  * Parsing option.
531
  *
@@ -534,7 +618,7 @@ class iubenda_Settings {
534
  public function iub_parse() {
535
  echo '
536
  <div id="iub_parse_container">
537
- <label><input id="iub_parse" type="checkbox" name="iubenda_cookie_law_solution[parse]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['parse'], false ) . '/>' . __( 'Automatically block scripts detected by the plugin.', 'iubenda' ) . '</label>
538
  <p class="description">' . '(' . sprintf( __( "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of detected scripts.", 'iubenda' ), $this->links['documentation'] ) . ')' . '</p>
539
  <div id="iub_parser_engine_container"' . ( iubenda()->options['cs']['parse'] === false ? ' style="display: none;"' : '' ) . '>
540
  <div>
@@ -544,7 +628,7 @@ class iubenda_Settings {
544
  </div>
545
  <div>
546
  <label><input id="iub_skip_parsing" type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['skip_parsing'], false ) . '/>' . __( 'Leave scripts untouched on the page if the user has already given consent', 'iubenda' ) . '</label>
547
- <p class="description">(' . __( "improves performance, highly recommended, to be deactivated only if your site uses a caching system", 'iubenda' ) . ')</p>
548
  </div>
549
  </div>
550
  </div>';
@@ -599,6 +683,60 @@ class iubenda_Settings {
599
  <p class="description">' . __( 'Select whether to display iubenda in a top admin menu or the Settings submenu.', 'iubenda' ) . '</p>
600
  </div>';
601
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
602
 
603
  /**
604
  * Deactivation option.
@@ -1027,40 +1165,87 @@ class iubenda_Settings {
1027
  $input['output_feed'] = (bool) isset( $input['output_feed'] );
1028
  $input['output_post'] = (bool) isset( $input['output_post'] );
1029
  $input['menu_position'] = isset( $input['menu_position'] ) && in_array( $input['menu_position'], array( 'topmenu', 'submenu' ) ) ? $input['menu_position'] : iubenda()->defaults['cs']['menu_position'];
 
1030
  $input['deactivation'] = (bool) isset( $input['deactivation'] );
1031
 
1032
  // multilang support
1033
  if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
 
 
1034
  foreach ( iubenda()->languages as $lang_id => $lang_name ) {
1035
- $input['code_' . $lang_id] = ! empty( $input['code_' . $lang_id] ) ? iubenda()->parse_code( $input['code_' . $lang_id] ) : '';
1036
 
1037
  // handle default lang too
1038
  if ( $lang_id == iubenda()->lang_default ) {
1039
  $input['code_default'] = ! empty( $input['code_' . $lang_id] ) ? iubenda()->parse_code( $input['code_' . $lang_id] ) : iubenda()->options['cs']['code_default'];
1040
  }
1041
  }
1042
- } else
1043
- $input['code_default'] = ! empty( $input['code_default'] ) ? iubenda()->parse_code( $input['code_default'] ) : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1044
 
1045
  // scripts
1046
- if ( isset( $input['custom_scripts'] ) ) {
1047
- $input['custom_scripts'] = trim( $input['custom_scripts'] );
1048
 
1049
- if ( ! empty( $input['custom_scripts'] ) )
1050
- $input['custom_scripts'] = array_map( 'trim', explode( "\n", str_replace( "\r", '', $input['custom_scripts'] ) ) );
1051
- else
1052
- $input['custom_scripts'] = array();
 
 
 
 
 
 
 
1053
  } else
1054
  $input['custom_scripts'] = array();
1055
 
1056
  // iframes
1057
- if ( isset( $input['custom_iframes'] ) ) {
1058
- $input['custom_iframes'] = trim( $input['custom_iframes'] );
1059
 
1060
- if ( ! empty( $input['custom_iframes'] ) )
1061
- $input['custom_iframes'] = array_map( 'trim', explode( "\n", str_replace( "\r", '', $input['custom_iframes'] ) ) );
1062
- else
1063
- $input['custom_iframes'] = array();
 
 
 
 
 
 
 
1064
  } else
1065
  $input['custom_iframes'] = array();
1066
 
@@ -1119,13 +1304,22 @@ class iubenda_Settings {
1119
 
1120
  if ( ! $page )
1121
  return;
 
 
 
 
 
 
 
 
 
1122
 
1123
  // add comments cookie option notice
1124
  if ( $tab_key != 'cs' && ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
1125
  $cookies_enabled = get_option( 'show_comments_cookies_opt_in' );
1126
 
1127
  if ( ! $cookies_enabled ) {
1128
- iubenda()->settings->add_notice( 'iub_comment_cookies_disabled', sprintf( __( 'Please enable comments cookies opt-in checkbox in the <a href="%s" target="_blank">Discussion settings</a>.', 'iubenda' ), esc_url( admin_url( 'options-discussion.php' ) ) ), 'notice' );
1129
  }
1130
  }
1131
 
@@ -1137,23 +1331,15 @@ class iubenda_Settings {
1137
 
1138
  // new forms notice
1139
  if ( ! empty( $result['new'] ) )
1140
- iubenda()->settings->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form detected successfully.', '%d forms detected successfully.', count( $result['new'] ), 'iubenda' ), $result ), 'success' );
1141
 
1142
  // forms changed notice
1143
  if ( ! empty( $result['updated'] ) )
1144
- iubenda()->settings->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form change detected.', '%d form changes detected.', count( $result['updated'] ), 'iubenda' ), $result ), 'success' );
1145
 
1146
  // no changes notice
1147
  if ( empty( $result['new'] ) && empty( $result['updated'] ) )
1148
- iubenda()->settings->add_notice( 'iub_autodetect_success', __( 'No forms or form changes detected.', 'iubenda' ), 'error' );
1149
-
1150
- if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
1151
- // sub menu
1152
- $redirect_to = admin_url( 'options-general.php?page=iubenda&tab=cons' );
1153
- } else {
1154
- // top menu
1155
- $redirect_to = admin_url( 'admin.php?page=iubenda&tab=cons' );
1156
- }
1157
 
1158
  // make sure it's current host location
1159
  wp_safe_redirect( $redirect_to );
@@ -1213,7 +1399,7 @@ class iubenda_Settings {
1213
 
1214
  // bail if empty fields
1215
  if ( empty( $subject ) || empty( $preferences ) ) {
1216
- iubenda()->settings->add_notice( 'iub_form_fields_missing', __( 'Form saving failed. Please fill the Subject and Preferences fields.', 'iubenda' ), 'error' );
1217
  return;
1218
  }
1219
 
@@ -1237,13 +1423,13 @@ class iubenda_Settings {
1237
  if ( $result ) {
1238
  // form save, inform about form status update
1239
  if ( empty( $form->form_subject ) && empty( $form->form_preferences ) ) {
1240
- iubenda()->settings->add_notice( 'iub_form_saved', __( 'Form saved successfully - form status changed to Mapped.', 'iubenda' ), 'success' );
1241
  // form update
1242
  } else {
1243
- iubenda()->settings->add_notice( 'iub_form_updated', __( 'Form updated successfully.', 'iubenda' ), 'success' );
1244
  }
1245
  } else {
1246
- iubenda()->settings->add_notice( 'iub_form_failed', __( 'Form saving failed.', 'iubenda' ), 'error' );
1247
  }
1248
 
1249
  break;
@@ -1260,15 +1446,30 @@ class iubenda_Settings {
1260
  $result = iubenda()->forms->delete_form( $id );
1261
 
1262
  if ( $result )
1263
- iubenda()->settings->add_notice( 'iub_form_deleted', __( 'Form deleted successfully.', 'iubenda' ), 'success' );
1264
  else
1265
- iubenda()->settings->add_notice( 'iub_form_delete_failed', __( 'Form delete failed.', 'iubenda' ), 'error' );
1266
-
1267
- $redirect_to = admin_url( 'admin.php?page=iubenda&tab=cons' );
1268
 
1269
  // make sure it's current host location
1270
  wp_safe_redirect( $redirect_to );
1271
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1272
  break;
1273
 
1274
  default :
22
  add_action( 'admin_init', array( $this, 'register_options' ) );
23
  add_action( 'admin_init', array( $this, 'update_plugin' ), 9 );
24
  add_action( 'admin_init', array( $this, 'admin_page_redirect' ), 20 );
25
+ add_action( 'admin_init', array( $this, 'process_actions' ), 20 );
26
  add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
27
  add_action( 'admin_notices', array( $this, 'settings_errors' ) );
28
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
45
  'full_name' => __( 'string', 'iubenda' ),
46
  // 'verified' => __( 'boolean', 'iubenda' ),
47
  );
48
+
49
  $this->legal_notices = array(
50
  'privacy_policy',
51
  'cookie_policy',
67
  )
68
  );
69
 
70
+ $this->tag_types = array(
71
+ 0 => __( 'Not set', 'iubenda' ),
72
+ 1 => __( 'Strictly necessary', 'iubenda' ),
73
+ 2 => __( 'Basic interactions & functionalities', 'iubenda' ),
74
+ 3 => __( 'Experience enhancement', 'iubenda' ),
75
+ 4 => __( 'Analytics', 'iubenda' ),
76
+ 5 => __( 'Targeting & Advertising', 'iubenda' )
77
+ );
78
+
79
  $links = array(
80
  'en' => array(
81
  'iab' => 'https://www.iubenda.com/en/help/7440-enable-preference-management-iab-framework',
127
  add_settings_field( 'iub_output_feed', __( 'RSS feed', 'iubenda' ), array( $this, 'iub_output_feed' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
128
  add_settings_field( 'iub_output_post', __( 'POST requests', 'iubenda' ), array( $this, 'iub_output_post' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
129
  add_settings_field( 'iub_menu_position', __( 'Menu position', 'iubenda' ), array( $this, 'iub_menu_position' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
130
+ add_settings_field( 'iub_amp_support', __( 'Google AMP', 'iubenda' ), array( $this, 'iub_amp_support' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
131
  add_settings_field( 'iub_deactivation', __( 'Deactivation', 'iubenda' ), array( $this, 'iub_deactivation' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
132
 
133
  // forms list
323
 
324
  // multilang support
325
  if ( ! empty( iubenda()->languages ) ) {
326
+ foreach ( iubenda()->languages as $lang_id => $lang_name ) {
327
+ $code = get_option( 'iubenda-code-' . $lang_id );
328
 
329
  if ( ! empty( $code ) ) {
330
+ $options['code_' . $lang_id] = $code;
331
 
332
+ delete_option( 'iubenda-code-' . $lang_id );
333
  }
334
  }
335
  }
351
  }
352
 
353
  $tab_key = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'cs';
354
+
355
+ // get redirect url
356
+ if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
357
+ // sub menu
358
+ $redirect_to = admin_url( 'options-general.php?page=iubenda&tab=' . $tab_key );
359
+ } else {
360
+ // top menu
361
+ $redirect_to = admin_url( 'admin.php?page=iubenda&tab=' . $tab_key );
362
+ }
363
  ?>
364
  <div class="wrap">
365
 
401
  </div>
402
 
403
  <?php
404
+ // add per-purpose notice
405
+ if ( $tab_key === 'cs' && iubenda()->options['cs']['skip_parsing'] ) {
406
+ $iubenda_code = '';
407
+
408
+ if ( iubenda()->multilang === true && defined( 'ICL_LANGUAGE_CODE' ) && isset( iubenda()->options['cs']['code_' . ICL_LANGUAGE_CODE] ) ) {
409
+ $iubenda_code = iubenda()->options['cs']['code_' . ICL_LANGUAGE_CODE];
410
+
411
+ // no code for current language, use default
412
+ if ( ! $iubenda_code )
413
+ $iubenda_code = iubenda()->options['cs']['code_default'];
414
+ } else
415
+ $iubenda_code = iubenda()->options['cs']['code_default'];
416
+
417
+ $per_purpose_enabled = preg_match( '/(?:"|\')perPurposeConsent(?:"|\')\: *(?:"|\'*)true(?:"|\'*)/', $iubenda_code );
418
+ $reject_enabled = preg_match( '/(?:"|\')rejectButtonDisplay(?:"|\')\: *(?:"|\'*)true(?:"|\'*)/', $iubenda_code );
419
+
420
+ if ( $per_purpose_enabled || $reject_enabled )
421
+ $this->add_notice( 'iub_per_purpose_enabled', sprintf( __( 'If you are using per-purpose script blocking or Reject option please disable the "Leave scripts untouched on the page if the user has already given consent" option. <a href="%s" target="_self">Disable now</a>', 'iubenda' ), esc_url( add_query_arg( 'action', 'disable_skip_parsing', $redirect_to ) ) ), 'notice' );
422
+ }
423
+
424
  // render custom notices
425
  $this->print_notices();
426
  ?>
553
  </div>
554
  <div id="contextual-help-tabs-wrap-2" class="contextual-help-tabs-wrap">
555
  <div id="tab-panel-scripts" class="help-tab-content active">
556
+ <p class="description">' . __( 'Provide a list of custom scripts you’d like to block and assign their purpose.', 'iubenda' ) . '</p>
557
+ <div id="custom-script-field-template" class="template-field" style="display: none;">
558
+ <input type="text" class="regular-text" value="" name="iubenda_cookie_law_solution[custom_scripts][script][]" placeholder="' . __( 'Enter custom script', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'script', 0 ) . ' <a href="#" class="remove-custom-script-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
559
+ </div>';
560
+
561
+ if ( ! empty( iubenda()->options['cs']['custom_scripts'] ) ) {
562
+ foreach ( iubenda()->options['cs']['custom_scripts'] as $script => $type ) {
563
+ echo '
564
+ <div class="custom-script-field">
565
+ <input type="text" class="regular-text" value="' . esc_attr( $script ) . '" name="iubenda_cookie_law_solution[custom_scripts][script][]" placeholder="' . __( 'Enter custom script', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'script', $type ) . ' <a href="#" class="remove-custom-script-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
566
+ </div>';
567
+ }
568
+ }
569
+
570
+ echo '
571
+ <a href="#" class="add-custom-script-field button-secondary">Add New Script</a>
572
  </div>
573
  <div id="tab-panel-iframes" class="help-tab-content">
574
+ <p class="description">' . __( 'Provide a list of custom iframes you’d like to block and assign their purpose. ', 'iubenda' ) . '</p>
575
+ <div id="custom-iframe-field-template" class="template-field" style="display: none;">
576
+ <input type="text" class="regular-text" value="" name="iubenda_cookie_law_solution[custom_iframes][iframe][]" placeholder="' . __( 'Enter custom iframe', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'iframe', 0 ) . ' <a href="#" class="remove-custom-iframe-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
577
+ </div>';
578
+
579
+ if ( ! empty( iubenda()->options['cs']['custom_iframes'] ) ) {
580
+ foreach ( iubenda()->options['cs']['custom_iframes'] as $iframe => $type ) {
581
+ echo '
582
+ <div class="custom-iframe-field">
583
+ <input type="text" class="regular-text" value="' . esc_attr( $iframe ) . '" name="iubenda_cookie_law_solution[custom_iframes][iframe][]" placeholder="' . __( 'Enter custom iframe', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'iframe', $type ) . ' <a href="#" class="remove-custom-iframe-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
584
+ </div>';
585
+ }
586
+ }
587
+
588
+ echo '
589
+ <a href="#" class="add-custom-iframe-field button-secondary">Add New Iframe</a>
590
  </div>
591
  </div>
592
  </div>
593
  </div>';
594
  }
595
 
596
+ /**
597
+ * Prepare tag types select.
598
+ *
599
+ * @param string $type
600
+ * @param int $selected
601
+ * @return string
602
+ */
603
+ function render_tag_types( $type, $selected ) {
604
+ $html = '<select name="iubenda_cookie_law_solution[custom_' . $type . 's][type][]">';
605
+
606
+ foreach ( $this->tag_types as $tag_id => $tag_name ) {
607
+ $html .= '<option value="' . esc_attr( $tag_id ) . '" ' . selected( $selected, $tag_id, false ) . '>' . esc_html( $tag_name ) . '</option>';
608
+ }
609
+
610
+ return $html . '</select>';
611
+ }
612
+
613
  /**
614
  * Parsing option.
615
  *
618
  public function iub_parse() {
619
  echo '
620
  <div id="iub_parse_container">
621
+ <label><input id="iub_parse" type="checkbox" name="iubenda_cookie_law_solution[parse]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['parse'], false ) . '/>' . __( 'Automatically block scripts detected by the plugin', 'iubenda' ) . '</label>
622
  <p class="description">' . '(' . sprintf( __( "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of detected scripts.", 'iubenda' ), $this->links['documentation'] ) . ')' . '</p>
623
  <div id="iub_parser_engine_container"' . ( iubenda()->options['cs']['parse'] === false ? ' style="display: none;"' : '' ) . '>
624
  <div>
628
  </div>
629
  <div>
630
  <label><input id="iub_skip_parsing" type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['skip_parsing'], false ) . '/>' . __( 'Leave scripts untouched on the page if the user has already given consent', 'iubenda' ) . '</label>
631
+ <p class="description">(' . __( "improves performance, highly recommended, to be deactivated only if your site uses a caching system or if you're collecting per-category consent.", 'iubenda' ) . ')</p>
632
  </div>
633
  </div>
634
  </div>';
683
  <p class="description">' . __( 'Select whether to display iubenda in a top admin menu or the Settings submenu.', 'iubenda' ) . '</p>
684
  </div>';
685
  }
686
+
687
+ /**
688
+ * Google AMP support option.
689
+ *
690
+ * @return mixed
691
+ */
692
+ public function iub_amp_support() {
693
+ echo '
694
+ <div id="iub_amp_support_container">
695
+ <label><input id="iub_amp_support" type="checkbox" name="iubenda_cookie_law_solution[amp_support]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['amp_support'], false ) . '/>' . __( 'Enable Google AMP support.', 'iubenda' ) . '</label>
696
+ <p class="description">' . sprintf( __( 'This feature enables iubenda on AMP pages via the <a href="%s" target="_blank">AMP</a> and <a href="%s" target="_blank">AMP for WP</a> plugins. AMP requires specific configuration parameters and a page hosted on your domain where the configuration is loaded from. <a href="%s" target="_blank">Learn more on iubenda and AMP</a>.', 'iubenda' ), 'https://wordpress.org/plugins/amp/', 'https://wordpress.org/plugins/accelerated-mobile-pages/', 'https://www.iubenda.com/en/help/3182-cookie-solution-amp#wordpress' ) . '</p>
697
+ <div id="iub_amp_options_container"' . ( iubenda()->options['cs']['amp_support'] === false ? ' style="display: none;"' : '' ) . '>
698
+ <div>
699
+ <label><input id="iub_amp_source-local" class="iub_amp_source" type="radio" name="iubenda_cookie_law_solution[amp_source]" value="local" ' . checked( 'local', iubenda()->options['cs']['amp_source'], false ) . ' />' . __( 'Auto-generated configuration file', 'iubenda' ) . '</label>
700
+ <label><input id="iub_amp_source-remote" class="iub_amp_source" type="radio" name="iubenda_cookie_law_solution[amp_source]" value="remote" ' . checked( 'remote', iubenda()->options['cs']['amp_source'], false ) . ' />' . __( 'Custom configuration file', 'iubenda' ) . '</label>
701
+ <p class="description">' . __( 'Select the iubenda AMP configuration file location.', 'iubenda' ) . '</p>
702
+ </div>
703
+ <div id="iub_amp_template-local"' . ( iubenda()->options['cs']['amp_source'] === 'remote' ? ' style="display: none;"' : '' ) . '>';
704
+ if ( empty( iubenda()->options['cs']['amp_template_done'] ) ) {
705
+ echo '
706
+ <p class="description">' . __( 'No file available. Save changes to generate iubenda AMP configuration file.', 'iubenda' ) . '</p>';
707
+ } else {
708
+ // multilang support
709
+ if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
710
+ foreach ( iubenda()->languages as $lang_id => $lang_name ) {
711
+ echo $lang_name . ':
712
+ <a href="' . iubenda()->AMP->get_amp_template_url( $lang_id ) . '" target="_blank">' . iubenda()->AMP->get_amp_template_url( $lang_id ) . '</a><br />';
713
+ }
714
+ } else {
715
+ echo '
716
+ <a href="' . iubenda()->AMP->get_amp_template_url() . '" target="_blank">' . iubenda()->AMP->get_amp_template_url() . '</a>';
717
+ }
718
+ }
719
+ echo '
720
+ </div>
721
+ <div id="iub_amp_template-remote"' . ( iubenda()->options['cs']['amp_source'] === 'local' ? ' style="display: none;"' : '' ) . '>';
722
+
723
+ // multilang support
724
+ if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
725
+ foreach ( iubenda()->languages as $lang_id => $lang_name ) {
726
+ echo $lang_name . ':
727
+ <label><input id="iub_amp_template-' . $lang_id . '" type="text" class="regular-text" name="iubenda_cookie_law_solution[amp_template][' . $lang_id . ']" value="' . ( isset( iubenda()->options['cs']['amp_template'][$lang_id] ) ? esc_url( iubenda()->options['cs']['amp_template'][$lang_id] ) : '' ) . '" /></label><br />';
728
+ }
729
+ } else {
730
+ echo '
731
+ <label><input id="iub_amp_template" type="text" class="regular-text" name="iubenda_cookie_law_solution[amp_template]" value="' . ( isset( iubenda()->options['cs']['amp_template'] ) ? esc_url( iubenda()->options['cs']['amp_template'] ) : '' ) . '" /></label>';
732
+ }
733
+ echo '
734
+ <p class="description">' . __( 'If you\'re experiencing issues with AMP setup download the generated iubenda AMP configuration file, upload it to any SSL server and paste the file link to the field above.', 'iubenda' ) . '</p>
735
+ </div>
736
+ <p class="description">' . sprintf( __( 'Seeing the AMP cookie notice when testing from Google but not when visiting your AMP pages directly? <a href="%s" target="_blank">Learn how to fix it</a>.', 'iubenda' ), 'https://www.iubenda.com/en/help/3182-cookie-solution-amp#amp-domain' ) . '</p>
737
+ </div>
738
+ </div>';
739
+ }
740
 
741
  /**
742
  * Deactivation option.
1165
  $input['output_feed'] = (bool) isset( $input['output_feed'] );
1166
  $input['output_post'] = (bool) isset( $input['output_post'] );
1167
  $input['menu_position'] = isset( $input['menu_position'] ) && in_array( $input['menu_position'], array( 'topmenu', 'submenu' ) ) ? $input['menu_position'] : iubenda()->defaults['cs']['menu_position'];
1168
+ $input['amp_support'] = (bool) isset( $input['amp_support'] );
1169
  $input['deactivation'] = (bool) isset( $input['deactivation'] );
1170
 
1171
  // multilang support
1172
  if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
1173
+ $iubenda_code = array();
1174
+
1175
  foreach ( iubenda()->languages as $lang_id => $lang_name ) {
1176
+ $input['code_' . $lang_id] = $iubenda_code[$lang_id] = ! empty( $input['code_' . $lang_id] ) ? iubenda()->parse_code( $input['code_' . $lang_id] ) : '';
1177
 
1178
  // handle default lang too
1179
  if ( $lang_id == iubenda()->lang_default ) {
1180
  $input['code_default'] = ! empty( $input['code_' . $lang_id] ) ? iubenda()->parse_code( $input['code_' . $lang_id] ) : iubenda()->options['cs']['code_default'];
1181
  }
1182
  }
1183
+ } else {
1184
+ $iubenda_code = '';
1185
+
1186
+ $input['code_default'] = $iubenda_code = ! empty( $input['code_default'] ) ? iubenda()->parse_code( $input['code_default'] ) : '';
1187
+ }
1188
+
1189
+ // generate amp template file
1190
+ if ( isset( $input['amp_support'] ) ) {
1191
+ $template_done = false;
1192
+
1193
+ if ( ! empty( $iubenda_code ) ) {
1194
+ if ( is_array( $iubenda_code ) ) {
1195
+ $template_done = array();
1196
+
1197
+ foreach ( $iubenda_code as $lang => $code ) {
1198
+ $template_done[$lang] = (bool) iubenda()->AMP->generate_amp_template( $code, $lang );
1199
+ }
1200
+ } else {
1201
+ $template_done = (bool) iubenda()->AMP->generate_amp_template( $iubenda_code );
1202
+ }
1203
+ }
1204
+
1205
+ $input['amp_template_done'] = $template_done;
1206
+
1207
+ if ( is_array( $input['amp_template'] ) ) {
1208
+ foreach ( $input['amp_template'] as $lang => $template ) {
1209
+ $input['amp_template'][$lang] = esc_url( $template );
1210
+ }
1211
+ } else {
1212
+ $input['amp_template'] = esc_url( $input['amp_template'] );
1213
+ }
1214
+ }
1215
 
1216
  // scripts
1217
+ if ( ! empty( $input['custom_scripts'] ) && ! empty( $input['custom_scripts']['script'] ) && ! empty( $input['custom_scripts']['type'] ) ) {
1218
+ $scripts = array();
1219
 
1220
+ // first field is template
1221
+ if ( count( $input['custom_scripts']['script'] ) > 1 ) {
1222
+ foreach ( $input['custom_scripts']['script'] as $number => $script ) {
1223
+ $trimmed = trim( $script );
1224
+
1225
+ if ( $trimmed !== '' )
1226
+ $scripts[$trimmed] = (int) $input['custom_scripts']['type'][$number];
1227
+ }
1228
+ }
1229
+
1230
+ $input['custom_scripts'] = $scripts;
1231
  } else
1232
  $input['custom_scripts'] = array();
1233
 
1234
  // iframes
1235
+ if ( ! empty( $input['custom_iframes'] ) && ! empty( $input['custom_iframes']['iframe'] ) && ! empty( $input['custom_iframes']['type'] ) ) {
1236
+ $iframes = array();
1237
 
1238
+ // first field is template
1239
+ if ( count( $input['custom_iframes']['iframe'] ) > 1 ) {
1240
+ foreach ( $input['custom_iframes']['iframe'] as $number => $iframe ) {
1241
+ $trimmed = trim( $iframe );
1242
+
1243
+ if ( $trimmed !== '' )
1244
+ $iframes[$trimmed] = (int) $input['custom_iframes']['type'][$number];
1245
+ }
1246
+ }
1247
+
1248
+ $input['custom_iframes'] = $iframes;
1249
  } else
1250
  $input['custom_iframes'] = array();
1251
 
1304
 
1305
  if ( ! $page )
1306
  return;
1307
+
1308
+ // get redirect url
1309
+ if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
1310
+ // sub menu
1311
+ $redirect_to = admin_url( 'options-general.php?page=iubenda&tab=' . $tab_key );
1312
+ } else {
1313
+ // top menu
1314
+ $redirect_to = admin_url( 'admin.php?page=iubenda&tab=' . $tab_key );
1315
+ }
1316
 
1317
  // add comments cookie option notice
1318
  if ( $tab_key != 'cs' && ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
1319
  $cookies_enabled = get_option( 'show_comments_cookies_opt_in' );
1320
 
1321
  if ( ! $cookies_enabled ) {
1322
+ $this->add_notice( 'iub_comment_cookies_disabled', sprintf( __( 'Please enable comments cookies opt-in checkbox in the <a href="%s" target="_blank">Discussion settings</a>.', 'iubenda' ), esc_url( admin_url( 'options-discussion.php' ) ) ), 'notice' );
1323
  }
1324
  }
1325
 
1331
 
1332
  // new forms notice
1333
  if ( ! empty( $result['new'] ) )
1334
+ $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form detected successfully.', '%d forms detected successfully.', count( $result['new'] ), 'iubenda' ), $result ), 'success' );
1335
 
1336
  // forms changed notice
1337
  if ( ! empty( $result['updated'] ) )
1338
+ $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form change detected.', '%d form changes detected.', count( $result['updated'] ), 'iubenda' ), $result ), 'success' );
1339
 
1340
  // no changes notice
1341
  if ( empty( $result['new'] ) && empty( $result['updated'] ) )
1342
+ $this->add_notice( 'iub_autodetect_success', __( 'No forms or form changes detected.', 'iubenda' ), 'error' );
 
 
 
 
 
 
 
 
1343
 
1344
  // make sure it's current host location
1345
  wp_safe_redirect( $redirect_to );
1399
 
1400
  // bail if empty fields
1401
  if ( empty( $subject ) || empty( $preferences ) ) {
1402
+ $this->add_notice( 'iub_form_fields_missing', __( 'Form saving failed. Please fill the Subject and Preferences fields.', 'iubenda' ), 'error' );
1403
  return;
1404
  }
1405
 
1423
  if ( $result ) {
1424
  // form save, inform about form status update
1425
  if ( empty( $form->form_subject ) && empty( $form->form_preferences ) ) {
1426
+ $this->add_notice( 'iub_form_saved', __( 'Form saved successfully - form status changed to Mapped.', 'iubenda' ), 'success' );
1427
  // form update
1428
  } else {
1429
+ $this->add_notice( 'iub_form_updated', __( 'Form updated successfully.', 'iubenda' ), 'success' );
1430
  }
1431
  } else {
1432
+ $this->add_notice( 'iub_form_failed', __( 'Form saving failed.', 'iubenda' ), 'error' );
1433
  }
1434
 
1435
  break;
1446
  $result = iubenda()->forms->delete_form( $id );
1447
 
1448
  if ( $result )
1449
+ $this->add_notice( 'iub_form_deleted', __( 'Form deleted successfully.', 'iubenda' ), 'success' );
1450
  else
1451
+ $this->add_notice( 'iub_form_delete_failed', __( 'Form delete failed.', 'iubenda' ), 'error' );
 
 
1452
 
1453
  // make sure it's current host location
1454
  wp_safe_redirect( $redirect_to );
1455
+ exit;
1456
+
1457
+ break;
1458
+
1459
+ case 'disable_skip_parsing' :
1460
+
1461
+ // disable skip parsing option
1462
+ $options = iubenda()->options['cs'];
1463
+ $options['skip_parsing'] = false;
1464
+
1465
+ update_option( 'iubenda_cookie_law_solution', $options );
1466
+
1467
+ $this->add_notice( 'iub_settings_updated', __( 'Settings saved.', 'iubenda' ), 'success' );
1468
+
1469
+ // make sure it's current host location
1470
+ wp_safe_redirect( $redirect_to );
1471
+ exit;
1472
+
1473
  break;
1474
 
1475
  default :
iubenda-cookie-class/README.md CHANGED
@@ -98,6 +98,13 @@ These operations take place in accordance with the rules explained in [this guid
98
 
99
  ## Changelog
100
 
 
 
 
 
 
 
 
101
  ##### 3.4.0
102
  * New: Introducing wildcard support for scripts and iframes
103
 
98
 
99
  ## Changelog
100
 
101
+ ##### 4.1.0
102
+ * New: Google AMP support
103
+
104
+ ##### 4.0.0
105
+ * New: Per-purpose script blocking support
106
+ * New: Reject button support
107
+
108
  ##### 3.4.0
109
  * New: Introducing wildcard support for scripts and iframes
110
 
iubenda-cookie-class/iubenda.class.php CHANGED
@@ -3,9 +3,9 @@
3
  * iubenda.class.php
4
  *
5
  * @author iubenda s.r.l
6
- * @copyright 2018-2019, iubenda s.r.l
7
  * @license GNU/GPL
8
- * @version 3.4.0
9
  * @deprecated
10
  *
11
  * This program is free software: you can redistribute it and/or modify
@@ -27,118 +27,117 @@ class iubendaParser {
27
  // variables
28
  const IUB_REGEX_PATTERN = '/<!--\s*IUB_COOKIE_POLICY_START\s*-->(.*?)<!--\s*IUB_COOKIE_POLICY_END\s*-->/s';
29
  const IUB_REGEX_PATTERN_2 = '/<!--\s*IUB-COOKIE-BLOCK-START\s*-->(.*?)<!--\s*IUB-COOKIE-BLOCK-END\s*-->/s';
 
30
  const IUB_REGEX_SKIP_PATTERN = '/<!--\s*IUB-COOKIE-BLOCK-SKIP-START\s*-->(.*?)<!--\s*IUB-COOKIE-BLOCK-SKIP-END\s*-->/s';
31
 
32
  // scripts
33
- public $auto_script_tags = array(
34
- // google
35
- 'apis.google.com/js/plusone.js',
36
- 'apis.google.com/js/client/plusone.js',
37
- 'apis.google.com/js/platform.js',
38
- 'apis.google.com/js/api.js', // oauth
39
- 'cse.google.com/cse.js', // site search
40
- 'googlesyndication.com/pagead/js/adsbygoogle.js',
41
- 'googlesyndication.com/pagead/show_ads.js',
42
- 'googleadservices.com/pagead/conversion.js',
43
- 'googletagmanager.com/gtm.js',
44
- 'www.googletagmanager.com/gtag/js',
45
- 'google.com/recaptcha/',
46
- 'www.youtube.com/iframe_api',
47
- 'youtu.be',
48
- 'window.adsbygoogle',
49
- // twitter
50
- 'platform.twitter.com/widgets.js',
51
- 'static.ads-twitter.com',
52
- // facebook
53
- 'connect.facebook.net',
54
- // instagram
55
- 'instawidget.net/js/instawidget.js',
56
- // sharethis
57
- 'sharethis.com/button/buttons.js',
58
- // addthis
59
- 'addthis.com/js/',
60
- // disqus
61
- 'disqus.com/embed.js',
62
- // linkedin
63
- 'platform.linkedin.com/in.js',
64
- // scorecardresearch
65
- 'scorecardresearch.com/beacon.js',
66
- // neodata
67
- 'neodatagroup.com',
68
- // criteo
69
- 'static.criteo.net/js/',
70
- // adagio
71
- 'adagionet.com/uploads/js/sipra.js',
72
- // rainbowtgx
73
- 'cdn-wx.rainbowtgx.com/rtgx.js',
74
- // pinterest
75
- 'pinterest.com/js/pinit.js',
76
- // linkpulse
77
- 'lp4.io',
78
- // optimizely
79
- 'cdn.optimizely.com/js/',
80
- // getsatisfaction
81
- 'loader.engage.gsfn.us/loader.js',
82
- // outbrain
83
- 'outbrain.js',
84
- // headway
85
- 'headwayapp.co/widget.js',
86
- // codepen
87
- 'codepen.io',
88
- // freshchat
89
- 'wchat.freshchat.com',
90
- // uservoice
91
- 'widget.uservoice.com',
92
- 'UserVoice.push',
93
- // adroll
94
- 's.adroll.com',
95
- // olark
96
- 'static.olark.com/jsclient/loader0.js',
97
- // cxense
98
- 'scdn.cxense.com',
99
- // segment
100
- 'cdn.segment.io/analytics.js',
101
- 'cdn.segment.com/analytics.js',
102
- // kissmetrics
103
- 'i.kissmetrics.com/i.js',
104
- // mixpanel
105
- 'cdn.mxpnl.com',
106
- // pingdom
107
- 'rum-static.pingdom.net/prum.min.js',
108
- // bing
109
- 'bat.bing.com',
110
- // elevio
111
- 'cdn.elev.io',
112
- // paypal
113
- 'paypalobjects.com/js/external/api.js', // paypal login
114
- 'paypalobjects.com/api/checkout.js', // paypal checkout
115
- );
116
 
117
  // iframes
118
- public $auto_iframe_tags = array(
119
- // google
120
- 'apis.google.com',
121
- 'maps.google.it/maps',
122
- 'maps.google.com/maps',
123
- 'www.google.com/maps/embed',
124
- 'googletagmanager.com/ns.html',
125
- 'window.adsbygoogle',
126
- // youtube
127
- 'youtube.com',
128
- // twitter
129
- 'platform.twitter.com',
130
- // facebook
131
- 'www.facebook.com/plugins/like.php',
132
- 'www.facebook.com/*/plugins/like.php',
133
- 'www.facebook.com/plugins/likebox.php',
134
- 'www.facebook.com/*/plugins/likebox.php',
135
- // vimeo
136
- 'player.vimeo.com',
137
- // 4w
138
- '4wnet.com'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  );
140
 
141
  private $type = 'page';
 
142
  public $iub_comments_detected = array();
143
  public $skipped_comments_detected = array();
144
  public $iframes_skipped = array();
@@ -162,18 +161,11 @@ class iubendaParser {
162
  * @param array $args
163
  */
164
  public function __construct( $content_page = '', $args = array() ) {
165
- // check scripts
166
- if ( ! empty( $args['scripts'] ) && is_array( $args['scripts'] ) ) {
167
- $this->auto_script_tags = array_unique( array_merge( $this->auto_script_tags, $args['scripts'] ) );
168
- }
169
-
170
- // check iframes
171
- if ( ! empty( $args['iframes'] ) && is_array( $args['iframes'] ) ) {
172
- $this->auto_iframe_tags = array_unique( array_merge( $this->auto_iframe_tags, $args['iframes'] ) );
173
- }
174
-
175
  // valid type?
176
  $this->type = ! empty( $args['type'] ) && in_array( $args['type'], array( 'page', 'faster' ), true ) ? $args['type'] : 'page';
 
 
 
177
 
178
  // load Simple HTML DOM if needed
179
  if ( ! function_exists( 'file_get_html' ) || ! function_exists( 'str_get_html' ) )
@@ -182,6 +174,49 @@ class iubendaParser {
182
  // set content
183
  $this->original_content_page = $content_page;
184
  $this->content_page = $content_page;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  }
186
 
187
  /**
@@ -199,45 +234,123 @@ class iubendaParser {
199
  * @return boolean
200
  */
201
  static function consent_given() {
 
 
202
  foreach ( $_COOKIE as $key => $value ) {
203
- if ( self::strpos_array( $key, array( '_iub_cs-s', '_iub_cs' ) ) )
204
- return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  }
206
 
207
- return false;
208
  }
209
 
210
  /**
211
- * Static, utility function: strpos for array wilth wildcard support
212
  *
213
- * @param type $haystack
214
- * @param type $needle
215
- * @return boolean
216
  */
217
- static function strpos_array( $haystack, $needle ) {
218
- if ( empty( $haystack ) || empty( $needle ) )
219
- return false;
220
 
221
- $needle = ! is_array( $needle ) ? array( $needle ) : $needle;
222
-
223
- foreach ( $needle as $need ) {
224
- // wildcard?
225
- if ( strpos( $need, '/*/' ) !== false ) {
226
- // strtok - removes query string
227
- // str_replace - removes double slashes // from url
228
- // preg_replace - removes http or https from url
229
- $haystack = strtok( str_replace( '//', '', preg_replace( "(^https?://)", "", $haystack ) ), '?' );
230
-
231
- if ( fnmatch( $need, $haystack ) !== false )
232
- return true;
233
- // regular
234
- } else {
235
- if ( strpos( $haystack, $need ) !== false )
236
- return true;
237
  }
238
  }
239
-
240
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  }
242
 
243
  /**
@@ -246,7 +359,7 @@ class iubendaParser {
246
  * @param mixed $content
247
  * @return mixed
248
  */
249
- public function create_tags( $content ) {
250
  $elements = $content->find( "*" );
251
  $js = '';
252
 
@@ -258,6 +371,13 @@ class iubendaParser {
258
 
259
  switch ( $e->tag ) {
260
  case 'script':
 
 
 
 
 
 
 
261
  $class = $e->class;
262
  $e->class = $class . ' ' . $this->iub_class;
263
  $e->type = 'text/plain';
@@ -265,6 +385,13 @@ class iubendaParser {
265
  break;
266
 
267
  case 'iframe':
 
 
 
 
 
 
 
268
  $new_src = $this->iub_empty;
269
  $class = $e->class;
270
  $e->suppressedsrc = $e->src;
@@ -274,7 +401,7 @@ class iubendaParser {
274
  break;
275
 
276
  default:
277
- $js = $e->outertext;
278
  break;
279
  }
280
  }
@@ -301,11 +428,6 @@ class iubendaParser {
301
 
302
  switch ( $element->tag ) {
303
  case 'script':
304
- $class = trim( $element->class );
305
- $element->class = ( $class !== '' ? $class . ' ' : '' ) . $this->iub_class_skip;
306
- $js .= $element->outertext;
307
- break;
308
-
309
  case 'iframe':
310
  $class = trim( $element->class );
311
  $element->class = ( $class !== '' ? $class . ' ' : '' ) . $this->iub_class_skip;
@@ -331,15 +453,18 @@ class iubendaParser {
331
  public function parse_scripts() {
332
  switch ( $this->type ) {
333
  case 'page':
334
- $html = str_get_html( $this->content_page, $lowercase = true, $force_tags_closed = true, $strip = false );
 
335
 
336
  if ( is_object( $html ) ) {
 
337
  $scripts = $html->find( 'script' );
338
 
339
  if ( is_array( $scripts ) ) {
340
  $count = count( $scripts );
341
  $class_skip = $this->iub_class_skip;
342
 
 
343
  for ( $j = 0; $j < $count; $j ++ ) {
344
  $s = $scripts[$j];
345
  $script_class = trim( $s->class );
@@ -360,8 +485,10 @@ class iubendaParser {
360
 
361
  if ( ! empty( $s->innertext ) ) {
362
  $this->scripts_inline_detected[] = $s->innertext;
 
 
363
 
364
- if ( self::strpos_array( $s->innertext, $this->auto_script_tags ) !== false ) {
365
  $class = $s->class;
366
  $s->class = $class . ' ' . $this->iub_class_inline;
367
  $s->type = 'text/plain';
@@ -372,11 +499,21 @@ class iubendaParser {
372
 
373
  if ( $src ) {
374
  $this->scripts_detected[] = $src;
 
 
375
 
376
- if ( self::strpos_array( $src, $this->auto_script_tags ) !== false ) {
377
  $class = $s->class;
378
  $s->class = $class . ' ' . $this->iub_class;
379
  $s->type = 'text/plain';
 
 
 
 
 
 
 
 
380
  $this->scripts_converted[] = $src;
381
  }
382
  }
@@ -523,16 +660,30 @@ class iubendaParser {
523
  // add inline script as detected
524
  if ( ! empty( $script->nodeValue ) )
525
  $this->scripts_inline_detected[] = $script->nodeValue;
 
 
 
526
 
527
- if ( self::strpos_array( $src, $script_tags ) ) {
528
  $script->setAttribute( 'type', 'text/plain' );
529
  $script->setAttribute( 'class', $script->getAttribute( 'class' ) . ' ' . $class );
 
 
 
 
 
 
 
530
 
531
  // add script as converted
532
  $this->scripts_converted[] = $src;
533
- } elseif ( self::strpos_array( $script->nodeValue, $script_tags ) ) {
534
  $script->setAttribute( 'type', 'text/plain' );
535
  $script->setAttribute( 'class', $script->getAttribute( 'class' ) . ' ' . $class_inline );
 
 
 
 
536
 
537
  // add inline script as converted
538
  $this->scripts_inline_converted[] = $script->nodeValue;
@@ -560,7 +711,7 @@ class iubendaParser {
560
  public function parse_iframes() {
561
  switch ( $this->type ) {
562
  case 'page':
563
- $html = str_get_html( $this->content_page, $lowercase = true, $force_tags_closed = true, $strip = false );
564
 
565
  if ( is_object( $html ) ) {
566
  $iframes = $html->find( 'iframe' );
@@ -587,11 +738,21 @@ class iubendaParser {
587
  $src = $i->src;
588
  $this->iframes_detected[] = $src;
589
 
590
- if ( self::strpos_array( $src, $this->auto_iframe_tags ) !== false ) {
 
 
591
  $class = $i->class;
592
  $i->suppressedsrc = $src;
593
  $i->src = $this->iub_empty;
594
  $i->class = $class . ' ' . $this->iub_class;
 
 
 
 
 
 
 
 
595
  $this->iframes_converted[] = $src;
596
  }
597
  }
@@ -642,11 +803,20 @@ class iubendaParser {
642
 
643
  // add iframe as detected
644
  $this->iframes_detected[] = $src;
 
 
645
 
646
- if ( self::strpos_array( $src, $iframe_tags ) ) {
647
  $iframe->setAttribute( 'src', $empty );
648
  $iframe->setAttribute( 'suppressedsrc', $src );
649
  $iframe->setAttribute( 'class', $iframe_class . ' ' . $class );
 
 
 
 
 
 
 
650
 
651
  // add iframe as converted
652
  $this->iframes_converted[] = $src;
@@ -685,7 +855,7 @@ class iubendaParser {
685
  // get HTML dom from string
686
  $html = str_get_html( $scripts[1][$j], true, true, false );
687
 
688
- // skip scripts and iframes inside IUBENDAs comments
689
  $js_scripts[] = $this->skip_tags( $html );
690
  }
691
 
@@ -696,26 +866,40 @@ class iubendaParser {
696
  unset( $scripts );
697
 
698
  // block
699
- foreach ( array( 'IUB_REGEX_PATTERN', 'IUB_REGEX_PATTERN_2' ) as $pattern ) {
700
  preg_match_all( constant( 'self::' . $pattern ), $this->content_page, $scripts );
701
 
 
 
 
 
 
 
 
 
 
 
 
702
  // found any content?
703
- if ( is_array( $scripts[1] ) ) {
704
- $count = count( $scripts[1] );
705
  $js_scripts = array();
706
 
707
  for ( $j = 0; $j < $count; $j++ ) {
708
- $this->iub_comments_detected[] = $scripts[1][$j];
709
 
710
  // get HTML dom from string
711
- $html = str_get_html( $scripts[1][$j], $lowercase = true, $force_tags_closed = true, $strip = false );
 
 
 
712
 
713
  // convert scripts, iframes and other code inside IUBENDAs comment in text/plain to not generate cookies
714
- $js_scripts[] = $this->create_tags( $html );
715
  }
716
 
717
- if ( ( is_array( $scripts[1] ) && is_array( $js_scripts ) ) && ( $count >= 1 && count( $js_scripts ) >= 1 ) )
718
- $this->content_page = strtr( $this->content_page, array_combine( $scripts[1], $js_scripts ) );
719
  }
720
  }
721
  }
@@ -753,16 +937,88 @@ class iubendaParser {
753
  <script>
754
  var iCallback = function(){};
755
 
756
- if ('callback' in _iub.csConfiguration) {
757
- if ('onConsentGiven' in _iub.csConfiguration.callback)
758
  iCallback = _iub.csConfiguration.callback.onConsentGiven;
759
 
760
  _iub.csConfiguration.callback.onConsentGiven = function() {
761
  iCallback();
762
 
763
- jQuery('noscript._no_script_iub').each(function (a, b) { var el = jQuery(b); el.after(el.html()); });
764
  };
765
  };
766
  </script>";
767
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
768
  }
3
  * iubenda.class.php
4
  *
5
  * @author iubenda s.r.l
6
+ * @copyright 2018-2020, iubenda s.r.l
7
  * @license GNU/GPL
8
+ * @version 4.1.0
9
  * @deprecated
10
  *
11
  * This program is free software: you can redistribute it and/or modify
27
  // variables
28
  const IUB_REGEX_PATTERN = '/<!--\s*IUB_COOKIE_POLICY_START\s*-->(.*?)<!--\s*IUB_COOKIE_POLICY_END\s*-->/s';
29
  const IUB_REGEX_PATTERN_2 = '/<!--\s*IUB-COOKIE-BLOCK-START\s*-->(.*?)<!--\s*IUB-COOKIE-BLOCK-END\s*-->/s';
30
+ const IUB_REGEX_PURPOSE_PATTERN = '/<!--\s*IUB-COOKIE-BLOCK-START-PURPOSE-(\d+)\s*-->(.*?)<!--\s*IUB-COOKIE-BLOCK-END-PURPOSE-\d+\s*-->/s';
31
  const IUB_REGEX_SKIP_PATTERN = '/<!--\s*IUB-COOKIE-BLOCK-SKIP-START\s*-->(.*?)<!--\s*IUB-COOKIE-BLOCK-SKIP-END\s*-->/s';
32
 
33
  // scripts
34
+ public $auto_script_tags = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  // iframes
37
+ public $auto_iframe_tags = array();
38
+
39
+ // purposes
40
+ public $purposes = array();
41
+
42
+ // per-purpose scripts
43
+ public $script_tags = array(
44
+ // Strictly necessary
45
+ 1 => array(),
46
+ // Basic interactions & functionalities
47
+ 2 => array(
48
+ 'apis.google.com/js/api.js',
49
+ 'cse.google.com/cse.js',
50
+ 'googletagmanager.com/gtm.js',
51
+ 'loader.engage.gsfn.us/loader.js',
52
+ 'headwayapp.co/widget.js',
53
+ 'wchat.freshchat.com',
54
+ 'widget.uservoice.com',
55
+ 'UserVoice.push',
56
+ 'static.olark.com/jsclient/loader0.js',
57
+ 'cdn.elev.io',
58
+ 'paypalobjects.com/js/external/api.js',
59
+ 'paypalobjects.com/api/checkout.js'
60
+ ),
61
+ // Experience enhancement
62
+ 3 => array(
63
+ 'apis.google.com/js/plusone.js',
64
+ 'apis.google.com/js/client/plusone.js',
65
+ 'apis.google.com/js/platform.js',
66
+ 'www.youtube.com/iframe_api',
67
+ 'youtu.be',
68
+ 'platform.twitter.com/widgets.js',
69
+ 'instawidget.net/js/instawidget.js',
70
+ 'disqus.com/embed.js',
71
+ 'platform.linkedin.com/in.js',
72
+ 'pinterest.com/js/pinit.js',
73
+ 'codepen.io',
74
+ 'bat.bing.com'
75
+ ),
76
+ // Analytics
77
+ 4 => array(
78
+ 'sharethis.com/button/buttons.js',
79
+ 'addthis.com/js/',
80
+ 'scorecardresearch.com/beacon.js',
81
+ 'neodatagroup.com',
82
+ 'lp4.io',
83
+ 'cdn.optimizely.com/js/',
84
+ 'cdn.segment.io/analytics.js',
85
+ 'cdn.segment.com/analytics.js',
86
+ 'i.kissmetrics.com/i.js',
87
+ 'cdn.mxpnl.com',
88
+ 'rum-static.pingdom.net/prum.min.js'
89
+ ),
90
+ // Targeting & Advertising
91
+ 5 => array(
92
+ 'googlesyndication.com/pagead/js/adsbygoogle.js',
93
+ 'googlesyndication.com/pagead/show_ads.js',
94
+ 'googleadservices.com/pagead/conversion.js',
95
+ 'www.googletagmanager.com/gtag/js',
96
+ 'window.adsbygoogle',
97
+ 'static.ads-twitter.com',
98
+ 'connect.facebook.net',
99
+ 'static.criteo.net/js/',
100
+ 'adagionet.com/uploads/js/sipra.js',
101
+ 'cdn-wx.rainbowtgx.com/rtgx.js',
102
+ 'outbrain.js',
103
+ 's.adroll.com',
104
+ 'scdn.cxense.com'
105
+ )
106
+ );
107
+
108
+ // per-purpose iframes
109
+ public $iframe_tags = array(
110
+ // Strictly necessary
111
+ 1 => array(),
112
+ // Basic interactions & functionalities
113
+ 2 => array(
114
+ 'googletagmanager.com/ns.html'
115
+ ),
116
+ // Experience enhancement
117
+ 3 => array(
118
+ 'apis.google.com',
119
+ 'maps.google.it/maps',
120
+ 'maps.google.com/maps',
121
+ 'www.google.com/maps/embed',
122
+ 'youtube.com',
123
+ 'platform.twitter.com',
124
+ 'player.vimeo.com',
125
+ 'www.facebook.com/plugins/like.php',
126
+ 'www.facebook.com/*/plugins/like.php',
127
+ 'www.facebook.com/plugins/likebox.php',
128
+ 'www.facebook.com/*/plugins/likebox.php'
129
+ ),
130
+ // Analytics
131
+ 4 => array(),
132
+ // Targeting & Advertising
133
+ 5 => array(
134
+ 'window.adsbygoogle',
135
+ '4wnet.com'
136
+ )
137
  );
138
 
139
  private $type = 'page';
140
+ private $amp = false;
141
  public $iub_comments_detected = array();
142
  public $skipped_comments_detected = array();
143
  public $iframes_skipped = array();
161
  * @param array $args
162
  */
163
  public function __construct( $content_page = '', $args = array() ) {
 
 
 
 
 
 
 
 
 
 
164
  // valid type?
165
  $this->type = ! empty( $args['type'] ) && in_array( $args['type'], array( 'page', 'faster' ), true ) ? $args['type'] : 'page';
166
+
167
+ // amp support>
168
+ $this->amp = (bool) ( isset( $args['amp'] ) && $args['amp'] === true );
169
 
170
  // load Simple HTML DOM if needed
171
  if ( ! function_exists( 'file_get_html' ) || ! function_exists( 'str_get_html' ) )
174
  // set content
175
  $this->original_content_page = $content_page;
176
  $this->content_page = $content_page;
177
+
178
+ // get purposes
179
+ $this->purposes = self::get_purposes();
180
+
181
+ // check for additional scripts
182
+ if ( ! empty( $args['scripts'] ) && is_array( $args['scripts'] ) ) {
183
+ // array is not multidimensional, backward compatibility, so block it
184
+ if ( ! is_array( reset( $args['scripts'] ) ) ) {
185
+ $this->auto_script_tags = array_merge( $this->auto_script_tags, $args['scripts'] );
186
+ // array is multidimensional, assign per purpose
187
+ } else {
188
+ // block unassigned script
189
+ if ( array_key_exists( 0, $args['scripts'] ) ) {
190
+ $this->auto_script_tags = array_merge( $this->auto_script_tags, $args['scripts'][0] );
191
+ unset( $args['scripts'][0] );
192
+ }
193
+
194
+ $this->script_tags = $this->array_merge_custom( $this->script_tags, $args['scripts'] );
195
+ }
196
+ }
197
+
198
+ // check for additional iframes
199
+ if ( ! empty( $args['iframes'] ) && is_array( $args['iframes'] ) ) {
200
+ // array is not multidimensional, backward compatibility, so assign block it
201
+ if ( ! is_array( reset( $args['iframes'] ) ) ) {
202
+ $this->auto_iframe_tags = array_merge( $this->auto_iframe_tags, $args['iframes'] );
203
+ // array is multidimensional, assign per purpose
204
+ } else {
205
+ // block unassigned script
206
+ if ( array_key_exists( 0, $args['iframes'] ) ) {
207
+ $this->auto_iframe_tags = array_merge( $this->auto_iframe_tags, $args['iframes'][0] );
208
+ unset( $args['iframes'][0] );
209
+ }
210
+
211
+ $this->iframe_tags = $this->array_merge_custom( $this->iframe_tags, $args['iframes'] );
212
+ }
213
+ }
214
+
215
+ // get script tags to block
216
+ $this->auto_script_tags = array_unique( self::get_script_tags() );
217
+
218
+ // get iframes tags to block
219
+ $this->auto_iframe_tags = array_unique( self::get_iframe_tags() );
220
  }
221
 
222
  /**
234
  * @return boolean
235
  */
236
  static function consent_given() {
237
+ $consent_given = false;
238
+
239
  foreach ( $_COOKIE as $key => $value ) {
240
+ $found = self::strpos_array( $key, array( '_iub_cs-s', '_iub_cs' ) );
241
+
242
+ if ( $found !== false ) {
243
+ $consent_data = json_decode( stripslashes( $value ), true );
244
+
245
+ // read cookie value if given
246
+ if ( isset( $consent_data['consent'] ) && $consent_data['consent'] == true )
247
+ $consent_given = true;
248
+
249
+ // read purposes if given
250
+ if ( ! empty( $consent_data['purposes'] ) && is_array( $consent_data['purposes'] ) ) {
251
+ // all purposes accepted, consent given
252
+ if ( ! in_array( false, $consent_data['purposes'] ) )
253
+ $consent_given = true;
254
+ }
255
+ }
256
  }
257
 
258
+ return $consent_given;
259
  }
260
 
261
  /**
262
+ * Get user accepted purposes.
263
  *
264
+ * @return array
 
 
265
  */
266
+ static function get_purposes() {
267
+ $purposes = array();
 
268
 
269
+ if ( ! empty( $_COOKIE ) ) {
270
+ foreach ( $_COOKIE as $key => $value ) {
271
+ $found = self::strpos_array( $key, array( '_iub_cs-s', '_iub_cs' ) );
272
+
273
+ if ( $found !== false ) {
274
+ $consent_data = json_decode( $value, true );
275
+
276
+ // read purposes if given
277
+ if ( ! empty( $consent_data['purposes'] ) && is_array( $consent_data['purposes'] ) )
278
+ $purposes = $consent_data['purposes'];
279
+ }
 
 
 
 
 
280
  }
281
  }
282
+
283
+ return $purposes;
284
+ }
285
+
286
+ /**
287
+ * Get script tags to be blocked.
288
+ *
289
+ * @return array
290
+ */
291
+ private function get_script_tags() {
292
+ $tags = $this->auto_script_tags;
293
+
294
+ foreach ( $this->script_tags as $purpose_id => $tags_list ) {
295
+ // empty tags list, go to another
296
+ if ( empty( $tags_list ) )
297
+ continue;
298
+
299
+ // purposes available, filter per purpose
300
+ if ( ! empty( $this->purposes ) ) {
301
+ // don't block scripts unavailable in the user purposes
302
+ // if ( array_key_exists( $purpose_id, $this->purposes ) && $this->purposes[$purpose_id] == false ) {
303
+
304
+ // block scripts unavailable in the user purposes
305
+ if ( ! isset( $this->purposes[$purpose_id] ) || $this->purposes[$purpose_id] == false ) {
306
+ foreach ( $tags_list as $tag ) {
307
+ $tags[] = $tag;
308
+ }
309
+ }
310
+ // no purposes yet, just add all scripts
311
+ } else {
312
+ foreach ( $tags_list as $tag ) {
313
+ $tags[] = $tag;
314
+ }
315
+ }
316
+ }
317
+
318
+ return $tags;
319
+ }
320
+
321
+ /**
322
+ * Get iframe tags to be blocked.
323
+ *
324
+ * @return array
325
+ */
326
+ private function get_iframe_tags() {
327
+ $tags = $this->auto_iframe_tags;
328
+
329
+ foreach ( $this->iframe_tags as $purpose_id => $tags_list ) {
330
+ // empty tags list, go to another
331
+ if ( empty( $tags_list ) )
332
+ continue;
333
+
334
+ // purposes available, filter per purpose
335
+ if ( ! empty( $this->purposes ) ) {
336
+ // don't block iframes unavailable in the user purposes
337
+ // if ( array_key_exists( $purpose_id, $this->purposes ) && $this->purposes[$purpose_id] == false ) {
338
+
339
+ // block iframes unavailable in the user purposes
340
+ if ( ! isset( $this->purposes[$purpose_id] ) && $this->purposes[$purpose_id] == false ) {
341
+ foreach ( $tags_list as $tag ) {
342
+ $tags[] = $tag;
343
+ }
344
+ }
345
+ // no purposes yet, just add all scripts
346
+ } else {
347
+ foreach ( $tags_list as $tag ) {
348
+ $tags[] = $tag;
349
+ }
350
+ }
351
+ }
352
+
353
+ return $tags;
354
  }
355
 
356
  /**
359
  * @param mixed $content
360
  * @return mixed
361
  */
362
+ public function create_tags( $content, $args ) {
363
  $elements = $content->find( "*" );
364
  $js = '';
365
 
371
 
372
  switch ( $e->tag ) {
373
  case 'script':
374
+ if ( $args['pattern'] === 'IUB_REGEX_PURPOSE_PATTERN' )
375
+ $e->{'data-iub-purposes'} = $args['number'];
376
+
377
+ // AMP support
378
+ if ( $this->amp )
379
+ $e->{'data-block-on-consent'} = '_till_accepted';
380
+
381
  $class = $e->class;
382
  $e->class = $class . ' ' . $this->iub_class;
383
  $e->type = 'text/plain';
385
  break;
386
 
387
  case 'iframe':
388
+ if ( $args['pattern'] === 'IUB_REGEX_PURPOSE_PATTERN' )
389
+ $e->{'data-iub-purposes'} = $args['number'];
390
+
391
+ // AMP support
392
+ if ( $this->amp )
393
+ $e->{'data-block-on-consent'} = '_till_accepted';
394
+
395
  $new_src = $this->iub_empty;
396
  $class = $e->class;
397
  $e->suppressedsrc = $e->src;
401
  break;
402
 
403
  default:
404
+ $js .= $e->outertext;
405
  break;
406
  }
407
  }
428
 
429
  switch ( $element->tag ) {
430
  case 'script':
 
 
 
 
 
431
  case 'iframe':
432
  $class = trim( $element->class );
433
  $element->class = ( $class !== '' ? $class . ' ' : '' ) . $this->iub_class_skip;
453
  public function parse_scripts() {
454
  switch ( $this->type ) {
455
  case 'page':
456
+ // get page contents
457
+ $html = str_get_html( $this->content_page, true, true, false );
458
 
459
  if ( is_object( $html ) ) {
460
+ // get scripts
461
  $scripts = $html->find( 'script' );
462
 
463
  if ( is_array( $scripts ) ) {
464
  $count = count( $scripts );
465
  $class_skip = $this->iub_class_skip;
466
 
467
+ // loop through scripts
468
  for ( $j = 0; $j < $count; $j ++ ) {
469
  $s = $scripts[$j];
470
  $script_class = trim( $s->class );
485
 
486
  if ( ! empty( $s->innertext ) ) {
487
  $this->scripts_inline_detected[] = $s->innertext;
488
+
489
+ $found = self::strpos_array( $s->innertext, $this->auto_script_tags );
490
 
491
+ if ( $found !== false ) {
492
  $class = $s->class;
493
  $s->class = $class . ' ' . $this->iub_class_inline;
494
  $s->type = 'text/plain';
499
 
500
  if ( $src ) {
501
  $this->scripts_detected[] = $src;
502
+
503
+ $found = self::strpos_array( $src, $this->auto_script_tags );
504
 
505
+ if ( $found !== false ) {
506
  $class = $s->class;
507
  $s->class = $class . ' ' . $this->iub_class;
508
  $s->type = 'text/plain';
509
+
510
+ // add data-iub-purposes attribute
511
+ $s->{'data-iub-purposes'} = $this->recursive_array_search( $found, $this->script_tags );
512
+
513
+ // AMP support
514
+ if ( $this->amp )
515
+ $s->{'data-block-on-consent'} = '_till_accepted';
516
+
517
  $this->scripts_converted[] = $src;
518
  }
519
  }
660
  // add inline script as detected
661
  if ( ! empty( $script->nodeValue ) )
662
  $this->scripts_inline_detected[] = $script->nodeValue;
663
+
664
+ $found = self::strpos_array( $src, $script_tags );
665
+ $found_inline = self::strpos_array( $script->nodeValue, $script_tags );
666
 
667
+ if ( $found !== false ) {
668
  $script->setAttribute( 'type', 'text/plain' );
669
  $script->setAttribute( 'class', $script->getAttribute( 'class' ) . ' ' . $class );
670
+
671
+ // add data-iub-purposes attribute
672
+ $script->setAttribute( 'data-iub-purposes', $this->recursive_array_search( $found, $this->script_tags ) );
673
+
674
+ // AMP support
675
+ if ( $this->amp )
676
+ $script->setAttribute( 'data-block-on-consent', '_till_accepted' );
677
 
678
  // add script as converted
679
  $this->scripts_converted[] = $src;
680
+ } elseif ( $found_inline !== false ) {
681
  $script->setAttribute( 'type', 'text/plain' );
682
  $script->setAttribute( 'class', $script->getAttribute( 'class' ) . ' ' . $class_inline );
683
+
684
+ // AMP support
685
+ if ( $this->amp )
686
+ $script->setAttribute( 'data-block-on-consent', '_till_accepted' );
687
 
688
  // add inline script as converted
689
  $this->scripts_inline_converted[] = $script->nodeValue;
711
  public function parse_iframes() {
712
  switch ( $this->type ) {
713
  case 'page':
714
+ $html = str_get_html( $this->content_page, true, true, false );
715
 
716
  if ( is_object( $html ) ) {
717
  $iframes = $html->find( 'iframe' );
738
  $src = $i->src;
739
  $this->iframes_detected[] = $src;
740
 
741
+ $found = self::strpos_array( $src, $this->auto_iframe_tags );
742
+
743
+ if ( $found !== false ) {
744
  $class = $i->class;
745
  $i->suppressedsrc = $src;
746
  $i->src = $this->iub_empty;
747
  $i->class = $class . ' ' . $this->iub_class;
748
+
749
+ // add data-iub-purposes attribute
750
+ $i->{'data-iub-purposes'} = $this->recursive_array_search( $found, $this->iframe_tags );
751
+
752
+ // AMP support
753
+ if ( $this->amp )
754
+ $i->{'data-block-on-consent'} = '_till_accepted';
755
+
756
  $this->iframes_converted[] = $src;
757
  }
758
  }
803
 
804
  // add iframe as detected
805
  $this->iframes_detected[] = $src;
806
+
807
+ $found = self::strpos_array( $src, $iframe_tags );
808
 
809
+ if ( $found !== false ) {
810
  $iframe->setAttribute( 'src', $empty );
811
  $iframe->setAttribute( 'suppressedsrc', $src );
812
  $iframe->setAttribute( 'class', $iframe_class . ' ' . $class );
813
+
814
+ // per purpose, add data-iub-purposes attribute
815
+ $iframe->setAttribute( 'data-iub-purposes', $this->recursive_array_search( $found, $this->iframe_tags ) );
816
+
817
+ // AMP support
818
+ if ( $this->amp )
819
+ $iframe->setAttribute( 'data-block-on-consent', '_till_accepted' );
820
 
821
  // add iframe as converted
822
  $this->iframes_converted[] = $src;
855
  // get HTML dom from string
856
  $html = str_get_html( $scripts[1][$j], true, true, false );
857
 
858
+ // skip scripts and iframes inside iubenda's comments
859
  $js_scripts[] = $this->skip_tags( $html );
860
  }
861
 
866
  unset( $scripts );
867
 
868
  // block
869
+ foreach ( array( 'IUB_REGEX_PATTERN', 'IUB_REGEX_PATTERN_2', 'IUB_REGEX_PURPOSE_PATTERN' ) as $pattern ) {
870
  preg_match_all( constant( 'self::' . $pattern ), $this->content_page, $scripts );
871
 
872
+ $chunks = array();
873
+ $args = array(
874
+ 'pattern' => $pattern
875
+ );
876
+
877
+ if ( $pattern === 'IUB_REGEX_PURPOSE_PATTERN' ) {
878
+ $numbers = $scripts[1];
879
+ $chunks = $scripts[2];
880
+ } else
881
+ $chunks = $scripts[1];
882
+
883
  // found any content?
884
+ if ( is_array( $chunks ) ) {
885
+ $count = count( $chunks );
886
  $js_scripts = array();
887
 
888
  for ( $j = 0; $j < $count; $j++ ) {
889
+ $this->iub_comments_detected[] = $chunks[$j];
890
 
891
  // get HTML dom from string
892
+ $html = str_get_html( $chunks[$j], true, true, false );
893
+
894
+ if ( $pattern === 'IUB_REGEX_PURPOSE_PATTERN' )
895
+ $args['number'] = $numbers[$j];
896
 
897
  // convert scripts, iframes and other code inside IUBENDAs comment in text/plain to not generate cookies
898
+ $js_scripts[] = $this->create_tags( $html, $args );
899
  }
900
 
901
+ if ( ( is_array( $chunks ) && is_array( $js_scripts ) ) && ( $count >= 1 && count( $js_scripts ) >= 1 ) )
902
+ $this->content_page = strtr( $this->content_page, array_combine( $chunks, $js_scripts ) );
903
  }
904
  }
905
  }
937
  <script>
938
  var iCallback = function(){};
939
 
940
+ if ( 'callback' in _iub.csConfiguration ) {
941
+ if ( 'onConsentGiven' in _iub.csConfiguration.callback )
942
  iCallback = _iub.csConfiguration.callback.onConsentGiven;
943
 
944
  _iub.csConfiguration.callback.onConsentGiven = function() {
945
  iCallback();
946
 
947
+ jQuery( 'noscript._no_script_iub' ).each( function (a, b) { var el = jQuery(b); el.after( el.html() ); } );
948
  };
949
  };
950
  </script>";
951
  }
952
+
953
+ /**
954
+ * Static, utility function: strpos for array wilth wildcard support
955
+ *
956
+ * @param type $haystack
957
+ * @param type $needle
958
+ * @return boolean
959
+ */
960
+ static function strpos_array( $haystack, $needle ) {
961
+ if ( empty( $haystack ) || empty( $needle ) )
962
+ return false;
963
+
964
+ $needle = ! is_array( $needle ) ? array( $needle ) : $needle;
965
+
966
+ foreach ( $needle as $need ) {
967
+ // wildcard?
968
+ if ( strpos( $need, '/*/' ) !== false ) {
969
+ // strtok - removes query string
970
+ // str_replace - removes double slashes // from url
971
+ // preg_replace - removes http or https from url
972
+ $haystack = strtok( str_replace( '//', '', preg_replace( "(^https?://)", "", $haystack ) ), '?' );
973
+
974
+ if ( fnmatch( $need, $haystack ) !== false )
975
+ return $need;
976
+ // regular
977
+ } else {
978
+ if ( strpos( $haystack, $need ) !== false )
979
+ return $need;
980
+ }
981
+ }
982
+
983
+ return false;
984
+ }
985
+
986
+ /**
987
+ * Custom array merge helper function.
988
+ *
989
+ * @return array
990
+ */
991
+ public function array_merge_custom( $builtin, $data ) {
992
+ foreach ( $data as $type => $array ) {
993
+ // if ( $type === 0 )
994
+ // continue;
995
+
996
+ foreach ( $array as $block ) {
997
+ $builtin[$type][] = $block;
998
+ }
999
+
1000
+ $builtin[$type] = array_unique( $builtin[$type] );
1001
+ }
1002
+
1003
+ return $builtin;
1004
+ }
1005
+
1006
+ /**
1007
+ * Array search helper function.
1008
+ *
1009
+ * @param type $needle
1010
+ * @param type $haystack
1011
+ * @return boolean
1012
+ */
1013
+ public function recursive_array_search( $needle, $haystack ) {
1014
+ foreach ( $haystack as $key => $value ) {
1015
+ $current_key = $key;
1016
+ if ( $needle === $value OR ( is_array( $value ) &&
1017
+ $this->recursive_array_search( $needle, $value ) !== false) ) {
1018
+ return $current_key;
1019
+ }
1020
+ }
1021
+ return false;
1022
+ }
1023
+
1024
  }
iubenda_cookie_solution.php CHANGED
@@ -1,25 +1,25 @@
1
  <?php
2
  /*
3
- Plugin Name: Cookie and Consent Solution for the GDPR & ePrivacy
4
- Plugin URI: https://www.iubenda.com
5
- Description: An All-in-One approach developed by iubenda, which includes functionalities of two powerful solutions that help to make your website GDPR and ePrivacy compliant.
6
- Version: 2.0.3
7
- Author: iubenda
8
- Author URI: https://www.iubenda.com
9
- License: MIT License
10
- License URI: http://opensource.org/licenses/MIT
11
- Text Domain: iubenda
12
- Domain Path: /languages
13
 
14
- Cookie and Consent Solution for the GDPR & ePrivacy
15
- Copyright (C) 2018-2019, iubenda s.r.l
16
 
17
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18
 
19
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
20
 
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- */
23
 
24
  // exit if accessed directly
25
  if ( ! defined( 'ABSPATH' ) )
@@ -32,14 +32,14 @@ define( 'IUB_DEBUG', false );
32
  * iubenda final class.
33
  *
34
  * @class iubenda
35
- * @version 2.0.3
36
  */
37
  class iubenda {
38
 
39
  private static $instance;
40
  public $options = array();
41
  public $defaults = array(
42
- 'cs' => array(
43
  'parse' => false, // iubenda_parse
44
  'skip_parsing' => true, // skip_parsing
45
  'ctype' => true, // iubenda_ctype
@@ -49,30 +49,39 @@ class iubenda {
49
  'output_post' => true,
50
  'code_default' => false, // iubenda-code-default,
51
  'menu_position' => 'topmenu',
 
 
 
 
52
  'custom_scripts' => array(),
53
  'custom_iframes' => array(),
54
  'deactivation' => false
55
  ),
56
- 'cons' => array(
57
  'public_api_key' => '',
58
  )
59
  );
60
  public $base_url;
61
- public $version = '2.0.3';
62
  public $no_html = false;
63
  public $multilang = false;
64
  public $languages = array();
65
  public $lang_default = '';
 
66
 
67
  /**
68
  * Disable object clone.
69
  */
70
- private function __clone() {}
 
 
71
 
72
  /**
73
  * Disable unserializing of the class.
74
  */
75
- private function __wakeup() {}
 
 
76
 
77
  /**
78
  * Main plugin instance,
@@ -91,6 +100,7 @@ class iubenda {
91
 
92
  self::$instance->includes();
93
 
 
94
  self::$instance->forms = new iubenda_Forms();
95
  self::$instance->settings = new iubenda_Settings();
96
  }
@@ -106,19 +116,51 @@ class iubenda {
106
  register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
107
 
108
  // settings
109
- $this->options['cs'] = array_merge( $this->defaults['cs'], (array) get_option( 'iubenda_cookie_law_solution', $this->defaults['cs'] ) );
110
- $this->options['cons'] = array_merge( $this->defaults['cons'], (array) get_option( 'iubenda_consent_solution', $this->defaults['cons'] ) );
 
 
 
 
 
 
 
 
 
111
 
112
  $this->base_url = esc_url_raw( add_query_arg( 'page', 'iubenda', admin_url( $this->options['cs']['menu_position'] === 'submenu' ? 'options-general.php' : 'admin.php' ) ) );
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  // actions
115
  add_action( 'after_setup_theme', array( $this, 'register_shortcode' ) );
116
  add_action( 'wp_head', array( $this, 'wp_head_cs' ), 0 );
117
  add_action( 'wp_head', array( $this, 'wp_head_cons' ), 1 );
118
- // add_action( 'wp_footer', array( $this, 'wp_footer_cons' ), 1 );
119
  add_action( 'template_redirect', array( $this, 'output_start' ), 0 );
120
  add_action( 'shutdown', array( $this, 'output_end' ), 100 );
121
  add_action( 'template_redirect', array( $this, 'disable_jetpack_tracking' ) );
 
 
122
  }
123
 
124
  /**
@@ -140,6 +182,7 @@ class iubenda {
140
  private function includes() {
141
  include_once( IUBENDA_PLUGIN_PATH . 'includes/settings.php' );
142
  include_once( IUBENDA_PLUGIN_PATH . 'includes/forms.php' );
 
143
  }
144
 
145
  /**
@@ -165,8 +208,10 @@ class iubenda {
165
 
166
  // get default language
167
  $this->lang_default = pll_default_language();
 
 
168
 
169
- // WPML support
170
  } elseif ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) && class_exists( 'SitePress' ) ) {
171
  $this->multilang = true;
172
 
@@ -182,6 +227,8 @@ class iubenda {
182
 
183
  // get default language
184
  $this->lang_default = $sitepress->get_default_language();
 
 
185
  }
186
 
187
  // load iubenda parser
@@ -194,6 +241,8 @@ class iubenda {
194
  * @return void
195
  */
196
  public function activation() {
 
 
197
  add_option( 'iubenda_cookie_law_solution', $this->options['cs'], '', 'no' );
198
  add_option( 'iubenda_cookie_law_solution', $this->options['cons'], '', 'no' );
199
  add_option( 'iubenda_cookie_law_version', $this->version, '', 'no' );
@@ -213,6 +262,27 @@ class iubenda {
213
  }
214
  }
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  /**
217
  * Load textdomain.
218
  *
@@ -261,6 +331,7 @@ class iubenda {
261
  * @return mixed
262
  */
263
  public function wp_head_cs() {
 
264
  // check content type
265
  if ( (bool) $this->options['cs']['ctype'] == true ) {
266
  $iub_headers = headers_list();
@@ -282,7 +353,7 @@ class iubenda {
282
  return;
283
 
284
  // initial head output
285
- $iubenda_code = "";
286
 
287
  if ( $this->multilang === true && defined( 'ICL_LANGUAGE_CODE' ) && isset( $this->options['cs']['code_' . ICL_LANGUAGE_CODE] ) ) {
288
  $iubenda_code .= $this->options['cs']['code_' . ICL_LANGUAGE_CODE];
@@ -329,9 +400,9 @@ class iubenda {
329
  if ( ! empty( $this->options['cons']['public_api_key'] ) ) {
330
 
331
  $parameters = apply_filters( 'iubenda_cons_init_parameters', array(
332
- 'log_level' => 'error',
333
- 'logger' => 'console',
334
- 'send_from_local' => true
335
  ) );
336
 
337
  echo '<!-- Library initialization -->
@@ -355,38 +426,6 @@ class iubenda {
355
  }
356
  }
357
 
358
- /**
359
- * Add wp_head consent solution content.
360
- *
361
- * @return mixed
362
- */
363
- public function wp_footer_cons() {
364
- if ( ! empty( $this->options['cons']['public_api_key'] ) ) {
365
- echo '<script type="text/javascript">
366
- console.log( document.getElementById( "wpcf7-f136-p87-o1" ).getElementsByClassName( "wpcf7-form" )[0] );
367
- console.log( document.getElementById( "wpcf7-f136-p87-o1" ).getElementsByClassName( "wpcf7-submit" )[0] );
368
-
369
- _iub.cons_instructions.push( [ "load", {
370
- submitElement: document.getElementById( "wpcf7-f136-p87-o1" ).getElementsByClassName( "wpcf7-submit" )[0],
371
- form: {
372
- selector: document.getElementById( "wpcf7-f136-p87-o1" ).getElementsByClassName( "wpcf7-form" )[0],
373
- map: {
374
- subject: {
375
- first_name: "your-name",
376
- last_name: "your-name",
377
- email: "your-email"
378
- },
379
- preferences: {
380
- acceptance: "acceptance"
381
- }
382
- }
383
- }
384
- } ]
385
- );
386
- </script>';
387
- }
388
- }
389
-
390
  /**
391
  * Initialize html output.
392
  *
@@ -415,13 +454,9 @@ class iubenda {
415
  */
416
  public function output_callback( $output ) {
417
  // check whether to run parser or not
418
-
419
  // bail on ajax, xmlrpc or iub_no_parse request
420
  if (
421
- ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )
422
- || ( defined( 'DOING_AJAX' ) && DOING_AJAX )
423
- || isset( $_SERVER["HTTP_X_REQUESTED_WITH"] )
424
- || isset( $_GET['iub_no_parse'] )
425
  )
426
  return $output;
427
 
@@ -456,27 +491,41 @@ class iubenda {
456
 
457
  // google recaptcha v3 compatibility
458
  if ( class_exists( 'WPCF7' ) && (int) WPCF7::get_option( 'iqfix_recaptcha' ) === 0 && ! iubendaParser::consent_given() )
459
- $this->options['cs']['custom_scripts'][] = 'grecaptcha';
460
 
461
  // Jetpack compatibility
462
  if ( class_exists( 'Jetpack' ) )
463
- $this->options['cs']['custom_scripts'][] = 'stats.wp.com';
464
 
465
  $startime = microtime( true );
466
  $output = apply_filters( 'iubenda_initial_output', $output );
467
 
 
 
 
 
468
  // experimental class
469
  if ( $this->options['cs']['parser_engine'] == 'new' ) {
470
- $iubenda = new iubendaParser( mb_convert_encoding( $output, 'HTML-ENTITIES', 'UTF-8' ), array( 'type' => 'faster', 'scripts' => $this->options['cs']['custom_scripts'], 'iframes' => $this->options['cs']['custom_iframes'] ) );
 
 
 
 
 
471
 
472
  // render output
473
  $output = $iubenda->parse();
474
 
475
  // append signature
476
  $output .= '<!-- Parsed with iubenda experimental class in ' . round( microtime( true ) - $startime, 4 ) . ' sec. -->';
477
- // default class
478
  } else {
479
- $iubenda = new iubendaParser( $output, array( 'type' => 'page', 'scripts' => $this->options['cs']['custom_scripts'], 'iframes' => $this->options['cs']['custom_iframes'] ) );
 
 
 
 
 
480
 
481
  // render output
482
  $output = $iubenda->parse();
@@ -488,6 +537,25 @@ class iubenda {
488
  return apply_filters( 'iubenda_final_output', $output );
489
  }
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  /**
492
  * Parse iubenda code.
493
  *
@@ -532,12 +600,11 @@ class iubenda {
532
  if ( ! class_exists( 'Jetpack' ) )
533
  return;
534
 
535
- // disable if it's not AMP cached request
536
- if ( ! Jetpack_AMP_Support::is_amp_request() )
537
  return;
538
 
539
  // if ( is_feed() || is_robots() || is_trackback() || is_preview() || jetpack_is_dnt_enabled() )
540
-
541
  // bail if skripts blocking disabled
542
  if ( ! $this->options['cs']['parse'] )
543
  return;
@@ -550,6 +617,155 @@ class iubenda {
550
  remove_action( 'wp_footer', 'stats_footer', 101 );
551
  }
552
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  /**
554
  * Get allowed iubenda script HTML.
555
  *
@@ -560,29 +776,28 @@ class iubenda {
560
  remove_filter( 'pre_kses', array( 'Filter_Embedded_HTML_Objects', 'filter' ), 11 );
561
 
562
  $html = array_merge(
563
- wp_kses_allowed_html( 'post' ),
564
- array(
565
- 'script' => array(
566
- 'type' => array(),
567
- 'src' => array(),
568
- 'charset' => array(),
569
- 'async' => array()
570
- ),
571
- 'noscript' => array(),
572
- 'style' => array(
573
- 'type' => array()
574
- ),
575
- 'iframe' => array(
576
- 'src' => array(),
577
- 'height' => array(),
578
- 'width' => array(),
579
- 'frameborder' => array(),
580
- 'allowfullscreen' => array()
581
- )
582
  )
 
583
  );
584
 
585
- return apply_filters( 'iub_code_allowed_html', $html );
586
  }
587
 
588
  }
1
  <?php
2
  /*
3
+ Plugin Name: Cookie and Consent Solution for the GDPR & ePrivacy
4
+ Plugin URI: https://www.iubenda.com
5
+ Description: An All-in-One approach developed by iubenda, which includes functionalities of two powerful solutions that help to make your website GDPR and ePrivacy compliant.
6
+ Version: 2.1.0
7
+ Author: iubenda
8
+ Author URI: https://www.iubenda.com
9
+ License: MIT License
10
+ License URI: http://opensource.org/licenses/MIT
11
+ Text Domain: iubenda
12
+ Domain Path: /languages
13
 
14
+ Cookie and Consent Solution for the GDPR & ePrivacy
15
+ Copyright (C) 2018-2020, iubenda s.r.l
16
 
17
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18
 
19
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
20
 
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
 
24
  // exit if accessed directly
25
  if ( ! defined( 'ABSPATH' ) )
32
  * iubenda final class.
33
  *
34
  * @class iubenda
35
+ * @version 2.1.0
36
  */
37
  class iubenda {
38
 
39
  private static $instance;
40
  public $options = array();
41
  public $defaults = array(
42
+ 'cs' => array(
43
  'parse' => false, // iubenda_parse
44
  'skip_parsing' => true, // skip_parsing
45
  'ctype' => true, // iubenda_ctype
49
  'output_post' => true,
50
  'code_default' => false, // iubenda-code-default,
51
  'menu_position' => 'topmenu',
52
+ 'amp_support' => false,
53
+ 'amp_source' => 'local',
54
+ 'amp_template_done' => false,
55
+ 'amp_template' => '',
56
  'custom_scripts' => array(),
57
  'custom_iframes' => array(),
58
  'deactivation' => false
59
  ),
60
+ 'cons' => array(
61
  'public_api_key' => '',
62
  )
63
  );
64
  public $base_url;
65
+ public $version = '2.1.0';
66
  public $no_html = false;
67
  public $multilang = false;
68
  public $languages = array();
69
  public $lang_default = '';
70
+ public $lang_current = '';
71
 
72
  /**
73
  * Disable object clone.
74
  */
75
+ private function __clone() {
76
+
77
+ }
78
 
79
  /**
80
  * Disable unserializing of the class.
81
  */
82
+ private function __wakeup() {
83
+
84
+ }
85
 
86
  /**
87
  * Main plugin instance,
100
 
101
  self::$instance->includes();
102
 
103
+ self::$instance->AMP = new iubenda_AMP();
104
  self::$instance->forms = new iubenda_Forms();
105
  self::$instance->settings = new iubenda_Settings();
106
  }
116
  register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
117
 
118
  // settings
119
+ $cs_options = (array) get_option( 'iubenda_cookie_law_solution', $this->defaults['cs'] );
120
+ $cons_options = (array) get_option( 'iubenda_consent_solution', $this->defaults['cons'] );
121
+
122
+ // activate AMP if not available before
123
+ if ( function_exists( 'is_amp_endpoint' ) || function_exists( 'ampforwp_is_amp_endpoint' ) ) {
124
+ if ( ! isset( $cs_options['amp_support'] ) )
125
+ $this->defaults['cs']['amp_support'] = true;
126
+ }
127
+
128
+ $this->options['cs'] = array_merge( $this->defaults['cs'], $cs_options );
129
+ $this->options['cons'] = array_merge( $this->defaults['cons'], $cons_options );
130
 
131
  $this->base_url = esc_url_raw( add_query_arg( 'page', 'iubenda', admin_url( $this->options['cs']['menu_position'] === 'submenu' ? 'options-general.php' : 'admin.php' ) ) );
132
 
133
+ // check old custom scripts
134
+ if ( ! empty( $this->options['cs']['custom_scripts'] ) && is_array( $this->options['cs']['custom_scripts'] ) && ! is_int( reset( $this->options['cs']['custom_scripts'] ) ) ) {
135
+ $data = array();
136
+
137
+ foreach ( $this->options['cs']['custom_scripts'] as $script ) {
138
+ $data[$script] = 0;
139
+ }
140
+
141
+ $this->options['cs']['custom_scripts'] = $data;
142
+ }
143
+
144
+ // check old custom iframes
145
+ if ( ! empty( $this->options['cs']['custom_iframes'] ) && is_array( $this->options['cs']['custom_iframes'] ) && ! is_int( reset( $this->options['cs']['custom_iframes'] ) ) ) {
146
+ $data = array();
147
+
148
+ foreach ( $this->options['cs']['custom_iframes'] as $iframe ) {
149
+ $data[$iframe] = 0;
150
+ }
151
+
152
+ $this->options['cs']['custom_iframes'] = $data;
153
+ }
154
+
155
  // actions
156
  add_action( 'after_setup_theme', array( $this, 'register_shortcode' ) );
157
  add_action( 'wp_head', array( $this, 'wp_head_cs' ), 0 );
158
  add_action( 'wp_head', array( $this, 'wp_head_cons' ), 1 );
 
159
  add_action( 'template_redirect', array( $this, 'output_start' ), 0 );
160
  add_action( 'shutdown', array( $this, 'output_end' ), 100 );
161
  add_action( 'template_redirect', array( $this, 'disable_jetpack_tracking' ) );
162
+ add_action( 'admin_init', array( $this, 'maybe_do_upgrade' ) );
163
+ add_action( 'upgrader_process_complete', array( $this, 'upgrade' ), 10, 2 );
164
  }
165
 
166
  /**
182
  private function includes() {
183
  include_once( IUBENDA_PLUGIN_PATH . 'includes/settings.php' );
184
  include_once( IUBENDA_PLUGIN_PATH . 'includes/forms.php' );
185
+ include_once( IUBENDA_PLUGIN_PATH . 'includes/amp.php' );
186
  }
187
 
188
  /**
208
 
209
  // get default language
210
  $this->lang_default = pll_default_language();
211
+ // get current language
212
+ $this->lang_current = pll_current_language();
213
 
214
+ // WPML support
215
  } elseif ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) && class_exists( 'SitePress' ) ) {
216
  $this->multilang = true;
217
 
227
 
228
  // get default language
229
  $this->lang_default = $sitepress->get_default_language();
230
+ // get current language
231
+ $this->lang_current = $sitepress->get_current_language();
232
  }
233
 
234
  // load iubenda parser
241
  * @return void
242
  */
243
  public function activation() {
244
+ set_transient( 'iub_activation_completed', 1, 3600 );
245
+
246
  add_option( 'iubenda_cookie_law_solution', $this->options['cs'], '', 'no' );
247
  add_option( 'iubenda_cookie_law_solution', $this->options['cons'], '', 'no' );
248
  add_option( 'iubenda_cookie_law_version', $this->version, '', 'no' );
262
  }
263
  }
264
 
265
+ /**
266
+ * Plugin upgrae.
267
+ *
268
+ * @return void
269
+ */
270
+ public function upgrade( $upgrader_object, $option ) {
271
+ // the path to our plugin's main file
272
+ $our_plugin = plugin_basename( __FILE__ );
273
+
274
+ // if an update has taken place and the updated type is plugins and the plugins element exists
275
+ if ( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
276
+ // iterate through the plugins being updated and check if ours is there
277
+ foreach ( $options['plugins'] as $plugin ) {
278
+ if ( $plugin == $our_plugin ) {
279
+ // set a transient to record that our plugin has just been updated
280
+ set_transient( 'iub_upgrade_completed', 1, 3600 );
281
+ }
282
+ }
283
+ }
284
+ }
285
+
286
  /**
287
  * Load textdomain.
288
  *
331
  * @return mixed
332
  */
333
  public function wp_head_cs() {
334
+
335
  // check content type
336
  if ( (bool) $this->options['cs']['ctype'] == true ) {
337
  $iub_headers = headers_list();
353
  return;
354
 
355
  // initial head output
356
+ $iubenda_code = '';
357
 
358
  if ( $this->multilang === true && defined( 'ICL_LANGUAGE_CODE' ) && isset( $this->options['cs']['code_' . ICL_LANGUAGE_CODE] ) ) {
359
  $iubenda_code .= $this->options['cs']['code_' . ICL_LANGUAGE_CODE];
400
  if ( ! empty( $this->options['cons']['public_api_key'] ) ) {
401
 
402
  $parameters = apply_filters( 'iubenda_cons_init_parameters', array(
403
+ 'log_level' => 'error',
404
+ 'logger' => 'console',
405
+ 'send_from_local' => true
406
  ) );
407
 
408
  echo '<!-- Library initialization -->
426
  }
427
  }
428
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
  /**
430
  * Initialize html output.
431
  *
454
  */
455
  public function output_callback( $output ) {
456
  // check whether to run parser or not
 
457
  // bail on ajax, xmlrpc or iub_no_parse request
458
  if (
459
+ ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || isset( $_SERVER["HTTP_X_REQUESTED_WITH"] ) || isset( $_GET['iub_no_parse'] )
 
 
 
460
  )
461
  return $output;
462
 
491
 
492
  // google recaptcha v3 compatibility
493
  if ( class_exists( 'WPCF7' ) && (int) WPCF7::get_option( 'iqfix_recaptcha' ) === 0 && ! iubendaParser::consent_given() )
494
+ $this->options['cs']['custom_scripts']['grecaptcha'] = 2;
495
 
496
  // Jetpack compatibility
497
  if ( class_exists( 'Jetpack' ) )
498
+ $this->options['cs']['custom_scripts']['stats.wp.com'] = 5;
499
 
500
  $startime = microtime( true );
501
  $output = apply_filters( 'iubenda_initial_output', $output );
502
 
503
+ // prepare scripts and iframes
504
+ $scripts = $this->prepare_custom_data( $this->options['cs']['custom_scripts'] );
505
+ $iframes = $this->prepare_custom_data( $this->options['cs']['custom_iframes'] );
506
+
507
  // experimental class
508
  if ( $this->options['cs']['parser_engine'] == 'new' ) {
509
+ $iubenda = new iubendaParser( mb_convert_encoding( $output, 'HTML-ENTITIES', 'UTF-8' ), array(
510
+ 'type' => 'faster',
511
+ 'amp' => $this->options['cs']['amp_support'],
512
+ 'scripts' => $scripts,
513
+ 'iframes' => $iframes
514
+ ) );
515
 
516
  // render output
517
  $output = $iubenda->parse();
518
 
519
  // append signature
520
  $output .= '<!-- Parsed with iubenda experimental class in ' . round( microtime( true ) - $startime, 4 ) . ' sec. -->';
521
+ // default class
522
  } else {
523
+ $iubenda = new iubendaParser( $output, array(
524
+ 'type' => 'page',
525
+ 'amp' => $this->options['cs']['amp_support'],
526
+ 'scripts' => $scripts,
527
+ 'iframes' => $iframes
528
+ ) );
529
 
530
  // render output
531
  $output = $iubenda->parse();
537
  return apply_filters( 'iubenda_final_output', $output );
538
  }
539
 
540
+ /**
541
+ * Prepare scripts/iframes.
542
+ *
543
+ * @param array $data
544
+ * @return array
545
+ */
546
+ public function prepare_custom_data( $data ) {
547
+ $newdata = array();
548
+
549
+ foreach ( $data as $script => $type ) {
550
+ if ( ! array_key_exists( $type, $newdata ) )
551
+ $newdata[$type] = array();
552
+
553
+ $newdata[$type][] = $script;
554
+ }
555
+
556
+ return $newdata;
557
+ }
558
+
559
  /**
560
  * Parse iubenda code.
561
  *
600
  if ( ! class_exists( 'Jetpack' ) )
601
  return;
602
 
603
+ // disable if it's not AMP cached request
604
+ if ( ! class_exists( 'Jetpack_AMP_Support' ) || ! Jetpack_AMP_Support::is_amp_request() )
605
  return;
606
 
607
  // if ( is_feed() || is_robots() || is_trackback() || is_preview() || jetpack_is_dnt_enabled() )
 
608
  // bail if skripts blocking disabled
609
  if ( ! $this->options['cs']['parse'] )
610
  return;
617
  remove_action( 'wp_footer', 'stats_footer', 101 );
618
  }
619
 
620
+ /**
621
+ * Perform actions on plugin installation/upgrade.
622
+ *
623
+ * @return void
624
+ */
625
+ public function maybe_do_upgrade() {
626
+
627
+ // bail if no activation or upgrade transient is set
628
+ if ( ! get_transient( 'iub_upgrade_completed' ) && ! get_transient( 'iub_activation_completed' ) )
629
+ return;
630
+
631
+ // delete the activation transient
632
+ delete_transient( 'iub_activation_completed' );
633
+ // delete the upgrade transient
634
+ delete_transient( 'iub_upgrade_completed' );
635
+
636
+ // bail if activating from network, or bulk, or within an iFrame
637
+ if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) )
638
+ return;
639
+
640
+ // generate AMP template file if AMP plugins available
641
+ if ( function_exists( 'is_amp_endpoint' ) || function_exists( 'ampforwp_is_amp_endpoint' ) ) {
642
+ iubenda()->AMP->generate_amp_template();
643
+ }
644
+ }
645
+
646
+ /**
647
+ * Get configuration data parsed from iubenda code
648
+ *
649
+ * @param type $iubenda_code
650
+ * @param type $args
651
+ * @return type
652
+ */
653
+ public function parse_configuration( $code, $args = array() ) {
654
+ $configuration = array();
655
+ $defaults = array(
656
+ 'mode' => 'basic',
657
+ 'parse' => false
658
+ );
659
+
660
+ // parse incoming $args into an array and merge it with $defaults
661
+ $args = wp_parse_args( $args, $defaults );
662
+
663
+ if ( empty( $code ) )
664
+ return $configuration;
665
+
666
+ // parse code if needed
667
+ $parsed_code = $args['parse'] === true ? $this->parse_code( $code, true ) : $code;
668
+
669
+ // get script
670
+ $parsed_script = '';
671
+
672
+ preg_match( '/src\=(["\'])(.*?)\1/', $parsed_code, $matches );
673
+
674
+ if ( ! empty( $matches[2] ) && wp_http_validate_url( $matches[2] ) )
675
+ $parsed_script = $matches[2];
676
+
677
+ // strip tags
678
+ $parsed_code = wp_kses( $parsed_code, array() );
679
+
680
+ // get configuration
681
+ preg_match( '/_iub.csConfiguration *= *{(.*?)\};/', $parsed_code, $matches );
682
+
683
+ if ( ! empty( $matches[1] ) )
684
+ $parsed_code = '{' . $matches[1] . '}';
685
+
686
+ // decode
687
+ $decoded = json_decode( $parsed_code, true );
688
+
689
+ if ( ! empty( $decoded ) && is_array( $decoded ) ) {
690
+
691
+ $decoded['script'] = $parsed_script;
692
+
693
+ // basic mode
694
+ if ( $args['mode'] === 'basic' ) {
695
+ if ( isset( $decoded['banner'] ) )
696
+ unset( $decoded['banner'] );
697
+ if ( isset( $decoded['callback'] ) )
698
+ unset( $decoded['callback'] );
699
+ if ( isset( $decoded['perPurposeConsent'] ) )
700
+ unset( $decoded['perPurposeConsent'] );
701
+ }
702
+
703
+ $configuration = $decoded;
704
+ }
705
+
706
+ return $configuration;
707
+ }
708
+
709
+ /**
710
+ * Domain info helper function.
711
+ *
712
+ * @param type $domainb
713
+ * @return type
714
+ */
715
+ public function domain( $domainb ) {
716
+ $bits = explode( '/', $domainb );
717
+ if ( $bits[0] == 'http:' || $bits[0] == 'https:' ) {
718
+ $domainb = $bits[2];
719
+ } else {
720
+ $domainb = $bits[0];
721
+ }
722
+ unset( $bits );
723
+ $bits = explode( '.', $domainb );
724
+ $idz = 0;
725
+ while ( isset( $bits[$idz] ) ) {
726
+ $idz += 1;
727
+ }
728
+ $idz -= 3;
729
+ $idy = 0;
730
+ while ( $idy < $idz ) {
731
+ unset( $bits[$idy] );
732
+ $idy += 1;
733
+ }
734
+ $part = array();
735
+ foreach ( $bits AS $bit ) {
736
+ $part[] = $bit;
737
+ }
738
+ unset( $bit );
739
+ unset( $bits );
740
+ unset( $domainb );
741
+ $domainb = '';
742
+
743
+ if ( strlen( $part[1] ) > 3 ) {
744
+ unset( $part[0] );
745
+ }
746
+ foreach ( $part AS $bit ) {
747
+ $domainb .= $bit . '.';
748
+ }
749
+ unset( $bit );
750
+
751
+ return preg_replace( '/(.*)\./', '$1', $domainb );
752
+ }
753
+
754
+ /**
755
+ * Check if file exists helper function.
756
+ *
757
+ * @param type $file
758
+ */
759
+ public function file_exists( $file ) {
760
+ $file_headers = @get_headers( $file );
761
+
762
+ if ( ! $file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found' ) {
763
+ $exists = false;
764
+ } else {
765
+ $exists = true;
766
+ }
767
+ }
768
+
769
  /**
770
  * Get allowed iubenda script HTML.
771
  *
776
  remove_filter( 'pre_kses', array( 'Filter_Embedded_HTML_Objects', 'filter' ), 11 );
777
 
778
  $html = array_merge(
779
+ wp_kses_allowed_html( 'post' ), array(
780
+ 'script' => array(
781
+ 'type' => array(),
782
+ 'src' => array(),
783
+ 'charset' => array(),
784
+ 'async' => array()
785
+ ),
786
+ 'noscript' => array(),
787
+ 'style' => array(
788
+ 'type' => array()
789
+ ),
790
+ 'iframe' => array(
791
+ 'src' => array(),
792
+ 'height' => array(),
793
+ 'width' => array(),
794
+ 'frameborder' => array(),
795
+ 'allowfullscreen' => array()
 
 
796
  )
797
+ )
798
  );
799
 
800
+ return apply_filters( 'iub_code_allowed_html', $html );
801
  }
802
 
803
  }
js/admin.js CHANGED
@@ -1,13 +1,10 @@
1
  ( function ( $ ) {
2
 
3
  $( document ).ready( function () {
4
-
5
  // parse args
6
  var args = $.parseJSON( iubAdminArgs );
7
-
8
- // console.log( args );
9
 
10
- // read more option
11
  $( '#iub_parse' ).change( function () {
12
  if ( $( this ).is( ':checked' ) ) {
13
  $( '#iub_parser_engine_container' ).slideDown( 'fast' );
@@ -15,6 +12,30 @@
15
  $( '#iub_parser_engine_container' ).slideUp( 'fast' );
16
  }
17
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  // move notices
20
  var errors = $( '.settings-error' ).detach();
@@ -55,7 +76,7 @@
55
 
56
  $( '#postbox-container-2' ).change();
57
 
58
- html = $( '#preferences-field-template' ).html();
59
  html = html.replace( /__PREFERENCE_ID__/g, preferencesID++ );
60
 
61
  $( '.preferences-table .add-preferences-field' ).closest( 'tr' ).before( '<tr class="preferences-field options-field" style="display: none;">' + html + '</tr>' );
@@ -87,7 +108,7 @@
87
 
88
  $( '#postbox-container-2' ).change();
89
 
90
- html = $( '#exclude-field-template' ).html();
91
  html = html.replace( /__EXCLUDE_ID__/g, excludeID++ );
92
 
93
  $( '.exclude-table .add-exclude-field' ).closest( 'tr' ).before( '<tr class="exclude-field options-field" style="display: none;">' + html + '</tr>' );
@@ -117,7 +138,7 @@
117
 
118
  $( '#postbox-container-2' ).change();
119
 
120
- html = $( '#legal_notices-field-template' ).html();
121
  html = html.replace( /__LEGAL_NOTICE_ID__/g, legalNoticesID++ );
122
 
123
  console.log( html );
@@ -139,7 +160,41 @@
139
  $( this ).remove();
140
  } );
141
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
 
 
 
 
 
 
 
 
 
143
  // Remove template fields on save
144
  $( document ).on( 'click', '#publish', function () {
145
  $( '#preferences-field-template' ).remove();
1
  ( function ( $ ) {
2
 
3
  $( document ).ready( function () {
 
4
  // parse args
5
  var args = $.parseJSON( iubAdminArgs );
 
 
6
 
7
+ // parser options
8
  $( '#iub_parse' ).change( function () {
9
  if ( $( this ).is( ':checked' ) ) {
10
  $( '#iub_parser_engine_container' ).slideDown( 'fast' );
12
  $( '#iub_parser_engine_container' ).slideUp( 'fast' );
13
  }
14
  } );
15
+
16
+ // amp options
17
+ $( '#iub_amp_support' ).change( function () {
18
+ if ( $( this ).is( ':checked' ) ) {
19
+ $( '#iub_amp_options_container' ).slideDown( 'fast' );
20
+ } else {
21
+ $( '#iub_amp_options_container' ).slideUp( 'fast' );
22
+ }
23
+ } );
24
+
25
+ // amp options
26
+ $( 'input.iub_amp_source' ).change( function () {
27
+ var value = $( 'input.iub_amp_source:checked' ).val();
28
+
29
+ if ( value === 'remote' ) {
30
+ $( '#iub_amp_template-local' ).fadeOut( 'fast', function () {
31
+ $( '#iub_amp_template-remote' ).fadeIn( 'fast' );
32
+ } );
33
+ } else {
34
+ $( '#iub_amp_template-remote' ).fadeOut( 'fast', function () {
35
+ $( '#iub_amp_template-local' ).fadeIn( 'fast' );
36
+ } );
37
+ }
38
+ } );
39
 
40
  // move notices
41
  var errors = $( '.settings-error' ).detach();
76
 
77
  $( '#postbox-container-2' ).change();
78
 
79
+ var html = $( '#preferences-field-template' ).html();
80
  html = html.replace( /__PREFERENCE_ID__/g, preferencesID++ );
81
 
82
  $( '.preferences-table .add-preferences-field' ).closest( 'tr' ).before( '<tr class="preferences-field options-field" style="display: none;">' + html + '</tr>' );
108
 
109
  $( '#postbox-container-2' ).change();
110
 
111
+ var html = $( '#exclude-field-template' ).html();
112
  html = html.replace( /__EXCLUDE_ID__/g, excludeID++ );
113
 
114
  $( '.exclude-table .add-exclude-field' ).closest( 'tr' ).before( '<tr class="exclude-field options-field" style="display: none;">' + html + '</tr>' );
138
 
139
  $( '#postbox-container-2' ).change();
140
 
141
+ var html = $( '#legal_notices-field-template' ).html();
142
  html = html.replace( /__LEGAL_NOTICE_ID__/g, legalNoticesID++ );
143
 
144
  console.log( html );
160
  $( this ).remove();
161
  } );
162
  } );
163
+
164
+ // add new script field
165
+ $( document ).on( 'click', '.add-custom-script-field', function( e ) {
166
+ e.preventDefault();
167
+
168
+ $( this ).before( '<div class="custom-script-field" style="display: none;">' + $( '#custom-script-field-template' ).html() + '</div>' );
169
+ $( '#tab-panel-scripts' ).find( '.custom-script-field' ).last().fadeIn( 300 );
170
+ } );
171
+
172
+ // remove custom script field
173
+ $( document ).on( 'click', '.remove-custom-script-field', function( e ) {
174
+ e.preventDefault();
175
+
176
+ $( this ).closest( '.custom-script-field' ).fadeOut( 300, function() {
177
+ $( this ).remove();
178
+ } );
179
+ } );
180
+
181
+ // add new iframe field
182
+ $( document ).on( 'click', '.add-custom-iframe-field', function( e ) {
183
+ e.preventDefault();
184
+
185
+ $( this ).before( '<div class="custom-iframe-field" style="display: none;">' + $( '#custom-iframe-field-template' ).html() + '</div>' );
186
+ $( '#tab-panel-iframes' ).find( '.custom-iframe-field' ).last().fadeIn( 300 );
187
+ } );
188
 
189
+ // remove custom iframe field
190
+ $( document ).on( 'click', '.remove-custom-iframe-field', function( e ) {
191
+ e.preventDefault();
192
+
193
+ $( this ).closest( '.custom-iframe-field' ).fadeOut( 300, function() {
194
+ $( this ).remove();
195
+ } );
196
+ } );
197
+
198
  // Remove template fields on save
199
  $( document ).on( 'click', '#publish', function () {
200
  $( '#preferences-field-template' ).remove();
js/frontend.js CHANGED
@@ -137,7 +137,7 @@
137
  formArgs.consent.legal_notices = form.consent.legal_notices;
138
  }
139
 
140
- // console.log( formArgs );
141
 
142
  // build form consent data
143
  _iub.cons_instructions.push( [ 'load', formArgs ] );
137
  formArgs.consent.legal_notices = form.consent.legal_notices;
138
  }
139
 
140
+ console.log( formArgs );
141
 
142
  // build form consent data
143
  _iub.cons_instructions.push( [ 'load', formArgs ] );
languages/iubenda-cookie-law-solution-it_IT.mo CHANGED
Binary file
languages/iubenda-cookie-law-solution-it_IT.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Iubenda Cookie Solution\n"
4
- "POT-Creation-Date: 2019-11-12 15:08+0100\n"
5
- "PO-Revision-Date: 2019-11-14 12:07+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: it\n"
@@ -16,6 +16,10 @@ msgstr ""
16
  "X-Poedit-KeywordsList: __\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
 
 
 
 
19
  #: includes/forms-list-table.php:92
20
  msgid "Form Title"
21
  msgstr "Nome del form"
@@ -25,7 +29,9 @@ msgid "Form ID"
25
  msgstr "ID del form"
26
 
27
  #: includes/forms-list-table.php:94
28
- msgid "Source"
 
 
29
  msgstr "Fonte"
30
 
31
  #: includes/forms-list-table.php:95
@@ -60,7 +66,7 @@ msgstr "Tutte le fonti"
60
  msgid "No forms found."
61
  msgstr "Nessun form trovato."
62
 
63
- #: includes/forms.php:149 includes/settings.php:126
64
  msgid "Forms"
65
  msgstr "Form"
66
 
@@ -69,17 +75,14 @@ msgid "Form"
69
  msgstr "Form"
70
 
71
  #: includes/forms.php:566 includes/forms.php:580
72
- #, php-format
73
  msgid "First name"
74
  msgstr "Nome"
75
 
76
  #: includes/forms.php:572 includes/forms.php:592
77
- #, php-format
78
  msgid "Last name"
79
  msgstr "Cognome"
80
 
81
  #: includes/forms.php:586
82
- #, php-format
83
  msgid "Middle name"
84
  msgstr "Secondo nome"
85
 
@@ -88,253 +91,340 @@ msgstr "Secondo nome"
88
  msgid "string"
89
  msgstr "stringa"
90
 
91
- #: includes/settings.php:57 includes/settings.php:171
92
  msgid "Cookie Solution"
93
  msgstr "Cookie Solution"
94
 
95
- #: includes/settings.php:63 includes/settings.php:172
96
  msgid "Consent Solution"
97
  msgstr "Consent Solution"
98
 
99
- #: includes/settings.php:114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  msgid "Code"
101
  msgstr "Codice"
102
 
103
- #: includes/settings.php:115
104
  #, fuzzy
105
  #| msgid "Scripts blocking"
106
  msgid "Script blocking"
107
  msgstr "Blocco preventivo dei codici"
108
 
109
- #: includes/settings.php:116
110
  msgid "Custom scripts"
111
  msgstr "Script personalizzati"
112
 
113
- #: includes/settings.php:117
114
  msgid "Content type"
115
  msgstr "Tipo di contenuto"
116
 
117
- #: includes/settings.php:118
118
  msgid "RSS feed"
119
  msgstr "Feed RSS"
120
 
121
- #: includes/settings.php:119
122
  msgid "POST requests"
123
  msgstr "Richieste POST"
124
 
125
- #: includes/settings.php:120
126
  msgid "Menu position"
127
  msgstr "Posizione menu"
128
 
129
- #: includes/settings.php:121
 
 
 
 
130
  msgid "Deactivation"
131
  msgstr "Disattivazione"
132
 
133
- #: includes/settings.php:127
134
- msgid "Public API Key"
 
 
135
  msgstr "Chiave API pubblica"
136
 
137
- #: includes/settings.php:130 includes/settings.php:134
138
  msgid "Field Mapping"
139
  msgstr "Mapping dei campi"
140
 
141
- #: includes/settings.php:192
142
  msgid "Are you sure you want to delete this form?"
143
  msgstr "Sei sicuro di voler eliminare questo form?"
144
 
145
- #: includes/settings.php:340
146
  msgid "You don't have permission to access this page."
147
  msgstr "Non disponi dell'autorizzazione per accedere a questa pagina."
148
 
149
- #: includes/settings.php:357
150
  #, fuzzy
151
  #| msgid ""
152
- #| "This plugin is the easiest and most comprehensive way to adapt your WordPress "
153
- #| "site to the European cookie law. Upon your user's first visit, the plugin "
154
- #| "will take care of collecting their consent, of blocking the most popular "
155
- #| "among the scripts that install cookies and subsequently reactivate these "
156
- #| "scripts as soon as consent is provided. The basic settings include obtaining "
157
- #| "consent by a simple scroll action (the most effective method) and script "
158
- #| "reactivation without refreshing the page."
159
  msgid ""
160
- "This plugin is the easiest and most comprehensive way to adapt your WordPress "
161
- "site to the ePrivacy (EU Cookie Law). Upon your users’ first visit, the plugin "
162
- "will take care of collecting their consent, blocking the most popular cookie-"
163
- "scripts and subsequently reactivating these scripts as soon as consent is "
164
- "provided. The basic settings include obtaining consent by a simple scroll action "
165
- "(the most effective method) and script reactivation without refreshing the page "
166
- "(asynchronous script reactivation)."
167
  msgstr ""
168
  "Questo plugin è il modo più semplice e completo per adeguare il tuo sito "
169
- "WordPress alla Direttiva ePrivacy (Cookie Law). Alla prima visita dell'utente il "
170
- "plugin si occuperà di raccoglierne il consenso, bloccare gli script più popolari "
171
- "che installano cookie e riattivarli non appena il consenso viene fornito. Le "
172
- "impostazioni di base includono la raccolta del consenso tramite il semplice "
173
- "scroll (il metodo più efficace) e la riattivazione senza il refresh della pagina."
174
-
175
- #: includes/settings.php:360
176
- msgid "Does the Cookie Solution support IAB’s Transparency and Consent Framework?"
177
- msgstr "La Cookie Solution supporta il Transparency e Consent Framework di IAB?"
 
 
 
178
 
179
- #: includes/settings.php:361
180
  #, fuzzy, php-format
181
  #| msgid ""
182
- #| "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin page."
183
- #| "</a>"
184
  msgid ""
185
  "Yes it does. You can read more about it <a href=\"%s\" class=\"iubenda-url\" "
186
  "target=\"_blank\">here.</a>"
187
  msgstr ""
188
- "Sì. Visita <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">questa pagina</"
189
- "a> per maggiori dettagli."
190
 
191
- #: includes/settings.php:364
192
- msgid "Would you like to know more about the Cookie Law?"
 
 
193
  msgstr "Vuoi saperne di più sulla Cookie Law?"
194
 
195
- #: includes/settings.php:365
196
- #, php-format
 
 
 
197
  msgid ""
198
- "Read our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">complete guide "
199
- "to the Cookie Law</a>."
200
  msgstr ""
201
  "Leggi la nostra <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">guida "
202
  "completa alla Cookie Law</a>."
203
 
204
- #: includes/settings.php:368
205
  msgid "What is the full functionality of the plugin?"
206
  msgstr "Quali sono le funzionalità del plugin?"
207
 
208
- #: includes/settings.php:369
209
- #, php-format
 
 
 
210
  msgid ""
211
- "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin page</a>."
 
212
  msgstr ""
213
  "Visita la <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">pagina "
214
  "dedicata</a> al plugin."
215
 
216
- #: includes/settings.php:372
217
  msgid "Enter the iubenda code for the Cookie Solution below."
218
  msgstr "Inserisci qui sotto il codice di iubenda per la Cookie Solution."
219
 
220
- #: includes/settings.php:373
221
  #, php-format
222
  msgid ""
223
- "In order to run the plugin, you need to enter the iubenda code that activates "
224
- "the cookie law banner and the cookie policy in the form below. This code can be "
225
- "generated on www.iubenda.com, following <a href=\"%s\" class=\"iubenda-url\" "
226
- "target=\"_blank\">this guide.</a>"
227
  msgstr ""
228
  "Per far funzionare il plugin, è necessario inserire nel form sottostante il "
229
- "codice di iubenda che attiva il cookie banner e la cookie policy. Questo codice "
230
- "può essere generato su www.iubenda.com seguendo le istruzioni contenute in <a "
231
- "href=\"%s\" class=\"iubenda-url\" target=\"_blank\">questa guida</a>."
 
232
 
233
- #: includes/settings.php:378
 
 
 
 
 
 
 
 
 
234
  msgid ""
235
  "Maintaining comprehensive records of consent is a vital part of privacy "
236
- "compliance in general but is specifically required under the GDPR. These records "
237
- "should include a way of identifying the user, store proof of consent, record of "
238
- "the consenting action, and the legal documents available to the user at the time "
239
- "of consent, among other things. You can read about the <a href=\"https://www."
240
- "iubenda.com/en/help/5428#records-of-consent\" target=\"_blank\">full "
241
- "requirements here</a>."
242
- msgstr ""
243
- "Oltre ad essere un elemento vitale per il rispetto della privacy in generale, il "
244
- "mantenimento di un registro dei consensi è specificamente richiesto dal GDPR. "
245
- "Tra le altre cose, tale registro dovrebbe includere un modo per identificare "
246
- "l'utente, la prova del consenso, la registrazione dell'azione di consenso e i "
247
- "documenti legali messi a disposizione dell'utente al momento del consenso. <a "
248
- "href=\"https://www.iubenda.com/it/help/5424#registro-consensi\" target=\"_blank"
249
- "\">Trovi tutti i requisiti qui</a>."
250
-
251
- #: includes/settings.php:402
 
252
  #, php-format
253
  msgid ""
254
- "This plugin drastically reduces the need for direct interventions in the code of "
255
- "the site by integrating with iubenda’s Cookie Solution. It provides a fully "
256
- "customizable cookie banner, dynamically generates a cookie policy <a href=\"%s\" "
257
- "target=\"_blank\">to match the services in use on your site</a>, and, fully "
258
- "manages cookie-related consent – including the blocking of the most common "
259
- "widgets and third-party cookies before consent is received – in order to comply "
260
- "with the GDPR and ePrivacy."
261
- msgstr ""
262
- "Grazie all'integrazione con la Cookie Solution di iubenda, questo plugin riduce "
263
- "drasticamente la necessità di interventi diretti sul codice del sito. Prevede un "
264
- "cookie banner completamente personalizzabile, genera una cookie policy che <a "
265
- "href=\"%s\" target=\"_blank\">rispecchia i servizi in uso dal tuo sito web</a> e "
266
- "gestisce il consenso ai cookie (incluso il blocco automatico dei widget e dei "
267
- "cookie di terza parte più diffusi) in modo da permetterti di rispettare il GDPR "
268
- "e la Direttiva ePrivacy."
269
-
270
- #: includes/settings.php:404
271
  msgid ""
272
- "Maintaining valid records of consent is a vital part of privacy compliance in "
273
- "general, and it is specifically required under the GDPR. These records should "
274
- "include a userid, timestamp, consent proof, record of the consenting action, and "
275
- "the legal documents available to the user at the time of consent, among other "
276
- "things. This plugin is THE most complete solution for recording, sorting and "
277
- "maintaining GDPR records of consent*. The plugin also boasts built-in "
278
- "compatibility with WordPress comment form, Contact Form 7 and WP Forms plugins "
279
- "for your convenience, but can be manually integrated with any type of web-form "
280
- "and can even store consent proofs for consents collected offline (e.g in-store "
281
- "sign-ups) via WP media upload."
282
- msgstr ""
283
- "Il mantenimento di un valido registro dei consensi è un elemento vitale per il "
284
- "rispetto della privacy, ed è specificamente richiesto dal GDPR. Tra le altre "
285
- "cose, questo registro dovrebbe includere l'identificativo dell'utente, il "
286
- "timestamp, la prova del consenso, la registrazione dell'azione di consenso e i "
287
- "documenti legali messi a disposizione dell'utente nel momento in cui il consenso "
288
- stato acquisito. Questo plugin è la soluzione più completa per la creazione e "
289
- "la gestione di un registro dei consensi*. Il plugin è compatibile con il modulo "
290
- "dei commenti WordPress e i plugin Contact Form 7 e WP Forms, può essere "
291
- "integrato manualmente con qualsiasi form e può memorizzare la prova del consenso "
292
- "anche per i consensi raccolti offline (ad esempio, le iscrizioni in-store) "
293
- "tramite l'upload dei media WP."
294
-
295
- #: includes/settings.php:422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  msgid "Reset to defaults"
297
  msgstr "Ripristina le impostazioni di default"
298
 
299
- #: includes/settings.php:434
300
  msgid "Need support for this plugin?"
301
  msgstr "Serve aiuto per questo plugin?"
302
 
303
- #: includes/settings.php:435
304
  #, php-format
305
  msgid ""
306
- "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">support forum.</"
307
- "a>"
308
  msgstr ""
309
- "Visita il nostro <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">forum di "
310
- "supporto</a>"
311
 
312
- #: includes/settings.php:479
313
  #, php-format
314
  msgid "Enter the iubenda code for %s."
315
  msgstr "Inserisci il codice di iubenda per %s."
316
 
317
- #: includes/settings.php:490
318
  msgid "Enter the iubenda code."
319
  msgstr "Inserisci il codice di iubenda."
320
 
321
- #: includes/settings.php:518
322
  #, fuzzy
323
  #| msgid "Enter a list of custom scripts (one per line)."
324
- msgid "Enter the list of custom scripts you’d like to block here (one per line)"
 
 
325
  msgstr "Elenca gli script personalizzati (uno per riga)."
326
 
327
- #: includes/settings.php:522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  #, fuzzy
329
  #| msgid "Enter a list of custom iframes (one per line)."
330
- msgid "Enter the list of custom iframes you’d like to block here (one per line)."
 
 
331
  msgstr "Elenca gli iframe personalizzati (uno per riga)."
332
 
333
- #: includes/settings.php:537
334
- msgid "Automatically block scripts detected by the plugin."
 
 
 
 
 
 
335
  msgstr "Blocca automaticamente gli script rilevati dal plugin."
336
 
337
- #: includes/settings.php:538
338
  #, php-format
339
  msgid ""
340
  "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of "
@@ -343,286 +433,343 @@ msgstr ""
343
  "visita <a href=\"%s\" target=\"_blank\">la nostra documentazione</a> per la "
344
  "lista degli script rilevati automaticamente dal plugin."
345
 
346
- #: includes/settings.php:541
347
  msgid "Primary"
348
  msgstr "Primario"
349
 
350
- #: includes/settings.php:542
351
  msgid "Secondary"
352
  msgstr "Secondario"
353
 
354
- #: includes/settings.php:543
355
  msgid "Select parsing engine."
356
  msgstr "Seleziona il motore di parsing."
357
 
358
- #: includes/settings.php:546
359
- msgid "Leave scripts untouched on the page if the user has already given consent"
 
360
  msgstr ""
361
- "Lascia gli script intatti sulla pagina se l'utente ha già prestato il consenso"
 
362
 
363
- #: includes/settings.php:547
 
 
 
 
364
  msgid ""
365
- "improves performance, highly recommended, to be deactivated only if your site "
366
- "uses a caching system"
367
  msgstr ""
368
- "migliora le prestazioni, altamente consigliato, da disattivare solo qualora il "
369
- "tuo sito utilizzi un sistema di cache"
370
 
371
- #: includes/settings.php:561
372
  msgid ""
373
- "Restrict the plugin to run only for requests that have \"Content-type: text / "
374
- "html\" (recommended)"
375
  msgstr ""
376
- "Restringi l'esecuzione del plugin alle sole richieste che presentano \"Content-"
377
- "type: text/html\" (consigliato)"
378
 
379
- #: includes/settings.php:573
380
  msgid "Do not run the plugin inside the RSS feed (recommended)"
381
  msgstr "Non eseguire il plugin all'interno dei Feed RSS (consigliato)"
382
 
383
- #: includes/settings.php:585
384
  #, fuzzy
385
  #| msgid "Do not run the plugin inside the RSS feed (recommended)"
386
  msgid "Do not run the plugin on POST requests (recommended)"
387
  msgstr "Non eseguire il plugin per richieste POST (consigliato)"
388
 
389
- #: includes/settings.php:597
390
  msgid "Top menu"
391
  msgstr "Menu principale"
392
 
393
- #: includes/settings.php:598
394
  msgid "Submenu"
395
  msgstr "Sottomenu"
396
 
397
- #: includes/settings.php:599
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  msgid ""
399
- "Select whether to display iubenda in a top admin menu or the Settings submenu."
 
 
 
 
 
 
 
 
400
  msgstr ""
401
- "Scegli se visualizzare iubenda in una voce di menu principale del pannello admin "
402
- "o in un sottomenu della scheda Impostazioni."
403
 
404
- #: includes/settings.php:611
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
405
  msgid "Delete all plugin data upon deactivation?"
406
- msgstr "Vuoi eliminare tutti i dati del plugin al momento della disattivazione?"
 
407
 
408
- #: includes/settings.php:624
409
  msgid "Enter your iubenda Javascript library public API key."
410
- msgstr "Inserisci la chiave API pubblica per la libreria JavaScript di iubenda."
 
411
 
412
- #: includes/settings.php:640
413
  msgid ""
414
- "This section lists the forms available for field mapping. The plugin currently "
415
- "supports & detects: WordPress Comment, Contact Form 7, WooCommerce Checkout and "
416
- "WP Forms."
417
  msgstr ""
418
  "Questa sezione elenca i form disponibili al mapping. Al momento il plugin "
419
- "supporta e rileva: Commenti WordPress, Contact Form 7, WooCommerce Checkout e WP "
420
- "Forms."
421
 
422
- #: includes/settings.php:701
423
  #, php-format
424
  msgid "%s form title."
425
  msgstr "%s nome del form."
426
 
427
- #: includes/settings.php:701
428
  msgid "Unknown"
429
  msgstr "Sconosciuto"
430
 
431
- #: includes/settings.php:703
432
  msgid "Available form fields:"
433
  msgstr "Campi disponibili:"
434
 
435
- #: includes/settings.php:709
436
  msgid "Publish"
437
  msgstr "Pubblica"
438
 
439
- #: includes/settings.php:714
440
  msgid "Status"
441
  msgstr "Stato"
442
 
443
- #: includes/settings.php:727
444
  msgid "Cancel"
445
  msgstr "Annulla"
446
 
447
- #: includes/settings.php:732
448
  msgid "Save"
449
  msgstr "Salva"
450
 
451
- #: includes/settings.php:745
452
  msgid "Map fields"
453
  msgstr "Mappa i campi"
454
 
455
- #: includes/settings.php:751
456
  msgid "Subject fields"
457
  msgstr "Utente"
458
 
459
- #: includes/settings.php:752
 
 
 
 
 
460
  msgid ""
461
  "Subject fields allow you to store a series of identifying values about your "
462
- "individual subjects/users. Please map the subject field with the corresponding "
463
- "form fields where applicable."
464
  msgstr ""
465
  "Questi campi ti permettono di memorizzare una serie di valori identificativi "
466
- "dell'utente. Associa gli attributi dell'utente ai corrispondenti campi del form "
467
- "(quando applicabile)."
468
 
469
- #: includes/settings.php:757
470
  msgid "Subject field"
471
  msgstr "Attributo"
472
 
473
- #: includes/settings.php:758 includes/settings.php:802
474
  msgid "Form field"
475
  msgstr "Campo del form"
476
 
477
- #: includes/settings.php:764
478
  msgid "Autogenerated"
479
  msgstr "Generato automaticamente"
480
 
481
- #: includes/settings.php:764
482
  msgid "None"
483
  msgstr "Nessuno"
484
 
485
- #: includes/settings.php:795
486
  msgid "Preferences fields"
487
  msgstr "Preferenze"
488
 
489
- #: includes/settings.php:796
490
  msgid ""
491
- "Preferences fields allow you to store a record of the various opt-ins points at "
492
- "which the user has agreed or given consent, such as fields for agreeing to terms "
493
- "and conditions, newsletter, profiling, etc. *Please create at least one "
494
- "preference field."
495
  msgstr ""
496
- "Questi campi ti permettono di memorizzare a cosa l'utente ha prestato il proprio "
497
- "consenso, come ad esempio i termini e condizioni, la newsletter la profilazione, "
498
- "ecc. *Si prega di creare almeno un campo."
499
 
500
- #: includes/settings.php:801
501
  msgid "Preferences field"
502
  msgstr "Campo delle preferenze"
503
 
504
- #: includes/settings.php:807 includes/settings.php:833 includes/settings.php:958
505
- #: includes/settings.php:968 includes/settings.php:984
 
506
  msgid "Enter field name"
507
  msgstr "Aggiungi il nome di un campo"
508
 
509
- #: includes/settings.php:821 includes/settings.php:848 includes/settings.php:889
510
- #: includes/settings.php:917 includes/settings.php:968 includes/settings.php:984
511
- msgid "Remove"
512
- msgstr "Elimina"
513
-
514
- #: includes/settings.php:857
515
  msgid "Add New Preference"
516
  msgstr "Aggiungi nuova preferenza"
517
 
518
- #: includes/settings.php:864
519
  msgid "Exclude fields"
520
  msgstr "Esclusioni"
521
 
522
- #: includes/settings.php:865
523
  msgid ""
524
  "Exclude fields allow you to create a list of fields that you would like to "
525
- "exclude from your Consent Solution recorded proofs (for e.g. password or other "
526
- "fields not related to the consent)."
527
  msgstr ""
528
  "Qui puoi creare una lista dei campi che desideri escludere dalle prove del "
529
- "consenso memorizzate dalla Consent Solution (ad es. password o altri campi non "
530
- "correlati)."
531
 
532
- #: includes/settings.php:870
533
  msgid "Exclude field"
534
  msgstr "Campi esclusi"
535
 
536
- #: includes/settings.php:927
537
  msgid "Add New Exclude"
538
  msgstr "Aggiungi una nuova esclusione"
539
 
540
- #: includes/settings.php:937
541
  msgid "Legal Notices"
542
  msgstr "Note legali"
543
 
544
- #: includes/settings.php:943
545
  msgid "Legal documents"
546
  msgstr "Documenti legali"
547
 
548
- #: includes/settings.php:944
549
  msgid ""
550
  "In general, it’s important that you declare which legal documents are being "
551
- "agreed upon when each consent is collected. However, if you use iubenda for your "
552
- "legal documents, it is *required* that you identify the documents by selecting "
553
- "them here."
554
  msgstr ""
555
- "In generale, è importante dichiarare quali documenti legali vengono accettati al "
556
- "momento del conferimento del consenso. Se usi iubenda per le tue informative, "
557
- "*devi* identificare tali documenti selezionandoli qui."
558
 
559
- #: includes/settings.php:949
560
  msgid "Identifier"
561
  msgstr "Identificatore"
562
 
563
- #: includes/settings.php:958
564
  msgid "Please select each legal document available on your site."
565
  msgstr "Seleziona tutti i documenti legali presenti sul tuo sito."
566
 
567
- #: includes/settings.php:974
568
  msgid "Alternatively, you may add your own custom document identifiers."
569
  msgstr "In alternativa, puoi aggiungere degli identificatori personalizzati."
570
 
571
- #: includes/settings.php:993
572
  msgid "Add New Document"
573
  msgstr "Aggiungi un nuovo documento"
574
 
575
- #: includes/settings.php:1067 includes/settings.php:1099
 
576
  msgid "Settings saved."
577
  msgstr "Impostazioni salvate."
578
 
579
- #: includes/settings.php:1079 includes/settings.php:1104
580
  msgid "Settings restored to defaults."
581
  msgstr "Impostazioni di default ripristinate."
582
 
583
- #: includes/settings.php:1128
584
  #, php-format
585
  msgid ""
586
  "Please enable comments cookies opt-in checkbox in the <a href=\"%s\" target="
587
  "\"_blank\">Discussion settings</a>."
588
  msgstr ""
589
  "Abilita per i commenti la possibilità di attivare o disattivare la "
590
- "memorizzazione dei dati personali in un cookie. Per farlo, vai su <a href=\"%s\" "
591
- "target=\"_blank\">Impostazioni discussione</a>."
592
 
593
- #: includes/settings.php:1148
594
  msgid "No forms or form changes detected."
595
  msgstr "Nessun form o modifica rilevati."
596
 
597
- #: includes/settings.php:1216
598
  msgid "Form saving failed. Please fill the Subject and Preferences fields."
599
  msgstr "Salvataggio del form fallito. Compila i campi Utente e Preferenze."
600
 
601
- #: includes/settings.php:1240
602
  #, fuzzy
603
  #| msgid "Settings applied successfully"
604
  msgid "Form saved successfully - form status changed to Mapped."
605
  msgstr "Form salvato con successo - Stato aggiornato a Mappato."
606
 
607
- #: includes/settings.php:1243
608
  msgid "Form updated successfully."
609
  msgstr "Form aggiornato con successo."
610
 
611
- #: includes/settings.php:1246
612
  msgid "Form saving failed."
613
  msgstr "Salvataggio del form fallito."
614
 
615
- #: includes/settings.php:1263
616
  #, fuzzy
617
  #| msgid "Settings applied successfully"
618
  msgid "Form deleted successfully."
619
  msgstr "Form eliminato con successo."
620
 
621
- #: includes/settings.php:1265
622
  msgid "Form delete failed."
623
  msgstr "Eliminazione del form fallita."
624
 
625
- #: includes/settings.php:1325
626
  msgid "Dismiss this notice."
627
  msgstr "Chiudi questo avviso."
628
 
@@ -665,8 +812,8 @@ msgstr "Chiudi questo avviso."
665
  #~ msgstr "Effettua il blocco automatico degli script rilevati dal plugin"
666
 
667
  #~ msgid ""
668
- #~ "see <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">our documentation</"
669
- #~ "a> for the list of detected scripts."
670
  #~ msgstr ""
671
  #~ "consulta la <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">nostra "
672
  #~ "documentazione</a> per la lista di script rilevati."
@@ -674,9 +821,6 @@ msgstr "Chiudi questo avviso."
674
  #~ msgid "Parsing engine"
675
  #~ msgstr "Parsing engine"
676
 
677
- #~ msgid "Experimental (enhances performance)"
678
- #~ msgstr "Sperimentale (performance migliorata)"
679
-
680
  #~ msgid ""
681
  #~ "Leaves scripts untouched on the page if the user has already given consent"
682
  #~ msgstr ""
@@ -686,11 +830,11 @@ msgstr "Chiudi questo avviso."
686
  #~ msgstr "Applica ottimizzazioni speciali in caso di errori con l'output"
687
 
688
  #~ msgid ""
689
- #~ "only select this option if you had performance problems or if you notice that "
690
- #~ "the blocking of code is run several times"
691
  #~ msgstr ""
692
- #~ "attiva questa opzione solo qualora avessi problemi di performance o notassi "
693
- #~ "che il blocco dei codici viene applicato più volte"
694
 
695
  #~ msgid "Parsed with iubenda experimental class in %s sec."
696
  #~ msgstr "Parsed with iubenda experimental class in %s sec."
@@ -699,8 +843,8 @@ msgstr "Chiudi questo avviso."
699
  #~ msgstr "Parsed with iubenda default class in %s sec."
700
 
701
  #~ msgid ""
702
- #~ "see <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">our documentation</"
703
- #~ "a> for the list of detected scripts this guide."
704
  #~ msgstr ""
705
  #~ "consulta la <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">nostra "
706
  #~ "documentazione</a> per la lista di script rilevati."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Iubenda Cookie Solution\n"
4
+ "POT-Creation-Date: 2020-01-22 17:20+0100\n"
5
+ "PO-Revision-Date: 2020-01-22 17:20+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: it\n"
16
  "X-Poedit-KeywordsList: __\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: includes/amp.php:134
20
+ msgid "Loading"
21
+ msgstr ""
22
+
23
  #: includes/forms-list-table.php:92
24
  msgid "Form Title"
25
  msgstr "Nome del form"
29
  msgstr "ID del form"
30
 
31
  #: includes/forms-list-table.php:94
32
+ #, fuzzy
33
+ #| msgid "Source"
34
+ msgid "Form Source"
35
  msgstr "Fonte"
36
 
37
  #: includes/forms-list-table.php:95
66
  msgid "No forms found."
67
  msgstr "Nessun form trovato."
68
 
69
+ #: includes/forms.php:149 includes/settings.php:136
70
  msgid "Forms"
71
  msgstr "Form"
72
 
75
  msgstr "Form"
76
 
77
  #: includes/forms.php:566 includes/forms.php:580
 
78
  msgid "First name"
79
  msgstr "Nome"
80
 
81
  #: includes/forms.php:572 includes/forms.php:592
 
82
  msgid "Last name"
83
  msgstr "Cognome"
84
 
85
  #: includes/forms.php:586
 
86
  msgid "Middle name"
87
  msgstr "Secondo nome"
88
 
91
  msgid "string"
92
  msgstr "stringa"
93
 
94
+ #: includes/settings.php:57 includes/settings.php:181
95
  msgid "Cookie Solution"
96
  msgstr "Cookie Solution"
97
 
98
+ #: includes/settings.php:63 includes/settings.php:182
99
  msgid "Consent Solution"
100
  msgstr "Consent Solution"
101
 
102
+ #: includes/settings.php:71
103
+ msgid "Not set"
104
+ msgstr ""
105
+
106
+ #: includes/settings.php:72
107
+ msgid "Strictly necessary"
108
+ msgstr ""
109
+
110
+ #: includes/settings.php:73
111
+ msgid "Basic interactions & functionalities"
112
+ msgstr ""
113
+
114
+ #: includes/settings.php:74
115
+ #, fuzzy
116
+ #| msgid "Experimental (enhances performance)"
117
+ msgid "Experience enhancement"
118
+ msgstr "Sperimentale (performance migliorata)"
119
+
120
+ #: includes/settings.php:75
121
+ msgid "Analytics"
122
+ msgstr ""
123
+
124
+ #: includes/settings.php:76
125
+ msgid "Targeting & Advertising"
126
+ msgstr ""
127
+
128
+ #: includes/settings.php:123
129
  msgid "Code"
130
  msgstr "Codice"
131
 
132
+ #: includes/settings.php:124
133
  #, fuzzy
134
  #| msgid "Scripts blocking"
135
  msgid "Script blocking"
136
  msgstr "Blocco preventivo dei codici"
137
 
138
+ #: includes/settings.php:125
139
  msgid "Custom scripts"
140
  msgstr "Script personalizzati"
141
 
142
+ #: includes/settings.php:126
143
  msgid "Content type"
144
  msgstr "Tipo di contenuto"
145
 
146
+ #: includes/settings.php:127
147
  msgid "RSS feed"
148
  msgstr "Feed RSS"
149
 
150
+ #: includes/settings.php:128
151
  msgid "POST requests"
152
  msgstr "Richieste POST"
153
 
154
+ #: includes/settings.php:129
155
  msgid "Menu position"
156
  msgstr "Posizione menu"
157
 
158
+ #: includes/settings.php:130
159
+ msgid "Google AMP"
160
+ msgstr ""
161
+
162
+ #: includes/settings.php:131
163
  msgid "Deactivation"
164
  msgstr "Disattivazione"
165
 
166
+ #: includes/settings.php:137
167
+ #, fuzzy
168
+ #| msgid "Public API Key"
169
+ msgid "Public Api Key"
170
  msgstr "Chiave API pubblica"
171
 
172
+ #: includes/settings.php:140 includes/settings.php:144
173
  msgid "Field Mapping"
174
  msgstr "Mapping dei campi"
175
 
176
+ #: includes/settings.php:202
177
  msgid "Are you sure you want to delete this form?"
178
  msgstr "Sei sicuro di voler eliminare questo form?"
179
 
180
+ #: includes/settings.php:350
181
  msgid "You don't have permission to access this page."
182
  msgstr "Non disponi dell'autorizzazione per accedere a questa pagina."
183
 
184
+ #: includes/settings.php:376
185
  #, fuzzy
186
  #| msgid ""
187
+ #| "This plugin is the easiest and most comprehensive way to adapt your "
188
+ #| "WordPress site to the European cookie law. Upon your user's first visit, "
189
+ #| "the plugin will take care of collecting their consent, of blocking the "
190
+ #| "most popular among the scripts that install cookies and subsequently "
191
+ #| "reactivate these scripts as soon as consent is provided. The basic "
192
+ #| "settings include obtaining consent by a simple scroll action (the most "
193
+ #| "effective method) and script reactivation without refreshing the page."
194
  msgid ""
195
+ "This plugin is the easiest and most comprehensive way to adapt your "
196
+ "WordPress site to the ePrivacy (EU Cookie Law). Upon your users’ first "
197
+ "visit, the plugin will take care of collecting their consent, blocking the "
198
+ "most popular cookie-scripts and subsequently reactivating these scripts as "
199
+ "soon as consent is provided. The basic settings include obtaining consent by "
200
+ "a simple scroll action (the most effective method) and script reactivation "
201
+ "without refreshing the page (asynchronous script reactivation)."
202
  msgstr ""
203
  "Questo plugin è il modo più semplice e completo per adeguare il tuo sito "
204
+ "WordPress alla Direttiva ePrivacy (Cookie Law). Alla prima visita "
205
+ "dell'utente il plugin si occuperà di raccoglierne il consenso, bloccare gli "
206
+ "script più popolari che installano cookie e riattivarli non appena il "
207
+ "consenso viene fornito. Le impostazioni di base includono la raccolta del "
208
+ "consenso tramite il semplice scroll (il metodo più efficace) e la "
209
+ "riattivazione senza il refresh della pagina."
210
+
211
+ #: includes/settings.php:379
212
+ msgid ""
213
+ "Does the Cookie Solution support IAB’s Transparency and Consent Framework?"
214
+ msgstr ""
215
+ "La Cookie Solution supporta il Transparency e Consent Framework di IAB?"
216
 
217
+ #: includes/settings.php:380
218
  #, fuzzy, php-format
219
  #| msgid ""
220
+ #| "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin "
221
+ #| "page.</a>"
222
  msgid ""
223
  "Yes it does. You can read more about it <a href=\"%s\" class=\"iubenda-url\" "
224
  "target=\"_blank\">here.</a>"
225
  msgstr ""
226
+ "Sì. Visita <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">questa "
227
+ "pagina</a> per maggiori dettagli."
228
 
229
+ #: includes/settings.php:383
230
+ #, fuzzy
231
+ #| msgid "Would you like to know more about the Cookie Law?"
232
+ msgid "Would you like to know more about the cookie law?"
233
  msgstr "Vuoi saperne di più sulla Cookie Law?"
234
 
235
+ #: includes/settings.php:384
236
+ #, fuzzy, php-format
237
+ #| msgid ""
238
+ #| "Read our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">complete "
239
+ #| "guide to the Cookie Law</a>."
240
  msgid ""
241
+ "Read our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">complete "
242
+ "guide to the cookie law.</a>"
243
  msgstr ""
244
  "Leggi la nostra <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">guida "
245
  "completa alla Cookie Law</a>."
246
 
247
+ #: includes/settings.php:387
248
  msgid "What is the full functionality of the plugin?"
249
  msgstr "Quali sono le funzionalità del plugin?"
250
 
251
+ #: includes/settings.php:388
252
+ #, fuzzy, php-format
253
+ #| msgid ""
254
+ #| "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin "
255
+ #| "page</a>."
256
  msgid ""
257
+ "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin page."
258
+ "</a>"
259
  msgstr ""
260
  "Visita la <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">pagina "
261
  "dedicata</a> al plugin."
262
 
263
+ #: includes/settings.php:391
264
  msgid "Enter the iubenda code for the Cookie Solution below."
265
  msgstr "Inserisci qui sotto il codice di iubenda per la Cookie Solution."
266
 
267
+ #: includes/settings.php:392
268
  #, php-format
269
  msgid ""
270
+ "In order to run the plugin, you need to enter the iubenda code that "
271
+ "activates the cookie law banner and the cookie policy in the form below. "
272
+ "This code can be generated on www.iubenda.com, following <a href=\"%s\" "
273
+ "class=\"iubenda-url\" target=\"_blank\">this guide.</a>"
274
  msgstr ""
275
  "Per far funzionare il plugin, è necessario inserire nel form sottostante il "
276
+ "codice di iubenda che attiva il cookie banner e la cookie policy. Questo "
277
+ "codice può essere generato su www.iubenda.com seguendo le istruzioni "
278
+ "contenute in <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">questa "
279
+ "guida</a>."
280
 
281
+ #: includes/settings.php:397
282
+ #, fuzzy
283
+ #| msgid ""
284
+ #| "Maintaining comprehensive records of consent is a vital part of privacy "
285
+ #| "compliance in general but is specifically required under the GDPR. These "
286
+ #| "records should include a way of identifying the user, store proof of "
287
+ #| "consent, record of the consenting action, and the legal documents "
288
+ #| "available to the user at the time of consent, among other things. You can "
289
+ #| "read about the <a href=\"https://www.iubenda.com/en/help/5428#records-of-"
290
+ #| "consent\" target=\"_blank\">full requirements here</a>."
291
  msgid ""
292
  "Maintaining comprehensive records of consent is a vital part of privacy "
293
+ "compliance in general but is specifically required under the GDPR. These "
294
+ "records should include a way of identifying the user, store proof of "
295
+ "consent, record of the consenting action, and the legal documents available "
296
+ "to the user at the time of consent, among other things. You can read about "
297
+ "the <a href=\"https://www.iubenda.com/en/help/5428-gdpr-guide#records-of-"
298
+ "consent\" target=\"_blank\">full requirements here</a>."
299
+ msgstr ""
300
+ "Oltre ad essere un elemento vitale per il rispetto della privacy in "
301
+ "generale, il mantenimento di un registro dei consensi è specificamente "
302
+ "richiesto dal GDPR. Tra le altre cose, tale registro dovrebbe includere un "
303
+ "modo per identificare l'utente, la prova del consenso, la registrazione "
304
+ "dell'azione di consenso e i documenti legali messi a disposizione "
305
+ "dell'utente al momento del consenso. <a href=\"https://www.iubenda.com/it/"
306
+ "help/5424#registro-consensi\" target=\"_blank\">Trovi tutti i requisiti qui</"
307
+ "a>."
308
+
309
+ #: includes/settings.php:421
310
  #, php-format
311
  msgid ""
312
+ "If you are using per-purpose script blocking or Reject option please disable "
313
+ "the \"Leave scripts untouched on the page if the user has already given "
314
+ "consent\" option. <a href=\"%s\" target=\"_self\">Disable now</a>"
315
+ msgstr ""
316
+
317
+ #: includes/settings.php:441
318
+ #, php-format
 
 
 
 
 
 
 
 
 
 
319
  msgid ""
320
+ "This plugin drastically reduces the need for direct interventions in the "
321
+ "code of the site by integrating with iubenda’s Cookie Solution. It provides "
322
+ "a fully customizable cookie banner, dynamically generates a cookie policy <a "
323
+ "href=\"%s\" target=\"_blank\">to match the services in use on your site</a>, "
324
+ "and, fully manages cookie-related consent including the blocking of the "
325
+ "most common widgets and third-party cookies before consent is received in "
326
+ "order to comply with the GDPR and ePrivacy."
327
+ msgstr ""
328
+ "Grazie all'integrazione con la Cookie Solution di iubenda, questo plugin "
329
+ "riduce drasticamente la necessità di interventi diretti sul codice del sito. "
330
+ "Prevede un cookie banner completamente personalizzabile, genera una cookie "
331
+ "policy che <a href=\"%s\" target=\"_blank\">rispecchia i servizi in uso dal "
332
+ "tuo sito web</a> e gestisce il consenso ai cookie (incluso il blocco "
333
+ "automatico dei widget e dei cookie di terza parte più diffusi) in modo da "
334
+ "permetterti di rispettare il GDPR e la Direttiva ePrivacy."
335
+
336
+ #: includes/settings.php:443
337
+ msgid ""
338
+ "Maintaining valid records of consent is a vital part of privacy compliance "
339
+ "in general, and it is specifically required under the GDPR. These records "
340
+ "should include a userid, timestamp, consent proof, record of the consenting "
341
+ "action, and the legal documents available to the user at the time of "
342
+ "consent, among other things. This plugin is THE most complete solution for "
343
+ "recording, sorting and maintaining GDPR records of consent*. The plugin also "
344
+ "boasts built-in compatibility with WordPress comment form, Contact Form 7 "
345
+ "and WP Forms plugins for your convenience, but can be manually integrated "
346
+ "with any type of web-form and can even store consent proofs for consents "
347
+ "collected offline (e.g in-store sign-ups) via WP media upload."
348
+ msgstr ""
349
+ "Il mantenimento di un valido registro dei consensi è un elemento vitale per "
350
+ "il rispetto della privacy, ed è specificamente richiesto dal GDPR. Tra le "
351
+ "altre cose, questo registro dovrebbe includere l'identificativo dell'utente, "
352
+ "il timestamp, la prova del consenso, la registrazione dell'azione di "
353
+ "consenso e i documenti legali messi a disposizione dell'utente nel momento "
354
+ "in cui il consenso è stato acquisito. Questo plugin è la soluzione più "
355
+ "completa per la creazione e la gestione di un registro dei consensi*. Il "
356
+ "plugin è compatibile con il modulo dei commenti WordPress e i plugin Contact "
357
+ "Form 7 e WP Forms, può essere integrato manualmente con qualsiasi form e può "
358
+ "memorizzare la prova del consenso anche per i consensi raccolti offline (ad "
359
+ "esempio, le iscrizioni in-store) tramite l'upload dei media WP."
360
+
361
+ #: includes/settings.php:461
362
  msgid "Reset to defaults"
363
  msgstr "Ripristina le impostazioni di default"
364
 
365
+ #: includes/settings.php:473
366
  msgid "Need support for this plugin?"
367
  msgstr "Serve aiuto per questo plugin?"
368
 
369
+ #: includes/settings.php:474
370
  #, php-format
371
  msgid ""
372
+ "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">support "
373
+ "forum.</a>"
374
  msgstr ""
375
+ "Visita il nostro <a href=\"%s\" class=\"iubenda-url\" target=\"_blank"
376
+ "\">forum di supporto</a>"
377
 
378
+ #: includes/settings.php:518
379
  #, php-format
380
  msgid "Enter the iubenda code for %s."
381
  msgstr "Inserisci il codice di iubenda per %s."
382
 
383
+ #: includes/settings.php:529
384
  msgid "Enter the iubenda code."
385
  msgstr "Inserisci il codice di iubenda."
386
 
387
+ #: includes/settings.php:556
388
  #, fuzzy
389
  #| msgid "Enter a list of custom scripts (one per line)."
390
+ msgid ""
391
+ "Provide a list of custom scripts you’d like to block and assign their "
392
+ "purpose."
393
  msgstr "Elenca gli script personalizzati (uno per riga)."
394
 
395
+ #: includes/settings.php:558 includes/settings.php:565
396
+ #, fuzzy
397
+ #| msgid "Custom scripts"
398
+ msgid "Enter custom script"
399
+ msgstr "Script personalizzati"
400
+
401
+ #: includes/settings.php:558 includes/settings.php:565
402
+ #: includes/settings.php:576 includes/settings.php:583
403
+ #: includes/settings.php:959 includes/settings.php:986
404
+ #: includes/settings.php:1027 includes/settings.php:1055
405
+ #: includes/settings.php:1106 includes/settings.php:1122
406
+ msgid "Remove"
407
+ msgstr "Elimina"
408
+
409
+ #: includes/settings.php:574
410
  #, fuzzy
411
  #| msgid "Enter a list of custom iframes (one per line)."
412
+ msgid ""
413
+ "Provide a list of custom iframes you’d like to block and assign their "
414
+ "purpose. "
415
  msgstr "Elenca gli iframe personalizzati (uno per riga)."
416
 
417
+ #: includes/settings.php:576 includes/settings.php:583
418
+ msgid "Enter custom iframe"
419
+ msgstr ""
420
+
421
+ #: includes/settings.php:621
422
+ #, fuzzy
423
+ #| msgid "Automatically block scripts detected by the plugin."
424
+ msgid "Automatically block scripts detected by the plugin"
425
  msgstr "Blocca automaticamente gli script rilevati dal plugin."
426
 
427
+ #: includes/settings.php:622
428
  #, php-format
429
  msgid ""
430
  "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of "
433
  "visita <a href=\"%s\" target=\"_blank\">la nostra documentazione</a> per la "
434
  "lista degli script rilevati automaticamente dal plugin."
435
 
436
+ #: includes/settings.php:625
437
  msgid "Primary"
438
  msgstr "Primario"
439
 
440
+ #: includes/settings.php:626
441
  msgid "Secondary"
442
  msgstr "Secondario"
443
 
444
+ #: includes/settings.php:627
445
  msgid "Select parsing engine."
446
  msgstr "Seleziona il motore di parsing."
447
 
448
+ #: includes/settings.php:630
449
+ msgid ""
450
+ "Leave scripts untouched on the page if the user has already given consent"
451
  msgstr ""
452
+ "Lascia gli script intatti sulla pagina se l'utente ha già prestato il "
453
+ "consenso"
454
 
455
+ #: includes/settings.php:631
456
+ #, fuzzy
457
+ #| msgid ""
458
+ #| "improves performance, highly recommended, to be deactivated only if your "
459
+ #| "site uses a caching system"
460
  msgid ""
461
+ "improves performance, highly recommended, to be deactivated only if your "
462
+ "site uses a caching system or if you're collecting per-category consent."
463
  msgstr ""
464
+ "migliora le prestazioni, altamente consigliato, da disattivare solo qualora "
465
+ "il tuo sito utilizzi un sistema di cache"
466
 
467
+ #: includes/settings.php:645
468
  msgid ""
469
+ "Restrict the plugin to run only for requests that have \"Content-type: "
470
+ "text / html\" (recommended)"
471
  msgstr ""
472
+ "Restringi l'esecuzione del plugin alle sole richieste che presentano "
473
+ "\"Content-type: text/html\" (consigliato)"
474
 
475
+ #: includes/settings.php:657
476
  msgid "Do not run the plugin inside the RSS feed (recommended)"
477
  msgstr "Non eseguire il plugin all'interno dei Feed RSS (consigliato)"
478
 
479
+ #: includes/settings.php:669
480
  #, fuzzy
481
  #| msgid "Do not run the plugin inside the RSS feed (recommended)"
482
  msgid "Do not run the plugin on POST requests (recommended)"
483
  msgstr "Non eseguire il plugin per richieste POST (consigliato)"
484
 
485
+ #: includes/settings.php:681
486
  msgid "Top menu"
487
  msgstr "Menu principale"
488
 
489
+ #: includes/settings.php:682
490
  msgid "Submenu"
491
  msgstr "Sottomenu"
492
 
493
+ #: includes/settings.php:683
494
+ msgid ""
495
+ "Select whether to display iubenda in a top admin menu or the Settings "
496
+ "submenu."
497
+ msgstr ""
498
+ "Scegli se visualizzare iubenda in una voce di menu principale del pannello "
499
+ "admin o in un sottomenu della scheda Impostazioni."
500
+
501
+ #: includes/settings.php:695
502
+ msgid "Enable Google AMP support."
503
+ msgstr ""
504
+
505
+ #: includes/settings.php:696
506
+ #, php-format
507
  msgid ""
508
+ "This feature enables iubenda on AMP pages via the <a href=\"%s\" target="
509
+ "\"_blank\">AMP</a> and <a href=\"%s\" target=\"_blank\">AMP for WP</a> "
510
+ "plugins. AMP requires specific configuration parameters and a page hosted on "
511
+ "your domain where the configuration is loaded from. <a href=\"%s\" target="
512
+ "\"_blank\">Learn more on iubenda and AMP</a>."
513
+ msgstr ""
514
+
515
+ #: includes/settings.php:699
516
+ msgid "Auto-generated configuration file"
517
  msgstr ""
 
 
518
 
519
+ #: includes/settings.php:700
520
+ msgid "Custom configuration file"
521
+ msgstr ""
522
+
523
+ #: includes/settings.php:701
524
+ msgid "Select the iubenda AMP configuration file location."
525
+ msgstr ""
526
+
527
+ #: includes/settings.php:706
528
+ msgid ""
529
+ "No file available. Save changes to generate iubenda AMP configuration file."
530
+ msgstr ""
531
+
532
+ #: includes/settings.php:734
533
+ msgid ""
534
+ "If you're experiencing issues with AMP setup download the generated iubenda "
535
+ "AMP configuration file, upload it to any SSL server and paste the file link "
536
+ "to the field above."
537
+ msgstr ""
538
+
539
+ #: includes/settings.php:736
540
+ #, php-format
541
+ msgid ""
542
+ "Seeing the AMP cookie notice when testing from Google but not when visiting "
543
+ "your AMP pages directly? <a href=\"%s\" target=\"_blank\">Learn how to fix "
544
+ "it</a>."
545
+ msgstr ""
546
+
547
+ #: includes/settings.php:749
548
  msgid "Delete all plugin data upon deactivation?"
549
+ msgstr ""
550
+ "Vuoi eliminare tutti i dati del plugin al momento della disattivazione?"
551
 
552
+ #: includes/settings.php:762
553
  msgid "Enter your iubenda Javascript library public API key."
554
+ msgstr ""
555
+ "Inserisci la chiave API pubblica per la libreria JavaScript di iubenda."
556
 
557
+ #: includes/settings.php:778
558
  msgid ""
559
+ "This section lists the forms available for field mapping. The plugin "
560
+ "currently supports & detects: WordPress Comment, Contact Form 7, WooCommerce "
561
+ "Checkout and WP Forms."
562
  msgstr ""
563
  "Questa sezione elenca i form disponibili al mapping. Al momento il plugin "
564
+ "supporta e rileva: Commenti WordPress, Contact Form 7, WooCommerce Checkout "
565
+ "e WP Forms."
566
 
567
+ #: includes/settings.php:839
568
  #, php-format
569
  msgid "%s form title."
570
  msgstr "%s nome del form."
571
 
572
+ #: includes/settings.php:839
573
  msgid "Unknown"
574
  msgstr "Sconosciuto"
575
 
576
+ #: includes/settings.php:841
577
  msgid "Available form fields:"
578
  msgstr "Campi disponibili:"
579
 
580
+ #: includes/settings.php:847
581
  msgid "Publish"
582
  msgstr "Pubblica"
583
 
584
+ #: includes/settings.php:852
585
  msgid "Status"
586
  msgstr "Stato"
587
 
588
+ #: includes/settings.php:865
589
  msgid "Cancel"
590
  msgstr "Annulla"
591
 
592
+ #: includes/settings.php:870
593
  msgid "Save"
594
  msgstr "Salva"
595
 
596
+ #: includes/settings.php:883
597
  msgid "Map fields"
598
  msgstr "Mappa i campi"
599
 
600
+ #: includes/settings.php:889
601
  msgid "Subject fields"
602
  msgstr "Utente"
603
 
604
+ #: includes/settings.php:890
605
+ #, fuzzy
606
+ #| msgid ""
607
+ #| "Subject fields allow you to store a series of identifying values about "
608
+ #| "your individual subjects/users. Please map the subject field with the "
609
+ #| "corresponding form fields where applicable."
610
  msgid ""
611
  "Subject fields allow you to store a series of identifying values about your "
612
+ "individual subjects/users. Please map the subject field with the "
613
+ "corresponding form fields where applicable."
614
  msgstr ""
615
  "Questi campi ti permettono di memorizzare una serie di valori identificativi "
616
+ "dell'utente. Associa gli attributi dell'utente ai corrispondenti campi del "
617
+ "form (quando applicabile)."
618
 
619
+ #: includes/settings.php:895
620
  msgid "Subject field"
621
  msgstr "Attributo"
622
 
623
+ #: includes/settings.php:896 includes/settings.php:940
624
  msgid "Form field"
625
  msgstr "Campo del form"
626
 
627
+ #: includes/settings.php:902
628
  msgid "Autogenerated"
629
  msgstr "Generato automaticamente"
630
 
631
+ #: includes/settings.php:902
632
  msgid "None"
633
  msgstr "Nessuno"
634
 
635
+ #: includes/settings.php:933
636
  msgid "Preferences fields"
637
  msgstr "Preferenze"
638
 
639
+ #: includes/settings.php:934
640
  msgid ""
641
+ "Preferences fields allow you to store a record of the various opt-ins points "
642
+ "at which the user has agreed or given consent, such as fields for agreeing "
643
+ "to terms and conditions, newsletter, profiling, etc. *Please create at least "
644
+ "one preference field."
645
  msgstr ""
646
+ "Questi campi ti permettono di memorizzare a cosa l'utente ha prestato il "
647
+ "proprio consenso, come ad esempio i termini e condizioni, la newsletter la "
648
+ "profilazione, ecc. *Si prega di creare almeno un campo."
649
 
650
+ #: includes/settings.php:939
651
  msgid "Preferences field"
652
  msgstr "Campo delle preferenze"
653
 
654
+ #: includes/settings.php:945 includes/settings.php:971
655
+ #: includes/settings.php:1096 includes/settings.php:1106
656
+ #: includes/settings.php:1122
657
  msgid "Enter field name"
658
  msgstr "Aggiungi il nome di un campo"
659
 
660
+ #: includes/settings.php:995
 
 
 
 
 
661
  msgid "Add New Preference"
662
  msgstr "Aggiungi nuova preferenza"
663
 
664
+ #: includes/settings.php:1002
665
  msgid "Exclude fields"
666
  msgstr "Esclusioni"
667
 
668
+ #: includes/settings.php:1003
669
  msgid ""
670
  "Exclude fields allow you to create a list of fields that you would like to "
671
+ "exclude from your Consent Solution recorded proofs (for e.g. password or "
672
+ "other fields not related to the consent)."
673
  msgstr ""
674
  "Qui puoi creare una lista dei campi che desideri escludere dalle prove del "
675
+ "consenso memorizzate dalla Consent Solution (ad es. password o altri campi "
676
+ "non correlati)."
677
 
678
+ #: includes/settings.php:1008
679
  msgid "Exclude field"
680
  msgstr "Campi esclusi"
681
 
682
+ #: includes/settings.php:1065
683
  msgid "Add New Exclude"
684
  msgstr "Aggiungi una nuova esclusione"
685
 
686
+ #: includes/settings.php:1075
687
  msgid "Legal Notices"
688
  msgstr "Note legali"
689
 
690
+ #: includes/settings.php:1081
691
  msgid "Legal documents"
692
  msgstr "Documenti legali"
693
 
694
+ #: includes/settings.php:1082
695
  msgid ""
696
  "In general, it’s important that you declare which legal documents are being "
697
+ "agreed upon when each consent is collected. However, if you use iubenda for "
698
+ "your legal documents, it is *required* that you identify the documents by "
699
+ "selecting them here."
700
  msgstr ""
701
+ "In generale, è importante dichiarare quali documenti legali vengono "
702
+ "accettati al momento del conferimento del consenso. Se usi iubenda per le "
703
+ "tue informative, *devi* identificare tali documenti selezionandoli qui."
704
 
705
+ #: includes/settings.php:1087
706
  msgid "Identifier"
707
  msgstr "Identificatore"
708
 
709
+ #: includes/settings.php:1096
710
  msgid "Please select each legal document available on your site."
711
  msgstr "Seleziona tutti i documenti legali presenti sul tuo sito."
712
 
713
+ #: includes/settings.php:1112
714
  msgid "Alternatively, you may add your own custom document identifiers."
715
  msgstr "In alternativa, puoi aggiungere degli identificatori personalizzati."
716
 
717
+ #: includes/settings.php:1131
718
  msgid "Add New Document"
719
  msgstr "Aggiungi un nuovo documento"
720
 
721
+ #: includes/settings.php:1252 includes/settings.php:1284
722
+ #: includes/settings.php:1467
723
  msgid "Settings saved."
724
  msgstr "Impostazioni salvate."
725
 
726
+ #: includes/settings.php:1264 includes/settings.php:1289
727
  msgid "Settings restored to defaults."
728
  msgstr "Impostazioni di default ripristinate."
729
 
730
+ #: includes/settings.php:1322
731
  #, php-format
732
  msgid ""
733
  "Please enable comments cookies opt-in checkbox in the <a href=\"%s\" target="
734
  "\"_blank\">Discussion settings</a>."
735
  msgstr ""
736
  "Abilita per i commenti la possibilità di attivare o disattivare la "
737
+ "memorizzazione dei dati personali in un cookie. Per farlo, vai su <a href="
738
+ "\"%s\" target=\"_blank\">Impostazioni discussione</a>."
739
 
740
+ #: includes/settings.php:1342
741
  msgid "No forms or form changes detected."
742
  msgstr "Nessun form o modifica rilevati."
743
 
744
+ #: includes/settings.php:1402
745
  msgid "Form saving failed. Please fill the Subject and Preferences fields."
746
  msgstr "Salvataggio del form fallito. Compila i campi Utente e Preferenze."
747
 
748
+ #: includes/settings.php:1426
749
  #, fuzzy
750
  #| msgid "Settings applied successfully"
751
  msgid "Form saved successfully - form status changed to Mapped."
752
  msgstr "Form salvato con successo - Stato aggiornato a Mappato."
753
 
754
+ #: includes/settings.php:1429
755
  msgid "Form updated successfully."
756
  msgstr "Form aggiornato con successo."
757
 
758
+ #: includes/settings.php:1432
759
  msgid "Form saving failed."
760
  msgstr "Salvataggio del form fallito."
761
 
762
+ #: includes/settings.php:1449
763
  #, fuzzy
764
  #| msgid "Settings applied successfully"
765
  msgid "Form deleted successfully."
766
  msgstr "Form eliminato con successo."
767
 
768
+ #: includes/settings.php:1451
769
  msgid "Form delete failed."
770
  msgstr "Eliminazione del form fallita."
771
 
772
+ #: includes/settings.php:1526
773
  msgid "Dismiss this notice."
774
  msgstr "Chiudi questo avviso."
775
 
812
  #~ msgstr "Effettua il blocco automatico degli script rilevati dal plugin"
813
 
814
  #~ msgid ""
815
+ #~ "see <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">our "
816
+ #~ "documentation</a> for the list of detected scripts."
817
  #~ msgstr ""
818
  #~ "consulta la <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">nostra "
819
  #~ "documentazione</a> per la lista di script rilevati."
821
  #~ msgid "Parsing engine"
822
  #~ msgstr "Parsing engine"
823
 
 
 
 
824
  #~ msgid ""
825
  #~ "Leaves scripts untouched on the page if the user has already given consent"
826
  #~ msgstr ""
830
  #~ msgstr "Applica ottimizzazioni speciali in caso di errori con l'output"
831
 
832
  #~ msgid ""
833
+ #~ "only select this option if you had performance problems or if you notice "
834
+ #~ "that the blocking of code is run several times"
835
  #~ msgstr ""
836
+ #~ "attiva questa opzione solo qualora avessi problemi di performance o "
837
+ #~ "notassi che il blocco dei codici viene applicato più volte"
838
 
839
  #~ msgid "Parsed with iubenda experimental class in %s sec."
840
  #~ msgstr "Parsed with iubenda experimental class in %s sec."
843
  #~ msgstr "Parsed with iubenda default class in %s sec."
844
 
845
  #~ msgid ""
846
+ #~ "see <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">our "
847
+ #~ "documentation</a> for the list of detected scripts this guide."
848
  #~ msgstr ""
849
  #~ "consulta la <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">nostra "
850
  #~ "documentazione</a> per la lista di script rilevati."
languages/iubenda-cookie-law-solution.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Iubenda Cookie Solution\n"
5
- "POT-Creation-Date: 2019-11-14 10:52+0100\n"
6
  "PO-Revision-Date: 2015-08-12 10:36+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
@@ -16,6 +16,10 @@ msgstr ""
16
  "X-Poedit-KeywordsList: __\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
 
 
 
 
19
  #: includes/forms-list-table.php:92
20
  msgid "Form Title"
21
  msgstr ""
@@ -60,7 +64,7 @@ msgstr ""
60
  msgid "No forms found."
61
  msgstr ""
62
 
63
- #: includes/forms.php:149 includes/settings.php:126
64
  msgid "Forms"
65
  msgstr ""
66
 
@@ -85,63 +89,91 @@ msgstr ""
85
  msgid "string"
86
  msgstr ""
87
 
88
- #: includes/settings.php:57 includes/settings.php:171
89
  msgid "Cookie Solution"
90
  msgstr ""
91
 
92
- #: includes/settings.php:63 includes/settings.php:172
93
  msgid "Consent Solution"
94
  msgstr ""
95
 
96
- #: includes/settings.php:114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  msgid "Code"
98
  msgstr ""
99
 
100
- #: includes/settings.php:115
101
  msgid "Script blocking"
102
  msgstr ""
103
 
104
- #: includes/settings.php:116
105
  msgid "Custom scripts"
106
  msgstr ""
107
 
108
- #: includes/settings.php:117
109
  msgid "Content type"
110
  msgstr ""
111
 
112
- #: includes/settings.php:118
113
  msgid "RSS feed"
114
  msgstr ""
115
 
116
- #: includes/settings.php:119
117
  msgid "POST requests"
118
  msgstr ""
119
 
120
- #: includes/settings.php:120
121
  msgid "Menu position"
122
  msgstr ""
123
 
124
- #: includes/settings.php:121
 
 
 
 
125
  msgid "Deactivation"
126
  msgstr ""
127
 
128
- #: includes/settings.php:127
129
  msgid "Public Api Key"
130
  msgstr ""
131
 
132
- #: includes/settings.php:130 includes/settings.php:134
133
  msgid "Field Mapping"
134
  msgstr ""
135
 
136
- #: includes/settings.php:192
137
  msgid "Are you sure you want to delete this form?"
138
  msgstr ""
139
 
140
- #: includes/settings.php:340
141
  msgid "You don't have permission to access this page."
142
  msgstr ""
143
 
144
- #: includes/settings.php:357
145
  msgid ""
146
  "This plugin is the easiest and most comprehensive way to adapt your "
147
  "WordPress site to the ePrivacy (EU Cookie Law). Upon your users’ first "
@@ -152,45 +184,45 @@ msgid ""
152
  "reactivation without refreshing the page (asynchronous script reactivation)."
153
  msgstr ""
154
 
155
- #: includes/settings.php:360
156
  msgid ""
157
  "Does the Cookie Solution support IAB’s Transparency and Consent Framework?"
158
  msgstr ""
159
 
160
- #: includes/settings.php:361
161
  #, php-format
162
  msgid ""
163
  "Yes it does. You can read more about it <a href=\"%s\" class=\"iubenda-url"
164
  "\" target=\"_blank\">here.</a>"
165
  msgstr ""
166
 
167
- #: includes/settings.php:364
168
  msgid "Would you like to know more about the cookie law?"
169
  msgstr ""
170
 
171
- #: includes/settings.php:365
172
  #, php-format
173
  msgid ""
174
  "Read our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">complete "
175
  "guide to the cookie law.</a>"
176
  msgstr ""
177
 
178
- #: includes/settings.php:368
179
  msgid "What is the full functionality of the plugin?"
180
  msgstr ""
181
 
182
- #: includes/settings.php:369
183
  #, php-format
184
  msgid ""
185
  "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin "
186
  "page.</a>"
187
  msgstr ""
188
 
189
- #: includes/settings.php:372
190
  msgid "Enter the iubenda code for the Cookie Solution below."
191
  msgstr ""
192
 
193
- #: includes/settings.php:373
194
  #, php-format
195
  msgid ""
196
  "In order to run the plugin, you need to enter the iubenda code that "
@@ -199,7 +231,7 @@ msgid ""
199
  "class=\"iubenda-url\" target=\"_blank\">this guide.</a>"
200
  msgstr ""
201
 
202
- #: includes/settings.php:378
203
  msgid ""
204
  "Maintaining comprehensive records of consent is a vital part of privacy "
205
  "compliance in general but is specifically required under the GDPR. These "
@@ -210,7 +242,15 @@ msgid ""
210
  "consent\" target=\"_blank\">full requirements here</a>."
211
  msgstr ""
212
 
213
- #: includes/settings.php:402
 
 
 
 
 
 
 
 
214
  #, php-format
215
  msgid ""
216
  "This plugin drastically reduces the need for direct interventions in the "
@@ -222,7 +262,7 @@ msgid ""
222
  "– in order to comply with the GDPR and ePrivacy."
223
  msgstr ""
224
 
225
- #: includes/settings.php:404
226
  msgid ""
227
  "Maintaining valid records of consent is a vital part of privacy compliance "
228
  "in general, and it is specifically required under the GDPR. These records "
@@ -236,182 +276,246 @@ msgid ""
236
  "consents collected offline (e.g in-store sign-ups) via WP media upload."
237
  msgstr ""
238
 
239
- #: includes/settings.php:422
240
  msgid "Reset to defaults"
241
  msgstr ""
242
 
243
- #: includes/settings.php:434
244
  msgid "Need support for this plugin?"
245
  msgstr ""
246
 
247
- #: includes/settings.php:435
248
  #, php-format
249
  msgid ""
250
  "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">support "
251
  "forum.</a>"
252
  msgstr ""
253
 
254
- #: includes/settings.php:479
255
  #, php-format
256
  msgid "Enter the iubenda code for %s."
257
  msgstr ""
258
 
259
- #: includes/settings.php:490
260
  msgid "Enter the iubenda code."
261
  msgstr ""
262
 
263
- #: includes/settings.php:518
264
  msgid ""
265
- "Enter the list of custom scripts you’d like to block here (one per line)"
 
266
  msgstr ""
267
 
268
- #: includes/settings.php:522
 
 
 
 
 
 
 
 
 
 
 
 
269
  msgid ""
270
- "Enter the list of custom iframes you’d like to block here (one per line). "
 
 
 
 
 
271
  msgstr ""
272
 
273
- #: includes/settings.php:537
274
- msgid "Automatically block scripts detected by the plugin."
275
  msgstr ""
276
 
277
- #: includes/settings.php:538
278
  #, php-format
279
  msgid ""
280
  "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of "
281
  "detected scripts."
282
  msgstr ""
283
 
284
- #: includes/settings.php:541
285
  msgid "Primary"
286
  msgstr ""
287
 
288
- #: includes/settings.php:542
289
  msgid "Secondary"
290
  msgstr ""
291
 
292
- #: includes/settings.php:543
293
  msgid "Select parsing engine."
294
  msgstr ""
295
 
296
- #: includes/settings.php:546
297
  msgid ""
298
  "Leave scripts untouched on the page if the user has already given consent"
299
  msgstr ""
300
 
301
- #: includes/settings.php:547
302
  msgid ""
303
  "improves performance, highly recommended, to be deactivated only if your "
304
- "site uses a caching system"
305
  msgstr ""
306
 
307
- #: includes/settings.php:561
308
  msgid ""
309
  "Restrict the plugin to run only for requests that have \"Content-type: "
310
  "text / html\" (recommended)"
311
  msgstr ""
312
 
313
- #: includes/settings.php:573
314
  msgid "Do not run the plugin inside the RSS feed (recommended)"
315
  msgstr ""
316
 
317
- #: includes/settings.php:585
318
  msgid "Do not run the plugin on POST requests (recommended)"
319
  msgstr ""
320
 
321
- #: includes/settings.php:597
322
  msgid "Top menu"
323
  msgstr ""
324
 
325
- #: includes/settings.php:598
326
  msgid "Submenu"
327
  msgstr ""
328
 
329
- #: includes/settings.php:599
330
  msgid ""
331
  "Select whether to display iubenda in a top admin menu or the Settings "
332
  "submenu."
333
  msgstr ""
334
 
335
- #: includes/settings.php:611
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  msgid "Delete all plugin data upon deactivation?"
337
  msgstr ""
338
 
339
- #: includes/settings.php:624
340
  msgid "Enter your iubenda Javascript library public API key."
341
  msgstr ""
342
 
343
- #: includes/settings.php:640
344
  msgid ""
345
  "This section lists the forms available for field mapping. The plugin "
346
  "currently supports & detects: WordPress Comment, Contact Form 7, "
347
  "WooCommerce Checkout and WP Forms."
348
  msgstr ""
349
 
350
- #: includes/settings.php:701
351
  #, php-format
352
  msgid "%s form title."
353
  msgstr ""
354
 
355
- #: includes/settings.php:701
356
  msgid "Unknown"
357
  msgstr ""
358
 
359
- #: includes/settings.php:703
360
  msgid "Available form fields:"
361
  msgstr ""
362
 
363
- #: includes/settings.php:709
364
  msgid "Publish"
365
  msgstr ""
366
 
367
- #: includes/settings.php:714
368
  msgid "Status"
369
  msgstr ""
370
 
371
- #: includes/settings.php:727
372
  msgid "Cancel"
373
  msgstr ""
374
 
375
- #: includes/settings.php:732
376
  msgid "Save"
377
  msgstr ""
378
 
379
- #: includes/settings.php:745
380
  msgid "Map fields"
381
  msgstr ""
382
 
383
- #: includes/settings.php:751
384
  msgid "Subject fields"
385
  msgstr ""
386
 
387
- #: includes/settings.php:752
388
  msgid ""
389
  "Subject fields allow you to store a series of identifying values about your "
390
  "individual subjects/users. Please map the subject field with the "
391
  "corresponding form fields where applicable."
392
  msgstr ""
393
 
394
- #: includes/settings.php:757
395
  msgid "Subject field"
396
  msgstr ""
397
 
398
- #: includes/settings.php:758 includes/settings.php:802
399
  msgid "Form field"
400
  msgstr ""
401
 
402
- #: includes/settings.php:764
403
  msgid "Autogenerated"
404
  msgstr ""
405
 
406
- #: includes/settings.php:764
407
  msgid "None"
408
  msgstr ""
409
 
410
- #: includes/settings.php:795
411
  msgid "Preferences fields"
412
  msgstr ""
413
 
414
- #: includes/settings.php:796
415
  msgid ""
416
  "Preferences fields allow you to store a record of the various opt-ins "
417
  "points at which the user has agreed or given consent, such as fields for "
@@ -419,54 +523,48 @@ msgid ""
419
  "create at least one preference field."
420
  msgstr ""
421
 
422
- #: includes/settings.php:801
423
  msgid "Preferences field"
424
  msgstr ""
425
 
426
- #: includes/settings.php:807 includes/settings.php:833
427
- #: includes/settings.php:958 includes/settings.php:968
428
- #: includes/settings.php:984
429
  msgid "Enter field name"
430
  msgstr ""
431
 
432
- #: includes/settings.php:821 includes/settings.php:848
433
- #: includes/settings.php:889 includes/settings.php:917
434
- #: includes/settings.php:968 includes/settings.php:984
435
- msgid "Remove"
436
- msgstr ""
437
-
438
- #: includes/settings.php:857
439
  msgid "Add New Preference"
440
  msgstr ""
441
 
442
- #: includes/settings.php:864
443
  msgid "Exclude fields"
444
  msgstr ""
445
 
446
- #: includes/settings.php:865
447
  msgid ""
448
  "Exclude fields allow you to create a list of fields that you would like to "
449
  "exclude from your Consent Solution recorded proofs (for e.g. password or "
450
  "other fields not related to the consent)."
451
  msgstr ""
452
 
453
- #: includes/settings.php:870
454
  msgid "Exclude field"
455
  msgstr ""
456
 
457
- #: includes/settings.php:927
458
  msgid "Add New Exclude"
459
  msgstr ""
460
 
461
- #: includes/settings.php:937
462
  msgid "Legal Notices"
463
  msgstr ""
464
 
465
- #: includes/settings.php:943
466
  msgid "Legal documents"
467
  msgstr ""
468
 
469
- #: includes/settings.php:944
470
  msgid ""
471
  "In general, it’s important that you declare which legal documents are being "
472
  "agreed upon when each consent is collected. However, if you use iubenda for "
@@ -474,65 +572,66 @@ msgid ""
474
  "selecting them here."
475
  msgstr ""
476
 
477
- #: includes/settings.php:949
478
  msgid "Identifier"
479
  msgstr ""
480
 
481
- #: includes/settings.php:958
482
  msgid "Please select each legal document available on your site."
483
  msgstr ""
484
 
485
- #: includes/settings.php:974
486
  msgid "Alternatively, you may add your own custom document identifiers."
487
  msgstr ""
488
 
489
- #: includes/settings.php:993
490
  msgid "Add New Document"
491
  msgstr ""
492
 
493
- #: includes/settings.php:1067 includes/settings.php:1099
 
494
  msgid "Settings saved."
495
  msgstr ""
496
 
497
- #: includes/settings.php:1079 includes/settings.php:1104
498
  msgid "Settings restored to defaults."
499
  msgstr ""
500
 
501
- #: includes/settings.php:1128
502
  #, php-format
503
  msgid ""
504
  "Please enable comments cookies opt-in checkbox in the <a href=\"%s\" target="
505
  "\"_blank\">Discussion settings</a>."
506
  msgstr ""
507
 
508
- #: includes/settings.php:1148
509
  msgid "No forms or form changes detected."
510
  msgstr ""
511
 
512
- #: includes/settings.php:1216
513
  msgid "Form saving failed. Please fill the Subject and Preferences fields."
514
  msgstr ""
515
 
516
- #: includes/settings.php:1240
517
  msgid "Form saved successfully - form status changed to Mapped."
518
  msgstr ""
519
 
520
- #: includes/settings.php:1243
521
  msgid "Form updated successfully."
522
  msgstr ""
523
 
524
- #: includes/settings.php:1246
525
  msgid "Form saving failed."
526
  msgstr ""
527
 
528
- #: includes/settings.php:1263
529
  msgid "Form deleted successfully."
530
  msgstr ""
531
 
532
- #: includes/settings.php:1265
533
  msgid "Form delete failed."
534
  msgstr ""
535
 
536
- #: includes/settings.php:1325
537
  msgid "Dismiss this notice."
538
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Iubenda Cookie Solution\n"
5
+ "POT-Creation-Date: 2020-01-22 17:20+0100\n"
6
  "PO-Revision-Date: 2015-08-12 10:36+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
16
  "X-Poedit-KeywordsList: __\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: includes/amp.php:134
20
+ msgid "Loading"
21
+ msgstr ""
22
+
23
  #: includes/forms-list-table.php:92
24
  msgid "Form Title"
25
  msgstr ""
64
  msgid "No forms found."
65
  msgstr ""
66
 
67
+ #: includes/forms.php:149 includes/settings.php:136
68
  msgid "Forms"
69
  msgstr ""
70
 
89
  msgid "string"
90
  msgstr ""
91
 
92
+ #: includes/settings.php:57 includes/settings.php:181
93
  msgid "Cookie Solution"
94
  msgstr ""
95
 
96
+ #: includes/settings.php:63 includes/settings.php:182
97
  msgid "Consent Solution"
98
  msgstr ""
99
 
100
+ #: includes/settings.php:71
101
+ msgid "Not set"
102
+ msgstr ""
103
+
104
+ #: includes/settings.php:72
105
+ msgid "Strictly necessary"
106
+ msgstr ""
107
+
108
+ #: includes/settings.php:73
109
+ msgid "Basic interactions & functionalities"
110
+ msgstr ""
111
+
112
+ #: includes/settings.php:74
113
+ msgid "Experience enhancement"
114
+ msgstr ""
115
+
116
+ #: includes/settings.php:75
117
+ msgid "Analytics"
118
+ msgstr ""
119
+
120
+ #: includes/settings.php:76
121
+ msgid "Targeting & Advertising"
122
+ msgstr ""
123
+
124
+ #: includes/settings.php:123
125
  msgid "Code"
126
  msgstr ""
127
 
128
+ #: includes/settings.php:124
129
  msgid "Script blocking"
130
  msgstr ""
131
 
132
+ #: includes/settings.php:125
133
  msgid "Custom scripts"
134
  msgstr ""
135
 
136
+ #: includes/settings.php:126
137
  msgid "Content type"
138
  msgstr ""
139
 
140
+ #: includes/settings.php:127
141
  msgid "RSS feed"
142
  msgstr ""
143
 
144
+ #: includes/settings.php:128
145
  msgid "POST requests"
146
  msgstr ""
147
 
148
+ #: includes/settings.php:129
149
  msgid "Menu position"
150
  msgstr ""
151
 
152
+ #: includes/settings.php:130
153
+ msgid "Google AMP"
154
+ msgstr ""
155
+
156
+ #: includes/settings.php:131
157
  msgid "Deactivation"
158
  msgstr ""
159
 
160
+ #: includes/settings.php:137
161
  msgid "Public Api Key"
162
  msgstr ""
163
 
164
+ #: includes/settings.php:140 includes/settings.php:144
165
  msgid "Field Mapping"
166
  msgstr ""
167
 
168
+ #: includes/settings.php:202
169
  msgid "Are you sure you want to delete this form?"
170
  msgstr ""
171
 
172
+ #: includes/settings.php:350
173
  msgid "You don't have permission to access this page."
174
  msgstr ""
175
 
176
+ #: includes/settings.php:376
177
  msgid ""
178
  "This plugin is the easiest and most comprehensive way to adapt your "
179
  "WordPress site to the ePrivacy (EU Cookie Law). Upon your users’ first "
184
  "reactivation without refreshing the page (asynchronous script reactivation)."
185
  msgstr ""
186
 
187
+ #: includes/settings.php:379
188
  msgid ""
189
  "Does the Cookie Solution support IAB’s Transparency and Consent Framework?"
190
  msgstr ""
191
 
192
+ #: includes/settings.php:380
193
  #, php-format
194
  msgid ""
195
  "Yes it does. You can read more about it <a href=\"%s\" class=\"iubenda-url"
196
  "\" target=\"_blank\">here.</a>"
197
  msgstr ""
198
 
199
+ #: includes/settings.php:383
200
  msgid "Would you like to know more about the cookie law?"
201
  msgstr ""
202
 
203
+ #: includes/settings.php:384
204
  #, php-format
205
  msgid ""
206
  "Read our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">complete "
207
  "guide to the cookie law.</a>"
208
  msgstr ""
209
 
210
+ #: includes/settings.php:387
211
  msgid "What is the full functionality of the plugin?"
212
  msgstr ""
213
 
214
+ #: includes/settings.php:388
215
  #, php-format
216
  msgid ""
217
  "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin "
218
  "page.</a>"
219
  msgstr ""
220
 
221
+ #: includes/settings.php:391
222
  msgid "Enter the iubenda code for the Cookie Solution below."
223
  msgstr ""
224
 
225
+ #: includes/settings.php:392
226
  #, php-format
227
  msgid ""
228
  "In order to run the plugin, you need to enter the iubenda code that "
231
  "class=\"iubenda-url\" target=\"_blank\">this guide.</a>"
232
  msgstr ""
233
 
234
+ #: includes/settings.php:397
235
  msgid ""
236
  "Maintaining comprehensive records of consent is a vital part of privacy "
237
  "compliance in general but is specifically required under the GDPR. These "
242
  "consent\" target=\"_blank\">full requirements here</a>."
243
  msgstr ""
244
 
245
+ #: includes/settings.php:421
246
+ #, php-format
247
+ msgid ""
248
+ "If you are using per-purpose script blocking or Reject option please "
249
+ "disable the \"Leave scripts untouched on the page if the user has already "
250
+ "given consent\" option. <a href=\"%s\" target=\"_self\">Disable now</a>"
251
+ msgstr ""
252
+
253
+ #: includes/settings.php:441
254
  #, php-format
255
  msgid ""
256
  "This plugin drastically reduces the need for direct interventions in the "
262
  "– in order to comply with the GDPR and ePrivacy."
263
  msgstr ""
264
 
265
+ #: includes/settings.php:443
266
  msgid ""
267
  "Maintaining valid records of consent is a vital part of privacy compliance "
268
  "in general, and it is specifically required under the GDPR. These records "
276
  "consents collected offline (e.g in-store sign-ups) via WP media upload."
277
  msgstr ""
278
 
279
+ #: includes/settings.php:461
280
  msgid "Reset to defaults"
281
  msgstr ""
282
 
283
+ #: includes/settings.php:473
284
  msgid "Need support for this plugin?"
285
  msgstr ""
286
 
287
+ #: includes/settings.php:474
288
  #, php-format
289
  msgid ""
290
  "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">support "
291
  "forum.</a>"
292
  msgstr ""
293
 
294
+ #: includes/settings.php:518
295
  #, php-format
296
  msgid "Enter the iubenda code for %s."
297
  msgstr ""
298
 
299
+ #: includes/settings.php:529
300
  msgid "Enter the iubenda code."
301
  msgstr ""
302
 
303
+ #: includes/settings.php:556
304
  msgid ""
305
+ "Provide a list of custom scripts you’d like to block and assign their "
306
+ "purpose."
307
  msgstr ""
308
 
309
+ #: includes/settings.php:558 includes/settings.php:565
310
+ msgid "Enter custom script"
311
+ msgstr ""
312
+
313
+ #: includes/settings.php:558 includes/settings.php:565
314
+ #: includes/settings.php:576 includes/settings.php:583
315
+ #: includes/settings.php:959 includes/settings.php:986
316
+ #: includes/settings.php:1027 includes/settings.php:1055
317
+ #: includes/settings.php:1106 includes/settings.php:1122
318
+ msgid "Remove"
319
+ msgstr ""
320
+
321
+ #: includes/settings.php:574
322
  msgid ""
323
+ "Provide a list of custom iframes you’d like to block and assign their "
324
+ "purpose. "
325
+ msgstr ""
326
+
327
+ #: includes/settings.php:576 includes/settings.php:583
328
+ msgid "Enter custom iframe"
329
  msgstr ""
330
 
331
+ #: includes/settings.php:621
332
+ msgid "Automatically block scripts detected by the plugin"
333
  msgstr ""
334
 
335
+ #: includes/settings.php:622
336
  #, php-format
337
  msgid ""
338
  "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of "
339
  "detected scripts."
340
  msgstr ""
341
 
342
+ #: includes/settings.php:625
343
  msgid "Primary"
344
  msgstr ""
345
 
346
+ #: includes/settings.php:626
347
  msgid "Secondary"
348
  msgstr ""
349
 
350
+ #: includes/settings.php:627
351
  msgid "Select parsing engine."
352
  msgstr ""
353
 
354
+ #: includes/settings.php:630
355
  msgid ""
356
  "Leave scripts untouched on the page if the user has already given consent"
357
  msgstr ""
358
 
359
+ #: includes/settings.php:631
360
  msgid ""
361
  "improves performance, highly recommended, to be deactivated only if your "
362
+ "site uses a caching system or if you're collecting per-category consent."
363
  msgstr ""
364
 
365
+ #: includes/settings.php:645
366
  msgid ""
367
  "Restrict the plugin to run only for requests that have \"Content-type: "
368
  "text / html\" (recommended)"
369
  msgstr ""
370
 
371
+ #: includes/settings.php:657
372
  msgid "Do not run the plugin inside the RSS feed (recommended)"
373
  msgstr ""
374
 
375
+ #: includes/settings.php:669
376
  msgid "Do not run the plugin on POST requests (recommended)"
377
  msgstr ""
378
 
379
+ #: includes/settings.php:681
380
  msgid "Top menu"
381
  msgstr ""
382
 
383
+ #: includes/settings.php:682
384
  msgid "Submenu"
385
  msgstr ""
386
 
387
+ #: includes/settings.php:683
388
  msgid ""
389
  "Select whether to display iubenda in a top admin menu or the Settings "
390
  "submenu."
391
  msgstr ""
392
 
393
+ #: includes/settings.php:695
394
+ msgid "Enable Google AMP support."
395
+ msgstr ""
396
+
397
+ #: includes/settings.php:696
398
+ #, php-format
399
+ msgid ""
400
+ "This feature enables iubenda on AMP pages via the <a href=\"%s\" target="
401
+ "\"_blank\">AMP</a> and <a href=\"%s\" target=\"_blank\">AMP for WP</a> "
402
+ "plugins. AMP requires specific configuration parameters and a page hosted "
403
+ "on your domain where the configuration is loaded from. <a href=\"%s\" "
404
+ "target=\"_blank\">Learn more on iubenda and AMP</a>."
405
+ msgstr ""
406
+
407
+ #: includes/settings.php:699
408
+ msgid "Auto-generated configuration file"
409
+ msgstr ""
410
+
411
+ #: includes/settings.php:700
412
+ msgid "Custom configuration file"
413
+ msgstr ""
414
+
415
+ #: includes/settings.php:701
416
+ msgid "Select the iubenda AMP configuration file location."
417
+ msgstr ""
418
+
419
+ #: includes/settings.php:706
420
+ msgid ""
421
+ "No file available. Save changes to generate iubenda AMP configuration file."
422
+ msgstr ""
423
+
424
+ #: includes/settings.php:734
425
+ msgid ""
426
+ "If you're experiencing issues with AMP setup download the generated iubenda "
427
+ "AMP configuration file, upload it to any SSL server and paste the file link "
428
+ "to the field above."
429
+ msgstr ""
430
+
431
+ #: includes/settings.php:736
432
+ #, php-format
433
+ msgid ""
434
+ "Seeing the AMP cookie notice when testing from Google but not when visiting "
435
+ "your AMP pages directly? <a href=\"%s\" target=\"_blank\">Learn how to fix "
436
+ "it</a>."
437
+ msgstr ""
438
+
439
+ #: includes/settings.php:749
440
  msgid "Delete all plugin data upon deactivation?"
441
  msgstr ""
442
 
443
+ #: includes/settings.php:762
444
  msgid "Enter your iubenda Javascript library public API key."
445
  msgstr ""
446
 
447
+ #: includes/settings.php:778
448
  msgid ""
449
  "This section lists the forms available for field mapping. The plugin "
450
  "currently supports & detects: WordPress Comment, Contact Form 7, "
451
  "WooCommerce Checkout and WP Forms."
452
  msgstr ""
453
 
454
+ #: includes/settings.php:839
455
  #, php-format
456
  msgid "%s form title."
457
  msgstr ""
458
 
459
+ #: includes/settings.php:839
460
  msgid "Unknown"
461
  msgstr ""
462
 
463
+ #: includes/settings.php:841
464
  msgid "Available form fields:"
465
  msgstr ""
466
 
467
+ #: includes/settings.php:847
468
  msgid "Publish"
469
  msgstr ""
470
 
471
+ #: includes/settings.php:852
472
  msgid "Status"
473
  msgstr ""
474
 
475
+ #: includes/settings.php:865
476
  msgid "Cancel"
477
  msgstr ""
478
 
479
+ #: includes/settings.php:870
480
  msgid "Save"
481
  msgstr ""
482
 
483
+ #: includes/settings.php:883
484
  msgid "Map fields"
485
  msgstr ""
486
 
487
+ #: includes/settings.php:889
488
  msgid "Subject fields"
489
  msgstr ""
490
 
491
+ #: includes/settings.php:890
492
  msgid ""
493
  "Subject fields allow you to store a series of identifying values about your "
494
  "individual subjects/users. Please map the subject field with the "
495
  "corresponding form fields where applicable."
496
  msgstr ""
497
 
498
+ #: includes/settings.php:895
499
  msgid "Subject field"
500
  msgstr ""
501
 
502
+ #: includes/settings.php:896 includes/settings.php:940
503
  msgid "Form field"
504
  msgstr ""
505
 
506
+ #: includes/settings.php:902
507
  msgid "Autogenerated"
508
  msgstr ""
509
 
510
+ #: includes/settings.php:902
511
  msgid "None"
512
  msgstr ""
513
 
514
+ #: includes/settings.php:933
515
  msgid "Preferences fields"
516
  msgstr ""
517
 
518
+ #: includes/settings.php:934
519
  msgid ""
520
  "Preferences fields allow you to store a record of the various opt-ins "
521
  "points at which the user has agreed or given consent, such as fields for "
523
  "create at least one preference field."
524
  msgstr ""
525
 
526
+ #: includes/settings.php:939
527
  msgid "Preferences field"
528
  msgstr ""
529
 
530
+ #: includes/settings.php:945 includes/settings.php:971
531
+ #: includes/settings.php:1096 includes/settings.php:1106
532
+ #: includes/settings.php:1122
533
  msgid "Enter field name"
534
  msgstr ""
535
 
536
+ #: includes/settings.php:995
 
 
 
 
 
 
537
  msgid "Add New Preference"
538
  msgstr ""
539
 
540
+ #: includes/settings.php:1002
541
  msgid "Exclude fields"
542
  msgstr ""
543
 
544
+ #: includes/settings.php:1003
545
  msgid ""
546
  "Exclude fields allow you to create a list of fields that you would like to "
547
  "exclude from your Consent Solution recorded proofs (for e.g. password or "
548
  "other fields not related to the consent)."
549
  msgstr ""
550
 
551
+ #: includes/settings.php:1008
552
  msgid "Exclude field"
553
  msgstr ""
554
 
555
+ #: includes/settings.php:1065
556
  msgid "Add New Exclude"
557
  msgstr ""
558
 
559
+ #: includes/settings.php:1075
560
  msgid "Legal Notices"
561
  msgstr ""
562
 
563
+ #: includes/settings.php:1081
564
  msgid "Legal documents"
565
  msgstr ""
566
 
567
+ #: includes/settings.php:1082
568
  msgid ""
569
  "In general, it’s important that you declare which legal documents are being "
570
  "agreed upon when each consent is collected. However, if you use iubenda for "
572
  "selecting them here."
573
  msgstr ""
574
 
575
+ #: includes/settings.php:1087
576
  msgid "Identifier"
577
  msgstr ""
578
 
579
+ #: includes/settings.php:1096
580
  msgid "Please select each legal document available on your site."
581
  msgstr ""
582
 
583
+ #: includes/settings.php:1112
584
  msgid "Alternatively, you may add your own custom document identifiers."
585
  msgstr ""
586
 
587
+ #: includes/settings.php:1131
588
  msgid "Add New Document"
589
  msgstr ""
590
 
591
+ #: includes/settings.php:1252 includes/settings.php:1284
592
+ #: includes/settings.php:1467
593
  msgid "Settings saved."
594
  msgstr ""
595
 
596
+ #: includes/settings.php:1264 includes/settings.php:1289
597
  msgid "Settings restored to defaults."
598
  msgstr ""
599
 
600
+ #: includes/settings.php:1322
601
  #, php-format
602
  msgid ""
603
  "Please enable comments cookies opt-in checkbox in the <a href=\"%s\" target="
604
  "\"_blank\">Discussion settings</a>."
605
  msgstr ""
606
 
607
+ #: includes/settings.php:1342
608
  msgid "No forms or form changes detected."
609
  msgstr ""
610
 
611
+ #: includes/settings.php:1402
612
  msgid "Form saving failed. Please fill the Subject and Preferences fields."
613
  msgstr ""
614
 
615
+ #: includes/settings.php:1426
616
  msgid "Form saved successfully - form status changed to Mapped."
617
  msgstr ""
618
 
619
+ #: includes/settings.php:1429
620
  msgid "Form updated successfully."
621
  msgstr ""
622
 
623
+ #: includes/settings.php:1432
624
  msgid "Form saving failed."
625
  msgstr ""
626
 
627
+ #: includes/settings.php:1449
628
  msgid "Form deleted successfully."
629
  msgstr ""
630
 
631
+ #: includes/settings.php:1451
632
  msgid "Form delete failed."
633
  msgstr ""
634
 
635
+ #: includes/settings.php:1526
636
  msgid "Dismiss this notice."
637
  msgstr ""
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === Cookie and Consent Solution for the GDPR & ePrivacy ===
2
  Contributors: iubenda
3
  Donate link:
4
  Tags: cookies, cookie law, cookie policy, cookie banner, privacy policy, cookie consent, privacy, gdpr, eprivacy
5
  Requires at least: 4.0
6
  Requires PHP: 5.2.4
7
  Tested up to: 5.3.2
8
- Stable tag: 2.0.3
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
@@ -134,9 +134,23 @@ We will be very happy to receive feedback here: [Uservoice forum](http://support
134
 
135
  == Changelog ==
136
 
137
- = 2.0.3 =
 
 
 
 
 
 
 
 
 
 
138
  * Fix: Safari unrecognized expression on CSS wildcards
139
 
 
 
 
 
140
  = 2.0.2 =
141
  * Fix: initialize iubenda CS on POST requests not working
142
  * Tweak: iubenda generic menu icon switched to iubenda logo
@@ -380,5 +394,5 @@ We will be very happy to receive feedback here: [Uservoice forum](http://support
380
 
381
  == Upgrade Notice ==
382
 
383
- = 2.0.3 =
384
- * Fix: Safari unrecognized expression on CSS wildcards
1
+ === iubenda - Cookie and Consent Solution for the GDPR & ePrivacy ===
2
  Contributors: iubenda
3
  Donate link:
4
  Tags: cookies, cookie law, cookie policy, cookie banner, privacy policy, cookie consent, privacy, gdpr, eprivacy
5
  Requires at least: 4.0
6
  Requires PHP: 5.2.4
7
  Tested up to: 5.3.2
8
+ Stable tag: 2.0.2
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
134
 
135
  == Changelog ==
136
 
137
+ = 2.1.4-beta =
138
+ * New: Multilingual support from AMP
139
+
140
+ = 2.1.3-beta =
141
+ * Tweak: Block tracking code from WP AMP plugins
142
+
143
+ = 2.1.2-beta =
144
+ * New: Google AMP compatibility option
145
+
146
+ = 2.1.1-beta =
147
+ * Tweak: Improved regular expression on per-purpose feature detection
148
  * Fix: Safari unrecognized expression on CSS wildcards
149
 
150
+ = 2.1.0-beta =
151
+ * New: Per-purpose script blocking support
152
+ * New: "Reject" button support
153
+
154
  = 2.0.2 =
155
  * Fix: initialize iubenda CS on POST requests not working
156
  * Tweak: iubenda generic menu icon switched to iubenda logo
394
 
395
  == Upgrade Notice ==
396
 
397
+ = 2.1.4-beta =
398
+ * New: Multilingual support from AMP