GDPR - Version 2.0.3

Version Description

  • Fix third party cookies now showing up in the privacy preferences window or the settings page.
Download this release

Release Info

Developer fclaussen
Plugin Icon 128x128 GDPR
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: gdpr, compliance, privacy, law, general data protection regulation
5
  Requires at least: 4.7
6
  Requires PHP: 5.6
7
  Tested up to: 4.9
8
- Stable tag: 2.0.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -206,6 +206,9 @@ Activating this plugin does not guarantee that an organisation is successfully m
206
 
207
  == Changelog ==
208
 
 
 
 
209
  = 2.0.2 =
210
  * Fix reconsent not logging correctly on reconsent
211
  * Fix reconsent bar not showing up.
5
  Requires at least: 4.7
6
  Requires PHP: 5.6
7
  Tested up to: 4.9
8
+ Stable tag: 2.0.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
206
 
207
  == Changelog ==
208
 
209
+ = 2.0.3 =
210
+ * Fix third party cookies now showing up in the privacy preferences window or the settings page.
211
+
212
  = 2.0.2 =
213
  * Fix reconsent not logging correctly on reconsent
214
  * Fix reconsent bar not showing up.
admin/class-gdpr-admin.php CHANGED
@@ -171,13 +171,13 @@ class GDPR_Admin {
171
  'status' => isset( $props['status'] ) ? sanitize_text_field( $props['status'] ) : '',
172
  'cookies_used' => isset( $props['cookies_used'] ) ? sanitize_text_field( wp_unslash( $props['cookies_used'] ) ) : '',
173
  'how_we_use' => isset( $props['how_we_use'] ) ? wp_kses_post( $props['how_we_use'] ) : '',
174
- 'domains' => array(),
175
  );
