iubenda Cookie Solution for GDPR - Version 2.3.7

Version Description

  • Fix: admin.js ready method deprecation
Download this release

Release Info

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

Code changes from version 2.3.6 to 2.3.7

Files changed (3) hide show
  1. iubenda_cookie_solution.php +3 -3
  2. js/admin.js +46 -46
  3. readme.txt +7 -4
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.3.6
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.3.6
36
  */
37
  class iubenda {
38
 
@@ -62,7 +62,7 @@ class iubenda {
62
  )
63
  );
64
  public $base_url;
65
- public $version = '2.3.6';
66
  public $activation = array(
67
  'update_version' => 0,
68
  'update_notice' => true,
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.3.7
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.3.7
36
  */
37
  class iubenda {
38
 
62
  )
63
  );
64
  public $base_url;
65
+ public $version = '2.3.7';
66
  public $activation = array(
67
  'update_version' => 0,
68
  'update_notice' => true,
js/admin.js CHANGED
@@ -1,6 +1,6 @@
1
  ( function ( $ ) {
2
 
3
- $( document ).ready( function () {
4
  // parse args
5
  var args = $.parseJSON( iubAdminArgs );
6
 
@@ -12,7 +12,7 @@
12
  $( '#iub_parser_engine_container' ).slideUp( 'fast' );
13
  }
14
  } );
15
-
16
  // amp options
17
  $( '#iub_amp_support' ).change( function () {
18
  if ( $( this ).is( ':checked' ) ) {
@@ -21,11 +21,11 @@
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' );
@@ -53,7 +53,7 @@
53
  // don't do anything if the click is for the tab already showing.
54
  if ( link.is( '.active a' ) )
55
  return false;
56
-
57
  panelParent = link.closest( '.contextual-help-wrap' );
58
 
59
  // links
@@ -66,96 +66,96 @@
66
  $( panelParent ).find( '.help-tab-content' ).not( panel ).removeClass( 'active' ).hide();
67
  panel.addClass( 'active' ).show();
68
  } );
69
-
70
  // Preferences fields
71
  var preferencesID = $( '.preferences-field' ).length;
72
 
73
  // Add new preferences field
74
  $( document ).on( 'click', '.add-preferences-field', function ( e ) {
75
  e.preventDefault();
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>' );
83
 
84
  var last = $( '.preferences-field' ).last();
85
-
86
  last.fadeIn( 300 );
87
  } );
88
-
89
  // Remove preferences field
90
  $( document ).on( 'click', '.remove-preferences-field', function ( e ) {
91
  e.preventDefault();
92
-
93
  $( '#postbox-container-2' ).change();
94
-
95
  $( this ).closest( '.preferences-field' ).fadeOut( 300, function () {
96
  $( this ).remove();
97
  } );
98
  } );
99
-
100
  // Exclude fields
101
  var excludeID = $( '.exclude-field' ).length;
102
 
103
  // Add new preferences field
104
  $( document ).on( 'click', '.add-exclude-field', function ( e ) {
105
  e.preventDefault();
106
-
107
  console.log( this );
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>' );
115
 
116
  var last = $( '.exclude-field' ).last();
117
-
118
  last.fadeIn( 300 );
119
  } );
120
-
121
  // Remove exclude field
122
  $( document ).on( 'click', '.remove-exclude-field', function ( e ) {
123
  e.preventDefault();
124
-
125
  $( '#postbox-container-2' ).change();
126
-
127
  $( this ).closest( '.exclude-field' ).fadeOut( 300, function () {
128
  $( this ).remove();
129
  } );
130
  } );
131
-
132
  // Legal notices fields
133
  var legalNoticesID = $( '.legal_notices-field' ).length;
134
 
135
  // Add new preferences field
136
  $( document ).on( 'click', '.add-legal_notices-field', function ( e ) {
137
  e.preventDefault();
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 );
145
-
146
  $( '.legal_notices-table .add-legal_notices-field' ).closest( 'tr' ).before( '<tr class="legal_notices-field options-field" style="display: none;">' + html + '</tr>' );
147
 
148
  var last = $( '.legal_notices-field' ).last();
149
-
150
  last.fadeIn( 300 );
151
  } );
152
-
153
  // Remove legal notices field
154
  $( document ).on( 'click', '.remove-legal_notices-field', function ( e ) {
155
  e.preventDefault();
156
-
157
  $( '#postbox-container-2' ).change();
158
-
159
  $( this ).closest( '.legal_notices-field' ).fadeOut( 300, function () {
160
  $( this ).remove();
161
  } );
@@ -168,7 +168,7 @@
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();
@@ -185,7 +185,7 @@
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();
@@ -201,12 +201,12 @@
201
  $( '#exclude-field-template' ).remove();
202
  $( '#legal_notices-field-template' ).remove();
203
  } );
204
-
205
  // Confirm form delete
206
  $( document ).on( 'click', '#iubenda-consent-forms .delete-form', function () {
207
  return confirm( args.deleteForm );
208
  } );
209
-
210
  // Handle form fields data
211
  $( document ).on( 'change', '#postbox-container-2', function() {
212
  var fields = {},
@@ -219,20 +219,20 @@
219
  // get specific fields
220
  $.each( fieldsTypes, function( index, fieldType ) {
221
  fields[fieldType] = [];
222
-
223
  var fieldItems = $( '.' + fieldType + '-field select' );
224
-
225
  // get selected values
226
  $.each( fieldItems, function( index, item ) {
227
  if ( $( item ).val() != '' )
228
  fields[fieldType].push( $( item ).val() );
229
  } );
230
-
231
  fields.fieldType = $.unique( fields[fieldType] );
232
-
233
  // remove available fields if needed
234
  if ( fields[fieldType].length > 0 ) {
235
-
236
  // get options count
237
  var templateItemsCount = $( '.template-field .' + fieldType + '-fields-select option:disabled' ).length;
238
 
@@ -240,7 +240,7 @@
240
  if ( templateItemsCount !== 0 && fields[fieldType].length != templateItemsCount ) {
241
  // console.log( fields[fieldType] );
242
  }
243
-
244
  // disable add button if needed
245
  if ( fields.all.length == fields[fieldType].length ) {
246
  $( '.add-' + fieldType + '-field' ).attr( 'disabled', 'disabled' );
@@ -265,18 +265,18 @@
265
 
266
  // console.log( fields );
267
  }
268
-
269
  } );
270
-
271
  // Force trigger change on document ready
272
  $( document ).on( 'ready', function() {
273
  $( '#postbox-container-2' ).change();
274
  } );
275
-
276
  $( document ).on( 'mouseenter mouseleave', '#postbox-container-2 .options-field, #postbox-container-2 .submit-field', function() {
277
  $( '#postbox-container-2' ).change();
278
  } );
279
-
280
  } );
281
 
282
- } )( jQuery );
1
  ( function ( $ ) {
2
 
3
+ $(function() {
4
  // parse args
5
  var args = $.parseJSON( iubAdminArgs );
6
 
12
  $( '#iub_parser_engine_container' ).slideUp( 'fast' );
13
  }
14
  } );
15
+
16
  // amp options
17
  $( '#iub_amp_support' ).change( function () {
18
  if ( $( this ).is( ':checked' ) ) {
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' );
53
  // don't do anything if the click is for the tab already showing.
54
  if ( link.is( '.active a' ) )
55
  return false;
56
+
57
  panelParent = link.closest( '.contextual-help-wrap' );
58
 
59
  // links
66
  $( panelParent ).find( '.help-tab-content' ).not( panel ).removeClass( 'active' ).hide();
67
  panel.addClass( 'active' ).show();
68
  } );
69
+
70
  // Preferences fields
71
  var preferencesID = $( '.preferences-field' ).length;
72
 
73
  // Add new preferences field
74
  $( document ).on( 'click', '.add-preferences-field', function ( e ) {
75
  e.preventDefault();
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>' );
83
 
84
  var last = $( '.preferences-field' ).last();
85
+
86
  last.fadeIn( 300 );
87
  } );
88
+
89
  // Remove preferences field
90
  $( document ).on( 'click', '.remove-preferences-field', function ( e ) {
91
  e.preventDefault();
92
+
93
  $( '#postbox-container-2' ).change();
94
+
95
  $( this ).closest( '.preferences-field' ).fadeOut( 300, function () {
96
  $( this ).remove();
97
  } );
98
  } );
99
+
100
  // Exclude fields
101
  var excludeID = $( '.exclude-field' ).length;
102
 
103
  // Add new preferences field
104
  $( document ).on( 'click', '.add-exclude-field', function ( e ) {
105
  e.preventDefault();
106
+
107
  console.log( this );
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>' );
115
 
116
  var last = $( '.exclude-field' ).last();
117
+
118
  last.fadeIn( 300 );
119
  } );
120
+
121
  // Remove exclude field
122
  $( document ).on( 'click', '.remove-exclude-field', function ( e ) {
123
  e.preventDefault();
124
+
125
  $( '#postbox-container-2' ).change();
126
+
127
  $( this ).closest( '.exclude-field' ).fadeOut( 300, function () {
128
  $( this ).remove();
129
  } );
130
  } );
131
+
132
  // Legal notices fields
133
  var legalNoticesID = $( '.legal_notices-field' ).length;
134
 
135
  // Add new preferences field
136
  $( document ).on( 'click', '.add-legal_notices-field', function ( e ) {
137
  e.preventDefault();
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 );
145
+
146
  $( '.legal_notices-table .add-legal_notices-field' ).closest( 'tr' ).before( '<tr class="legal_notices-field options-field" style="display: none;">' + html + '</tr>' );
147
 
148
  var last = $( '.legal_notices-field' ).last();
149
+
150
  last.fadeIn( 300 );
151
  } );
152
+
153
  // Remove legal notices field
154
  $( document ).on( 'click', '.remove-legal_notices-field', function ( e ) {
155
  e.preventDefault();
156
+
157
  $( '#postbox-container-2' ).change();
158
+
159
  $( this ).closest( '.legal_notices-field' ).fadeOut( 300, function () {
160
  $( this ).remove();
161
  } );
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();
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();
201
  $( '#exclude-field-template' ).remove();
202
  $( '#legal_notices-field-template' ).remove();
203
  } );
204
+
205
  // Confirm form delete
206
  $( document ).on( 'click', '#iubenda-consent-forms .delete-form', function () {
207
  return confirm( args.deleteForm );
208
  } );
209
+
210
  // Handle form fields data
211
  $( document ).on( 'change', '#postbox-container-2', function() {
212
  var fields = {},
219
  // get specific fields
220
  $.each( fieldsTypes, function( index, fieldType ) {
221
  fields[fieldType] = [];
222
+
223
  var fieldItems = $( '.' + fieldType + '-field select' );
224
+
225
  // get selected values
226
  $.each( fieldItems, function( index, item ) {
227
  if ( $( item ).val() != '' )
228
  fields[fieldType].push( $( item ).val() );
229
  } );
230
+
231
  fields.fieldType = $.unique( fields[fieldType] );
232
+
233
  // remove available fields if needed
234
  if ( fields[fieldType].length > 0 ) {
235
+
236
  // get options count
237
  var templateItemsCount = $( '.template-field .' + fieldType + '-fields-select option:disabled' ).length;
238
 
240
  if ( templateItemsCount !== 0 && fields[fieldType].length != templateItemsCount ) {
241
  // console.log( fields[fieldType] );
242
  }
243
+
244
  // disable add button if needed
245
  if ( fields.all.length == fields[fieldType].length ) {
246
  $( '.add-' + fieldType + '-field' ).attr( 'disabled', 'disabled' );
265
 
266
  // console.log( fields );
267
  }
268
+
269
  } );
270
+
271
  // Force trigger change on document ready
272
  $( document ).on( 'ready', function() {
273
  $( '#postbox-container-2' ).change();
274
  } );
275
+
276
  $( document ).on( 'mouseenter mouseleave', '#postbox-container-2 .options-field, #postbox-container-2 .submit-field', function() {
277
  $( '#postbox-container-2' ).change();
278
  } );
279
+
280
  } );
281
 
282
+ } )( jQuery );
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.3.2
8
- Stable tag: 2.3.6
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
@@ -150,6 +150,9 @@ We will be very happy to receive feedback here: [Uservoice forum](https://suppor
150
 
151
  == Changelog ==
152
 
 
 
 
153
  = 2.3.6 =
154
  * TCF v2 Support
155
 
@@ -449,5 +452,5 @@ We will be very happy to receive feedback here: [Uservoice forum](https://suppor
449
 
450
  == Upgrade Notice ==
451
 
452
- = 2.3.6 =
453
- * TCF v2 Support
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.5.0
8
+ Stable tag: 2.3.7
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
150
 
151
  == Changelog ==
152
 
153
+ = 2.3.7 =
154
+ * Fix: admin.js ready method deprecation
155
+
156
  = 2.3.6 =
157
  * TCF v2 Support
158
 
452
 
453
  == Upgrade Notice ==
454
 
455
+ = 2.3.7 =
456
+ * Fix: admin.js ready method deprecation