iubenda Cookie Solution for GDPR - Version 3.0.6

Version Description

  • Bugfix: Run upgrade process after using a new WP version
  • Bugfix: Issue in integration with CF7
Download this release

Release Info

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

Code changes from version 3.0.5 to 3.0.6

assets/js/frontend.js CHANGED
@@ -111,7 +111,7 @@
111
  };
112
 
113
  // send only if specific form has been submitted
114
- if ( selector.parentElement.id == e.target.parentElement.id ) {
115
  _this.submitForm( form, formArgs );
116
 
117
  _iub.cons.sendData();
111
  };
112
 
113
  // send only if specific form has been submitted
114
+ if ( (selector.parentElement.id == e.target.parentElement.id) || (selector.parentElement.id == e.target.id) ) {
115
  _this.submitForm( form, formArgs );
116
 
117
  _iub.cons.sendData();
includes/forms.php CHANGED
@@ -982,6 +982,8 @@ class iubenda_Forms {
982
  break;
983
  }
984
 
 
 
985
  return $forms;
986
  }
987
 
982
  break;
983
  }
984
 
985
+ $forms = apply_filters("iub_after_call_{$source}_forms", $forms);
986
+
987
  return $forms;
988
  }
989
 
includes/settings.php CHANGED
@@ -1340,6 +1340,7 @@ class iubenda_Settings {
1340
  $new_iubenda_global_options['public_ids'] = iub_array_get($result, 'public_ids', []);
1341
  }
1342
  update_option( 'iubenda_global_options', array_merge($old_iubenda_global_options, $new_iubenda_global_options));
 
1343
 
1344
  $this->load_defaults();
1345
  }
1340
  $new_iubenda_global_options['public_ids'] = iub_array_get($result, 'public_ids', []);
1341
  }
1342
  update_option( 'iubenda_global_options', array_merge($old_iubenda_global_options, $new_iubenda_global_options));
1343
+ iubenda()->options['global_options'] = array_merge($old_iubenda_global_options, $new_iubenda_global_options);
1344
 
1345
  $this->load_defaults();
1346
  }
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: 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: 3.0.5
7
  Author: iubenda
8
  Author URI: https://www.iubenda.com
9
  License: MIT License
@@ -34,7 +34,7 @@ define( 'IUB_DEBUG', false );
34
  * @property-read iubenda_Settings $settings
35
  *
36
  * @class iubenda
37
- * @version 3.0.5
38
  */
39
  class iubenda {
40
 
@@ -92,7 +92,7 @@ class iubenda {
92
  )
93
  );
94
  public $base_url;
95
- public $version = '3.0.5';
96
  public $activation = array(
97
  'update_version' => 0,
98
  'update_notice' => true,
@@ -207,9 +207,11 @@ class iubenda {
207
  add_action( 'shutdown', array( $this, 'output_end' ), 100 );
208
  add_action( 'template_redirect', array( $this, 'disable_jetpack_tracking' ) );
209
  add_action( 'admin_init', array( $this, 'maybe_do_upgrade' ) );
 
210
  add_action( 'upgrader_process_complete', array( $this, 'upgrade' ), 10, 2 );
211
  add_filter( 'plugin_action_links', array($this, 'plugin_action_links'), 10, 5 );
212
- }
 
213
 
214
  /**
215
  * Append settings to plugin action link
@@ -328,6 +330,9 @@ class iubenda {
328
  * @return void
329
  */
330
  public function activation() {
 
 
 
331
  set_transient( 'iub_activation_completed', 1, 3600 );
332
 
333
  add_option( 'iubenda_cookie_law_solution', $this->options['cs'], '', 'no' );
@@ -792,17 +797,46 @@ class iubenda {
792
  }
793
 
794
  // Sending a radar request when installing the plugin for the first time
795
- $radar = new RadarService;
796
- $radar->askRadarToSendRequest();
 
797
 
798
- // Migrating with old version
799
- $db_version = get_option( 'iubenda_cookie_law_version' ) ?: '2.5.91';
800
 
801
- // Update the new version in database
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
802
  update_option( 'iubenda_cookie_law_version', $this->version, 'no' );
 
 
 
 
 
 
 
 
 
 
803
 
804
  // Version 3.0.0 and above
805
- if ( version_compare( $db_version, '3.0.4', '<' ) ) {
806
  $this->upgrading_to_ver_3_process();
807
  }
808
  }
@@ -1109,8 +1143,7 @@ class iubenda {
1109
 
1110
  $this->settings->save_init_prepared_product_options($products, $result);
1111
 
1112
- // Reload Options and activated products
1113
- iubenda()->options['activated_products'] = iub_array_get($result, 'iubenda_activated_products', []) ?: [];
1114
  $this->settings->load_defaults();
1115
  }
1116
 
@@ -1156,6 +1189,20 @@ class iubenda {
1156
  return $close_pos;
1157
  }
1158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1159
  }
