iubenda Cookie Solution for GDPR - Version 2.4.2

Version Description

  • Fix comptability with PHP 8.0.2
  • Update WP support to 5.7
Download this release

Release Info

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

Code changes from version 2.4.1 to 2.4.2

includes/forms.php CHANGED
@@ -135,7 +135,7 @@ class iubenda_Forms {
135
  wp_localize_script(
136
  'iubenda-forms',
137
  'iubForms',
138
- json_encode( $args )
139
  );
140
 
141
  wp_enqueue_script( 'iubenda-forms' );
@@ -462,7 +462,7 @@ class iubenda_Forms {
462
  $result = $this->save_form( $formdata );
463
 
464
  if ( $result )
465
- $new_forms['new'] = $result;
466
  } else {
467
  // Is multi dimensions array
468
  // Check if the existing form fields is not equal the new form fields
@@ -474,7 +474,7 @@ class iubenda_Forms {
474
  }
475
 
476
  if ( $new_fields ) {
477
- $new_forms['updated'] = $exists->ID;
478
 
479
  // update form
480
  $formdata['ID'] = $exists->ID;
135
  wp_localize_script(
136
  'iubenda-forms',
137
  'iubForms',
138
+ $args
139
  );
140
 
141
  wp_enqueue_script( 'iubenda-forms' );
462
  $result = $this->save_form( $formdata );
463
 
464
  if ( $result )
465
+ $new_forms['new'][] = $result;
466
  } else {
467
  // Is multi dimensions array
468
  // Check if the existing form fields is not equal the new form fields
474
  }
475
 
476
  if ( $new_fields ) {
477
+ $new_forms['updated'][] = $exists->ID;
478
 
479
  // update form
480
  $formdata['ID'] = $exists->ID;
includes/settings.php CHANGED
@@ -193,7 +193,7 @@ class iubenda_Settings {
193
  */
194
  public function admin_enqueue_scripts( $page ) {
195
  wp_enqueue_style( 'iubenda-admin', IUBENDA_PLUGIN_URL . '/css/admin.css' );
196
-
197
  if ( ! in_array( $page, array( 'toplevel_page_iubenda', 'settings_page_iubenda' ) ) )
198
  return;
199
 
@@ -217,7 +217,7 @@ class iubenda_Settings {
217
  wp_localize_script(
218
  'iubenda-admin',
219
  'iubAdminArgs',
220
- json_encode( $args )
221
  );
222
  }
223
 
@@ -1562,11 +1562,11 @@ class iubenda_Settings {
1562
 
1563
  // new forms notice
1564
  if ( ! empty( $result['new'] ) )
1565
- $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form detected successfully.', '%d forms detected successfully.', count( $result['new'] ), 'iubenda' ), $result ), 'success' );
1566
 
1567
  // forms changed notice
1568
  if ( ! empty( $result['updated'] ) )
1569
- $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form change detected.', '%d form changes detected.', count( $result['updated'] ), 'iubenda' ), $result ), 'success' );
1570
 
1571
  // no changes notice
1572
  if ( empty( $result['new'] ) && empty( $result['updated'] ) )
@@ -1731,7 +1731,8 @@ class iubenda_Settings {
1731
  $notices = get_transient( 'iubenda_dashboard_notices' );
1732
  $delay = MINUTE_IN_SECONDS * 2;
1733
 
1734
- if ( empty( $notices ) || ! array_key_exists( $key, $notices[$notice_type] ) ) {
 
1735
  $notices[$notice_type][$key] = $message;
1736
 
1737
  set_transient( 'iubenda_dashboard_notices', $notices, $delay );
193
  */
194
  public function admin_enqueue_scripts( $page ) {
195
  wp_enqueue_style( 'iubenda-admin', IUBENDA_PLUGIN_URL . '/css/admin.css' );
196
+
197
  if ( ! in_array( $page, array( 'toplevel_page_iubenda', 'settings_page_iubenda' ) ) )
198
  return;
199
 
217
  wp_localize_script(
218
  'iubenda-admin',
219
  'iubAdminArgs',
220
+ $args
221
  );
222
  }
223
 
1562
 
1563
  // new forms notice
1564
  if ( ! empty( $result['new'] ) )
1565
+ $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form detected successfully.', '%d forms detected successfully.', count( $result['new'] ), 'iubenda' ), count( $result['new'] ) ), 'success' );
1566
 
1567
  // forms changed notice
1568
  if ( ! empty( $result['updated'] ) )
1569
+ $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form change detected.', '%d form changes detected.', count( $result['updated'] ), 'iubenda' ), count( $result['updated'] ) ), 'success' );
1570
 
1571
  // no changes notice
1572
  if ( empty( $result['new'] ) && empty( $result['updated'] ) )
1731
  $notices = get_transient( 'iubenda_dashboard_notices' );
1732
  $delay = MINUTE_IN_SECONDS * 2;
1733
 
1734
+ // Check notice type is exist before checking the key
1735
+ if ( empty( $notices ) || ( isset( $notices[ $notice_type ] ) && ! array_key_exists( $key, $notices[ $notice_type ] ) ) ) {
1736
  $notices[$notice_type][$key] = $message;
1737
 
1738
  set_transient( 'iubenda_dashboard_notices', $notices, $delay );
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: 2.4.1
7
  Author: iubenda
8
  Author URI: https://www.iubenda.com
9
  License: MIT License
@@ -32,7 +32,7 @@ define( 'IUB_DEBUG', false );
32
  * iubenda final class.
33
  *
34
  * @class iubenda
35
- * @version 2.4.1
36
  */
37
  class iubenda {
38
 
@@ -62,7 +62,7 @@ class iubenda {
62
  )
63
  );
64
  public $base_url;
65
- public $version = '2.4.1';
66
  public $activation = array(
67
  'update_version' => 0,
68
  'update_notice' => true,
@@ -78,15 +78,15 @@ class iubenda {
78
  /**
79
  * Disable object clone.
80
  */
81
- private function __clone() {
82
-
83
  }
84
 
85
  /**
86
  * Disable unserializing of the class.
87
  */
88
- private function __wakeup() {
89
-
90
  }
91
 
92
  /**
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.4.2
7
  Author: iubenda
8
  Author URI: https://www.iubenda.com
9
  License: MIT License
32
  * iubenda final class.
33
  *
34
  * @class iubenda
35
+ * @version 2.4.2
36
  */
37
  class iubenda {
38
 
62
  )
63
  );
64
  public $base_url;
65
+ public $version = '2.4.2';
66
  public $activation = array(
67
  'update_version' => 0,
68
  'update_notice' => true,
78
  /**
79
  * Disable object clone.
80
  */
81
+ public function __clone() {
82
+ throw new Exception( 'Cloning is not allowed for ' . __CLASS__ );
83
  }
84
 
85
  /**
86
  * Disable unserializing of the class.
87
  */
88
+ public function __wakeup() {
89
+ throw new Exception( 'Serializing is disabled for class ' . __CLASS__ );
90
  }
91
 
92
  /**
js/admin.js CHANGED
@@ -2,7 +2,7 @@
2
 
3
  $(function() {
4
  // parse args
5
- var args = $.parseJSON( iubAdminArgs );
6
 
7
  // parser options
8
  $( '#iub_parse' ).change( function () {
2
 
3
  $(function() {
4
  // parse args
5
+ var args = iubAdminArgs;
6
 
7
  // parser options
8
  $( '#iub_parse' ).change( function () {
js/frontend.js CHANGED
@@ -6,7 +6,7 @@
6
  var _this = this;
7
 
8
  // parse args
9
- var args = $.parseJSON( iubForms );
10
 
11
  // console.log( args );
12
 
6
  var _this = this;
7
 
8
  // parse args
9
+ var args = iubForms;
10
 
11
  // console.log( args );
12
 
readme.txt CHANGED
@@ -4,8 +4,8 @@ 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.6.0
8
- Stable tag: 2.4.1
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
@@ -150,6 +150,10 @@ We will be very happy to receive feedback here: [Uservoice forum](https://suppor
150
 
151
  == Changelog ==
152
 
 
 
 
 
153
  = 2.4.1 =
154
  * Save Cons for non Ajax forms in WPForms
155
  * Fix saving consent in CF7
@@ -501,6 +505,6 @@ We will be very happy to receive feedback here: [Uservoice forum](https://suppor
501
 
502
  == Upgrade Notice ==
503
 
504
- = 2.4.1 =
505
- * Save Cons for non Ajax forms in WPForms
506
- * Fix saving consent in CF7
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.7.0
8
+ Stable tag: 2.4.2
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
150
 
151
  == Changelog ==
152
 
153
+ = 2.4.2 =
154
+ * Fix comptability with PHP 8.0.2
155
+ * Update WP support to 5.7
156
+
157
  = 2.4.1 =
158
  * Save Cons for non Ajax forms in WPForms
159
  * Fix saving consent in CF7
505
 
506
  == Upgrade Notice ==
507
 
508
+ = 2.4.2 =
509
+ * Fix comptability with PHP 8.0.2
510
+ * Update WP support to 5.7