WP GDPR Compliance - Version 1.2.2

Version Description

Release date: March 2nd, 2018 * Fixed a bug with WordPress Comments * Added countdown to GDPR deadline (May 25, 2018) * Added ability to add custom error messages to Contact Form 7 and Gravity Forms * Added ability to add HTML tags to the texts and error messages

Download this release

Release Info

Developer donnyoexman
Plugin Icon 128x128 WP GDPR Compliance
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

Includes/Extensions/CF7.php CHANGED
@@ -82,7 +82,7 @@ class CF7 {
82
  * @return string
83
  */
84
  public function addFormTagHandler($tag) {
85
- $tag = (is_array($tag)) ? new \WPCF7_FormTag($tag): $tag;
86
  $output = '';
87
  switch ($tag->type) {
88
  case 'wpgdprc' :
@@ -140,15 +140,15 @@ class CF7 {
140
  * @return \WPCF7_Validation
141
  */
142
  public function validateField(\WPCF7_Validation $result, $tag) {
143
- $tag = (gettype($tag) == 'array') ? new \WPCF7_FormTag($tag): $tag;
144
-
145
  switch ($tag->type) {
146
  case 'wpgdprc' :
147
  $tag->name = 'wpgdprc';
148
  $name = $tag->name;
149
  $value = (isset($_POST[$name])) ? filter_var($_POST[$name], FILTER_VALIDATE_BOOLEAN) : false;
150
  if ($value === false) {
151
- $result->invalidate($tag, Integrations::getErrorMessage(self::ID));
152
  }
153
  break;
154
  }
@@ -180,6 +180,13 @@ class CF7 {
180
  return (array)get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_form_text', array());
181
  }
182
 
 
 
 
 
 
 
 
183
  /**
184
  * @param int $formId
185
  * @return string
@@ -193,4 +200,18 @@ class CF7 {
193
  }
194
  return Integrations::getCheckboxText();
195
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  }
82
  * @return string
83
  */
84
  public function addFormTagHandler($tag) {
85
+ $tag = (is_array($tag)) ? new \WPCF7_FormTag($tag) : $tag;
86
  $output = '';
87
  switch ($tag->type) {
88
  case 'wpgdprc' :
140
  * @return \WPCF7_Validation
141
  */
142
  public function validateField(\WPCF7_Validation $result, $tag) {
143
+ $tag = (gettype($tag) == 'array') ? new \WPCF7_FormTag($tag) : $tag;
144
+ $formId = (isset($_POST['_wpcf7']) && is_numeric($_POST['_wpcf7'])) ? (int) $_POST['_wpcf7'] : 0;
145
  switch ($tag->type) {
146
  case 'wpgdprc' :
147
  $tag->name = 'wpgdprc';
148
  $name = $tag->name;
149
  $value = (isset($_POST[$name])) ? filter_var($_POST[$name], FILTER_VALIDATE_BOOLEAN) : false;
150
  if ($value === false) {
151
+ $result->invalidate($tag, self::getErrorMessage($formId));
152
  }
153
  break;
154
  }
180
  return (array)get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_form_text', array());
181
  }
182
 
183
+ /**
184
+ * @return array
185
+ */
186
+ public function getFormErrorMessages() {
187
+ return (array)get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_error_message', array());
188
+ }
189
+
190
  /**
191
  * @param int $formId
192
  * @return string
200
  }
201
  return Integrations::getCheckboxText();
202
  }
203
+
204
+ /**
205
+ * @param int $formId
206
+ * @return string
207
+ */
208
+ public function getErrorMessage($formId = 0) {
209
+ if (!empty($formId)) {
210
+ $errors = $this->getFormErrorMessages();
211
+ if (!empty($errors[$formId])) {
212
+ return esc_html($errors[$formId]);
213
+ }
214
+ }
215
+ return Integrations::getErrorMessage();
216
+ }
217
  }
Includes/Extensions/GForms.php CHANGED
@@ -81,6 +81,23 @@ class GForms {
81
  \GFAPI::update_form($form, $form['id']);
82
  }
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  /**
85
  * @param array $form
86
  */
@@ -121,6 +138,13 @@ class GForms {
121
  return (array)get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_form_text', array());
122
  }
123
 
 
 
 
 
 
 
 
124
  /**
125
  * @param int $formId
126
  * @return string
@@ -129,9 +153,23 @@ class GForms {
129
  if (!empty($formId)) {
130
  $texts = $this->getFormTexts();
131
  if (!empty($texts[$formId])) {
132
- return esc_html($texts[$formId]);
133
  }
134
  }
135
  return Integrations::getCheckboxText();
136
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  }
81
  \GFAPI::update_form($form, $form['id']);
82
  }
83
 
84
+ /**
85
+ * @param array $validation_result
86
+ * @return array
87
+ */
88
+ public function customValidation($validation_result = array()) {
89
+ $form = $validation_result['form'];
90
+ foreach ($form['fields'] as &$field) {
91
+ if (isset($field['wpgdprc']) && $field['wpgdprc'] === true) {
92
+ if (isset($field['failed_validation']) && $field['failed_validation'] === true) {
93
+ $field['validation_message'] = sprintf(self::getErrorMessage($form['id']));
94
+ }
95
+ }
96
+ }
97
+ $validation_result['form'] = $form;
98
+ return $validation_result;
99
+ }
100
+
101
  /**
102
  * @param array $form
103
  */
138
  return (array)get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_form_text', array());
139
  }
140
 
141
+ /**
142
+ * @return array
143
+ */
144
+ public function getFormErrorMessages() {
145
+ return (array)get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_error_message', array());
146
+ }
147
+
148
  /**
149
  * @param int $formId
150
  * @return string
153
  if (!empty($formId)) {
154
  $texts = $this->getFormTexts();
155
  if (!empty($texts[$formId])) {
156
+ return wp_kses($texts[$formId], Helpers::getAllowedHTMLTags());
157
  }
158
  }
159
  return Integrations::getCheckboxText();
160
  }
161
+
162
+ /**
163
+ * @param int $formId
164
+ * @return string
165
+ */
166
+ public function getErrorMessage($formId = 0) {
167
+ if (!empty($formId)) {
168
+ $errors = $this->getFormErrorMessages();
169
+ if (!empty($errors[$formId])) {
170
+ return wp_kses($errors[$formId], Helpers::getAllowedHTMLTags());
171
+ }
172
+ }
173
+ return Integrations::getErrorMessage();
174
+ }
175
  }
Includes/Helpers.php CHANGED
@@ -7,6 +7,19 @@ namespace WPGDPRC\Includes;
7
  * @package WPGDPRC\Includes
8
  */
9
  class Helpers {
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * @return array
12
  */
@@ -14,6 +27,60 @@ class Helpers {
14
  return get_plugin_data(WP_GDPR_C_ROOT_FILE);
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * @return array
19
  */
@@ -69,8 +136,8 @@ class Helpers {
69
  public static function getActivatedPlugins() {
70
  $output = array();
71
 
72
- $activePlugins = (array) get_option('active_plugins', array());
73
- $activeNetworkPlugins = (array) get_site_option('active_sitewide_plugins', array());
74
  if (!empty($activeNetworkPlugins)) {
75
  foreach ($activeNetworkPlugins as $file => $timestamp) {
76
  if (!in_array($file, $activePlugins)) {
@@ -116,4 +183,19 @@ class Helpers {
116
  }
117
  return $output;
118
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
7
  * @package WPGDPRC\Includes
8
  */
9
  class Helpers {
10
+ /** @var null */
11
+ private static $instance = null;
12
+
13
+ /**
14
+ * @return null|Helpers
15
+ */
16
+ public static function getInstance() {
17
+ if (!isset(self::$instance)) {
18
+ self::$instance = new self();
19
+ }
20
+ return self::$instance;
21
+ }
22
+
23
  /**
24
  * @return array
25
  */
27
  return get_plugin_data(WP_GDPR_C_ROOT_FILE);
28
  }
29
 
30
+ /**
31
+ * @return array
32
+ */
33
+ public static function getAllowedHTMLTags() {
34
+ return array(
35
+ 'a' => array(
36
+ 'class' => array(),
37
+ 'href' => array(),
38
+ 'hreflang' => array(),
39
+ 'title' => array(),
40
+ 'target' => array(),
41
+ 'rel' => array(),
42
+ ),
43
+ 'br' => array(),
44
+ 'em' => array(),
45
+ 'strong' => array(),
46
+ 'u' => array(),
47
+ 'strike' => array(),
48
+ 'span' => array(
49
+ 'class' => array(),
50
+ ),
51
+ );
52
+ }
53
+
54
+ /**
55
+ * @return string
56
+ */
57
+ public static function getAllowedHTMLTagsOutput() {
58
+ $tags = self::getAllowedHTMLTags();
59
+ $output = '';
60
+ foreach ($tags as $tag => $attributes) {
61
+ $output .= ' <' . $tag;
62
+ if (!empty($attributes)) {
63
+ foreach ($attributes as $attribute => $data) {
64
+ $output .= ' ' . $attribute . '=""';
65
+ }
66
+ }
67
+ $output .= '>';
68
+ }
69
+ return '<div class="wpgdprc-allowed-tags">' . sprintf(__('You can use: %s', WP_GDPR_C_SLUG), '<pre>' . esc_html($output) . '</pre>') . '</div>';
70
+ }
71
+
72
+ /**
73
+ * @return float|int
74
+ */
75
+ public static function getDaysLeftToComply() {
76
+ $date = mktime(0, 0, 0, 5, 25, 2018);
77
+ $difference = $date - time();
78
+ if ($difference < 0) {
79
+ return 0;
80
+ }
81
+ return floor($difference / 60 / 60 / 24);
82
+ }
83
+
84
  /**
85
  * @return array
86
  */
136
  public static function getActivatedPlugins() {
137
  $output = array();
138
 
139
+ $activePlugins = (array)get_option('active_plugins', array());
140
+ $activeNetworkPlugins = (array)get_site_option('active_sitewide_plugins', array());
141
  if (!empty($activeNetworkPlugins)) {
142
  foreach ($activeNetworkPlugins as $file => $timestamp) {
143
  if (!in_array($file, $activePlugins)) {
183
  }
184
  return $output;
185
  }
186
+
187
+ /**
188
+ * @param $data
189
+ * @return string
190
+ */
191
+ public function sanitizeData($data) {
192
+ if (is_array($data)) {
193
+ foreach ($data as &$value) {
194
+ $value = sanitize_text_field($value);
195
+ }
196
+ } else {
197
+ $data = sanitize_text_field($data);
198
+ }
199
+ return $data;
200
+ }
201
  }
Includes/Integrations.php CHANGED
@@ -33,22 +33,27 @@ class Integrations {
33
  foreach (Helpers::getEnabledPlugins() as $plugin) {
34
  switch ($plugin['id']) {
35
  case WP::ID :
36
- add_filter('comment_form_submit_field', array(WP::getInstance(), 'addField'));
37
  add_action('pre_comment_on_post', array(WP::getInstance(), 'checkPost'));
38
  break;
39
  case CF7::ID :
40
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_forms', array(CF7::getInstance(), 'processIntegration'));
41
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_form_text', array(CF7::getInstance(), 'processIntegration'));
 
42
  add_action('wpcf7_init', array(CF7::getInstance(), 'addFormTagSupport'));
43
  add_filter('wpcf7_validate_wpgdprc', array(CF7::getInstance(), 'validateField'), 10, 2);
44
  break;
45
  case WC::ID :
46
  add_action('woocommerce_checkout_process', array(WC::getInstance(), 'checkPost'));
47
- add_action('woocommerce_review_order_before_submit', array(WC::getInstance(), 'addField'));
48
  break;
49
  case GForms::ID :
50
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_forms', array(GForms::getInstance(), 'processIntegration'));
51
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_form_text', array(GForms::getInstance(), 'processIntegration'));
 
 
 
 
52
  break;
53
  }
54
  }
@@ -59,11 +64,16 @@ class Integrations {
59
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'], 'intval');
60
  switch ($plugin['id']) {
61
  case CF7::ID :
 
 
 
 
 
62
  case GForms::ID :
63
- $class = ($plugin['id'] === CF7::ID) ? CF7::getInstance() : GForms::getInstance();
64
- add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'], array($class, 'processIntegration'));
65
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_forms');
66
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_form_text');
 
67
  break;
68
  default :
69
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_text');
@@ -85,13 +95,16 @@ class Integrations {
85
  if (!empty($forms)) {
86
  $optionNameForms = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_forms';
87
  $optionNameFormText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text';
 
88
  $enabledForms = CF7::getInstance()->getEnabledForms();
89
  $output .= '<ul class="wpgdprc-checklist-options">';
90
  foreach ($forms as $form) {
91
  $formSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_' . $form;
92
  $textSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text_' . $form;
 
93
  $enabled = in_array($form, $enabledForms);
94
  $text = CF7::getInstance()->getCheckboxText($form);
 
95
  $output .= '<li>';
96
  $output .= '<div class="wpgdprc-checkbox">';
97
  $output .= '<input type="checkbox" name="' . $optionNameForms . '[]" id="' . $formSettingId . '" value="' . $form . '" tabindex="1" data-type="save_setting" data-option="' . $optionNameForms . '" data-append="1" ' . checked(true, $enabled, false) . ' />';
@@ -102,6 +115,10 @@ class Integrations {
102
  $output .= '<label for="' . $textSettingId . '">' . __('Checkbox text', WP_GDPR_C_SLUG) . '</label>';
103
  $output .= '<input type="text" name="' . $optionNameFormText . '[' . $form . ']' . '" class="regular-text" id="' . $textSettingId . '" placeholder="' . $text . '" value="' . $text . '" />';
104
  $output .= '</p>';
 
 
 
 
105
  $output .= '</li>';
106
  }
107
  $output .= '</ul>';
@@ -114,13 +131,16 @@ class Integrations {
114
  if (!empty($forms)) {
115
  $optionNameForms = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_forms';
116
  $optionNameFormText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text';
 
117
  $enabledForms = GForms::getInstance()->getEnabledForms();
118
  $output .= '<ul class="wpgdprc-checklist-options">';
119
  foreach ($forms as $form) {
120
  $formSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_' . $form['id'];
121
  $textSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text_' . $form['id'];
 
122
  $enabled = in_array($form['id'], $enabledForms);
123
- $text = GForms::getInstance()->getCheckboxText($form['id']);
 
124
  $output .= '<li>';
125
  $output .= '<div class="wpgdprc-checkbox">';
126
  $output .= '<input type="checkbox" name="' . $optionNameForms . '[]" id="' . $formSettingId . '" value="' . $form['id'] . '" tabindex="1" data-type="save_setting" data-option="' . $optionNameForms . '" data-append="1" ' . checked(true, $enabled, false) . ' />';
@@ -131,6 +151,11 @@ class Integrations {
131
  $output .= '<label for="' . $textSettingId . '">' . __('Checkbox text', WP_GDPR_C_SLUG) . '</label>';
132
  $output .= '<input type="text" name="' . $optionNameFormText . '[' . $form['id'] . ']' . '" class="regular-text" id="' . $textSettingId . '" placeholder="' . $text . '" value="' . $text . '" />';
133
  $output .= '</p>';
 
 
 
 
 
134
  $output .= '</li>';
135
  }
136
  $output .= '</ul>';
@@ -141,8 +166,8 @@ class Integrations {
141
  default :
142
  $optionNameText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_text';
143
  $optionNameErrorMessage = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message';
144
- $text = self::getCheckboxText($plugin);
145
- $errorMessage = self::getErrorMessage($plugin);
146
  $output .= '<ul class="wpgdprc-checklist-options">';
147
  $output .= '<li>';
148
  $output .= '<p class="wpgdprc-setting">';
@@ -153,6 +178,7 @@ class Integrations {
153
  $output .= '<label for="' . $optionNameErrorMessage . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
154
  $output .= '<input type="text" name="' . $optionNameErrorMessage . '" class="regular-text" id="' . $optionNameErrorMessage . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
155
  $output .= '</p>';
 
156
  $output .= '</li>';
157
  $output .= '</ul>';
158
  break;
@@ -169,7 +195,7 @@ class Integrations {
169
  if (empty($option)) {
170
  return __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
171
  }
172
- return esc_html($option);
173
  }
174
 
175
  /**
@@ -181,7 +207,7 @@ class Integrations {
181
  if (empty($option)) {
182
  return __('Please accept the privacy checkbox.', WP_GDPR_C_SLUG);
183
  }
184
- return esc_html($option);
185
  }
186
 
187
  /**
33
  foreach (Helpers::getEnabledPlugins() as $plugin) {
34
  switch ($plugin['id']) {
35
  case WP::ID :
36
+ add_filter('comment_form_submit_field', array(WP::getInstance(), 'addField'), 999);
37
  add_action('pre_comment_on_post', array(WP::getInstance(), 'checkPost'));
38
  break;
39
  case CF7::ID :
40
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_forms', array(CF7::getInstance(), 'processIntegration'));
41
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_form_text', array(CF7::getInstance(), 'processIntegration'));
42
+ add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_error_message', array(CF7::getInstance(), 'processIntegration'));
43
  add_action('wpcf7_init', array(CF7::getInstance(), 'addFormTagSupport'));
44
  add_filter('wpcf7_validate_wpgdprc', array(CF7::getInstance(), 'validateField'), 10, 2);
45
  break;
46
  case WC::ID :
47
  add_action('woocommerce_checkout_process', array(WC::getInstance(), 'checkPost'));
48
+ add_action('woocommerce_review_order_before_submit', array(WC::getInstance(), 'addField'), 999);
49
  break;
50
  case GForms::ID :
51
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_forms', array(GForms::getInstance(), 'processIntegration'));
52
  add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_form_text', array(GForms::getInstance(), 'processIntegration'));
53
+ add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_error_message', array(GForms::getInstance(), 'processIntegration'));
54
+ foreach (GForms::getInstance()->getEnabledForms() as $formId) {
55
+ add_action('gform_validation_' . $formId, array(GForms::getInstance(), 'customValidation'));
56
+ }
57
  break;
58
  }
59
  }
64
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'], 'intval');
65
  switch ($plugin['id']) {
66
  case CF7::ID :
67
+ add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'], array(CF7::getInstance(), 'processIntegration'));
68
+ register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_forms');
69
+ register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_form_text', array('sanitize_callback' => array(Helpers::getInstance(), 'sanitizeData')));
70
+ register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_error_message', array('sanitize_callback' => array(Helpers::getInstance(), 'sanitizeData')));
71
+ break;
72
  case GForms::ID :
73
+ add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'], array(GForms::getInstance(), 'processIntegration'));
 
74
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_forms');
75
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_form_text');
76
+ register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_error_message');
77
  break;
78
  default :
79
  register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_integrations_' . $plugin['id'] . '_text');
95
  if (!empty($forms)) {
96
  $optionNameForms = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_forms';
97
  $optionNameFormText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text';
98
+ $optionNameErrorMessage = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message';
99
  $enabledForms = CF7::getInstance()->getEnabledForms();
100
  $output .= '<ul class="wpgdprc-checklist-options">';
101
  foreach ($forms as $form) {
102
  $formSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_' . $form;
103
  $textSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text_' . $form;
104
+ $errorSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message_' . $form;
105
  $enabled = in_array($form, $enabledForms);
106
  $text = CF7::getInstance()->getCheckboxText($form);
107
+ $errorMessage = CF7::getInstance()->getErrorMessage($form);
108
  $output .= '<li>';
109
  $output .= '<div class="wpgdprc-checkbox">';
110
  $output .= '<input type="checkbox" name="' . $optionNameForms . '[]" id="' . $formSettingId . '" value="' . $form . '" tabindex="1" data-type="save_setting" data-option="' . $optionNameForms . '" data-append="1" ' . checked(true, $enabled, false) . ' />';
115
  $output .= '<label for="' . $textSettingId . '">' . __('Checkbox text', WP_GDPR_C_SLUG) . '</label>';
116
  $output .= '<input type="text" name="' . $optionNameFormText . '[' . $form . ']' . '" class="regular-text" id="' . $textSettingId . '" placeholder="' . $text . '" value="' . $text . '" />';
117
  $output .= '</p>';
118
+ $output .= '<p class="wpgdprc-setting">';
119
+ $output .= '<label for="' . $errorSettingId . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
120
+ $output .= '<input type="text" name="' . $optionNameErrorMessage . '[' . $form . ']' . '" class="regular-text" id="' . $errorSettingId . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
121
+ $output .= '</p>';
122
  $output .= '</li>';
123
  }
124
  $output .= '</ul>';
131
  if (!empty($forms)) {
132
  $optionNameForms = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_forms';
133
  $optionNameFormText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text';
134
+ $optionNameErrorMessage = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message';
135
  $enabledForms = GForms::getInstance()->getEnabledForms();
136
  $output .= '<ul class="wpgdprc-checklist-options">';
137
  foreach ($forms as $form) {
138
  $formSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_' . $form['id'];
139
  $textSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text_' . $form['id'];
140
+ $errorSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message_' . $form['id'];
141
  $enabled = in_array($form['id'], $enabledForms);
142
+ $text = esc_html(GForms::getInstance()->getCheckboxText($form['id']));
143
+ $errorMessage = esc_html(GForms::getInstance()->getErrorMessage($form['id']));
144
  $output .= '<li>';
145
  $output .= '<div class="wpgdprc-checkbox">';
146
  $output .= '<input type="checkbox" name="' . $optionNameForms . '[]" id="' . $formSettingId . '" value="' . $form['id'] . '" tabindex="1" data-type="save_setting" data-option="' . $optionNameForms . '" data-append="1" ' . checked(true, $enabled, false) . ' />';
151
  $output .= '<label for="' . $textSettingId . '">' . __('Checkbox text', WP_GDPR_C_SLUG) . '</label>';
152
  $output .= '<input type="text" name="' . $optionNameFormText . '[' . $form['id'] . ']' . '" class="regular-text" id="' . $textSettingId . '" placeholder="' . $text . '" value="' . $text . '" />';
153
  $output .= '</p>';
154
+ $output .= '<p class="wpgdprc-setting">';
155
+ $output .= '<label for="' . $errorSettingId . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
156
+ $output .= '<input type="text" name="' . $optionNameErrorMessage . '[' . $form['id'] . ']' . '" class="regular-text" id="' . $errorSettingId . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
157
+ $output .= '</p>';
158
+ $output .= Helpers::getAllowedHTMLTagsOutput();
159
  $output .= '</li>';
160
  }
161
  $output .= '</ul>';
166
  default :
167
  $optionNameText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_text';
168
  $optionNameErrorMessage = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message';
169
+ $text = esc_html(self::getCheckboxText($plugin));
170
+ $errorMessage = esc_html(self::getErrorMessage($plugin));
171
  $output .= '<ul class="wpgdprc-checklist-options">';
172
  $output .= '<li>';
173
  $output .= '<p class="wpgdprc-setting">';
178
  $output .= '<label for="' . $optionNameErrorMessage . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
179
  $output .= '<input type="text" name="' . $optionNameErrorMessage . '" class="regular-text" id="' . $optionNameErrorMessage . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
180
  $output .= '</p>';
181
+ $output .= Helpers::getAllowedHTMLTagsOutput();
182
  $output .= '</li>';
183
  $output .= '</ul>';
184
  break;
195
  if (empty($option)) {
196
  return __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
197
  }
198
+ return wp_kses($option, Helpers::getAllowedHTMLTags());
199
  }
200
 
201
  /**
207
  if (empty($option)) {
208
  return __('Please accept the privacy checkbox.', WP_GDPR_C_SLUG);
209
  }
210
+ return wp_kses($option, Helpers::getAllowedHTMLTags());
211
  }
212
 
213
  /**
Includes/Pages.php CHANGED
@@ -33,7 +33,7 @@ class Pages {
33
  $pluginData['Name'],
34
  $pluginData['Name'],
35
  'manage_options',
36
- 'wp_gdpr_compliance',
37
  array($this, 'generatePage')
38
  );
39
  }
@@ -41,6 +41,7 @@ class Pages {
41
  public function generatePage() {
42
  $pluginData = Helpers::getPluginData();
43
  $activatedPlugins = Helpers::getActivatedPlugins();
 
44
  ?>
45
  <div class="wrap">
46
  <div class="wpgdprc">
@@ -84,9 +85,9 @@ class Pages {
84
 
85
  <div class="wpgdprc-checkbox-data" <?php if (!$checked) : ?>style="display: none;"<?php endif; ?>>
86
  <?php if (!empty($description)) : ?>
87
- <div class="wpgdprc-checklist-description">
88
- <?php echo $description; ?>
89
- </div>
90
  <?php endif; ?>
91
  <?php echo $options; ?>
92
  </div>
@@ -137,11 +138,11 @@ class Pages {
137
  </div>
138
 
139
  <?php if (!empty($description)) : ?>
140
- <div class="wpgdprc-checkbox-data" <?php if (!$checked) : ?>style="display: none;"<?php endif; ?>>
141
- <div class="wpgdprc-checklist-description">
142
- <?php echo $description; ?>
 
143
  </div>
144
- </div>
145
  <?php endif; ?>
146
  </li>
147
  <?php
@@ -162,6 +163,15 @@ class Pages {
162
 
163
  <p class="wpgdprc-disclaimer"><?php _e('Disclaimer: The creators of this plugin do not have a legal background. We assist website and webshop owners in being compliant with the General Data Protection Regulation (GDPR) but recommend contacting a law firm for rock solid legal advice.', WP_GDPR_C_SLUG); ?></p>
164
 
 
 
 
 
 
 
 
 
 
165
  <div class="wpgdprc-background"><?php include(WP_GDPR_C_DIR_SVG . '/inline-waves.svg.php'); ?></div>
166
  </div>
167
  </div>
33
  $pluginData['Name'],
34
  $pluginData['Name'],
35
  'manage_options',
36
+ str_replace('-', '_', WP_GDPR_C_SLUG),
37
  array($this, 'generatePage')
38
  );
39
  }
41
  public function generatePage() {
42
  $pluginData = Helpers::getPluginData();
43
  $activatedPlugins = Helpers::getActivatedPlugins();
44
+ $daysLeftToComply = Helpers::getDaysLeftToComply();
45
  ?>
46
  <div class="wrap">
47
  <div class="wpgdprc">
85
 
86
  <div class="wpgdprc-checkbox-data" <?php if (!$checked) : ?>style="display: none;"<?php endif; ?>>
87
  <?php if (!empty($description)) : ?>
88
+ <div class="wpgdprc-checklist-description">
89
+ <?php echo $description; ?>
90
+ </div>
91
  <?php endif; ?>
92
  <?php echo $options; ?>
93
  </div>
138
  </div>
139
 
140
  <?php if (!empty($description)) : ?>
141
+ <div class="wpgdprc-checkbox-data" <?php if (!$checked) : ?>style="display: none;"<?php endif; ?>>
142
+ <div class="wpgdprc-checklist-description">
143
+ <?php echo $description; ?>
144
+ </div>
145
  </div>
 
146
  <?php endif; ?>
147
  </li>
148
  <?php
163
 
164
  <p class="wpgdprc-disclaimer"><?php _e('Disclaimer: The creators of this plugin do not have a legal background. We assist website and webshop owners in being compliant with the General Data Protection Regulation (GDPR) but recommend contacting a law firm for rock solid legal advice.', WP_GDPR_C_SLUG); ?></p>
165
 
166
+ <?php if ($daysLeftToComply > 0) : ?>
167
+ <div class="wpgdprc-countdown">
168
+ <div class="wpgdprc-countdown-inner">
169
+ <h2><?php echo date(get_option('date_format'), strtotime('25 May 2018')); ?></h2>
170
+ <p><?php printf(__('You have %s left to comply with GDPR.', WP_GDPR_C_SLUG), sprintf(_n('%s day', '%s days', $daysLeftToComply, WP_GDPR_C_SLUG), number_format_i18n($daysLeftToComply))); ?></p>
171
+ </div>
172
+ </div>
173
+ <?php endif; ?>
174
+
175
  <div class="wpgdprc-background"><?php include(WP_GDPR_C_DIR_SVG . '/inline-waves.svg.php'); ?></div>
176
  </div>
177
  </div>
assets/css/admin.css CHANGED
@@ -52,7 +52,23 @@
52
  color: #4AA94F;
53
  }
54
 
55
- .wpgdprc .submit .button.button-primary {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  vertical-align: top;
57
  height: 34px;
58
  background: #4AA94F;
@@ -377,6 +393,38 @@ span.wpgdprc-instructions {
377
  font-size: 1rem;
378
  }
379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  @media screen and (max-width: 639px) {
381
  .wpgdprc-instructions {
382
  display: none;
@@ -393,8 +441,18 @@ span.wpgdprc-instructions {
393
  .wpgdprc-setting label {
394
  max-width: 30%;
395
  }
 
396
  .wpgdprc-setting input {
397
  float: right;
398
  max-width: 70%;
399
  }
 
 
 
 
 
 
 
 
 
400
  }
52
  color: #4AA94F;
53
  }
54
 
55
+ .wpgdprc pre {
56
+ display: inline;
57
+ white-space: pre-wrap;
58
+ white-space: -moz-pre-wrap;
59
+ white-space: -pre-wrap;
60
+ white-space: -o-pre-wrap;
61
+ word-wrap: break-word;
62
+ font-style: normal;
63
+ }
64
+
65
+ div.wpgdprc-allowed-tags {
66
+ font-size: 14px;
67
+ font-style: italic;
68
+ color: #8A8A8A;
69
+ }
70
+
71
+ .wpgdprc p.submit .button.button-primary {
72
  vertical-align: top;
73
  height: 34px;
74
  background: #4AA94F;
393
  font-size: 1rem;
394
  }
395
 
396
+ .wpgdprc-countdown {
397
+ display: table;
398
+ margin: 30px auto 0;
399
+ padding: 20px;
400
+ background: #4AA94F;
401
+ -webkit-border-radius: 50%;
402
+ -moz-border-radius: 50%;
403
+ border-radius: 50%;
404
+ width: 200px;
405
+ height: 200px;
406
+ text-align: center;
407
+ color: #FFFFFF;
408
+ }
409
+
410
+ .wpgdprc-countdown-inner {
411
+ display: table-cell;
412
+ vertical-align: middle;
413
+ }
414
+
415
+ .wpgdprc-countdown h2 {
416
+ font-size: 22px;
417
+ }
418
+
419
+ .wpgdprc-countdown p {
420
+ line-height: 1.4;
421
+ font-size: 16px;
422
+ }
423
+
424
+ .wpgdprc-countdown h2, .wpgdprc-countdown p {
425
+ margin: 0;
426
+ }
427
+
428
  @media screen and (max-width: 639px) {
429
  .wpgdprc-instructions {
430
  display: none;
441
  .wpgdprc-setting label {
442
  max-width: 30%;
443
  }
444
+
445
  .wpgdprc-setting input {
446
  float: right;
447
  max-width: 70%;
448
  }
449
+ }
450
+
451
+ @media screen and (min-width: 1400px) {
452
+ .wpgdprc-countdown {
453
+ position: absolute;
454
+ top: 30px;
455
+ right: 30px;
456
+ margin: 0;
457
+ }
458
  }
languages/wp-gdpr-compliance-nl_NL.mo CHANGED
Binary file
languages/wp-gdpr-compliance-nl_NL.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP GDPR Compliance\n"
4
- "POT-Creation-Date: 2018-02-23 17:15+0100\n"
5
- "PO-Revision-Date: 2018-02-23 17:15+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Van Ons <info@van-ons.nl>\n"
8
  "Language: nl_NL\n"
@@ -12,7 +12,9 @@ msgstr ""
12
  "X-Generator: Poedit 2.0.6\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
 
 
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPathExcluded-0: assets\n"
@@ -37,20 +39,25 @@ msgstr ""
37
  msgid "Privacy"
38
  msgstr ""
39
 
40
- #: Includes/Extensions/WP.php:42
41
  #, php-format
42
  msgid "<strong>ERROR</strong>: %s"
43
  msgstr ""
44
 
45
- #: Includes/Extensions/WP.php:43
46
  msgid "Comment Submission Failure"
47
  msgstr ""
48
 
49
- #: Includes/Helpers.php:23
 
 
 
 
 
50
  msgid "Do you have a contact form?"
51
  msgstr ""
52
 
53
- #: Includes/Helpers.php:24
54
  msgid ""
55
  "Make sure you add a checkbox specifically asking the user of the form if "
56
  "they consent to you storing and using their personal information to get back "
@@ -58,11 +65,11 @@ msgid ""
58
  "if you will send or share the data with any 3rd-parties and which."
59
  msgstr ""
60
 
61
- #: Includes/Helpers.php:27
62
  msgid "Can visitors comment anywhere on your website?"
63
  msgstr ""
64
 
65
- #: Includes/Helpers.php:28
66
  msgid ""
67
  "Make sure you add a checkbox specifically asking the user of the comment "
68
  "section if they consent to storing their message attached to the e-mail "
@@ -71,11 +78,11 @@ msgid ""
71
  "which."
72
  msgstr ""
73
 
74
- #: Includes/Helpers.php:31
75
  msgid "Is there an order form on your website or webshop present?"
76
  msgstr ""
77
 
78
- #: Includes/Helpers.php:32
79
  msgid ""
80
  "Make sure you add a checkbox specifically asking the user of the form if "
81
  "they consent to you storing and using their personal information to ship the "
@@ -85,11 +92,11 @@ msgid ""
85
  "which."
86
  msgstr ""
87
 
88
- #: Includes/Helpers.php:35
89
  msgid "Do you provide a forum or message board?"
90
  msgstr ""
91
 
92
- #: Includes/Helpers.php:36
93
  msgid ""
94
  "Make sure you add a checkbox specifically asking forum / board users if they "
95
  "consent to you storing and using their personal information and messages. "
@@ -97,11 +104,11 @@ msgid ""
97
  "share the data with any 3rd-parties and which."
98
  msgstr ""
99
 
100
- #: Includes/Helpers.php:39
101
  msgid "Can visitors chat with your company directly?"
102
  msgstr ""
103
 
104
- #: Includes/Helpers.php:40
105
  msgid ""
106
  "Make sure you add a checkbox specifically asking chat users if they consent "
107
  "to you storing and using their personal information and messages. The "
@@ -110,106 +117,107 @@ msgid ""
110
  "mention if you will send or share the data with any 3rd-parties and which."
111
  msgstr ""
112
 
113
- #: Includes/Helpers.php:52 Includes/Integrations.php:195
114
  msgid "Please accept the privacy checkbox."
115
  msgstr ""
116
 
117
- #: Includes/Integrations.php:98 Includes/Integrations.php:133
118
  #, php-format
119
  msgid "Form: %s"
120
  msgstr ""
121
 
122
- #: Includes/Integrations.php:99 Includes/Integrations.php:134
123
  msgid "Activate for this form:"
124
  msgstr ""
125
 
126
- #: Includes/Integrations.php:108 Includes/Integrations.php:143
127
- #: Includes/Integrations.php:161
128
  msgid "Checkbox text"
129
  msgstr ""
130
 
131
- #: Includes/Integrations.php:115 Includes/Integrations.php:150
132
- msgid "No forms found."
 
133
  msgstr ""
134
 
135
- #: Includes/Integrations.php:165
136
- msgid "Error message"
137
  msgstr ""
138
 
139
- #: Includes/Integrations.php:183
140
  msgid ""
141
  "By using this form you agree with the storage and handling of your data by "
142
  "this website."
143
  msgstr ""
144
 
145
- #: Includes/Integrations.php:207
146
  msgid "WordPress Comments"
147
  msgstr ""
148
 
149
- #: Includes/Integrations.php:208
150
  msgid ""
151
  "When activated the GDPR checkbox will be added automatically just above the "
152
  "submit button."
153
  msgstr ""
154
 
155
- #: Includes/Integrations.php:222
156
  msgid "Contact Form 7"
157
  msgstr ""
158
 
159
- #: Includes/Integrations.php:223 Includes/Integrations.php:230
160
  msgid "A GDPR form tag will be automatically added to every form you activate."
161
  msgstr ""
162
 
163
- #: Includes/Integrations.php:229
164
  msgid "Gravity Forms"
165
  msgstr ""
166
 
167
- #: Includes/Integrations.php:236
168
  msgid "WooCommerce"
169
  msgstr ""
170
 
171
- #: Includes/Integrations.php:237
172
  msgid ""
173
  "The GDPR checkbox will be added automatically at the end of your checkout "
174
  "page."
175
  msgstr ""
176
 
177
- #: Includes/Pages.php:56
178
  msgid "Integrations"
179
  msgstr ""
180
 
181
- #: Includes/Pages.php:57
182
  msgid "Checklist"
183
  msgstr ""
184
 
185
- #: Includes/Pages.php:76
186
  msgid "Enable compliance:"
187
  msgstr ""
188
 
189
- #: Includes/Pages.php:97
190
  #, php-format
191
  msgid "This plugin is outdated. %s supports version %s and up."
192
  msgstr ""
193
 
194
- #: Includes/Pages.php:107
195
  msgid "Couldn't find any supported plugins installed."
196
  msgstr ""
197
 
198
- #: Includes/Pages.php:108
199
  msgid "The following plugins are supported as of now:"
200
  msgstr ""
201
 
202
- #: Includes/Pages.php:114
203
  msgid "More plugins will be added in the future."
204
  msgstr ""
205
 
206
- #: Includes/Pages.php:118
207
  msgid ""
208
  "Below we ask you what private data you currently collect and provide you "
209
  "with tips to comply."
210
  msgstr ""
211
 
212
- #: Includes/Pages.php:159
213
  #, php-format
214
  msgid ""
215
  "This plugin assists website and webshop owners to comply with European "
@@ -217,19 +225,37 @@ msgid ""
217
  "to comply to avoid large fines. The regulation can be read here: %s."
218
  msgstr ""
219
 
220
- #: Includes/Pages.php:159
221
  msgid "GDPR Key Changes"
222
  msgstr ""
223
 
224
- #: Includes/Pages.php:160
225
  #, php-format
226
  msgid "%s supports: %s."
227
  msgstr ""
228
 
229
- #: Includes/Pages.php:163
230
  msgid ""
231
  "Disclaimer: The creators of this plugin do not have a legal background. We "
232
  "assist website and webshop owners in being compliant with the General Data "
233
  "Protection Regulation (GDPR) but recommend contacting a law firm for rock "
234
  "solid legal advice."
235
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP GDPR Compliance\n"
4
+ "POT-Creation-Date: 2018-03-02 17:41+0100\n"
5
+ "PO-Revision-Date: 2018-03-02 17:42+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Van Ons <info@van-ons.nl>\n"
8
  "Language: nl_NL\n"
12
  "X-Generator: Poedit 2.0.6\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-KeywordsList: __;_e;_ngettext:1,2;_n;_ngettext_noop:1,2;_n_noop:1,2;"
16
+ "_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;esc_attr__;"
17
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
18
  "X-Poedit-SourceCharset: UTF-8\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Poedit-SearchPathExcluded-0: assets\n"
39
  msgid "Privacy"
40
  msgstr ""
41
 
42
+ #: Includes/Extensions/WP.php:38
43
  #, php-format
44
  msgid "<strong>ERROR</strong>: %s"
45
  msgstr ""
46
 
47
+ #: Includes/Extensions/WP.php:39
48
  msgid "Comment Submission Failure"
49
  msgstr ""
50
 
51
+ #: Includes/Helpers.php:69
52
+ #, php-format
53
+ msgid "You can use: %s"
54
+ msgstr ""
55
+
56
+ #: Includes/Helpers.php:90
57
  msgid "Do you have a contact form?"
58
  msgstr ""
59
 
60
+ #: Includes/Helpers.php:91
61
  msgid ""
62
  "Make sure you add a checkbox specifically asking the user of the form if "
63
  "they consent to you storing and using their personal information to get back "
65
  "if you will send or share the data with any 3rd-parties and which."
66
  msgstr ""
67
 
68
+ #: Includes/Helpers.php:94
69
  msgid "Can visitors comment anywhere on your website?"
70
  msgstr ""
71
 
72
+ #: Includes/Helpers.php:95
73
  msgid ""
74
  "Make sure you add a checkbox specifically asking the user of the comment "
75
  "section if they consent to storing their message attached to the e-mail "
78
  "which."
79
  msgstr ""
80
 
81
+ #: Includes/Helpers.php:98
82
  msgid "Is there an order form on your website or webshop present?"
83
  msgstr ""
84
 
85
+ #: Includes/Helpers.php:99
86
  msgid ""
87
  "Make sure you add a checkbox specifically asking the user of the form if "
88
  "they consent to you storing and using their personal information to ship the "
92
  "which."
93
  msgstr ""
94
 
95
+ #: Includes/Helpers.php:102
96
  msgid "Do you provide a forum or message board?"
97
  msgstr ""
98
 
99
+ #: Includes/Helpers.php:103
100
  msgid ""
101
  "Make sure you add a checkbox specifically asking forum / board users if they "
102
  "consent to you storing and using their personal information and messages. "
104
  "share the data with any 3rd-parties and which."
105
  msgstr ""
106
 
107
+ #: Includes/Helpers.php:106
108
  msgid "Can visitors chat with your company directly?"
109
  msgstr ""
110
 
111
+ #: Includes/Helpers.php:107
112
  msgid ""
113
  "Make sure you add a checkbox specifically asking chat users if they consent "
114
  "to you storing and using their personal information and messages. The "
117
  "mention if you will send or share the data with any 3rd-parties and which."
118
  msgstr ""
119
 
120
+ #: Includes/Helpers.php:119 Includes/Integrations.php:208
121
  msgid "Please accept the privacy checkbox."
122
  msgstr ""
123
 
124
+ #: Includes/Integrations.php:111 Includes/Integrations.php:147
125
  #, php-format
126
  msgid "Form: %s"
127
  msgstr ""
128
 
129
+ #: Includes/Integrations.php:112 Includes/Integrations.php:148
130
  msgid "Activate for this form:"
131
  msgstr ""
132
 
133
+ #: Includes/Integrations.php:115 Includes/Integrations.php:151
134
+ #: Includes/Integrations.php:174
135
  msgid "Checkbox text"
136
  msgstr ""
137
 
138
+ #: Includes/Integrations.php:119 Includes/Integrations.php:155
139
+ #: Includes/Integrations.php:178
140
+ msgid "Error message"
141
  msgstr ""
142
 
143
+ #: Includes/Integrations.php:126 Includes/Integrations.php:163
144
+ msgid "No forms found."
145
  msgstr ""
146
 
147
+ #: Includes/Integrations.php:196
148
  msgid ""
149
  "By using this form you agree with the storage and handling of your data by "
150
  "this website."
151
  msgstr ""
152
 
153
+ #: Includes/Integrations.php:220
154
  msgid "WordPress Comments"
155
  msgstr ""
156
 
157
+ #: Includes/Integrations.php:221
158
  msgid ""
159
  "When activated the GDPR checkbox will be added automatically just above the "
160
  "submit button."
161
  msgstr ""
162
 
163
+ #: Includes/Integrations.php:235
164
  msgid "Contact Form 7"
165
  msgstr ""
166
 
167
+ #: Includes/Integrations.php:236 Includes/Integrations.php:243
168
  msgid "A GDPR form tag will be automatically added to every form you activate."
169
  msgstr ""
170
 
171
+ #: Includes/Integrations.php:242
172
  msgid "Gravity Forms"
173
  msgstr ""
174
 
175
+ #: Includes/Integrations.php:249
176
  msgid "WooCommerce"
177
  msgstr ""
178
 
179
+ #: Includes/Integrations.php:250
180
  msgid ""
181
  "The GDPR checkbox will be added automatically at the end of your checkout "
182
  "page."
183
  msgstr ""
184
 
185
+ #: Includes/Pages.php:57
186
  msgid "Integrations"
187
  msgstr ""
188
 
189
+ #: Includes/Pages.php:58
190
  msgid "Checklist"
191
  msgstr ""
192
 
193
+ #: Includes/Pages.php:77
194
  msgid "Enable compliance:"
195
  msgstr ""
196
 
197
+ #: Includes/Pages.php:98
198
  #, php-format
199
  msgid "This plugin is outdated. %s supports version %s and up."
200
  msgstr ""
201
 
202
+ #: Includes/Pages.php:108
203
  msgid "Couldn't find any supported plugins installed."
204
  msgstr ""
205
 
206
+ #: Includes/Pages.php:109
207
  msgid "The following plugins are supported as of now:"
208
  msgstr ""
209
 
210
+ #: Includes/Pages.php:115
211
  msgid "More plugins will be added in the future."
212
  msgstr ""
213
 
214
+ #: Includes/Pages.php:119
215
  msgid ""
216
  "Below we ask you what private data you currently collect and provide you "
217
  "with tips to comply."
218
  msgstr ""
219
 
220
+ #: Includes/Pages.php:160
221
  #, php-format
222
  msgid ""
223
  "This plugin assists website and webshop owners to comply with European "
225
  "to comply to avoid large fines. The regulation can be read here: %s."
226
  msgstr ""
227
 
228
+ #: Includes/Pages.php:160
229
  msgid "GDPR Key Changes"
230
  msgstr ""
231
 
232
+ #: Includes/Pages.php:161
233
  #, php-format
234
  msgid "%s supports: %s."
235
  msgstr ""
236
 
237
+ #: Includes/Pages.php:164
238
  msgid ""
239
  "Disclaimer: The creators of this plugin do not have a legal background. We "
240
  "assist website and webshop owners in being compliant with the General Data "
241
  "Protection Regulation (GDPR) but recommend contacting a law firm for rock "
242
  "solid legal advice."
243
  msgstr ""
244
+
245
+ #: Includes/Pages.php:170
246
+ #, php-format
247
+ msgid "You have %s left to comply with GDPR."
248
+ msgstr ""
249
+
250
+ #: Includes/Pages.php:170
251
+ #, php-format
252
+ msgid "%s day"
253
+ msgstr ""
254
+
255
+ #: wp-gdpr-compliance.php:97
256
+ msgid "View WP GDPR Compliance settings"
257
+ msgstr ""
258
+
259
+ #: wp-gdpr-compliance.php:97
260
+ msgid "Settings"
261
+ msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gdpr, law, regulations, compliance, data, protection, privacy, data protec
4
  Requires at least: 4.5
5
  Tested up to: 4.9.4
6
  Requires PHP: 5.2.4
7
- Stable tag: 1.2.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -33,6 +33,13 @@ You'll find answers to many of your questions on [wpgdprc.com](https://www.wpgdp
33
 
34
  == Changelog ==
35
 
 
 
 
 
 
 
 
36
  = 1.2.1 =
37
  *Release date: February 26th, 2018*
38
  * Fixed a bug with WordPress comments
4
  Requires at least: 4.5
5
  Tested up to: 4.9.4
6
  Requires PHP: 5.2.4
7
+ Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
33
 
34
  == Changelog ==
35
 
36
+ = 1.2.2 =
37
+ *Release date: March 2nd, 2018*
38
+ * Fixed a bug with WordPress Comments
39
+ * Added countdown to GDPR deadline (May 25, 2018)
40
+ * Added ability to add custom error messages to Contact Form 7 and Gravity Forms
41
+ * Added ability to add HTML tags to the texts and error messages
42
+
43
  = 1.2.1 =
44
  *Release date: February 26th, 2018*
45
  * Fixed a bug with WordPress comments
wp-gdpr-compliance.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: WP GDPR Compliance
5
  Plugin URI: https://www.wpgdprc.com/
6
  Description: This plugin assists website and webshop owners to comply with European privacy regulations (known as GDPR). By May 24th, 2018 your website or shop has to comply to avoid large fines.
7
- Version: 1.2.1
8
  Author: Van Ons
9
  Author URI: https://www.van-ons.nl/
10
  License: GPL2
@@ -79,6 +79,7 @@ class WPGDPRC {
79
  require_once(ABSPATH . 'wp-admin/includes/plugin.php');
80
  }
81
  load_plugin_textdomain(WP_GDPR_C_SLUG, false, basename(dirname(__FILE__)) . '/languages/');
 
82
  add_action('admin_init', array(Pages::getInstance(), 'registerSettings'));
83
  add_action('admin_menu', array(Pages::getInstance(), 'addAdminMenu'));
84
  add_action('admin_enqueue_scripts', array($this, 'loadAssets'), 999);
@@ -87,6 +88,17 @@ class WPGDPRC {
87
  Integrations::getInstance();
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
90
  public function loadAssets() {
91
  wp_enqueue_style('wpgdprc.css', WP_GDPR_C_URI_CSS . '/admin.css', array(), filemtime(WP_GDPR_C_DIR_CSS . '/admin.css'));
92
  wp_enqueue_script('wpgdprc.js', WP_GDPR_C_URI_JS . '/admin.js', array(), filemtime(WP_GDPR_C_DIR_JS . '/admin.js'), true);
4
  Plugin Name: WP GDPR Compliance
5
  Plugin URI: https://www.wpgdprc.com/
6
  Description: This plugin assists website and webshop owners to comply with European privacy regulations (known as GDPR). By May 24th, 2018 your website or shop has to comply to avoid large fines.
7
+ Version: 1.2.2
8
  Author: Van Ons
9
  Author URI: https://www.van-ons.nl/
10
  License: GPL2
79
  require_once(ABSPATH . 'wp-admin/includes/plugin.php');
80
  }
81
  load_plugin_textdomain(WP_GDPR_C_SLUG, false, basename(dirname(__FILE__)) . '/languages/');
82
+ add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'addActionLinksToPluginPage'));
83
  add_action('admin_init', array(Pages::getInstance(), 'registerSettings'));
84
  add_action('admin_menu', array(Pages::getInstance(), 'addAdminMenu'));
85
  add_action('admin_enqueue_scripts', array($this, 'loadAssets'), 999);
88
  Integrations::getInstance();
89
  }
90
 
91
+ /**
92
+ * @param array $links
93
+ * @return array
94
+ */
95
+ public function addActionLinksToPluginPage($links = array()) {
96
+ $actionLinks = array(
97
+ 'settings' => '<a href="' . admin_url('tools.php?page=' . str_replace('-', '_', WP_GDPR_C_SLUG)) . '" aria-label="' . esc_attr__('View WP GDPR Compliance settings', WP_GDPR_C_SLUG) . '">' . esc_html__('Settings', WP_GDPR_C_SLUG) . '</a>',
98
+ );
99
+ return array_merge($actionLinks, $links);
100
+ }
101
+
102
  public function loadAssets() {
103
  wp_enqueue_style('wpgdprc.css', WP_GDPR_C_URI_CSS . '/admin.css', array(), filemtime(WP_GDPR_C_DIR_CSS . '/admin.css'));
104
  wp_enqueue_script('wpgdprc.js', WP_GDPR_C_URI_JS . '/admin.js', array(), filemtime(WP_GDPR_C_DIR_JS . '/admin.js'), true);