iubenda Cookie Solution for GDPR - Version 3.2.4

Version Description

  • Add PCP and T&C embedding section
Download this release

Release Info

Developer iubenda
Plugin Icon 128x128 iubenda Cookie Solution for GDPR
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.2.3 to 3.2.4

assets/css/style.css CHANGED
@@ -39,22 +39,6 @@
39
  font-size: 2rem;
40
  }
41
 
42
- .text-gray-lighter {
43
- color: #808080;
44
- }
45
-
46
- .text-gray {
47
- color: #595959;
48
- }
49
-
50
- .text-warning {
51
- color: #804123;
52
- }
53
-
54
- .text-green {
55
- color: #1cc691;
56
- }
57
-
58
  h1 {
59
  line-height: 1.25;
60
  }
@@ -682,6 +666,38 @@ hr {
682
  border-top: 1px solid rgba(151, 151, 151, 0.28);
683
  }
684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  .d-block {
686
  display: block !important;
687
  }
@@ -777,8 +793,8 @@ hr {
777
  }
778
  .flex-fill {
779
  -webkit-box-flex: 1;
780
- -ms-flex: 1;
781
- flex: 1;
782
  }
783
 
784
  .flex-wrap {
@@ -988,11 +1004,13 @@ hr {
988
 
989
  .notice {
990
  border-radius: 0.25rem;
991
- display: -webkit-inline-box;
992
- display: -ms-inline-flexbox;
993
- display: inline-flex;
994
  margin: 0;
995
  border: 0;
 
 
996
  }
997
  .notice p {
998
  margin: 0;
@@ -1003,6 +1021,9 @@ hr {
1003
  .notice--general {
1004
  background-color: #f5f5f5;
1005
  }
 
 
 
1006
 
1007
  /* SWITCH TOOGGLE*/
1008
  .switch {
@@ -1067,8 +1088,8 @@ hr {
1067
  display: -ms-flexbox;
1068
  display: flex;
1069
  -webkit-box-align: start;
1070
- -ms-flex-align: start;
1071
- align-items: flex-start;
1072
  margin-bottom: 0.75rem;
1073
  }
1074
  .checkbox-regular span {
@@ -1502,6 +1523,7 @@ input {
1502
 
1503
  .custom-iframe-field,
1504
  .custom-script-field {
 
1505
  margin-bottom: 0.5rem;
1506
  }
1507
  .custom-iframe-field.shown,
@@ -2304,6 +2326,12 @@ input {
2304
  -ms-flex-align: center;
2305
  align-items: center;
2306
  }
 
 
 
 
 
 
2307
 
2308
  .link:hover {
2309
  text-decoration: underline;
@@ -2336,6 +2364,18 @@ input {
2336
  pointer-events: none;
2337
  opacity: 0.6;
2338
  }
 
 
 
 
 
 
 
 
 
 
 
 
2339
  #iubenda-header {
2340
  margin-bottom: 30px;
2341
  }
@@ -2395,4 +2435,4 @@ input {
2395
  }
2396
  .iubenda-notice .reply-no:before {
2397
  content: "\f335";
2398
- }
39
  font-size: 2rem;
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  h1 {
43
  line-height: 1.25;
44
  }
666
  border-top: 1px solid rgba(151, 151, 151, 0.28);
667
  }
668
 
669
+ .text-gray-lighter {
670
+ color: #808080;
671
+ }
672
+
673
+ .border-gray-lighter {
674
+ color: #808080;
675
+ }
676
+
677
+ .text-gray {
678
+ color: #595959;
679
+ }
680
+
681
+ .border-gray {
682
+ color: #595959;
683
+ }
684
+
685
+ .text-warning {
686
+ color: #804123;
687
+ }
688
+
689
+ .border-warning {
690
+ color: #804123;
691
+ }
692
+
693
+ .text-green {
694
+ color: #1cc691;
695
+ }
696
+
697
+ .border-green {
698
+ color: #1cc691;
699
+ }
700
+
701
  .d-block {
702
  display: block !important;
703
  }
793
  }
794
  .flex-fill {
795
  -webkit-box-flex: 1;
796
+ -ms-flex: 1;
797
+ flex: 1;
798
  }
799
 
800
  .flex-wrap {
1004
 
1005
  .notice {
1006
  border-radius: 0.25rem;
1007
+ display: -webkit-box;
1008
+ display: -ms-flexbox;
1009
+ display: flex;
1010
  margin: 0;
1011
  border: 0;
1012
+ -ms-flex-preferred-size: 100%;
1013
+ flex-basis: 100%;
1014
  }
1015
  .notice p {
1016
  margin: 0;
1021
  .notice--general {
1022
  background-color: #f5f5f5;
1023
  }
1024
+ .notice--info {
1025
+ background-color: #ECF8FF;
1026
+ }
1027
 
1028
  /* SWITCH TOOGGLE*/
1029
  .switch {
1088
  display: -ms-flexbox;
1089
  display: flex;
1090
  -webkit-box-align: start;
1091
+ -ms-flex-align: start;
1092
+ align-items: flex-start;
1093
  margin-bottom: 0.75rem;
1094
  }
1095
  .checkbox-regular span {
1523
 
1524
  .custom-iframe-field,
1525
  .custom-script-field {
1526
+ display: none;
1527
  margin-bottom: 0.5rem;
1528
  }
1529
  .custom-iframe-field.shown,
2326
  -ms-flex-align: center;
2327
  align-items: center;
2328
  }
2329
+ .link-helper:hover .link-helper__label {
2330
+ text-decoration: underline;
2331
+ }
2332
+ .link-helper:hover .tooltip-icon {
2333
+ color: currentColor;
2334
+ }
2335
 
2336
  .link:hover {
2337
  text-decoration: underline;
2364
  pointer-events: none;
2365
  opacity: 0.6;
2366
  }
2367
+
2368
+ .services-list li:not(:last-of-type) {
2369
+ margin-right: 1rem;
2370
+ }
2371
+
2372
+ .rounded {
2373
+ border-radius: 0.25rem;
2374
+ }
2375
+
2376
+ .border-1 {
2377
+ border: 1px solid;
2378
+ }
2379
  #iubenda-header {
2380
  margin-bottom: 30px;
2381
  }
2435
  }
2436
  .iubenda-notice .reply-no:before {
2437
  content: "\f335";
2438
+ }
assets/js/admin.js CHANGED
@@ -419,6 +419,10 @@ document.addEventListener("DOMContentLoaded", function () {
419
  var text = $(this).html();
420
  $(this).html(text.replace('white', $(evt.target).val()).replace('black', $(evt.target).val()));
421
  });
 
 
 
 
422
  }
423
 
424
  // Sync embed code between TC live code and Readonly code
@@ -427,6 +431,7 @@ document.addEventListener("DOMContentLoaded", function () {
427
 
428
  if($('#iub-tc-code-'+ele.data('language')).length > 0){
429
  $('#iub-tc-code-'+ele.data('language')).text(ele.val())
 
430
  }
431
  }
432
 
419
  var text = $(this).html();
420
  $(this).html(text.replace('white', $(evt.target).val()).replace('black', $(evt.target).val()));
421
  });
422
+ $('.iub-language-code').each(function() {
423
+ var text = $(this).val();
424
+ $(this).val(text.replace('white', $(evt.target).val()).replace('black', $(evt.target).val()));
425
+ });
426
  }
427
 
428
  // Sync embed code between TC live code and Readonly code
431
 
432
  if($('#iub-tc-code-'+ele.data('language')).length > 0){
433
  $('#iub-tc-code-'+ele.data('language')).text(ele.val())
434
+ $('#iub-embed-code-readonly-'+ele.data('language')).trigger('click')
435
  }
436
  }
437
 
iubenda_cookie_solution.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cookie and Consent Solution for the GDPR & ePrivacy
4
  Plugin URI: https://www.iubenda.com
5
  Description: The iubenda plugin is an <strong>all-in-one</strong>, extremely easy to use 360° compliance solution, with text crafted by actual lawyers, that quickly <strong>scans your site and auto-configures to match your specific setup</strong>. It supports the GDPR (DSGVO, RGPD), UK-GDPR, ePrivacy, LGPD, CCPA, CalOPPA, PECR and more.
6
- Version: 3.2.3
7
  Author: iubenda
8
  Author URI: https://www.iubenda.com
9
  License: MIT License
@@ -36,7 +36,7 @@ define( 'IUB_DEBUG', false );
36
  * @property IubendaLegalBlock $block
37
  *
38
  * @class iubenda
39
- * @version 3.2.3
40
  */
41
  class iubenda {
42
 
@@ -94,7 +94,7 @@ class iubenda {
94
  )
95
  );
96
  public $base_url;
97
- public $version = '3.2.3';
98
  public $activation = array(
99
  'update_version' => 0,
100
  'update_notice' => true,
3
  Plugin Name: Cookie and Consent Solution for the GDPR & ePrivacy
4
  Plugin URI: https://www.iubenda.com
5
  Description: The iubenda plugin is an <strong>all-in-one</strong>, extremely easy to use 360° compliance solution, with text crafted by actual lawyers, that quickly <strong>scans your site and auto-configures to match your specific setup</strong>. It supports the GDPR (DSGVO, RGPD), UK-GDPR, ePrivacy, LGPD, CCPA, CalOPPA, PECR and more.
6
+ Version: 3.2.4
7
  Author: iubenda
8
  Author URI: https://www.iubenda.com
9
  License: MIT License
36
  * @property IubendaLegalBlock $block
37
  *
38
  * @class iubenda
39
+ * @version 3.2.4
40
  */
41
  class iubenda {
42
 
94
  )
95
  );
96
  public $base_url;
97
+ public $version = '3.2.4';
98
  public $activation = array(
99
  'update_version' => 0,
100
  'update_notice' => true,
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: cookie banner, cookie law, eprivacy, gdpr, ukgdpr, ccpa, caloppa, lgpd, ds
5
  Requires at least: 5.0
6
  Requires PHP: 7.0.0
7
  Tested up to: 6.0
8
- Stable tag: 3.2.3
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
@@ -254,6 +254,9 @@ The Brazilian General Data Protection Law, the ***Lei Geral de Proteção de Dad
254
 
255
  == Changelog ==
256
 
 
 
 
257
  = 3.2.3 =
258
  * Support PHP 8
259
 
@@ -719,5 +722,5 @@ The Brazilian General Data Protection Law, the ***Lei Geral de Proteção de Dad
719
 
720
  == Upgrade Notice ==
721
 
722
- = 3.2.3 =
723
- * Support PHP 8
5
  Requires at least: 5.0
6
  Requires PHP: 7.0.0
7
  Tested up to: 6.0
8
+ Stable tag: 3.2.4
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
254
 
255
  == Changelog ==
256
 
257
+ = 3.2.4 =
258
+ * Add PCP and T&C embedding section
259
+
260
  = 3.2.3 =
261
  * Support PHP 8
262
 
722
 
723
  == Upgrade Notice ==
724
 
725
+ = 3.2.4 =
726
+ * Add PCP and T&C embedding section
views/integrate-setup.php CHANGED
@@ -31,18 +31,18 @@
31
  <section id="amp_support" class="subOptions my-2">
32
  <h4><?php _e('Select the iubenda AMP configuration file location.', 'iubenda') ?></h4>
33
  <div class="mb-2 d-flex flex-wrap align-items-center">
34
- <label class="radio-regular mr-4">
35
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="local" class="mr-2 section-radio-control" data-section-name="#auto_generated_conf_file" data-section-group=".amp_configuration_file" checked>
36
  <span><?php _e('Auto-generated configuration file', 'iubenda') ?></span>
37
  </label>
38
- <label class="mr-4 radio-regular text-xs">
39
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="remote" class="mr-2 section-radio-control" data-section-name="#custom_conf_file" data-section-group=".amp_configuration_file">
40
  <span><?php _e('Custom configuration file', 'iubenda') ?></span>
41
  </label>
42
  </div>
43
 
44
  <section id="auto_generated_conf_file" class="text-xs text-gray amp_configuration_file">
45
- <div class="notice notice--general mt-2 p-3 d-flex flex-wrap align-items-center">
46
  <?php
47
  if (empty(iubenda()->options['cs']['amp_template_done'])) {
48
  echo '
@@ -82,7 +82,9 @@
82
  </tbody>
83
  </table>
84
  </div>
85
- <p class="px-3 mx-4"><?php _e('Seeing the AMP cookie notice when testing from Google but not when visiting your AMP pages directly?', 'iubenda') ?> <a target="_blank" href="<?php echo iubenda()->settings->links["amp_support"]; ?>" class="link-underline"><?php _e('Learn how to fix it', 'iubenda') ?></a></p>
 
 
86
  </section>
87
  <section id="custom_conf_file" class="text-xs text-gray amp_configuration_file <?php echo iub_array_get(iubenda()->options['cs'], 'amp_source') == 'remote' ?: 'hidden' ?>">
88
  <table class="table">
@@ -108,24 +110,27 @@
108
  <span><?php _e('Automatically block scripts detected by the plugin', 'iubenda') ?> <a target="_blank" href="<?php echo iubenda()->settings->links['automatic_block_scripts']; ?>" class="ml-1 tooltip-icon">?</a></span>
109
  </label>
110
  <section id="iub_parser_engine_container" class="subOptions">
 
111
  <div class="mb-3 d-flex flex-wrap align-items-center">
112
- <label class="radio-regular mr-4">
113
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="new" class="mr-2 section-radio-control" checked>
114
  <span><?php _e('Primary', 'iubenda') ?></span>
115
  </label>
116
- <label class="mr-4 radio-regular text-xs">
117
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="default" class="mr-2 section-radio-control">
118
  <span><?php _e('Secondary', 'iubenda') ?></span>
119
  </label>
120
  </div>
121
- <p class="px-3 mx-4"><?php _e("Select Parsing Engine", 'iubenda') ?></p>
122
- <br>
123
  <div class="mb-2 d-flex flex-wrap align-items-center">
124
  <label class="checkbox-regular">
125
  <input type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" class="mr-2 section-checkbox-control" data-section-name="#section-block-script">
126
- <span><?php _e('Leave scripts untouched on the page if the user has already given consent', 'iubenda') ?></span>
 
 
 
 
 
127
  </label>
128
- <p class="px-3 mx-4"><?php _e("Enable this option to improve performance <strong>only</strong> if your site does <strong>not</strong> use a cache system or a cache plugin and if you're <strong>not</strong> collecting per-category consent. If you're in doubt, keep this setting disabled", 'iubenda') ?></p>
129
  </div>
130
  </section>
131
  </div>
31
  <section id="amp_support" class="subOptions my-2">
32
  <h4><?php _e('Select the iubenda AMP configuration file location.', 'iubenda') ?></h4>
33
  <div class="mb-2 d-flex flex-wrap align-items-center">
34
+ <label class="radio-regular mr-4 mb-3">
35
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="local" class="mr-2 section-radio-control" data-section-name="#auto_generated_conf_file" data-section-group=".amp_configuration_file" checked>
36
  <span><?php _e('Auto-generated configuration file', 'iubenda') ?></span>
37
  </label>
38
+ <label class="mr-4 mb-3 radio-regular text-xs">
39
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="remote" class="mr-2 section-radio-control" data-section-name="#custom_conf_file" data-section-group=".amp_configuration_file">
40
  <span><?php _e('Custom configuration file', 'iubenda') ?></span>
41
  </label>
42
  </div>
43
 
44
  <section id="auto_generated_conf_file" class="text-xs text-gray amp_configuration_file">
45
+ <div class="border-1 border-gray rounded mt-2 py-2 px-3 d-flex flex-wrap align-items-center">
46
  <?php
47
  if (empty(iubenda()->options['cs']['amp_template_done'])) {
48
  echo '
82
  </tbody>
83
  </table>
84
  </div>
85
+ <div class="notice notice--general mt-2 p-3 d-flex align-items-center text-xs">
86
+ <p><?php _e('Seeing the AMP cookie notice when testing from Google but not when visiting your AMP pages directly?', 'iubenda') ?> <a target="_blank" href="<?php echo iubenda()->settings->links["amp_support"]; ?>" class="link-underline"><?php _e('Learn how to fix it', 'iubenda') ?></a></p>
87
+ </div>
88
  </section>
89
  <section id="custom_conf_file" class="text-xs text-gray amp_configuration_file <?php echo iub_array_get(iubenda()->options['cs'], 'amp_source') == 'remote' ?: 'hidden' ?>">
90
  <table class="table">
110
  <span><?php _e('Automatically block scripts detected by the plugin', 'iubenda') ?> <a target="_blank" href="<?php echo iubenda()->settings->links['automatic_block_scripts']; ?>" class="ml-1 tooltip-icon">?</a></span>
111
  </label>
112
  <section id="iub_parser_engine_container" class="subOptions">
113
+ <h4><?php _e("Select Parsing Engine", 'iubenda') ?></h4>
114
  <div class="mb-3 d-flex flex-wrap align-items-center">
115
+ <label class="radio-regular mr-4 mb-3">
116
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="new" class="mr-2 section-radio-control" checked>
117
  <span><?php _e('Primary', 'iubenda') ?></span>
118
  </label>
119
+ <label class="mr-4 mb-3 radio-regular text-xs">
120
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="default" class="mr-2 section-radio-control">
121
  <span><?php _e('Secondary', 'iubenda') ?></span>
122
  </label>
123
  </div>
 
 
124
  <div class="mb-2 d-flex flex-wrap align-items-center">
125
  <label class="checkbox-regular">
126
  <input type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" class="mr-2 section-checkbox-control" data-section-name="#section-block-script">
127
+ <div class="px-0 py-1">
128
+ <span class="p-0"><?php _e('Leave scripts untouched on the page if the user has already given consent', 'iubenda') ?></span>
129
+ <div class="notice notice--info mt-2 mb-3 p-3 d-flex align-items-center text-xs">
130
+ <p><?php _e("Enable this option to improve performance <strong>only</strong> if your site does <strong>not</strong> use a cache system or a cache plugin and if you're <strong>not</strong> collecting per-category consent. If you're in doubt, keep this setting disabled", 'iubenda') ?></p>
131
+ </div>
132
+ </div>
133
  </label>
 
134
  </div>
135
  </section>
136
  </div>
views/partials/buttonPosition.php CHANGED
@@ -1,6 +1,6 @@
1
  <h4><?php _e('Button position', 'iubenda') ?></h4>
2
- <div class="mb-2 d-flex align-items-center flex-wrap">
3
- <label class="radio-regular mr-3">
4
  <input type="radio" name="iubenda_privacy_policy_solution[button_position]" value="automatic" class="mr-2 section-radio-control" data-section-group=".pp_button_position" data-section-name="#pp_button_position_automatically" <?php checked( 'automatic', iub_array_get(iubenda()->options['pp'], 'button_position')) ?>>
5
  <span><?php _e('Add to the footer automatically', 'iubenda') ?></span>
6
  </label>
@@ -32,52 +32,54 @@ if (!iubenda()->check_if_we_support_current_theme_to_attach_legal()) {
32
  }
33
  ?>
34
  <section id="pp_button_position_manually" class="pp_button_position <?php echo iub_array_get(iubenda()->options['pp'], 'button_position') == 'manual' ?:'hidden' ; ?>">
35
- <div class="mb-3 p-0">
36
- <div class="my-5">
37
- <h4><?php _e('HTML', 'iubenda') ?></h4>
38
- <fieldset class="paste_embed_code tabs tabs--style2">
39
- <ul class="tabs__nav">
40
- <?php foreach(iubenda()->languages as $k => $v): ?>
41
- <li class="tabs__nav__item <?php echo $k == iubenda()->lang_default?'active':false ; ?>" data-target="tab-<?php echo $k ; ?>" data-group="language-tabs">
42
- <?php echo strtoupper($k) ; ?>
43
- </li>
44
- <?php endforeach; ?>
45
- </ul>
46
- <?php
47
- $privacyPolicyGenerator = new PrivacyPolicyGenerator();
48
- $globalOptions = get_option('iubenda_global_options');
49
 
50
- $languages = (new ProductHelper())->get_languages();
51
- foreach($languages as $lang_id => $v):
52
- $code = iub_array_get(iubenda()->options['pp'], "code_{$lang_id}");
53
 
54
- // if there is no embed code saved generate embed code
55
- if(!$code){
56
- $publicIds = iub_array_get($globalOptions, 'public_ids');
57
- $publicId = iub_array_get($publicIds, $lang_id);
 
 
 
 
58
 
59
- $code = $privacyPolicyGenerator->handle($lang_id, $publicId, 'white');
60
- }
61
- $code = html_entity_decode(iubenda()->parse_code($code));
62
- ?>
63
- <div data-target="tab-<?php echo $lang_id ; ?>" class="tabs__target <?php echo $lang_id == iubenda()->lang_default || $lang_id == 'default'? 'active': '' ; ?>" data-group="language-tabs">
64
- <textarea readonly class='form-control text-sm m-0 iub-pp-code' placeholder='<?php _e('Your embed code', 'iubenda') ?>' rows='4'><?php echo $code ?></textarea>
65
- </div>
66
- <?php endforeach; ?>
 
 
 
 
 
67
 
68
- </fieldset>
69
- </div>
70
- </div>
71
- <div class="mb-3 p-0">
72
- <div class="my-5">
73
- <h4><?php _e('Shortcode', 'iubenda') ?></h4>
74
- <p><?php _e('A shortcode is a tiny bit of code that allows embedding interactive elements or creating complex page layouts with a minimal effort.<br>Just copy and paste the shortcode where you want the button to appear.', 'iubenda') ?></p>
75
- <p></p>
76
- <fieldset class="paste_embed_code">
77
- <div class="notice notice--general mt-2 mb-4 p-3 d-flex text-lg-bold">
78
- <span>[iub-pp-button]</span>
79
- </div>
80
- </fieldset>
 
 
 
 
 
 
 
81
  </div>
 
82
  </div>
83
  </section>
1
  <h4><?php _e('Button position', 'iubenda') ?></h4>
2
+ <div class="mb-2 flex-wrap">
3
+ <label class="radio-regular mb-3">
4
  <input type="radio" name="iubenda_privacy_policy_solution[button_position]" value="automatic" class="mr-2 section-radio-control" data-section-group=".pp_button_position" data-section-name="#pp_button_position_automatically" <?php checked( 'automatic', iub_array_get(iubenda()->options['pp'], 'button_position')) ?>>
5
  <span><?php _e('Add to the footer automatically', 'iubenda') ?></span>
6
  </label>
32
  }
33
  ?>
34
  <section id="pp_button_position_manually" class="pp_button_position <?php echo iub_array_get(iubenda()->options['pp'], 'button_position') == 'manual' ?:'hidden' ; ?>">
35
+ <div class="subOptions">
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ <p class="text-gray text-sm mb-4"><?php _e('Just copy and paste the embed code (WP shortcode or HTML) where you want the button to appear.', 'iubenda') ?></p>
 
 
38
 
39
+ <div class="d-lg-flex">
40
+ <div class="flex-fill mb-3 mr-0 mr-lg-5">
41
+ <h4><?php _e('WP shortcode (recommended)', 'iubenda') ?></h4>
42
+ <fieldset class="paste_embed_code">
43
+ <input type="text" class="form-control text-sm m-0" value="[iub-pp-button]" readonly />
44
+ </fieldset>
45
+ <p class="text-gray-lighter"><?php _e('A shortcode is a tiny bit of code that allows embedding interactive elements or creating complex page layouts with a minimal effort.', 'iubenda') ?></p>
46
+ </div>
47
 
48
+ <div class="flex-fill mb-0">
49
+ <h4><?php _e('HTML', 'iubenda') ?></h4>
50
+ <fieldset class="paste_embed_code tabs tabs--style2">
51
+ <ul class="tabs__nav">
52
+ <?php foreach(iubenda()->languages as $k => $v): ?>
53
+ <li class="tabs__nav__item <?php echo $k == iubenda()->lang_default?'active':false ; ?>" data-target="tab-<?php echo $k ; ?>" data-group="language-tabs">
54
+ <?php echo strtoupper($k) ; ?>
55
+ </li>
56
+ <?php endforeach; ?>
57
+ </ul>
58
+ <?php
59
+ $privacyPolicyGenerator = new PrivacyPolicyGenerator();
60
+ $globalOptions = get_option('iubenda_global_options');
61
 
62
+ $languages = (new ProductHelper())->get_languages();
63
+ foreach($languages as $lang_id => $v):
64
+ $code = iub_array_get(iubenda()->options['pp'], "code_{$lang_id}");
65
+
66
+ // if there is no embed code saved generate embed code
67
+ if(!$code){
68
+ $publicIds = iub_array_get($globalOptions, 'public_ids');
69
+ $publicId = iub_array_get($publicIds, $lang_id);
70
+
71
+ $code = $privacyPolicyGenerator->handle($lang_id, $publicId, 'white');
72
+ }
73
+ $code = html_entity_decode(iubenda()->parse_code($code));
74
+ ?>
75
+ <div data-target="tab-<?php echo $lang_id ; ?>" class="tabs__target <?php echo $lang_id == iubenda()->lang_default || $lang_id == 'default'? 'active': '' ; ?>" data-group="language-tabs">
76
+ <textarea readonly class='form-control text-sm m-0 iub-pp-code' rows='4'><?php echo $code ?></textarea>
77
+ </div>
78
+ <?php endforeach; ?>
79
+
80
+ </fieldset>
81
+ </div>
82
  </div>
83
+
84
  </div>
85
  </section>
views/partials/csGeneralSettings.php CHANGED
@@ -72,18 +72,18 @@
72
  <section id="amp_support" class="subOptions my-2 <?php echo (bool) iubenda()->options['cs']['amp_support'] ?: 'hidden' ?>">
73
  <h4><?php _e('Select the iubenda AMP configuration file location.', 'iubenda') ?></h4>
74
  <div class="mb-2 d-flex flex-wrap align-items-center">
75
- <label class="radio-regular mr-4">
76
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="local" class="mr-2 section-radio-control" data-section-name="#auto_generated_conf_file" data-section-group=".amp_configuration_file" <?php checked( 'local', iub_array_get(iubenda()->options['cs'], 'amp_source')) ?>>
77
  <span><?php _e('Auto-generated configuration file', 'iubenda') ?></span>
78
  </label>
79
- <label class="mr-4 radio-regular text-xs">
80
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="remote" class="mr-2 section-radio-control" data-section-name="#custom_conf_file" data-section-group=".amp_configuration_file" <?php checked( 'remote', iub_array_get(iubenda()->options['cs'], 'amp_source')) ?>>
81
  <span><?php _e('Custom configuration file', 'iubenda') ?></span>
82
  </label>
83
  </div>
84
 
85
  <section id="auto_generated_conf_file" class="text-xs text-gray amp_configuration_file <?php echo iub_array_get(iubenda()->options['cs'], 'amp_source') == 'local' ?: 'hidden' ?>">
86
- <div class="notice notice--general mt-2 p-3 d-flex flex-wrap align-items-center">
87
  <?php
88
 
89
  if (empty(iubenda()->options['cs']['amp_template_done'])) {
@@ -124,7 +124,11 @@
124
  </tbody>
125
  </table>
126
  </div>
127
- <p class="px-3 mx-4"><?php _e('Seeing the AMP cookie notice when testing from Google but not when visiting your AMP pages directly?', 'iubenda') ?> <a target="_blank" href="<?php echo iubenda()->settings->links["amp_support"]; ?>" class="link-underline"><?php _e('Learn how to fix it', 'iubenda') ?></a></p>
 
 
 
 
128
  </section>
129
  <section id="custom_conf_file" class="text-xs text-gray amp_configuration_file <?php echo iub_array_get(iubenda()->options['cs'], 'amp_source') == 'remote' ?: 'hidden' ?>">
130
  <table class="table">
@@ -152,22 +156,26 @@
152
  <section id="iub_parser_engine_container" class="subOptions <?php echo (bool) iubenda()->options['cs']['parse']?: 'hidden' ?>">
153
  <h4><?php _e('Select Parsing Engine', 'iubenda') ?></h4>
154
  <div class="mb-3 d-flex flex-wrap align-items-center">
155
- <label class="radio-regular mr-4">
156
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="new" class="mr-2 section-radio-control" <?php checked( 'new', iubenda()->options['cs']['parser_engine'] ) ?>>
157
  <span><?php _e('Primary', 'iubenda') ?></span>
158
  </label>
159
- <label class="mr-4 radio-regular text-xs">
160
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="default" class="mr-2 section-radio-control" <?php checked( 'default', iubenda()->options['cs']['parser_engine'] ) ?>>
161
  <span><?php _e('Secondary', 'iubenda') ?></span>
162
  </label>
163
  </div>
164
- <br>
165
  <div class="mb-2 d-flex flex-wrap align-items-center">
166
  <label class="checkbox-regular">
167
  <input type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" class="mr-2 section-checkbox-control" data-section-name="#section-block-script" <?php checked( true, (bool) iubenda()->options['cs']['skip_parsing'] ) ?>>
168
- <span><?php _e('Leave scripts untouched on the page if the user has already given consent', 'iubenda') ?></span>
 
 
 
 
 
169
  </label>
170
- <p class="px-3 mx-4"><?php _e("Enable this option to improve performance <strong>only</strong> if your site does <strong>not</strong> use a cache system or a cache plugin and if you're <strong>not</strong> collecting per-category consent. If you're in doubt, keep this setting disabled", 'iubenda') ?></p>
171
  </div>
172
 
173
  <h4><?php _e('Blocked domains', 'iubenda') ?></h4>
72
  <section id="amp_support" class="subOptions my-2 <?php echo (bool) iubenda()->options['cs']['amp_support'] ?: 'hidden' ?>">
73
  <h4><?php _e('Select the iubenda AMP configuration file location.', 'iubenda') ?></h4>
74
  <div class="mb-2 d-flex flex-wrap align-items-center">
75
+ <label class="radio-regular mb-3 mr-4">
76
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="local" class="mr-2 section-radio-control" data-section-name="#auto_generated_conf_file" data-section-group=".amp_configuration_file" <?php checked( 'local', iub_array_get(iubenda()->options['cs'], 'amp_source')) ?>>
77
  <span><?php _e('Auto-generated configuration file', 'iubenda') ?></span>
78
  </label>
79
+ <label class="mr-4 mb-3 radio-regular text-xs">
80
  <input type="radio" name="iubenda_cookie_law_solution[amp_source]" value="remote" class="mr-2 section-radio-control" data-section-name="#custom_conf_file" data-section-group=".amp_configuration_file" <?php checked( 'remote', iub_array_get(iubenda()->options['cs'], 'amp_source')) ?>>
81
  <span><?php _e('Custom configuration file', 'iubenda') ?></span>
82
  </label>
83
  </div>
84
 
85
  <section id="auto_generated_conf_file" class="text-xs text-gray amp_configuration_file <?php echo iub_array_get(iubenda()->options['cs'], 'amp_source') == 'local' ?: 'hidden' ?>">
86
+ <div class="border-1 border-gray rounded mt-2 py-2 px-3 d-flex flex-wrap align-items-center">
87
  <?php
88
 
89
  if (empty(iubenda()->options['cs']['amp_template_done'])) {
124
  </tbody>
125
  </table>
126
  </div>
127
+
128
+ <div class="notice notice--general mt-2 p-3 d-flex align-items-center text-xs">
129
+ <p><?php _e('Seeing the AMP cookie notice when testing from Google but not when visiting your AMP pages directly?', 'iubenda') ?> <a target="_blank" href="<?php echo iubenda()->settings->links["amp_support"]; ?>" class="link-underline"><?php _e('Learn how to fix it', 'iubenda') ?></a></p>
130
+ </div>
131
+
132
  </section>
133
  <section id="custom_conf_file" class="text-xs text-gray amp_configuration_file <?php echo iub_array_get(iubenda()->options['cs'], 'amp_source') == 'remote' ?: 'hidden' ?>">
134
  <table class="table">
156
  <section id="iub_parser_engine_container" class="subOptions <?php echo (bool) iubenda()->options['cs']['parse']?: 'hidden' ?>">
157
  <h4><?php _e('Select Parsing Engine', 'iubenda') ?></h4>
158
  <div class="mb-3 d-flex flex-wrap align-items-center">
159
+ <label class="radio-regular mr-4 mb-3">
160
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="new" class="mr-2 section-radio-control" <?php checked( 'new', iubenda()->options['cs']['parser_engine'] ) ?>>
161
  <span><?php _e('Primary', 'iubenda') ?></span>
162
  </label>
163
+ <label class="mr-4 mb-3 radio-regular text-xs">
164
  <input type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="default" class="mr-2 section-radio-control" <?php checked( 'default', iubenda()->options['cs']['parser_engine'] ) ?>>
165
  <span><?php _e('Secondary', 'iubenda') ?></span>
166
  </label>
167
  </div>
 
168
  <div class="mb-2 d-flex flex-wrap align-items-center">
169
  <label class="checkbox-regular">
170
  <input type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" class="mr-2 section-checkbox-control" data-section-name="#section-block-script" <?php checked( true, (bool) iubenda()->options['cs']['skip_parsing'] ) ?>>
171
+ <div class="px-0 py-1">
172
+ <span class="p-0"><?php _e('Leave scripts untouched on the page if the user has already given consent', 'iubenda') ?></span>
173
+ <div class="notice notice--info mt-2 mb-3 p-3 d-flex align-items-center text-xs">
174
+ <p><?php _e("Enable this option to improve performance <strong>only</strong> if your site does <strong>not</strong> use a cache system or a cache plugin and if you're <strong>not</strong> collecting per-category consent. If you're in doubt, keep this setting disabled", 'iubenda') ?></p>
175
+ </div>
176
+ </div>
177
  </label>
178
+
179
  </div>
180
 
181
  <h4><?php _e('Blocked domains', 'iubenda') ?></h4>
views/partials/modals/modal_select_language.php CHANGED
@@ -25,7 +25,7 @@
25
  // Unify intersect (iubenda with local) supported languages by STR to Lower function
26
  $iubenda_intersect_supported_langs = array_map('strtolower', $iubenda_intersect_supported_langs);
27
  ?>
28
- <select class="custom-script-field" id="iub-website-language" name="website-language" required>
29
  <?php foreach (iubenda()->supported_languages as $key => $label): ?>
30
  <option <?php echo (strtolower($default_website_language) == strtolower($key)) ? 'selected' : ''; ?> <?php echo (!in_array(strtolower($key), $iubenda_intersect_supported_langs)) ?'disabled' : ''; ?> value=<?php echo $key; ?>><?php echo $label; ?></option>
31
  <?php endforeach; ?>
25
  // Unify intersect (iubenda with local) supported languages by STR to Lower function
26
  $iubenda_intersect_supported_langs = array_map('strtolower', $iubenda_intersect_supported_langs);
27
  ?>
28
+ <select id="iub-website-language" name="website-language" required>
29
  <?php foreach (iubenda()->supported_languages as $key => $label): ?>
30
  <option <?php echo (strtolower($default_website_language) == strtolower($key)) ? 'selected' : ''; ?> <?php echo (!in_array(strtolower($key), $iubenda_intersect_supported_langs)) ?'disabled' : ''; ?> value=<?php echo $key; ?>><?php echo $label; ?></option>
31
  <?php endforeach; ?>
views/plugin-settings.php CHANGED
@@ -24,7 +24,7 @@
24
  <input type="checkbox" class="mr-2" name="iubenda_plugin_settings[deactivation]" value="1" <?php checked( true, (bool) iubenda()->options['cs']['deactivation'] ) ?>>
25
  <span><?php _e('Delete all plugin data upon deactivation', 'iubenda') ?></span>
26
  </label>
27
- <div class="mb-5">
28
  <h4><?php _e('Menu position', 'iubenda') ?></h4>
29
  <div class="mb-2 d-flex align-items-center flex-wrap">
30
  <label class="radio-regular mr-3">
24
  <input type="checkbox" class="mr-2" name="iubenda_plugin_settings[deactivation]" value="1" <?php checked( true, (bool) iubenda()->options['cs']['deactivation'] ) ?>>
25
  <span><?php _e('Delete all plugin data upon deactivation', 'iubenda') ?></span>
26
  </label>
27
+ <div class="mt-5">
28
  <h4><?php _e('Menu position', 'iubenda') ?></h4>
29
  <div class="mb-2 d-flex align-items-center flex-wrap">
30
  <label class="radio-regular mr-3">
views/tc-configuration.php CHANGED
@@ -26,7 +26,7 @@
26
  </div>
27
  </div>
28
  <hr>
29
- <div class="py-5">
30
  <h3 class="m-0 mb-4"><?php _e('Integration', 'iubenda') ?></h3>
31
  <!-- Button Style -->
32
  <h4><?php _e('Button style', 'iubenda') ?></h4>
@@ -55,8 +55,8 @@
55
 
56
  <!-- Button Position -->
57
  <h4><?php _e('Button position', 'iubenda') ?></h4>
58
- <div class="mb-2 d-flex align-items-center flex-wrap">
59
- <label class="radio-regular mr-3">
60
  <input type="radio" name="iubenda_terms_conditions_solution[button_position]" value="automatic" class="mr-2 section-radio-control" data-section-group=".tc_button_position" data-section-name="#tc_button_position_automatic" <?php checked( 'automatic', iub_array_get(iubenda()->options['tc'], 'button_position')) ?>>
61
  <span><?php _e('Add to the footer automatically', 'iubenda') ?></span>
62
  </label>
@@ -87,40 +87,41 @@
87
  }
88
  ?>
89
  <section id="tc_button_position_manually" class="tc_button_position <?php echo iub_array_get(iubenda()->options['tc'], 'button_position') == 'manual' ?:'hidden' ; ?>">
90
- <div class="mb-3 p-0">
91
- <div class="my-5">
92
- <h4><?php _e('HTML', 'iubenda') ?></h4>
93
- <fieldset class="paste_embed_code tabs tabs--style2">
94
- <ul class="tabs__nav">
95
- <?php foreach(iubenda()->languages as $k => $v): ?>
96
- <li class="tabs__nav__item <?php echo $k == iubenda()->lang_default?'active':false ; ?>" data-target="tab-<?php echo $k ; ?>" data-group="language-tabs">
97
- <?php echo strtoupper($k) ; ?>
98
- </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  <?php endforeach; ?>
100
- </ul>
101
- <?php
102
- $languages = (new ProductHelper())->get_languages();
103
- foreach($languages as $lang_id => $v):
104
- $code = iub_array_get(iubenda()->options['tc'], "code_{$lang_id}");
105
- $code = html_entity_decode(iubenda()->parse_code($code));
106
- ?>
107
- <div data-target="tab-<?php echo $lang_id ; ?>" class="tabs__target <?php echo $lang_id == iubenda()->lang_default || $lang_id == 'default'? 'active': '' ; ?>" data-group="language-tabs">
108
- <textarea readonly class='form-control text-sm m-0 iub-tc-code' id="iub-tc-code-<?php echo $lang_id; ?>" placeholder='<?php _e('Your embed code', 'iubenda') ?>' rows='4'><?php echo $code ?></textarea>
109
- </div>
110
- <?php endforeach; ?>
111
 
112
- </fieldset>
113
- </div>
114
- </div>
115
- <div class="mb-3 p-0">
116
- <div class="my-5">
117
- <h4><?php _e('Shortcode', 'iubenda') ?></h4>
118
- <p>A shortcode is a tiny bit of code that allows embedding interactive elements or creating complex page layouts with a minimal effort.<br>Just copy and paste the shortcode where you want the button to appear.</p>
119
- <fieldset class="paste_embed_code">
120
- <div class="notice notice--general mt-2 mb-4 p-3 d-flex text-lg-bold">
121
- <span>[iub-tc-button]</span>
122
- </div>
123
- </fieldset>
124
  </div>
125
  </div>
126
  </section>
@@ -138,4 +139,24 @@
138
 
139
  <?php require_once IUBENDA_PLUGIN_PATH . '/views/partials/modals/modal_ops_embed_invalid.php'; ?>
140
  <?php require_once IUBENDA_PLUGIN_PATH . '/views/partials/footer.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
 
 
 
26
  </div>
27
  </div>
28
  <hr>
29
+ <div id="integration-div" class="py-5">
30
  <h3 class="m-0 mb-4"><?php _e('Integration', 'iubenda') ?></h3>
31
  <!-- Button Style -->
32
  <h4><?php _e('Button style', 'iubenda') ?></h4>
55
 
56
  <!-- Button Position -->
57
  <h4><?php _e('Button position', 'iubenda') ?></h4>
58
+ <div class="mb-2 align-items-center flex-wrap">
59
+ <label class="radio-regular mb-3">
60
  <input type="radio" name="iubenda_terms_conditions_solution[button_position]" value="automatic" class="mr-2 section-radio-control" data-section-group=".tc_button_position" data-section-name="#tc_button_position_automatic" <?php checked( 'automatic', iub_array_get(iubenda()->options['tc'], 'button_position')) ?>>
61
  <span><?php _e('Add to the footer automatically', 'iubenda') ?></span>
62
  </label>
87
  }
88
  ?>
89
  <section id="tc_button_position_manually" class="tc_button_position <?php echo iub_array_get(iubenda()->options['tc'], 'button_position') == 'manual' ?:'hidden' ; ?>">
90
+ <div class="subOptions">
91
+
92
+ <p class="text-gray text-sm mb-4"><?php _e('Just copy and paste the embed code (WP shortcode or HTML) where you want the button to appear.', 'iubenda') ?></p>
93
+
94
+ <div class="d-lg-flex">
95
+ <div class="flex-fill mb-3 mr-0 mr-lg-5">
96
+ <h4><?php _e('WP shortcode (recommended)', 'iubenda') ?></h4>
97
+ <fieldset class="paste_embed_code">
98
+ <input type="text" class="form-control text-sm m-0" value="[iub-tc-button]" readonly />
99
+ </fieldset>
100
+ <p class="text-gray-lighter"><?php _e('A shortcode is a tiny bit of code that allows embedding interactive elements or creating complex page layouts with a minimal effort.', 'iubenda') ?></p>
101
+ </div>
102
+ <div class="flex-fill mb-0">
103
+ <h4><?php _e('HTML', 'iubenda') ?></h4>
104
+ <fieldset class="paste_embed_code tabs tabs--style2">
105
+ <ul class="tabs__nav">
106
+ <?php foreach(iubenda()->languages as $k => $v): ?>
107
+ <li class="tabs__nav__item <?php echo $k == iubenda()->lang_default?'active':false ; ?>" data-target="tab-<?php echo $k ; ?>" id="iub-embed-code-readonly-<?php echo $k ; ?>" data-group="language-tabs">
108
+ <?php echo strtoupper($k) ; ?>
109
+ </li>
110
+ <?php endforeach; ?>
111
+ </ul>
112
+ <?php
113
+ $languages = (new ProductHelper())->get_languages();
114
+ foreach($languages as $lang_id => $v):
115
+ $code = iub_array_get(iubenda()->options['tc'], "code_{$lang_id}");
116
+ $code = html_entity_decode(iubenda()->parse_code($code));
117
+ ?>
118
+ <div data-target="tab-<?php echo $lang_id ; ?>" class="tabs__target <?php echo $lang_id == iubenda()->lang_default || $lang_id == 'default'? 'active': '' ; ?>" data-group="language-tabs">
119
+ <textarea readonly class='form-control text-sm m-0 iub-tc-code' id="iub-tc-code-<?php echo $lang_id; ?>" rows='4'><?php echo $code ?></textarea>
120
+ </div>
121
  <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
122
 
123
+ </fieldset>
124
+ </div>
 
 
 
 
 
 
 
 
 
 
125
  </div>
126
  </div>
127
  </section>
139
 
140
  <?php require_once IUBENDA_PLUGIN_PATH . '/views/partials/modals/modal_ops_embed_invalid.php'; ?>
141
  <?php require_once IUBENDA_PLUGIN_PATH . '/views/partials/footer.php'; ?>
142
+ <script>
143
+ jQuery('.iub-language-code').on('keyup change past', function() {
144
+ if(check_if_all_embed_codes_is_empty()){
145
+ jQuery('#integration-div').hide()
146
+ }else{
147
+ jQuery('#integration-div').show()
148
+ }
149
+ }).trigger('change');
150
+
151
+ function check_if_all_embed_codes_is_empty(){
152
+ var empty = true;
153
+ jQuery('.iub-language-code').each(function() {
154
+ if (jQuery(this).val() != "") {
155
+ empty = false;
156
+ return false;
157
+ }
158
+ });
159
 
160
+ return empty
161
+ }
162
+ </script>