1160
 
1161
  if (!function_exists('iub_array_get')) {
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: 3.0.6
7
  Author: iubenda
8
  Author URI: https://www.iubenda.com
9
  License: MIT License
34
  * @property-read iubenda_Settings $settings
35
  *
36
  * @class iubenda
37
+ * @version 3.0.6
38
  */
39
  class iubenda {
40
 
92
  )
93
  );
94
  public $base_url;
95
+ public $version = '3.0.6';
96
  public $activation = array(
97
  'update_version' => 0,
98
  'update_notice' => true,
207
  add_action( 'shutdown', array( $this, 'output_end' ), 100 );
208
  add_action( 'template_redirect', array( $this, 'disable_jetpack_tracking' ) );
209
  add_action( 'admin_init', array( $this, 'maybe_do_upgrade' ) );
210
+ add_action( 'admin_init', array( $this, 'check_iubenda_version' ) );
211
  add_action( 'upgrader_process_complete', array( $this, 'upgrade' ), 10, 2 );
212
  add_filter( 'plugin_action_links', array($this, 'plugin_action_links'), 10, 5 );
213
+ add_action( 'upgrader_overwrote_package', array( $this, 'do_upgrade_processes' ) );
214
+ }
215
 
216
  /**
217
  * Append settings to plugin action link
330
  * @return void
331
  */
332
  public function activation() {
333
+ // Check Iubenda version on plugin activation
334
+ $this->check_iubenda_version();
335
+
336
  set_transient( 'iub_activation_completed', 1, 3600 );
337
 
338
  add_option( 'iubenda_cookie_law_solution', $this->options['cs'], '', 'no' );
797
  }
798
 
799
  // Sending a radar request when installing the plugin for the first time
800
+ $radar = new RadarService;
801
+ $radar->askRadarToSendRequest();
802
+ }
803
 
 
 
804
 
805
+ /**
806
+ * Compare Iubenda plugin versions and
807
+ * do functions if compare result false (DB_version < Current version of plugin files ).
808
+ *
809
+ */
810
+ public function check_iubenda_version() {
811
+ if ($this->compare_iub_plugin_versions()){
812
+ // Upgrade processes
813
+ $this->do_upgrade_processes();
814
+
815
+ // Update Iubenda plugin version
816
+ $this->update_iubenda_version();
817
+ }
818
+ }
819
+
820
+ /**
821
+ * update Iubenda version in Database.
822
+ *
823
+ * @return void
824
+ */
825
+ private function update_iubenda_version() {
826
  update_option( 'iubenda_cookie_law_version', $this->version, 'no' );
827
+ }
828
+
829
+
830
+ /**
831
+ * Perform processes on plugin upgrade.
832
+ *
833
+ * @return void
834
+ */
835
+ private function do_upgrade_processes() {
836
+ $db_version = get_option( 'iubenda_cookie_law_version' ) ?: '2.5.91';
837
 
838
  // Version 3.0.0 and above
839
+ if ( version_compare( $db_version, '3.0.6', '<' ) ) {
840
  $this->upgrading_to_ver_3_process();
841
  }
842
  }