176
- if ( isset( $props['domains'] ) ) {
177
- foreach ( $props['domains'] as $domain_key => $domain ) {
178
  $domain_key = sanitize_text_field( $domain_key );
179
 
180
- $output[ $key ]['domains'][ $domain_key ] = array(
181
  'cookies_used' => isset( $domain['cookies_used'] ) ? sanitize_text_field( $domain['cookies_used'] ) : '',
182
  'optout' => isset( $domain['optout'] ) ? esc_url_raw( $domain['optout'] ) : '',
183
  );
171
  'status' => isset( $props['status'] ) ? sanitize_text_field( $props['status'] ) : '',
172
  'cookies_used' => isset( $props['cookies_used'] ) ? sanitize_text_field( wp_unslash( $props['cookies_used'] ) ) : '',
173
  'how_we_use' => isset( $props['how_we_use'] ) ? wp_kses_post( $props['how_we_use'] ) : '',
174
+ 'hosts' => array(),
175
  );
176
+ if ( isset( $props['hosts'] ) ) {
177
+ foreach ( $props['hosts'] as $domain_key => $domain ) {
178
  $domain_key = sanitize_text_field( $domain_key );
179
 
180
+ $output[ $key ]['hosts'][ $domain_key ] = array(
181
  'cookies_used' => isset( $domain['cookies_used'] ) ? sanitize_text_field( $domain['cookies_used'] ) : '',
182
  'optout' => isset( $domain['optout'] ) ? esc_url_raw( $domain['optout'] ) : '',
183
  );
admin/partials/settings.php CHANGED
@@ -281,8 +281,9 @@
281
  </tr>
282
  </table>
283
  <div class="tab-hosts" data-tabid="<?php echo esc_attr( $cat_id ); ?>">
284
- <?php if ( isset( $cookie_cat['domains'] ) && $cookie_cat['domains'] ) : ?>
285
- <?php foreach ( $cookie_cat['domains'] as $domain_id => $domain ) : ?>
 
286
  <div class="postbox">
287
  <h2 class="hndle"><?php echo esc_attr( $domain_id ); ?><button class="notice-dismiss" type="button" aria-label="<?php esc_attr_e( 'Remove this domain.', 'gdpr' ) ?>"></button></h2>
288
  <div class="inside">
@@ -298,7 +299,7 @@
298
  </label>
299
  </th>
300
  <td>
301
- <textarea cols="53" rows="3" name="gdpr_cookie_popup_content[<?php echo esc_attr( $cat_id ); ?>][domains][<?php echo esc_attr( $domain_id ); ?>][cookies_used]" id="hosts-cookies-used-<?php echo esc_attr( $domain_id ); ?>"><?php echo esc_attr( $domain['cookies_used'] ); ?></textarea>
302
  </td>
303
  </tr>
304
  <tr>
@@ -312,7 +313,7 @@
312
  </label>
313
  </th>
314
  <td>
315
- <input type="text" name="gdpr_cookie_popup_content[<?php echo esc_attr( $cat_id ); ?>][domains][<?php echo esc_attr( $domain_id ); ?>][optout]" value="<?php echo esc_attr( $domain['optout'] ); ?>" id="hosts-cookies-optout-<?php echo esc_attr( $domain_id ); ?>" class="regular-text" />
316
  <br>
317
  <span class="description"><?php esc_html_e( 'Url with instructions on how to opt out.', 'gdpr' ); ?></span>
318
  </td>
281
  </tr>
282
  </table>
283
  <div class="tab-hosts" data-tabid="<?php echo esc_attr( $cat_id ); ?>">
284
+ <?php var_dump($cookie_cat); ?>
285
+ <?php if ( isset( $cookie_cat['hosts'] ) && $cookie_cat['hosts'] ) : ?>
286
+ <?php foreach ( $cookie_cat['hosts'] as $domain_id => $domain ) : ?>
287
  <div class="postbox">
288
  <h2 class="hndle"><?php echo esc_attr( $domain_id ); ?><button class="notice-dismiss" type="button" aria-label="<?php esc_attr_e( 'Remove this domain.', 'gdpr' ) ?>"></button></h2>
289
  <div class="inside">
299
  </label>
300
  </th>
301
  <td>
302
+ <textarea cols="53" rows="3" name="gdpr_cookie_popup_content[<?php echo esc_attr( $cat_id ); ?>][hosts][<?php echo esc_attr( $domain_id ); ?>][cookies_used]" id="hosts-cookies-used-<?php echo esc_attr( $domain_id ); ?>"><?php echo esc_attr( $domain['cookies_used'] ); ?></textarea>
303
  </td>
304
  </tr>
305
  <tr>
313
  </label>
314
  </th>
315
  <td>
316
+ <input type="text" name="gdpr_cookie_popup_content[<?php echo esc_attr( $cat_id ); ?>][hosts][<?php echo esc_attr( $domain_id ); ?>][optout]" value="<?php echo esc_attr( $domain['optout'] ); ?>" id="hosts-cookies-optout-<?php echo esc_attr( $domain_id ); ?>" class="regular-text" />
317
  <br>
318
  <span class="description"><?php esc_html_e( 'Url with instructions on how to opt out.', 'gdpr' ); ?></span>
319
  </td>
admin/partials/templates/tmpl-cookies.php CHANGED
@@ -92,13 +92,13 @@
92
  <script type="text/html" id="tmpl-cookie-tabs-hosts">
93
  <div class="postbox">
94
  <h2 class="hndle">{{data.host_key}}<button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php esc_html_e( 'Remove this domain.', 'gdpr' ); ?></span></button></h2>
95
- <input type="hidden" name="{{data.option_name}}[{{data.tab_key}}][domains][{{data.host_key}}][name]" value="{{data.host_key}}" />
96
  <div class="inside">
97
  <table class="form-table">
98
  <tr>
99
  <th><label for="hosts-cookies-used-{{data.host_key}}"><?php esc_html_e( 'Cookies used', 'gdpr' ); ?></label></th>
100
  <td>
101
- <textarea cols="53" rows="3" name="{{data.option_name}}[{{data.tab_key}}][domains][{{data.host_key}}][cookies_used]" id="hosts-cookies-used-{{data.host_key}}" required></textarea>
102
  <br>
103
  <span class="description"><?php esc_html_e( 'Comma separated list.', 'gdpr' ); ?></span>
104
  </td>
@@ -106,7 +106,7 @@
106
  <tr>
107
  <th><label for="hosts-cookies-optout-{{data.host_key}}"><?php esc_html_e( 'How to Opt Out', 'gdpr' ); ?></label></th>
108
  <td>
109
- <input type="text" name="{{data.option_name}}[{{data.tab_key}}][domains][{{data.host_key}}][optout]" id="hosts-cookies-optout-{{data.host_key}}" class="regular-text" required />
110
  <br>
111
  <span class="description"><?php esc_html_e( 'Url with instructions on how to opt out.', 'gdpr' ); ?></span>
112
  </td>
92
  <script type="text/html" id="tmpl-cookie-tabs-hosts">
93
  <div class="postbox">
94
  <h2 class="hndle">{{data.host_key}}<button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php esc_html_e( 'Remove this domain.', 'gdpr' ); ?></span></button></h2>
95
+ <input type="hidden" name="{{data.option_name}}[{{data.tab_key}}][hosts][{{data.host_key}}][name]" value="{{data.host_key}}" />
96
  <div class="inside">
97
  <table class="form-table">
98
  <tr>
99
  <th><label for="hosts-cookies-used-{{data.host_key}}"><?php esc_html_e( 'Cookies used', 'gdpr' ); ?></label></th>
100
  <td>
101
+ <textarea cols="53" rows="3" name="{{data.option_name}}[{{data.tab_key}}][hosts][{{data.host_key}}][cookies_used]" id="hosts-cookies-used-{{data.host_key}}" required></textarea>
102
  <br>
103
  <span class="description"><?php esc_html_e( 'Comma separated list.', 'gdpr' ); ?></span>
104
  </td>
106
  <tr>
107
  <th><label for="hosts-cookies-optout-{{data.host_key}}"><?php esc_html_e( 'How to Opt Out', 'gdpr' ); ?></label></th>
108
  <td>
109
+ <input type="text" name="{{data.option_name}}[{{data.tab_key}}][hosts][{{data.host_key}}][optout]" id="hosts-cookies-optout-{{data.host_key}}" class="regular-text" required />
110
  <br>
111
  <span class="description"><?php esc_html_e( 'Url with instructions on how to opt out.', 'gdpr' ); ?></span>
112
  </td>
gdpr.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: GDPR
17
  * Plugin URI: https://trewknowledge.com
18
  * Description: This plugin is meant to assist a Controller, Data Processor, and Data Protection Officer (DPO) with efforts to meet the obligations and rights enacted under the GDPR.
19
- * Version: 2.0.2
20
  * Author: Trew Knowledge
21
  * Author URI: https://trewknowledge.com
22
  * License: GPL-2.0+
@@ -35,7 +35,7 @@ if ( ! defined( 'WPINC' ) ) {
35
  * Start at version 1.0.0 and use SemVer - https://semver.org
36
  * Rename this for your plugin and update it as you release new versions.
37
  */
38
- define( 'GDPR_VERSION', '2.0.2' );
39
 
40
  /**
41
  * The code that runs during plugin activation.
16
  * Plugin Name: GDPR
17
  * Plugin URI: https://trewknowledge.com
18
  * Description: This plugin is meant to assist a Controller, Data Processor, and Data Protection Officer (DPO) with efforts to meet the obligations and rights enacted under the GDPR.
19
+ * Version: 2.0.3
20
  * Author: Trew Knowledge
21
  * Author URI: https://trewknowledge.com
22
  * License: GPL-2.0+
35
  * Start at version 1.0.0 and use SemVer - https://semver.org
36
  * Rename this for your plugin and update it as you release new versions.
37
  */
38
+ define( 'GDPR_VERSION', '2.0.3' );
39
 
40
  /**
41
  * The code that runs during plugin activation.
languages/gdpr.pot CHANGED
@@ -154,7 +154,7 @@ msgstr ""
154
  msgid "Profile Updated. These are the user consents after the save:"
155
  msgstr ""
156
 
157
- #: admin/class-gdpr-admin.php:929, admin/partials/settings.php:332
158
  msgid "Consents"
159
  msgstr ""
160
 
@@ -885,7 +885,7 @@ msgstr ""
885
  msgid "OFF"
886
  msgstr ""
887
 
888
- #: admin/partials/settings.php:240, admin/partials/settings.php:293, admin/partials/templates/tmpl-cookies.php:42, admin/partials/templates/tmpl-cookies.php:99
889
  msgid "Cookies used"
890
  msgstr ""
891
 
@@ -921,59 +921,59 @@ msgstr ""
921
  msgid "Cookies that are set by a third party, like facebook.com."
922
  msgstr ""
923
 
924
- #: admin/partials/settings.php:287, admin/partials/templates/tmpl-cookies.php:94
925
  msgid "Remove this domain."
926
  msgstr ""
927
 
928
- #: admin/partials/settings.php:294, admin/partials/settings.php:295
929
  msgid "A comma separated list of cookies that your site is using from this third-party provider."
930
  msgstr ""
931
 
932
- #: admin/partials/settings.php:307
933
  msgid "Opt Out Link"
934
  msgstr ""
935
 
936
- #: admin/partials/settings.php:308, admin/partials/settings.php:309
937
  msgid "Add a link with the third-party instructions on how to opt out of their cookies."
938
  msgstr ""
939
 
940
- #: admin/partials/settings.php:317, admin/partials/templates/tmpl-cookies.php:111
941
  msgid "Url with instructions on how to opt out."
942
  msgstr ""
943
 
944
- #: admin/partials/settings.php:333
945
  msgid "E.g. Privacy Policy or Cookie Policy"
946
  msgstr ""
947
 
948
- #: admin/partials/settings.php:334
949
  msgid "Add consent"
950
  msgstr ""
951
 
952
- #: admin/partials/settings.php:339, admin/partials/templates/tmpl-consents.php:3
953
  msgid "Unregister this consent."
954
  msgstr ""
955
 
956
- #: admin/partials/settings.php:346, admin/partials/templates/tmpl-consents.php:10
957
  msgid "Policy Page"
958
  msgstr ""
959
 
960
- #: admin/partials/settings.php:347, admin/partials/settings.php:348, admin/partials/templates/tmpl-consents.php:11, admin/partials/templates/tmpl-consents.php:12
961
  msgid "This page will be tracked for changes and you will be prompted to ask users to re-consent to the new policy. Selecting a page will make this consent required."
962
  msgstr ""
963
 
964
- #: admin/partials/settings.php:365, admin/partials/templates/tmpl-consents.php:29
965
  msgid "Long description"
966
  msgstr ""
967
 
968
- #: admin/partials/settings.php:366, admin/partials/settings.php:367, admin/partials/templates/tmpl-consents.php:30, admin/partials/templates/tmpl-consents.php:31
969
  msgid "This will show up at the privacy preferences center, under the name of the consent."
970
  msgstr ""
971
 
972
- #: admin/partials/settings.php:377, admin/partials/templates/tmpl-consents.php:41
973
  msgid "Short description"
974
  msgstr ""
975
 
976
- #: admin/partials/settings.php:378, admin/partials/settings.php:379, admin/partials/templates/tmpl-consents.php:42, admin/partials/templates/tmpl-consents.php:43
977
  msgid "This will show up at registration forms next to checkboxes."
978
  msgstr ""
979
 
154
  msgid "Profile Updated. These are the user consents after the save:"
155
  msgstr ""
156
 
157
+ #: admin/class-gdpr-admin.php:929, admin/partials/settings.php:333
158
  msgid "Consents"
159
  msgstr ""
160
 
885
  msgid "OFF"
886
  msgstr ""
887
 
888
+ #: admin/partials/settings.php:240, admin/partials/settings.php:294, admin/partials/templates/tmpl-cookies.php:42, admin/partials/templates/tmpl-cookies.php:99
889
  msgid "Cookies used"
890
  msgstr ""
891
 
921
  msgid "Cookies that are set by a third party, like facebook.com."
922
  msgstr ""
923
 
924
+ #: admin/partials/settings.php:288, admin/partials/templates/tmpl-cookies.php:94
925
  msgid "Remove this domain."
926
  msgstr ""
927
 
928
+ #: admin/partials/settings.php:295, admin/partials/settings.php:296
929
  msgid "A comma separated list of cookies that your site is using from this third-party provider."
930
  msgstr ""
931
 
932
+ #: admin/partials/settings.php:308
933
  msgid "Opt Out Link"
934
  msgstr ""
935
 
936
+ #: admin/partials/settings.php:309, admin/partials/settings.php:310
937
  msgid "Add a link with the third-party instructions on how to opt out of their cookies."
938
  msgstr ""
939
 
940
+ #: admin/partials/settings.php:318, admin/partials/templates/tmpl-cookies.php:111
941
  msgid "Url with instructions on how to opt out."
942
  msgstr ""
943
 
944
+ #: admin/partials/settings.php:334
945
  msgid "E.g. Privacy Policy or Cookie Policy"
946
  msgstr ""
947
 
948
+ #: admin/partials/settings.php:335
949
  msgid "Add consent"
950
  msgstr ""
951
 
952
+ #: admin/partials/settings.php:340, admin/partials/templates/tmpl-consents.php:3
953
  msgid "Unregister this consent."
954
  msgstr ""
955
 
956
+ #: admin/partials/settings.php:347, admin/partials/templates/tmpl-consents.php:10
957
  msgid "Policy Page"
958
  msgstr ""
959
 
960
+ #: admin/partials/settings.php:348, admin/partials/settings.php:349, admin/partials/templates/tmpl-consents.php:11, admin/partials/templates/tmpl-consents.php:12
961
  msgid "This page will be tracked for changes and you will be prompted to ask users to re-consent to the new policy. Selecting a page will make this consent required."
962
  msgstr ""
963
 
964
+ #: admin/partials/settings.php:366, admin/partials/templates/tmpl-consents.php:29
965
  msgid "Long description"
966
  msgstr ""
967
 
968
+ #: admin/partials/settings.php:367, admin/partials/settings.php:368, admin/partials/templates/tmpl-consents.php:30, admin/partials/templates/tmpl-consents.php:31
969
  msgid "This will show up at the privacy preferences center, under the name of the consent."
970
  msgstr ""
971
 
972
+ #: admin/partials/settings.php:378, admin/partials/templates/tmpl-consents.php:41
973
  msgid "Short description"
974
  msgstr ""
975
 
976
+ #: admin/partials/settings.php:379, admin/partials/settings.php:380, admin/partials/templates/tmpl-consents.php:42, admin/partials/templates/tmpl-consents.php:43
977
  msgid "This will show up at registration forms next to checkboxes."
978
  msgstr ""
979
 
public/partials/privacy-preferences-modal.php CHANGED
@@ -133,7 +133,7 @@
133
  <?php foreach ( $tab['hosts'] as $host_key => $host ) : ?>
134
  <div class="gdpr-cookies-used">
135
  <div class="gdpr-cookie-title">
136
- <p><?php echo esc_html( $host['name'] ); ?></p>
137
  <a href="<?php echo esc_url( $host['optout'] ); ?>" target="_blank" class="gdpr-button"><?php esc_html_e( 'Opt Out', 'gdpr' ); ?></a>
138
  </div>
139
  <div class="gdpr-cookies">
133
  <?php foreach ( $tab['hosts'] as $host_key => $host ) : ?>
134
  <div class="gdpr-cookies-used">
135
  <div class="gdpr-cookie-title">
136
+ <p><?php echo esc_html( $host_key ); ?></p>
137
  <a href="<?php echo esc_url( $host['optout'] ); ?>" target="_blank" class="gdpr-button"><?php esc_html_e( 'Opt Out', 'gdpr' ); ?></a>
138
  </div>
139
  <div class="gdpr-cookies">