1143
 
1144
  $this->settings->save_init_prepared_product_options($products, $result);
1145
 
1146
+ // Reload Options
 
1147
  $this->settings->load_defaults();
1148
  }
1149
 
1189
  return $close_pos;
1190
  }
1191
 
1192
+ /**
1193
+ * Compare between Iubenda DB version and This version and
1194
+ *
1195
+ * return true if DB version is lower than this version
1196
+ * return false if DB version is equal or more than this version
1197
+ *
1198
+ * @return bool|int
1199
+ */
1200
+ private function compare_iub_plugin_versions()
1201
+ {
1202
+ $db_version = get_option( 'iubenda_cookie_law_version' ) ?: '2.5.91';
1203
+ return version_compare( $db_version, $this->version, '<' );
1204
+ }
1205
+
1206
  }
1207
 
1208
  if (!function_exists('iub_array_get')) {
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: 5.9
8
- Stable tag: 3.0.5
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
@@ -129,7 +129,7 @@ We help companies all over the world to keep their websites and apps compliant w
129
 
130
  == Languages ==
131
 
132
- **Which languages do iubenda work in currently?**
133
 
134
  * English US and UK
135
  * Italian
@@ -242,6 +242,10 @@ The Brazilian General Data Protection Law, the ***Lei Geral de Proteção de Dad
242
 
243
  == Changelog ==
244
 
 
 
 
 
245
  = 3.0.5 =
246
  * Allow creating CS from QG widget
247
 
@@ -663,5 +667,6 @@ The Brazilian General Data Protection Law, the ***Lei Geral de Proteção de Dad
663
 
664
  == Upgrade Notice ==
665
 
666
- = 3.0.5 =
667
- * Allow creating CS from QG widget
 
5
  Requires at least: 5.0
6
  Requires PHP: 7.0.0
7
  Tested up to: 5.9
8
+ Stable tag: 3.0.6
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
129
 
130
  == Languages ==
131
 
132
+ **Our services are currently available in the following languages:**
133
 
134
  * English US and UK
135
  * Italian
242
 
243
  == Changelog ==
244
 
245
+ = 3.0.6 =
246
+ * Bugfix: Run upgrade process after using a new WP version
247
+ * Bugfix: Issue in integration with CF7
248
+
249
  = 3.0.5 =
250
  * Allow creating CS from QG widget
251
 
667
 
668
  == Upgrade Notice ==
669
 
670
+ = 3.0.6 =
671
+ * Bugfix: Run upgrade process after using a new WP version
672
+ * Bugfix: Issue in integration with CF7
views/partials/breadcrumb.php CHANGED
@@ -1,5 +1,5 @@
1
  <ul class="breadcrumb text-gray">
2
- <li class="breadcrumb__item"><a href="<?php echo add_query_arg( array('view' => 'products-page'), get_permalink() ); ?>"><?php _e('Products', 'iubenda') ?></a></li>
3
  <?php
4
  foreach($pageLabels as $pageLabel){
5
  if(end($pageLabels) === $pageLabel){
1
  <ul class="breadcrumb text-gray">
2
+ <li class="breadcrumb__item"><a href="<?php echo add_query_arg( array('view' => 'products-page'), iubenda()->base_url ); ?>"><?php _e('Products', 'iubenda') ?></a></li>
3
  <?php
4
  foreach($pageLabels as $pageLabel){
5
  if(end($pageLabels) === $pageLabel){
views/partials/footer.php CHANGED
@@ -1,5 +1,8 @@
1
  <footer class="py-4">
2
- <div class="d-flex justify-content-center ">
3
- <a target="_blank" class="text-bold text-xs text-gray mr-4" href="<?php echo iubenda()->settings->links['documentation']; ?>"><?php _e('Documentation', 'iubenda') ?></a>
 
 
 
4
  </div>
5
  </footer>
1
  <footer class="py-4">
2
+ <div class="d-flex justify-content-center">
3
+ <div class="text-center">
4
+ <p>Cookie and Consent Solution for the GDPR &amp; ePrivacy | v<?php echo get_option( 'iubenda_cookie_law_version' ) ?></p>
5
+ <a target="_blank" class="text-bold text-xs text-gray mr-4" href="<?php echo iubenda()->settings->links['documentation']; ?>"><?php _e('Documentation', 'iubenda') ?></a>
6
+ </div>
7
  </div>
8
  </footer>
views/partials/modals/modal_pp_created.php CHANGED
@@ -6,6 +6,6 @@
6
  </h1>
7
  <p class="mb-4"><?php _e('From here you can customize your privacy policy by adding the services you use within your website or you can customize the style of the button that displays your privacy policy.', 'iubenda') ?></p>
8
 
9
- <a class="btn-green-primary btn-block btn-sm" href="<?php echo add_query_arg( array('view' => "integrate-setup"), get_permalink() ); ?>"><?php _e('Got it', 'iubenda') ?></a>
10
 
11
  </div>
6
  </h1>
7
  <p class="mb-4"><?php _e('From here you can customize your privacy policy by adding the services you use within your website or you can customize the style of the button that displays your privacy policy.', 'iubenda') ?></p>
8
 
9
+ <a class="btn-green-primary btn-block btn-sm" href="<?php echo add_query_arg( array('view' => "integrate-setup"), iubenda()->base_url ); ?>"><?php _e('Got it', 'iubenda') ?></a>
10
 
11
  </div>
views/partials/product-card.php CHANGED
@@ -41,11 +41,11 @@
41
 
42
  <div class="d-flex align-items-center justify-content-between p-3">
43
  <div class="switch align-items-center">
44
- <input type="checkbox" class="service-checkbox" data-redirect="<?php echo add_query_arg(array('view' => "$serviceKey-configuration"), get_permalink()); ?>" data-service-key="iubenda-<?php echo $serviceKey; ?>" data-service-name="iubenda_<?php echo $serviceOptions['name']; ?>_solution" id="toggle-<?php echo $serviceKey; ?>" <?php echo $serviceOptions['status']=='true' ? 'checked':' '; ?> />
45
  <label for="toggle-<?php echo $serviceKey; ?>"></label>
46
  <p class="notification text-xs text-bold text-gray-lighter ml-2"><?php _e('Service', 'iubenda') ?><span class="selected"></span></p>
47
  </div>
48
- <a class="btn btn-gray-lighter btn-xs" href="<?php echo add_query_arg(array('view' => "$serviceKey-configuration"), get_permalink()); ?>"><?php _e('Configure', 'iubenda') ?></a>
49
  </div>
50
 
51
  </div>
41
 
42
  <div class="d-flex align-items-center justify-content-between p-3">
43
  <div class="switch align-items-center">
44
+ <input type="checkbox" class="service-checkbox" data-redirect="<?php echo add_query_arg(array('view' => "$serviceKey-configuration"), iubenda()->base_url ); ?>" data-service-key="iubenda-<?php echo $serviceKey; ?>" data-service-name="iubenda_<?php echo $serviceOptions['name']; ?>_solution" id="toggle-<?php echo $serviceKey; ?>" <?php echo $serviceOptions['status']=='true' ? 'checked':' '; ?> />
45
  <label for="toggle-<?php echo $serviceKey; ?>"></label>
46
  <p class="notification text-xs text-bold text-gray-lighter ml-2"><?php _e('Service', 'iubenda') ?><span class="selected"></span></p>
47
  </div>
48
+ <a class="btn btn-gray-lighter btn-xs" href="<?php echo add_query_arg(array('view' => "$serviceKey-configuration"), iubenda()->base_url ); ?>"><?php _e('Configure', 'iubenda') ?></a>
49
  </div>
50
 
51
  </div>