Version Description
Release date: March 29th, 2018 * Storage of explicit consent timestamp * Return of the settings tab * Added ability to include your privacy policy page * Added a couple of apply_filters() * Small styling changes * Added .POT file to translate this plugin (Thanks for translating!)
Download this release
Release Info
Developer | donnyoexman |
Plugin | WP GDPR Compliance |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
- Includes/Extensions/CF7.php +84 -13
- Includes/Extensions/GForms.php +116 -29
- Includes/Extensions/WC.php +43 -19
- Includes/Extensions/WP.php +47 -11
- Includes/Helpers.php +86 -42
- Includes/Integrations.php +74 -18
- Includes/Pages.php +33 -10
- assets/css/admin.css +28 -23
- languages/wp-gdpr-compliance-nl_NL.mo +0 -0
- languages/{wp-gdpr-compliance-nl_NL.po → wp-gdpr-compliance.pot} +100 -68
- readme.txt +17 -4
- wp-gdpr-compliance.php +2 -2
Includes/Extensions/CF7.php
CHANGED
@@ -27,13 +27,15 @@ class CF7 {
|
|
27 |
|
28 |
public function processIntegration() {
|
29 |
$this->removeFormTagFromForms();
|
|
|
30 |
if (Helpers::isEnabled(self::ID)) {
|
31 |
$this->addFormTagToForms();
|
|
|
32 |
}
|
33 |
}
|
34 |
|
35 |
/**
|
36 |
-
* Add [
|
37 |
*/
|
38 |
public function addFormTagToForms() {
|
39 |
foreach ($this->getEnabledForms() as $formId) {
|
@@ -56,25 +58,62 @@ class CF7 {
|
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
*/
|
61 |
public function removeFormTagFromForms() {
|
62 |
-
foreach (CF7::getInstance()->getForms() as $
|
63 |
-
$output = get_post_meta($
|
64 |
$pattern = '/(\n\n\[wpgdprc?.*\])/';
|
65 |
preg_match($pattern, $output, $matches);
|
66 |
if (!empty($matches)) {
|
67 |
$output = preg_replace($pattern, '', $output);
|
68 |
-
update_post_meta($
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
}
|
71 |
}
|
72 |
|
73 |
public function addFormTagSupport() {
|
74 |
-
wpcf7_add_form_tag(
|
75 |
-
'wpgdprc',
|
76 |
-
array($this, 'addFormTagHandler')
|
77 |
-
);
|
78 |
}
|
79 |
|
80 |
/**
|
@@ -134,6 +173,34 @@ class CF7 {
|
|
134 |
return $output;
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
/**
|
138 |
* @param \WPCF7_Validation $result
|
139 |
* @param \WPCF7_FormTag|array $tag
|
@@ -141,7 +208,7 @@ class CF7 {
|
|
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)
|
145 |
switch ($tag->type) {
|
146 |
case 'wpgdprc' :
|
147 |
$tag->name = 'wpgdprc';
|
@@ -189,13 +256,16 @@ class CF7 {
|
|
189 |
|
190 |
/**
|
191 |
* @param int $formId
|
|
|
192 |
* @return string
|
193 |
*/
|
194 |
-
public function getCheckboxText($formId = 0) {
|
195 |
if (!empty($formId)) {
|
196 |
$texts = $this->getFormTexts();
|
197 |
if (!empty($texts[$formId])) {
|
198 |
-
|
|
|
|
|
199 |
}
|
200 |
}
|
201 |
return Integrations::getCheckboxText();
|
@@ -209,7 +279,8 @@ class CF7 {
|
|
209 |
if (!empty($formId)) {
|
210 |
$errors = $this->getFormErrorMessages();
|
211 |
if (!empty($errors[$formId])) {
|
212 |
-
|
|
|
213 |
}
|
214 |
}
|
215 |
return Integrations::getErrorMessage();
|
27 |
|
28 |
public function processIntegration() {
|
29 |
$this->removeFormTagFromForms();
|
30 |
+
$this->removeAcceptedDateFromForms();
|
31 |
if (Helpers::isEnabled(self::ID)) {
|
32 |
$this->addFormTagToForms();
|
33 |
+
$this->addAcceptedDateToForms();
|
34 |
}
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
+
* Add [wpgdprc] string to enabled forms
|
39 |
*/
|
40 |
public function addFormTagToForms() {
|
41 |
foreach ($this->getEnabledForms() as $formId) {
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
+
* Add [wpgdprc] string to enabled forms
|
62 |
+
*/
|
63 |
+
public function addAcceptedDateToForms() {
|
64 |
+
foreach ($this->getEnabledForms() as $formId) {
|
65 |
+
$output = get_post_meta($formId, '_mail', true);
|
66 |
+
if (!empty($output)) {
|
67 |
+
$tag = '[wpgdprc]';
|
68 |
+
$body = $output['body'];
|
69 |
+
preg_match('/(\[wpgdprc\])/', $body, $matches);
|
70 |
+
if (empty($matches)) {
|
71 |
+
$pattern = '/(--)/';
|
72 |
+
preg_match($pattern, $body, $matches);
|
73 |
+
if (!empty($matches)) {
|
74 |
+
$body = preg_replace($pattern, "$tag\n\n" . $matches[0], $body);
|
75 |
+
} else {
|
76 |
+
$body = $body . "\n\n$tag";
|
77 |
+
}
|
78 |
+
}
|
79 |
+
$output['body'] = $body;
|
80 |
+
update_post_meta($formId, '_mail', $output);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Remove [wpgdprc] string from disabled forms
|
87 |
*/
|
88 |
public function removeFormTagFromForms() {
|
89 |
+
foreach (CF7::getInstance()->getForms() as $formId) {
|
90 |
+
$output = get_post_meta($formId, '_form', true);
|
91 |
$pattern = '/(\n\n\[wpgdprc?.*\])/';
|
92 |
preg_match($pattern, $output, $matches);
|
93 |
if (!empty($matches)) {
|
94 |
$output = preg_replace($pattern, '', $output);
|
95 |
+
update_post_meta($formId, '_form', $output);
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Remove [wpgdprc] string from disabled forms
|
102 |
+
*/
|
103 |
+
public function removeAcceptedDateFromForms() {
|
104 |
+
foreach (CF7::getInstance()->getForms() as $formId) {
|
105 |
+
$output = get_post_meta($formId, '_mail', true);
|
106 |
+
$pattern = '/(\n\n\[wpgdprc\])/';
|
107 |
+
preg_match($pattern, $output['body'], $matches);
|
108 |
+
if (!empty($matches)) {
|
109 |
+
$output['body'] = preg_replace($pattern, '', $output['body']);
|
110 |
+
update_post_meta($formId, '_mail', $output);
|
111 |
}
|
112 |
}
|
113 |
}
|
114 |
|
115 |
public function addFormTagSupport() {
|
116 |
+
wpcf7_add_form_tag('wpgdprc', array($this, 'addFormTagHandler'));
|
|
|
|
|
|
|
117 |
}
|
118 |
|
119 |
/**
|
173 |
return $output;
|
174 |
}
|
175 |
|
176 |
+
/**
|
177 |
+
* @param \WPCF7_ContactForm $contactForm
|
178 |
+
* @return \WPCF7_ContactForm
|
179 |
+
*/
|
180 |
+
public function changeMailBodyOutput(\WPCF7_ContactForm $contactForm) {
|
181 |
+
$mail = $contactForm->prop('mail');
|
182 |
+
if (!empty($mail['body'])) {
|
183 |
+
$submission = \WPCF7_Submission::get_instance();
|
184 |
+
if (!empty($submission)) {
|
185 |
+
$data = $submission->get_posted_data();
|
186 |
+
if (isset($data['wpgdprc']) && $data['wpgdprc'] == 1) {
|
187 |
+
$value = Helpers::localDateFormat(get_option('date_format') . ' ' . get_option('time_format'), time());
|
188 |
+
} else {
|
189 |
+
$value = __('Not accepted.', WP_GDPR_C_SLUG);
|
190 |
+
}
|
191 |
+
$output = apply_filters(
|
192 |
+
'wpgdprc_cf7_mail_body_output',
|
193 |
+
__('GDPR accepted on:', WP_GDPR_C_SLUG) . "\n$value",
|
194 |
+
$data,
|
195 |
+
$submission
|
196 |
+
);
|
197 |
+
$mail['body'] = str_replace('[wpgdprc]', $output, $mail['body']);
|
198 |
+
$contactForm->set_properties(array('mail' => $mail));
|
199 |
+
}
|
200 |
+
}
|
201 |
+
return $contactForm;
|
202 |
+
}
|
203 |
+
|
204 |
/**
|
205 |
* @param \WPCF7_Validation $result
|
206 |
* @param \WPCF7_FormTag|array $tag
|
208 |
*/
|
209 |
public function validateField(\WPCF7_Validation $result, $tag) {
|
210 |
$tag = (gettype($tag) == 'array') ? new \WPCF7_FormTag($tag) : $tag;
|
211 |
+
$formId = (isset($_POST['_wpcf7']) && is_numeric($_POST['_wpcf7'])) ? (int)$_POST['_wpcf7'] : 0;
|
212 |
switch ($tag->type) {
|
213 |
case 'wpgdprc' :
|
214 |
$tag->name = 'wpgdprc';
|
256 |
|
257 |
/**
|
258 |
* @param int $formId
|
259 |
+
* @param bool $insertPrivacyPolicyLink
|
260 |
* @return string
|
261 |
*/
|
262 |
+
public function getCheckboxText($formId = 0, $insertPrivacyPolicyLink = true) {
|
263 |
if (!empty($formId)) {
|
264 |
$texts = $this->getFormTexts();
|
265 |
if (!empty($texts[$formId])) {
|
266 |
+
$result = esc_html($texts[$formId]);
|
267 |
+
$result = ($insertPrivacyPolicyLink === true) ? Integrations::insertPrivacyPolicyLink($result) : $result;
|
268 |
+
return apply_filters('wpgdprc_cf7_checkbox_text', $result, $formId);
|
269 |
}
|
270 |
}
|
271 |
return Integrations::getCheckboxText();
|
279 |
if (!empty($formId)) {
|
280 |
$errors = $this->getFormErrorMessages();
|
281 |
if (!empty($errors[$formId])) {
|
282 |
+
$result = esc_html($errors[$formId]);
|
283 |
+
return apply_filters('wpgdprc_cf7_error_message', $result, $formId);
|
284 |
}
|
285 |
}
|
286 |
return Integrations::getErrorMessage();
|
Includes/Extensions/GForms.php
CHANGED
@@ -15,16 +15,6 @@ class GForms {
|
|
15 |
/** @var null */
|
16 |
private static $instance = null;
|
17 |
|
18 |
-
/**
|
19 |
-
* @return null|GForms
|
20 |
-
*/
|
21 |
-
public static function getInstance() {
|
22 |
-
if (!isset(self::$instance)) {
|
23 |
-
self::$instance = new self();
|
24 |
-
}
|
25 |
-
return self::$instance;
|
26 |
-
}
|
27 |
-
|
28 |
public function processIntegration() {
|
29 |
if (!class_exists('\GFAPI')) {
|
30 |
return;
|
@@ -46,7 +36,7 @@ class GForms {
|
|
46 |
$choices = array(
|
47 |
array(
|
48 |
'text' => self::getCheckboxText($form['id']),
|
49 |
-
'value' =>
|
50 |
'isSelected' => false
|
51 |
)
|
52 |
);
|
@@ -60,7 +50,7 @@ class GForms {
|
|
60 |
$lastField = array_values(array_slice($form['fields'], -1));
|
61 |
$lastField = (isset($lastField[0])) ? $lastField[0] : false;
|
62 |
$id = (!empty($lastField)) ? (int)$lastField['id'] + 1 : 1;
|
63 |
-
$
|
64 |
'id' => $id,
|
65 |
'type' => 'checkbox',
|
66 |
'label' => __('Privacy', WP_GDPR_C_SLUG),
|
@@ -77,20 +67,99 @@ class GForms {
|
|
77 |
),
|
78 |
'wpgdprc' => true
|
79 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
\GFAPI::update_form($form, $form['id']);
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
/**
|
85 |
* @param array $validation_result
|
86 |
* @return array
|
87 |
*/
|
88 |
-
public function
|
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'] =
|
94 |
}
|
95 |
}
|
96 |
}
|
@@ -98,18 +167,6 @@ class GForms {
|
|
98 |
return $validation_result;
|
99 |
}
|
100 |
|
101 |
-
/**
|
102 |
-
* @param array $form
|
103 |
-
*/
|
104 |
-
public function removeField($form = array()) {
|
105 |
-
foreach ($form['fields'] as $index => $field) {
|
106 |
-
if (isset($field->wpgdprc) && $field->wpgdprc === true) {
|
107 |
-
unset($form['fields'][$index]);
|
108 |
-
}
|
109 |
-
}
|
110 |
-
\GFAPI::update_form($form, $form['id']);
|
111 |
-
}
|
112 |
-
|
113 |
/**
|
114 |
* @return array
|
115 |
*/
|
@@ -147,13 +204,16 @@ class GForms {
|
|
147 |
|
148 |
/**
|
149 |
* @param int $formId
|
|
|
150 |
* @return string
|
151 |
*/
|
152 |
-
public function getCheckboxText($formId = 0) {
|
153 |
if (!empty($formId)) {
|
154 |
$texts = $this->getFormTexts();
|
155 |
if (!empty($texts[$formId])) {
|
156 |
-
|
|
|
|
|
157 |
}
|
158 |
}
|
159 |
return Integrations::getCheckboxText();
|
@@ -167,9 +227,36 @@ class GForms {
|
|
167 |
if (!empty($formId)) {
|
168 |
$errors = $this->getFormErrorMessages();
|
169 |
if (!empty($errors[$formId])) {
|
170 |
-
|
|
|
171 |
}
|
172 |
}
|
173 |
return Integrations::getErrorMessage();
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
15 |
/** @var null */
|
16 |
private static $instance = null;
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
public function processIntegration() {
|
19 |
if (!class_exists('\GFAPI')) {
|
20 |
return;
|
36 |
$choices = array(
|
37 |
array(
|
38 |
'text' => self::getCheckboxText($form['id']),
|
39 |
+
'value' => 'true',
|
40 |
'isSelected' => false
|
41 |
)
|
42 |
);
|
50 |
$lastField = array_values(array_slice($form['fields'], -1));
|
51 |
$lastField = (isset($lastField[0])) ? $lastField[0] : false;
|
52 |
$id = (!empty($lastField)) ? (int)$lastField['id'] + 1 : 1;
|
53 |
+
$args = array(
|
54 |
'id' => $id,
|
55 |
'type' => 'checkbox',
|
56 |
'label' => __('Privacy', WP_GDPR_C_SLUG),
|
67 |
),
|
68 |
'wpgdprc' => true
|
69 |
);
|
70 |
+
$form['fields'][] = apply_filters('wpgdprc_gforms_field_args', $args, $form);
|
71 |
+
}
|
72 |
+
\GFAPI::update_form($form, $form['id']);
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* @param array $form
|
77 |
+
*/
|
78 |
+
public function removeField($form = array()) {
|
79 |
+
foreach ($form['fields'] as $index => $field) {
|
80 |
+
if (isset($field['wpgdprc']) && $field['wpgdprc'] === true) {
|
81 |
+
unset($form['fields'][$index]);
|
82 |
+
}
|
83 |
}
|
84 |
\GFAPI::update_form($form, $form['id']);
|
85 |
}
|
86 |
|
87 |
+
/**
|
88 |
+
* @param array $columns
|
89 |
+
* @param int $formId
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
public function displayAcceptedDateColumnInEntryOverview($columns = array(), $formId = 0) {
|
93 |
+
$key = array_search(self::getCheckboxText($formId), $columns);
|
94 |
+
if (!empty($key) && isset($columns[$key])) {
|
95 |
+
$columns[$key] = apply_filters('wpgdprc_gforms_accepted_date_column_in_entry_overview', __('Privacy', WP_GDPR_C_SLUG), $columns[$key], $formId);
|
96 |
+
}
|
97 |
+
return $columns;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @param string $value
|
102 |
+
* @param int $formId
|
103 |
+
* @param int $fieldId
|
104 |
+
* @param array $entry
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
public function displayAcceptedDateInEntryOverview($value = '', $formId = 0, $fieldId = 0, $entry = array()) {
|
108 |
+
if (empty($value)) {
|
109 |
+
$id = self::getFieldIdByFormId($formId);
|
110 |
+
if (!empty($id) && $fieldId === $id) {
|
111 |
+
$value = (!empty($entry[$fieldId])) ? $entry[$fieldId] : __('Not accepted.', WP_GDPR_C_SLUG);
|
112 |
+
$value = apply_filters('wpgdprc_gforms_accepted_date_in_entry_overview', $value, $fieldId, $formId, $entry);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
return $value;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @param mixed $value
|
120 |
+
* @param array $entry
|
121 |
+
* @return string
|
122 |
+
*/
|
123 |
+
public function displayAcceptedDateInEntry($value, $entry = array()) {
|
124 |
+
$fieldId = self::getFieldIdByFormId($entry['form_id']);
|
125 |
+
if (!empty($fieldId) && isset($value[$fieldId])) {
|
126 |
+
if (empty($value[$fieldId])) {
|
127 |
+
$value = __('Not accepted.', WP_GDPR_C_SLUG);
|
128 |
+
}
|
129 |
+
$value = apply_filters('wpgdprc_gforms_accepted_date_in_entry', $value, $fieldId, $entry);
|
130 |
+
}
|
131 |
+
return $value;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* @param string $value
|
136 |
+
* @param array $lead
|
137 |
+
* @param \GF_Field $field
|
138 |
+
* @return string
|
139 |
+
*/
|
140 |
+
public function addAcceptedDateToEntry($value = '', $lead = array(), \GF_Field $field) {
|
141 |
+
if (isset($field['wpgdprc']) && $field['wpgdprc'] === true) {
|
142 |
+
if (!empty($value)) {
|
143 |
+
$date = Helpers::localDateFormat(get_option('date_format') . ' ' . get_option('time_format'), time());
|
144 |
+
$value = sprintf(__('Accepted on %s.', WP_GDPR_C_SLUG), $date);
|
145 |
+
} else {
|
146 |
+
$value = __('Not accepted.', WP_GDPR_C_SLUG);
|
147 |
+
}
|
148 |
+
$value = apply_filters('wpgdprc_gforms_accepted_date_to_entry', $value, $field, $lead);
|
149 |
+
}
|
150 |
+
return $value;
|
151 |
+
}
|
152 |
+
|
153 |
/**
|
154 |
* @param array $validation_result
|
155 |
* @return array
|
156 |
*/
|
157 |
+
public function overwriteValidationMessage($validation_result = array()) {
|
158 |
$form = $validation_result['form'];
|
159 |
foreach ($form['fields'] as &$field) {
|
160 |
if (isset($field['wpgdprc']) && $field['wpgdprc'] === true) {
|
161 |
if (isset($field['failed_validation']) && $field['failed_validation'] === true) {
|
162 |
+
$field['validation_message'] = apply_filters('wpgdprc_gforms_validation_message', self::getErrorMessage($form['id']), $field, $form);
|
163 |
}
|
164 |
}
|
165 |
}
|
167 |
return $validation_result;
|
168 |
}
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
/**
|
171 |
* @return array
|
172 |
*/
|
204 |
|
205 |
/**
|
206 |
* @param int $formId
|
207 |
+
* @param bool $insertPrivacyPolicyLink
|
208 |
* @return string
|
209 |
*/
|
210 |
+
public function getCheckboxText($formId = 0, $insertPrivacyPolicyLink = true) {
|
211 |
if (!empty($formId)) {
|
212 |
$texts = $this->getFormTexts();
|
213 |
if (!empty($texts[$formId])) {
|
214 |
+
$result = wp_kses($texts[$formId], Helpers::getAllowedHTMLTags(self::ID));
|
215 |
+
$result = ($insertPrivacyPolicyLink === true) ? Integrations::insertPrivacyPolicyLink($result) : $result;
|
216 |
+
return apply_filters('wpgdprc_gforms_checkbox_text', $result, $formId);
|
217 |
}
|
218 |
}
|
219 |
return Integrations::getCheckboxText();
|
227 |
if (!empty($formId)) {
|
228 |
$errors = $this->getFormErrorMessages();
|
229 |
if (!empty($errors[$formId])) {
|
230 |
+
$result = wp_kses($errors[$formId], Helpers::getAllowedHTMLTags(self::ID));
|
231 |
+
return apply_filters('wpgdprc_gforms_error_message', $result, $formId);
|
232 |
}
|
233 |
}
|
234 |
return Integrations::getErrorMessage();
|
235 |
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* @param int $formId
|
239 |
+
* @return int
|
240 |
+
*/
|
241 |
+
private static function getFieldIdByFormId($formId = 0) {
|
242 |
+
$form = \GFFormsModel::get_form_meta($formId);
|
243 |
+
foreach ($form['fields'] as $field) {
|
244 |
+
if (isset($field['wpgdprc']) && $field['wpgdprc'] === true) {
|
245 |
+
if (isset($field['inputs'][0]['id'])) {
|
246 |
+
return $field['inputs'][0]['id'];
|
247 |
+
}
|
248 |
+
}
|
249 |
+
}
|
250 |
+
return 0;
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* @return null|GForms
|
255 |
+
*/
|
256 |
+
public static function getInstance() {
|
257 |
+
if (!isset(self::$instance)) {
|
258 |
+
self::$instance = new self();
|
259 |
+
}
|
260 |
+
return self::$instance;
|
261 |
+
}
|
262 |
}
|
Includes/Extensions/WC.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
|
|
5 |
use WPGDPRC\Includes\Integrations;
|
6 |
|
7 |
/**
|
@@ -14,29 +15,17 @@ class WC {
|
|
14 |
/** @var null */
|
15 |
private static $instance = null;
|
16 |
|
17 |
-
/**
|
18 |
-
* @return null|WC
|
19 |
-
*/
|
20 |
-
public static function getInstance() {
|
21 |
-
if (!isset(self::$instance)) {
|
22 |
-
self::$instance = new self();
|
23 |
-
}
|
24 |
-
return self::$instance;
|
25 |
-
}
|
26 |
-
|
27 |
/**
|
28 |
* Add WP GDPR field before submit button
|
29 |
*/
|
30 |
public function addField() {
|
31 |
-
|
32 |
-
'
|
33 |
-
array(
|
34 |
-
|
35 |
-
|
36 |
-
'label' => Integrations::getCheckboxText(self::ID),
|
37 |
-
'required' => true,
|
38 |
-
)
|
39 |
);
|
|
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -44,7 +33,42 @@ class WC {
|
|
44 |
*/
|
45 |
public function checkPost() {
|
46 |
if (!isset($_POST['wpgdprc'])) {
|
47 |
-
wc_add_notice(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
5 |
+
use WPGDPRC\Includes\Helpers;
|
6 |
use WPGDPRC\Includes\Integrations;
|
7 |
|
8 |
/**
|
15 |
/** @var null */
|
16 |
private static $instance = null;
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
* Add WP GDPR field before submit button
|
20 |
*/
|
21 |
public function addField() {
|
22 |
+
$args = array(
|
23 |
+
'type' => 'checkbox',
|
24 |
+
'class' => array('wpgdprc-checkbox'),
|
25 |
+
'label' => Integrations::getCheckboxText(self::ID),
|
26 |
+
'required' => true,
|
|
|
|
|
|
|
27 |
);
|
28 |
+
woocommerce_form_field('wpgdprc', apply_filters('wpgdprc_woocommerce_field_args', $args));
|
29 |
}
|
30 |
|
31 |
/**
|
33 |
*/
|
34 |
public function checkPost() {
|
35 |
if (!isset($_POST['wpgdprc'])) {
|
36 |
+
wc_add_notice(Integrations::getErrorMessage(self::ID), 'error');
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param int $orderId
|
42 |
+
*/
|
43 |
+
public function addAcceptedDateToOrderMeta($orderId = 0) {
|
44 |
+
if (isset($_POST['wpgdprc']) && !empty($orderId)) {
|
45 |
+
update_post_meta($orderId, '_wpgdprc', time());
|
46 |
}
|
47 |
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param \WC_Order $order
|
51 |
+
*/
|
52 |
+
public function displayAcceptedDateInOrderData(\WC_Order $order) {
|
53 |
+
$label = __('GDPR accepted on:', WP_GDPR_C_SLUG);
|
54 |
+
$date = get_post_meta($order->get_id(), '_wpgdprc', true);
|
55 |
+
$value = (!empty($date)) ? Helpers::localDateFormat(get_option('date_format') . ' ' . get_option('time_format'), $date) : __('Not accepted.', WP_GDPR_C_SLUG);
|
56 |
+
echo apply_filters(
|
57 |
+
'wpgdprc_woocommerce_accepted_date_in_order_data',
|
58 |
+
sprintf('<p class="form-field form-field-wide wpgdprc-accepted-date"><strong>%s</strong><br />%s</p>', $label, $value),
|
59 |
+
$label,
|
60 |
+
$value,
|
61 |
+
$order
|
62 |
+
);
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @return null|WC
|
67 |
+
*/
|
68 |
+
public static function getInstance() {
|
69 |
+
if (!isset(self::$instance)) {
|
70 |
+
self::$instance = new self();
|
71 |
+
}
|
72 |
+
return self::$instance;
|
73 |
+
}
|
74 |
}
|
Includes/Extensions/WP.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
|
|
5 |
use WPGDPRC\Includes\Integrations;
|
6 |
|
7 |
/**
|
@@ -13,16 +14,6 @@ class WP {
|
|
13 |
/** @var null */
|
14 |
private static $instance = null;
|
15 |
|
16 |
-
/**
|
17 |
-
* @return null|WP
|
18 |
-
*/
|
19 |
-
public static function getInstance() {
|
20 |
-
if (!isset(self::$instance)) {
|
21 |
-
self::$instance = new self();
|
22 |
-
}
|
23 |
-
return self::$instance;
|
24 |
-
}
|
25 |
-
|
26 |
/**
|
27 |
* @param string $submitField
|
28 |
* @return string
|
@@ -35,10 +26,55 @@ class WP {
|
|
35 |
public function checkPost() {
|
36 |
if (!isset($_POST['wpgdprc'])) {
|
37 |
wp_die(
|
38 |
-
'<p>' . sprintf(
|
|
|
|
|
|
|
39 |
__('Comment Submission Failure'),
|
40 |
array('back_link' => true)
|
41 |
);
|
42 |
}
|
43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
5 |
+
use WPGDPRC\Includes\Helpers;
|
6 |
use WPGDPRC\Includes\Integrations;
|
7 |
|
8 |
/**
|
14 |
/** @var null */
|
15 |
private static $instance = null;
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* @param string $submitField
|
19 |
* @return string
|
26 |
public function checkPost() {
|
27 |
if (!isset($_POST['wpgdprc'])) {
|
28 |
wp_die(
|
29 |
+
'<p>' . sprintf(
|
30 |
+
__('<strong>ERROR</strong>: %s', WP_GDPR_C_SLUG),
|
31 |
+
Integrations::getErrorMessage(self::ID)
|
32 |
+
) . '</p>',
|
33 |
__('Comment Submission Failure'),
|
34 |
array('back_link' => true)
|
35 |
);
|
36 |
}
|
37 |
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @param int $commentId
|
41 |
+
*/
|
42 |
+
public function addAcceptedDateToCommentMeta($commentId = 0) {
|
43 |
+
if (isset($_POST['wpgdprc']) && !empty($commentId)) {
|
44 |
+
add_comment_meta($commentId, '_wpgdprc', time());
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* @param array $columns
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public function displayAcceptedDateColumnInCommentOverview($columns = array()) {
|
53 |
+
$columns['wpgdprc'] = apply_filters('wpgdprc_woocommerce_accepted_date_column_in_comment_overview', __('GDPR Accepted On', WP_GDPR_C_SLUG));
|
54 |
+
return $columns;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @param string $column
|
59 |
+
* @param int $commentId
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function displayAcceptedDateInCommentOverview($column = '', $commentId = 0) {
|
63 |
+
if ($column === 'wpgdprc') {
|
64 |
+
$date = get_comment_meta($commentId, '_wpgdprc', true);
|
65 |
+
$value = (!empty($date)) ? Helpers::localDateFormat(get_option('date_format') . ' ' . get_option('time_format'), $date) : __('Not accepted.', WP_GDPR_C_SLUG);
|
66 |
+
echo apply_filters('wpgdprc_woocommerce_accepted_date_in_comment_overview', $value, $commentId);
|
67 |
+
}
|
68 |
+
return $column;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @return null|WP
|
73 |
+
*/
|
74 |
+
public static function getInstance() {
|
75 |
+
if (!isset(self::$instance)) {
|
76 |
+
self::$instance = new self();
|
77 |
+
}
|
78 |
+
return self::$instance;
|
79 |
+
}
|
80 |
}
|
Includes/Helpers.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WPGDPRC\Includes;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class Helpers
|
7 |
* @package WPGDPRC\Includes
|
@@ -28,45 +30,69 @@ class Helpers {
|
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
-
* @
|
|
|
32 |
*/
|
33 |
-
public static function getAllowedHTMLTags() {
|
34 |
-
|
35 |
-
|
36 |
-
'
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
/**
|
|
|
55 |
* @return string
|
56 |
*/
|
57 |
-
public static function getAllowedHTMLTagsOutput() {
|
58 |
-
$
|
59 |
-
$output = '';
|
60 |
-
|
61 |
-
$
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
65 |
}
|
|
|
66 |
}
|
67 |
-
$output .=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
-
|
|
|
70 |
}
|
71 |
|
72 |
/**
|
@@ -109,18 +135,6 @@ class Helpers {
|
|
109 |
);
|
110 |
}
|
111 |
|
112 |
-
/**
|
113 |
-
* @param bool $return_default
|
114 |
-
* @return mixed
|
115 |
-
*/
|
116 |
-
public static function getErrorMessage($return_default = true) {
|
117 |
-
$option = get_option(WP_GDPR_C_PREFIX . '_advanced_error');
|
118 |
-
if (empty($option) && $return_default === true) {
|
119 |
-
return __('Please accept the privacy checkbox.', WP_GDPR_C_SLUG);
|
120 |
-
}
|
121 |
-
return esc_html($option);
|
122 |
-
}
|
123 |
-
|
124 |
/**
|
125 |
* @param string $plugin
|
126 |
* @param string $type
|
@@ -137,6 +151,8 @@ class Helpers {
|
|
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) {
|
@@ -198,4 +214,32 @@ class Helpers {
|
|
198 |
}
|
199 |
return $data;
|
200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
2 |
|
3 |
namespace WPGDPRC\Includes;
|
4 |
|
5 |
+
use WPGDPRC\Includes\Extensions\CF7;
|
6 |
+
|
7 |
/**
|
8 |
* Class Helpers
|
9 |
* @package WPGDPRC\Includes
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
+
* @param string $plugin
|
34 |
+
* @return mixed
|
35 |
*/
|
36 |
+
public static function getAllowedHTMLTags($plugin = '') {
|
37 |
+
switch ($plugin) {
|
38 |
+
case CF7::ID :
|
39 |
+
$output = '';
|
40 |
+
break;
|
41 |
+
default :
|
42 |
+
$output = array(
|
43 |
+
'a' => array(
|
44 |
+
'class' => array(),
|
45 |
+
'href' => array(),
|
46 |
+
'hreflang' => array(),
|
47 |
+
'title' => array(),
|
48 |
+
'target' => array(),
|
49 |
+
'rel' => array(),
|
50 |
+
),
|
51 |
+
'br' => array(),
|
52 |
+
'em' => array(),
|
53 |
+
'strong' => array(),
|
54 |
+
'u' => array(),
|
55 |
+
'strike' => array(),
|
56 |
+
'span' => array(
|
57 |
+
'class' => array(),
|
58 |
+
),
|
59 |
+
);
|
60 |
+
break;
|
61 |
+
}
|
62 |
+
return apply_filters('wpgdprc_allowed_html_tags', $output, $plugin);
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
+
* @param string $plugin
|
67 |
* @return string
|
68 |
*/
|
69 |
+
public static function getAllowedHTMLTagsOutput($plugin = '') {
|
70 |
+
$allowedTags = self::getAllowedHTMLTags($plugin);
|
71 |
+
$output = '<div class="wpgdprc-allowed-tags">';
|
72 |
+
if (!empty($allowedTags)) {
|
73 |
+
$tags = '%privacy_policy%';
|
74 |
+
foreach ($allowedTags as $tag => $attributes) {
|
75 |
+
$tags .= ' <' . $tag;
|
76 |
+
if (!empty($attributes)) {
|
77 |
+
foreach ($attributes as $attribute => $data) {
|
78 |
+
$tags .= ' ' . $attribute . '=""';
|
79 |
+
}
|
80 |
}
|
81 |
+
$tags .= '>';
|
82 |
}
|
83 |
+
$output .= sprintf(
|
84 |
+
__('You can use: %s', WP_GDPR_C_SLUG),
|
85 |
+
sprintf('<pre>%s</pre>', esc_html($tags))
|
86 |
+
);
|
87 |
+
} else {
|
88 |
+
$output .= sprintf(
|
89 |
+
'<strong>%s:</strong> %s',
|
90 |
+
strtoupper(__('Note', WP_GDPR_C_SLUG)),
|
91 |
+
__('No HTML allowed due to plugin limitations.', WP_GDPR_C_SLUG)
|
92 |
+
);
|
93 |
}
|
94 |
+
$output .= '</div>';
|
95 |
+
return $output;
|
96 |
}
|
97 |
|
98 |
/**
|
135 |
);
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
/**
|
139 |
* @param string $plugin
|
140 |
* @param string $type
|
151 |
$output = array();
|
152 |
|
153 |
$activePlugins = (array)get_option('active_plugins', array());
|
154 |
+
|
155 |
+
// Catch network activated plugins
|
156 |
$activeNetworkPlugins = (array)get_site_option('active_sitewide_plugins', array());
|
157 |
if (!empty($activeNetworkPlugins)) {
|
158 |
foreach ($activeNetworkPlugins as $file => $timestamp) {
|
214 |
}
|
215 |
return $data;
|
216 |
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* @param string $format
|
220 |
+
* @param int $timestamp
|
221 |
+
* @return string
|
222 |
+
*/
|
223 |
+
public static function localDateFormat($format = '', $timestamp = 0) {
|
224 |
+
$gmtOffset = get_option('gmt_offset', '');
|
225 |
+
if ($gmtOffset !== '') {
|
226 |
+
$negative = ($gmtOffset < 0);
|
227 |
+
$gmtOffset = str_replace('-', '', $gmtOffset);
|
228 |
+
$hour = floor($gmtOffset);
|
229 |
+
$minutes = ($gmtOffset - $hour) * 60;
|
230 |
+
if ($negative) {
|
231 |
+
$hour = '-' . $hour;
|
232 |
+
$minutes = '-' . $minutes;
|
233 |
+
}
|
234 |
+
$date = new \DateTime(null, new \DateTimeZone('UTC'));
|
235 |
+
$date->setTimestamp($timestamp);
|
236 |
+
$date->modify($hour . ' hour');
|
237 |
+
$date->modify($minutes . ' minutes');
|
238 |
+
} else {
|
239 |
+
$date = new \DateTime(null, new \DateTimeZone(get_option('timezone_string', 'UTC')));
|
240 |
+
$date->setTimestamp($timestamp);
|
241 |
+
}
|
242 |
+
$date = new \DateTime($date->format('Y-m-d H:i:s'), new \DateTimeZone('UTC'));
|
243 |
+
return date_i18n($format, $date->getTimestamp(), true);
|
244 |
+
}
|
245 |
}
|
Includes/Integrations.php
CHANGED
@@ -35,24 +35,34 @@ class Integrations {
|
|
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 |
-
|
|
|
|
|
56 |
}
|
57 |
break;
|
58 |
}
|
@@ -103,9 +113,9 @@ class Integrations {
|
|
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) . ' />';
|
111 |
$output .= '<label for="' . $formSettingId . '"><strong>' . sprintf(__('Form: %s', WP_GDPR_C_SLUG), get_the_title($form)) . '</strong></label>';
|
@@ -119,6 +129,7 @@ class Integrations {
|
|
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>';
|
@@ -139,9 +150,9 @@ class Integrations {
|
|
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) . ' />';
|
147 |
$output .= '<label for="' . $formSettingId . '"><strong>' . sprintf(__('Form: %s', WP_GDPR_C_SLUG), $form['title']) . '</strong></label>';
|
@@ -155,7 +166,7 @@ class Integrations {
|
|
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,10 +177,10 @@ class Integrations {
|
|
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">';
|
174 |
$output .= '<label for="' . $optionNameText . '">' . __('Checkbox text', WP_GDPR_C_SLUG) . '</label>';
|
175 |
$output .= '<input type="text" name="' . $optionNameText . '" class="regular-text" id="' . $optionNameText . '" placeholder="' . $text . '" value="' . $text . '" />';
|
@@ -178,7 +189,7 @@ class Integrations {
|
|
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;
|
@@ -188,14 +199,21 @@ class Integrations {
|
|
188 |
|
189 |
/**
|
190 |
* @param string $plugin
|
|
|
191 |
* @return string
|
192 |
*/
|
193 |
-
public static function getCheckboxText($plugin = '') {
|
194 |
-
$
|
195 |
-
if (empty($
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
-
|
|
|
199 |
}
|
200 |
|
201 |
/**
|
@@ -203,11 +221,49 @@ class Integrations {
|
|
203 |
* @return mixed
|
204 |
*/
|
205 |
public static function getErrorMessage($plugin = '') {
|
206 |
-
$
|
207 |
-
if (empty($
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
-
return
|
211 |
}
|
212 |
|
213 |
/**
|
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 |
+
add_action('comment_post', array(WP::getInstance(), 'addAcceptedDateToCommentMeta'));
|
39 |
+
add_filter('manage_edit-comments_columns', array(WP::getInstance(), 'displayAcceptedDateColumnInCommentOverview'));
|
40 |
+
add_action('manage_comments_custom_column', array(WP::getInstance(), 'displayAcceptedDateInCommentOverview'), 10, 2);
|
41 |
break;
|
42 |
case CF7::ID :
|
43 |
add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_forms', array(CF7::getInstance(), 'processIntegration'));
|
44 |
add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_form_text', array(CF7::getInstance(), 'processIntegration'));
|
45 |
add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . CF7::ID . '_error_message', array(CF7::getInstance(), 'processIntegration'));
|
46 |
add_action('wpcf7_init', array(CF7::getInstance(), 'addFormTagSupport'));
|
47 |
+
add_filter('wpcf7_before_send_mail', array(CF7::getInstance(), 'changeMailBodyOutput'), 999);
|
48 |
add_filter('wpcf7_validate_wpgdprc', array(CF7::getInstance(), 'validateField'), 10, 2);
|
49 |
break;
|
50 |
case WC::ID :
|
51 |
add_action('woocommerce_checkout_process', array(WC::getInstance(), 'checkPost'));
|
52 |
add_action('woocommerce_review_order_before_submit', array(WC::getInstance(), 'addField'), 999);
|
53 |
+
add_action('woocommerce_checkout_update_order_meta', array(WC::getInstance(), 'addAcceptedDateToOrderMeta'));
|
54 |
+
add_action('woocommerce_admin_order_data_after_order_details', array(WC::getInstance(), 'displayAcceptedDateInOrderData'));
|
55 |
break;
|
56 |
case GForms::ID :
|
57 |
add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_forms', array(GForms::getInstance(), 'processIntegration'));
|
58 |
add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_form_text', array(GForms::getInstance(), 'processIntegration'));
|
59 |
add_action('update_option_' . WP_GDPR_C_PREFIX . '_integrations_' . GForms::ID . '_error_message', array(GForms::getInstance(), 'processIntegration'));
|
60 |
+
add_filter('gform_entries_field_value', array(GForms::getInstance(), 'displayAcceptedDateInEntryOverview'), 10, 4);
|
61 |
+
add_filter('gform_get_field_value', array(GForms::getInstance(), 'displayAcceptedDateInEntry'), 10, 2);
|
62 |
foreach (GForms::getInstance()->getEnabledForms() as $formId) {
|
63 |
+
add_filter('gform_entry_list_columns_' . $formId, array(GForms::getInstance(), 'displayAcceptedDateColumnInEntryOverview'), 10, 2);
|
64 |
+
add_filter('gform_save_field_value_' . $formId, array(GForms::getInstance(), 'addAcceptedDateToEntry'), 10, 3);
|
65 |
+
add_action('gform_validation_' . $formId, array(GForms::getInstance(), 'overwriteValidationMessage'));
|
66 |
}
|
67 |
break;
|
68 |
}
|
113 |
$textSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text_' . $form;
|
114 |
$errorSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message_' . $form;
|
115 |
$enabled = in_array($form, $enabledForms);
|
116 |
+
$text = CF7::getInstance()->getCheckboxText($form, false);
|
117 |
$errorMessage = CF7::getInstance()->getErrorMessage($form);
|
118 |
+
$output .= '<li class="wpgdprc-clearfix">';
|
119 |
$output .= '<div class="wpgdprc-checkbox">';
|
120 |
$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) . ' />';
|
121 |
$output .= '<label for="' . $formSettingId . '"><strong>' . sprintf(__('Form: %s', WP_GDPR_C_SLUG), get_the_title($form)) . '</strong></label>';
|
129 |
$output .= '<label for="' . $errorSettingId . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
|
130 |
$output .= '<input type="text" name="' . $optionNameErrorMessage . '[' . $form . ']' . '" class="regular-text" id="' . $errorSettingId . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
|
131 |
$output .= '</p>';
|
132 |
+
$output .= Helpers::getAllowedHTMLTagsOutput($plugin);
|
133 |
$output .= '</li>';
|
134 |
}
|
135 |
$output .= '</ul>';
|
150 |
$textSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_form_text_' . $form['id'];
|
151 |
$errorSettingId = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message_' . $form['id'];
|
152 |
$enabled = in_array($form['id'], $enabledForms);
|
153 |
+
$text = esc_html(GForms::getInstance()->getCheckboxText($form['id'], false));
|
154 |
$errorMessage = esc_html(GForms::getInstance()->getErrorMessage($form['id']));
|
155 |
+
$output .= '<li class="wpgdprc-clearfix">';
|
156 |
$output .= '<div class="wpgdprc-checkbox">';
|
157 |
$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) . ' />';
|
158 |
$output .= '<label for="' . $formSettingId . '"><strong>' . sprintf(__('Form: %s', WP_GDPR_C_SLUG), $form['title']) . '</strong></label>';
|
166 |
$output .= '<label for="' . $errorSettingId . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
|
167 |
$output .= '<input type="text" name="' . $optionNameErrorMessage . '[' . $form['id'] . ']' . '" class="regular-text" id="' . $errorSettingId . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
|
168 |
$output .= '</p>';
|
169 |
+
$output .= Helpers::getAllowedHTMLTagsOutput($plugin);
|
170 |
$output .= '</li>';
|
171 |
}
|
172 |
$output .= '</ul>';
|
177 |
default :
|
178 |
$optionNameText = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_text';
|
179 |
$optionNameErrorMessage = WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message';
|
180 |
+
$text = esc_html(self::getCheckboxText($plugin, false));
|
181 |
$errorMessage = esc_html(self::getErrorMessage($plugin));
|
182 |
$output .= '<ul class="wpgdprc-checklist-options">';
|
183 |
+
$output .= '<li class="wpgdprc-clearfix">';
|
184 |
$output .= '<p class="wpgdprc-setting">';
|
185 |
$output .= '<label for="' . $optionNameText . '">' . __('Checkbox text', WP_GDPR_C_SLUG) . '</label>';
|
186 |
$output .= '<input type="text" name="' . $optionNameText . '" class="regular-text" id="' . $optionNameText . '" placeholder="' . $text . '" value="' . $text . '" />';
|
189 |
$output .= '<label for="' . $optionNameErrorMessage . '">' . __('Error message', WP_GDPR_C_SLUG) . '</label>';
|
190 |
$output .= '<input type="text" name="' . $optionNameErrorMessage . '" class="regular-text" id="' . $optionNameErrorMessage . '" placeholder="' . $errorMessage . '" value="' . $errorMessage . '" />';
|
191 |
$output .= '</p>';
|
192 |
+
$output .= Helpers::getAllowedHTMLTagsOutput($plugin);
|
193 |
$output .= '</li>';
|
194 |
$output .= '</ul>';
|
195 |
break;
|
199 |
|
200 |
/**
|
201 |
* @param string $plugin
|
202 |
+
* @param bool $insertPrivacyPolicyLink
|
203 |
* @return string
|
204 |
*/
|
205 |
+
public static function getCheckboxText($plugin = '', $insertPrivacyPolicyLink = true) {
|
206 |
+
$output = '';
|
207 |
+
if (!empty($plugin)) {
|
208 |
+
$output = get_option(WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_text');
|
209 |
+
$output = ($insertPrivacyPolicyLink === true) ? self::insertPrivacyPolicyLink($output) : $output;
|
210 |
+
$output = apply_filters('wpgdprc_' . $plugin . '_checkbox_text', $output);
|
211 |
+
}
|
212 |
+
if (empty($output)) {
|
213 |
+
$output = __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
|
214 |
}
|
215 |
+
$output = wp_kses($output, Helpers::getAllowedHTMLTags($plugin));
|
216 |
+
return apply_filters('wpgdprc_checkbox_text', $output);
|
217 |
}
|
218 |
|
219 |
/**
|
221 |
* @return mixed
|
222 |
*/
|
223 |
public static function getErrorMessage($plugin = '') {
|
224 |
+
$output = '';
|
225 |
+
if (!empty($plugin)) {
|
226 |
+
$output = get_option(WP_GDPR_C_PREFIX . '_integrations_' . $plugin . '_error_message');
|
227 |
+
$output = apply_filters('wpgdprc_' . $plugin . '_error_message', $output);
|
228 |
+
}
|
229 |
+
if (empty($output)) {
|
230 |
+
$output = __('Please accept the privacy checkbox.', WP_GDPR_C_SLUG);
|
231 |
+
}
|
232 |
+
return apply_filters('wpgdprc_error_message', wp_kses($output, Helpers::getAllowedHTMLTags($plugin)));
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* @return mixed
|
237 |
+
*/
|
238 |
+
public static function getPrivacyPolicyText() {
|
239 |
+
$output = get_option(WP_GDPR_C_PREFIX . '_settings_privacy_policy_text');
|
240 |
+
if (empty($output)) {
|
241 |
+
$output = __('Privacy Policy', WP_GDPR_C_SLUG);
|
242 |
+
}
|
243 |
+
return apply_filters('wpgdprc_privacy_policy_text', $output);
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* @param string $content
|
248 |
+
* @return mixed|string
|
249 |
+
*/
|
250 |
+
public static function insertPrivacyPolicyLink($content = '') {
|
251 |
+
$page = get_option(WP_GDPR_C_PREFIX . '_settings_privacy_policy_page');
|
252 |
+
$text = Integrations::getPrivacyPolicyText();
|
253 |
+
if (!empty($page) && !empty($text)) {
|
254 |
+
$link = apply_filters(
|
255 |
+
'wpgdprc_privacy_policy_link',
|
256 |
+
sprintf(
|
257 |
+
'<a target="_blank" href="%s">%s</a>',
|
258 |
+
get_page_link($page),
|
259 |
+
esc_html($text)
|
260 |
+
),
|
261 |
+
$page,
|
262 |
+
$text
|
263 |
+
);
|
264 |
+
$content = str_replace('%privacy_policy%', $link, $content);
|
265 |
}
|
266 |
+
return $content;
|
267 |
}
|
268 |
|
269 |
/**
|
Includes/Pages.php
CHANGED
@@ -24,6 +24,8 @@ class Pages {
|
|
24 |
foreach (Helpers::getCheckList() as $id => $check) {
|
25 |
register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_general_' . $id, 'intval');
|
26 |
}
|
|
|
|
|
27 |
}
|
28 |
|
29 |
public function addAdminMenu() {
|
@@ -41,6 +43,10 @@ class Pages {
|
|
41 |
public function generatePage() {
|
42 |
$pluginData = Helpers::getPluginData();
|
43 |
$activatedPlugins = Helpers::getActivatedPlugins();
|
|
|
|
|
|
|
|
|
44 |
$daysLeftToComply = Helpers::getDaysLeftToComply();
|
45 |
?>
|
46 |
<div class="wrap">
|
@@ -53,9 +59,10 @@ class Pages {
|
|
53 |
<?php settings_fields(WP_GDPR_C_SLUG); ?>
|
54 |
|
55 |
<div class="wpgdprc-tabs">
|
56 |
-
<div class="wpgdprc-tabs__navigation
|
57 |
<a id="tab-integrations-label" class="active" href="#tab-integrations" aria-controls="tab-integrations" tabindex="0" role="tab"><?php _e('Integrations', WP_GDPR_C_SLUG); ?></a>
|
58 |
-
<a id="tab-checklist-label" href="#tab-checklist" aria-
|
|
|
59 |
</div>
|
60 |
|
61 |
<div class="wpgdprc-tabs__content">
|
@@ -69,12 +76,12 @@ class Pages {
|
|
69 |
$description = (!empty($plugin['description'])) ? apply_filters('the_content', $plugin['description']) : '';
|
70 |
$options = Integrations::getSupportedPluginOptions($plugin['id']);
|
71 |
?>
|
72 |
-
<li>
|
73 |
<?php if ($plugin['supported']) : ?>
|
74 |
<div class="wpgdprc-checkbox">
|
75 |
<input type="checkbox" name="<?php echo $optionName; ?>" id="<?php echo $optionName; ?>" value="1" tabindex="1" data-type="save_setting" data-option="<?php echo $optionName; ?>" <?php checked(true, $checked); ?> />
|
76 |
<label for="<?php echo $optionName; ?>"><?php echo $plugin['name']; ?></label>
|
77 |
-
<span class="wpgdprc-instructions"><?php _e('Enable
|
78 |
<div class="wpgdprc-switch" aria-hidden="true">
|
79 |
<div class="wpgdprc-switch-label">
|
80 |
<div class="wpgdprc-switch-inner"></div>
|
@@ -117,7 +124,6 @@ class Pages {
|
|
117 |
</div>
|
118 |
<div id="tab-checklist" class="wpgdprc-tabs__panel" aria-hidden="true" aria-labelledby="tab-checklist-label" role="tabpanel">
|
119 |
<p><?php _e('Below we ask you what private data you currently collect and provide you with tips to comply.', WP_GDPR_C_SLUG); ?></p>
|
120 |
-
|
121 |
<ul class="wpgdprc-list">
|
122 |
<?php
|
123 |
foreach (Helpers::getCheckList() as $id => $check) :
|
@@ -125,7 +131,7 @@ class Pages {
|
|
125 |
$checked = Helpers::isEnabled($id, 'general');
|
126 |
$description = (!empty($check['description'])) ? esc_html($check['description']) : '';
|
127 |
?>
|
128 |
-
<li>
|
129 |
<div class="wpgdprc-checkbox">
|
130 |
<input type="checkbox" name="<?php echo $optionName; ?>" id="<?php echo $id; ?>" value="1" tabindex="1" data-type="save_setting" data-option="<?php echo $optionName; ?>" <?php checked(true, $checked); ?> />
|
131 |
<label for="<?php echo $id; ?>"><?php echo $check['label']; ?></label>
|
@@ -145,11 +151,28 @@ class Pages {
|
|
145 |
</div>
|
146 |
<?php endif; ?>
|
147 |
</li>
|
148 |
-
|
149 |
endforeach;
|
150 |
?>
|
151 |
</ul>
|
152 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
</div>
|
154 |
</div>
|
155 |
|
@@ -157,11 +180,11 @@ class Pages {
|
|
157 |
</form>
|
158 |
|
159 |
<div class="wpgdprc-description">
|
160 |
-
<p><?php printf(__('This plugin assists website and webshop owners to comply with European privacy regulations
|
161 |
-
<p><?php printf(__('%s supports
|
162 |
</div>
|
163 |
|
164 |
-
<p class="wpgdprc-disclaimer"><?php _e('Disclaimer: The creators of this plugin do not have a legal background
|
165 |
|
166 |
<?php if ($daysLeftToComply > 0) : ?>
|
167 |
<div class="wpgdprc-countdown">
|
24 |
foreach (Helpers::getCheckList() as $id => $check) {
|
25 |
register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_general_' . $id, 'intval');
|
26 |
}
|
27 |
+
register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_settings_privacy_policy_page', 'intval');
|
28 |
+
register_setting(WP_GDPR_C_SLUG, WP_GDPR_C_PREFIX . '_settings_privacy_policy_text', array('sanitize_callback' => array(Helpers::getInstance(), 'sanitizeData')));
|
29 |
}
|
30 |
|
31 |
public function addAdminMenu() {
|
43 |
public function generatePage() {
|
44 |
$pluginData = Helpers::getPluginData();
|
45 |
$activatedPlugins = Helpers::getActivatedPlugins();
|
46 |
+
$optionNamePrivacyPolicyPage = WP_GDPR_C_PREFIX . '_settings_privacy_policy_page';
|
47 |
+
$optionNamePrivacyPolicyText = WP_GDPR_C_PREFIX . '_settings_privacy_policy_text';
|
48 |
+
$privacyPolicyPage = get_option($optionNamePrivacyPolicyPage);
|
49 |
+
$privacyPolicyText = esc_html(Integrations::getPrivacyPolicyText());
|
50 |
$daysLeftToComply = Helpers::getDaysLeftToComply();
|
51 |
?>
|
52 |
<div class="wrap">
|
59 |
<?php settings_fields(WP_GDPR_C_SLUG); ?>
|
60 |
|
61 |
<div class="wpgdprc-tabs">
|
62 |
+
<div class="wpgdprc-tabs__navigation wpgdprc-clearfix">
|
63 |
<a id="tab-integrations-label" class="active" href="#tab-integrations" aria-controls="tab-integrations" tabindex="0" role="tab"><?php _e('Integrations', WP_GDPR_C_SLUG); ?></a>
|
64 |
+
<a id="tab-checklist-label" href="#tab-checklist" aria-controls="tab-checklist" tabindex="-1" role="tab"><?php _e('Checklist', WP_GDPR_C_SLUG); ?></a>
|
65 |
+
<a id="tab-settings-label" href="#tab-settings" aria-controls="tab-settings" tabindex="-1" role="tab"><?php _e('Settings', WP_GDPR_C_SLUG); ?></a>
|
66 |
</div>
|
67 |
|
68 |
<div class="wpgdprc-tabs__content">
|
76 |
$description = (!empty($plugin['description'])) ? apply_filters('the_content', $plugin['description']) : '';
|
77 |
$options = Integrations::getSupportedPluginOptions($plugin['id']);
|
78 |
?>
|
79 |
+
<li class="wpgdprc-clearfix">
|
80 |
<?php if ($plugin['supported']) : ?>
|
81 |
<div class="wpgdprc-checkbox">
|
82 |
<input type="checkbox" name="<?php echo $optionName; ?>" id="<?php echo $optionName; ?>" value="1" tabindex="1" data-type="save_setting" data-option="<?php echo $optionName; ?>" <?php checked(true, $checked); ?> />
|
83 |
<label for="<?php echo $optionName; ?>"><?php echo $plugin['name']; ?></label>
|
84 |
+
<span class="wpgdprc-instructions"><?php _e('Enable:', WP_GDPR_C_SLUG); ?></span>
|
85 |
<div class="wpgdprc-switch" aria-hidden="true">
|
86 |
<div class="wpgdprc-switch-label">
|
87 |
<div class="wpgdprc-switch-inner"></div>
|
124 |
</div>
|
125 |
<div id="tab-checklist" class="wpgdprc-tabs__panel" aria-hidden="true" aria-labelledby="tab-checklist-label" role="tabpanel">
|
126 |
<p><?php _e('Below we ask you what private data you currently collect and provide you with tips to comply.', WP_GDPR_C_SLUG); ?></p>
|
|
|
127 |
<ul class="wpgdprc-list">
|
128 |
<?php
|
129 |
foreach (Helpers::getCheckList() as $id => $check) :
|
131 |
$checked = Helpers::isEnabled($id, 'general');
|
132 |
$description = (!empty($check['description'])) ? esc_html($check['description']) : '';
|
133 |
?>
|
134 |
+
<li class="wpgdprc-clearfix">
|
135 |
<div class="wpgdprc-checkbox">
|
136 |
<input type="checkbox" name="<?php echo $optionName; ?>" id="<?php echo $id; ?>" value="1" tabindex="1" data-type="save_setting" data-option="<?php echo $optionName; ?>" <?php checked(true, $checked); ?> />
|
137 |
<label for="<?php echo $id; ?>"><?php echo $check['label']; ?></label>
|
151 |
</div>
|
152 |
<?php endif; ?>
|
153 |
</li>
|
154 |
+
<?php
|
155 |
endforeach;
|
156 |
?>
|
157 |
</ul>
|
158 |
</div>
|
159 |
+
<div id="tab-settings" class="wpgdprc-tabs__panel" aria-hidden="true" aria-labelledby="tab-settings-label" role="tabpanel">
|
160 |
+
<p><?php _e('Use %privacy_policy% if you want to link your Privacy Policy page in the GDPR checkbox texts.', WP_GDPR_C_SLUG); ?></p>
|
161 |
+
<p class="wpgdprc-setting">
|
162 |
+
<label for="<?php echo $optionNamePrivacyPolicyPage; ?>"><?php _e('Privacy Policy', WP_GDPR_C_SLUG); ?></label>
|
163 |
+
<?php
|
164 |
+
wp_dropdown_pages(array(
|
165 |
+
'show_option_none' => __('Select an option', WP_GDPR_C_SLUG),
|
166 |
+
'name' => $optionNamePrivacyPolicyPage,
|
167 |
+
'selected' => $privacyPolicyPage
|
168 |
+
));
|
169 |
+
?>
|
170 |
+
</p>
|
171 |
+
<p class="wpgdprc-setting">
|
172 |
+
<label for="<?php echo $optionNamePrivacyPolicyText; ?>"><?php _e('Link text', WP_GDPR_C_SLUG); ?></label>
|
173 |
+
<input type="text" name="<?php echo $optionNamePrivacyPolicyText; ?>" class="regular-text" id="<?php echo $optionNamePrivacyPolicyText; ?>" placeholder="<?php echo $privacyPolicyText; ?>" value="<?php echo $privacyPolicyText; ?>" />
|
174 |
+
</p>
|
175 |
+
</div>
|
176 |
</div>
|
177 |
</div>
|
178 |
|
180 |
</form>
|
181 |
|
182 |
<div class="wpgdprc-description">
|
183 |
+
<p><?php printf(__('This plugin assists website and webshop owners to comply with European privacy regulations known as GDPR. By May 24th, 2018 your site or shop has to comply to avoid large fines. The regulation can be read here: %s.', WP_GDPR_C_SLUG), '<a target="_blank" href="//www.eugdpr.org/the-regulation.html">' . __('GDPR Key Changes', WP_GDPR_C_SLUG) . '</a>'); ?></p>
|
184 |
+
<p><?php printf(__('%s currently supports %s.', WP_GDPR_C_SLUG), $pluginData['Name'], implode(', ', Integrations::getSupportedIntegrationsLabels())); ?></p>
|
185 |
</div>
|
186 |
|
187 |
+
<p class="wpgdprc-disclaimer"><?php _e('Disclaimer: The creators of this plugin do not have a legal background please contact a law firm for rock solid legal advice.', WP_GDPR_C_SLUG); ?></p>
|
188 |
|
189 |
<?php if ($daysLeftToComply > 0) : ?>
|
190 |
<div class="wpgdprc-countdown">
|
assets/css/admin.css
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
.
|
2 |
content: " ";
|
3 |
display: table;
|
4 |
}
|
5 |
|
6 |
-
.
|
7 |
clear: both;
|
8 |
}
|
9 |
|
10 |
-
.
|
11 |
*zoom: 1;
|
12 |
}
|
13 |
|
@@ -33,8 +33,8 @@
|
|
33 |
max-width: 900px;
|
34 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
35 |
font-weight: normal;
|
36 |
-
font-size:
|
37 |
-
line-height: 1.
|
38 |
text-rendering: optimizeLegibility;
|
39 |
color: #0A0A0A;
|
40 |
}
|
@@ -48,6 +48,10 @@
|
|
48 |
line-height: inherit;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
51 |
.wpgdprc a {
|
52 |
color: #4AA94F;
|
53 |
}
|
@@ -63,8 +67,7 @@
|
|
63 |
}
|
64 |
|
65 |
div.wpgdprc-allowed-tags {
|
66 |
-
font-size:
|
67 |
-
font-style: italic;
|
68 |
color: #8A8A8A;
|
69 |
}
|
70 |
|
@@ -279,7 +282,8 @@ span.wpgdprc-instructions {
|
|
279 |
transition: all 0.15s ease-in-out;
|
280 |
}
|
281 |
|
282 |
-
.wpgdprc-switch .wpgdprc-switch-inner:before,
|
|
|
283 |
float: left;
|
284 |
width: 50%;
|
285 |
line-height: 30px;
|
@@ -329,10 +333,6 @@ span.wpgdprc-instructions {
|
|
329 |
margin-top: 0;
|
330 |
}
|
331 |
|
332 |
-
.wpgdprc-checkbox-data p:last-child {
|
333 |
-
margin-bottom: 0;
|
334 |
-
}
|
335 |
-
|
336 |
.wpgdprc-checklist-description {
|
337 |
color: #8A8A8A;
|
338 |
}
|
@@ -358,7 +358,7 @@ span.wpgdprc-instructions {
|
|
358 |
margin-top: 10px;
|
359 |
padding: 20px;
|
360 |
background-color: #FAFAFA;
|
361 |
-
border:
|
362 |
}
|
363 |
|
364 |
.wpgdprc-checklist-options li:first-child {
|
@@ -383,14 +383,21 @@ span.wpgdprc-instructions {
|
|
383 |
vertical-align: top;
|
384 |
}
|
385 |
|
386 |
-
.wpgdprc-setting input {
|
387 |
margin: 0;
|
388 |
width: 100%;
|
389 |
-
background-color: #FFFFFF;
|
390 |
-webkit-box-shadow: none;
|
391 |
-moz-box-shadow: none;
|
392 |
box-shadow: none;
|
393 |
-
font-size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
}
|
395 |
|
396 |
.wpgdprc-countdown {
|
@@ -416,11 +423,6 @@ span.wpgdprc-instructions {
|
|
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 |
}
|
@@ -439,11 +441,14 @@ span.wpgdprc-instructions {
|
|
439 |
|
440 |
@media screen and (min-width: 768px) {
|
441 |
.wpgdprc-setting label {
|
|
|
442 |
max-width: 30%;
|
443 |
}
|
444 |
-
|
445 |
-
.wpgdprc-setting input
|
|
|
446 |
float: right;
|
|
|
447 |
max-width: 70%;
|
448 |
}
|
449 |
}
|
1 |
+
.wpgdprc-clearfix:before, .wpgdprc-clearfix:after {
|
2 |
content: " ";
|
3 |
display: table;
|
4 |
}
|
5 |
|
6 |
+
.wpgdprc-clearfix:after {
|
7 |
clear: both;
|
8 |
}
|
9 |
|
10 |
+
.wpgdprc-clearfix {
|
11 |
*zoom: 1;
|
12 |
}
|
13 |
|
33 |
max-width: 900px;
|
34 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
35 |
font-weight: normal;
|
36 |
+
font-size: 14px;
|
37 |
+
line-height: 1.4;
|
38 |
text-rendering: optimizeLegibility;
|
39 |
color: #0A0A0A;
|
40 |
}
|
48 |
line-height: inherit;
|
49 |
}
|
50 |
|
51 |
+
.wpgdprc p:last-child {
|
52 |
+
margin-bottom: 0;
|
53 |
+
}
|
54 |
+
|
55 |
.wpgdprc a {
|
56 |
color: #4AA94F;
|
57 |
}
|
67 |
}
|
68 |
|
69 |
div.wpgdprc-allowed-tags {
|
70 |
+
font-size: 12px;
|
|
|
71 |
color: #8A8A8A;
|
72 |
}
|
73 |
|
282 |
transition: all 0.15s ease-in-out;
|
283 |
}
|
284 |
|
285 |
+
.wpgdprc-switch .wpgdprc-switch-inner:before,
|
286 |
+
.wpgdprc-switch .wpgdprc-switch-inner:after {
|
287 |
float: left;
|
288 |
width: 50%;
|
289 |
line-height: 30px;
|
333 |
margin-top: 0;
|
334 |
}
|
335 |
|
|
|
|
|
|
|
|
|
336 |
.wpgdprc-checklist-description {
|
337 |
color: #8A8A8A;
|
338 |
}
|
358 |
margin-top: 10px;
|
359 |
padding: 20px;
|
360 |
background-color: #FAFAFA;
|
361 |
+
border: 1px solid #F0F0F0;
|
362 |
}
|
363 |
|
364 |
.wpgdprc-checklist-options li:first-child {
|
383 |
vertical-align: top;
|
384 |
}
|
385 |
|
386 |
+
.wpgdprc-setting input, .wpgdprc-setting select {
|
387 |
margin: 0;
|
388 |
width: 100%;
|
|
|
389 |
-webkit-box-shadow: none;
|
390 |
-moz-box-shadow: none;
|
391 |
box-shadow: none;
|
392 |
+
font-size: inherit;
|
393 |
+
}
|
394 |
+
|
395 |
+
.wpgdprc-setting input {
|
396 |
+
background-color: #FFFFFF;
|
397 |
+
}
|
398 |
+
|
399 |
+
.wpgdprc-setting select {
|
400 |
+
background-color: #FAFAFA;
|
401 |
}
|
402 |
|
403 |
.wpgdprc-countdown {
|
423 |
font-size: 22px;
|
424 |
}
|
425 |
|
|
|
|
|
|
|
|
|
|
|
426 |
.wpgdprc-countdown h2, .wpgdprc-countdown p {
|
427 |
margin: 0;
|
428 |
}
|
441 |
|
442 |
@media screen and (min-width: 768px) {
|
443 |
.wpgdprc-setting label {
|
444 |
+
width: 100%;
|
445 |
max-width: 30%;
|
446 |
}
|
447 |
+
div.wpgdprc-allowed-tags,
|
448 |
+
.wpgdprc-setting input,
|
449 |
+
.wpgdprc-setting select {
|
450 |
float: right;
|
451 |
+
width: 100%;
|
452 |
max-width: 70%;
|
453 |
}
|
454 |
}
|
languages/wp-gdpr-compliance-nl_NL.mo
DELETED
Binary file
|
languages/{wp-gdpr-compliance-nl_NL.po → wp-gdpr-compliance.pot}
RENAMED
@@ -1,23 +1,12 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP GDPR Compliance\n"
|
4 |
-
"POT-Creation-Date: 2018-03-
|
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"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\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"
|
21 |
|
22 |
#: Includes/Ajax.php:37
|
23 |
msgid "Missing data."
|
@@ -35,29 +24,56 @@ msgstr ""
|
|
35 |
msgid "Missing value."
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: Includes/Extensions/GForms.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
msgid "Privacy"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: Includes/Extensions/
|
|
|
|
|
|
|
|
|
|
|
43 |
#, php-format
|
44 |
msgid "<strong>ERROR</strong>: %s"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: Includes/Extensions/WP.php:
|
48 |
msgid "Comment Submission Failure"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: Includes/
|
|
|
|
|
|
|
|
|
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:
|
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,11 +81,11 @@ msgid ""
|
|
65 |
"if you will send or share the data with any 3rd-parties and which."
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: Includes/Helpers.php:
|
69 |
msgid "Can visitors comment anywhere on your website?"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: Includes/Helpers.php:
|
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,11 +94,11 @@ msgid ""
|
|
78 |
"which."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: Includes/Helpers.php:
|
82 |
msgid "Is there an order form on your website or webshop present?"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: Includes/Helpers.php:
|
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,11 +108,11 @@ msgid ""
|
|
92 |
"which."
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: Includes/Helpers.php:
|
96 |
msgid "Do you provide a forum or message board?"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: Includes/Helpers.php:
|
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,11 +120,11 @@ msgid ""
|
|
104 |
"share the data with any 3rd-parties and which."
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: Includes/Helpers.php:
|
108 |
msgid "Can visitors chat with your company directly?"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: Includes/Helpers.php:
|
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,137 +133,157 @@ msgid ""
|
|
117 |
"mention if you will send or share the data with any 3rd-parties and which."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: Includes/
|
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:
|
130 |
msgid "Activate for this form:"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: Includes/Integrations.php:
|
134 |
-
#: Includes/Integrations.php:
|
135 |
msgid "Checkbox text"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: Includes/Integrations.php:
|
139 |
-
#: Includes/Integrations.php:
|
140 |
msgid "Error message"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: Includes/Integrations.php:
|
144 |
msgid "No forms found."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: Includes/Integrations.php:
|
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:
|
|
|
|
|
|
|
|
|
154 |
msgid "WordPress Comments"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: Includes/Integrations.php:
|
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:
|
164 |
msgid "Contact Form 7"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: Includes/Integrations.php:
|
168 |
msgid "A GDPR form tag will be automatically added to every form you activate."
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: Includes/Integrations.php:
|
172 |
msgid "Gravity Forms"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: Includes/Integrations.php:
|
176 |
msgid "WooCommerce"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: Includes/Integrations.php:
|
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:
|
186 |
msgid "Integrations"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: Includes/Pages.php:
|
190 |
msgid "Checklist"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: Includes/Pages.php:
|
194 |
-
msgid "
|
|
|
|
|
|
|
|
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: Includes/Pages.php:
|
198 |
#, php-format
|
199 |
msgid "This plugin is outdated. %s supports version %s and up."
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: Includes/Pages.php:
|
203 |
msgid "Couldn't find any supported plugins installed."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: Includes/Pages.php:
|
207 |
msgid "The following plugins are supported as of now:"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: Includes/Pages.php:
|
211 |
msgid "More plugins will be added in the future."
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: Includes/Pages.php:
|
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 "
|
224 |
-
"privacy regulations
|
225 |
"to comply to avoid large fines. The regulation can be read here: %s."
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: Includes/Pages.php:
|
229 |
msgid "GDPR Key Changes"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: Includes/Pages.php:
|
233 |
#, php-format
|
234 |
-
msgid "%s supports
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: Includes/Pages.php:
|
238 |
msgid ""
|
239 |
-
"Disclaimer: The creators of this plugin do not have a legal background
|
240 |
-
"
|
241 |
-
"Protection Regulation (GDPR) but recommend contacting a law firm for rock "
|
242 |
-
"solid legal advice."
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: Includes/Pages.php:
|
246 |
#, php-format
|
247 |
msgid "You have %s left to comply with GDPR."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: Includes/Pages.php:
|
251 |
#, php-format
|
252 |
msgid "%s day"
|
253 |
msgstr ""
|
@@ -255,7 +291,3 @@ msgstr ""
|
|
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 ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP GDPR Compliance\n"
|
4 |
+
"POT-Creation-Date: 2018-03-29 11:59+0200\n"
|
|
|
5 |
"Last-Translator: \n"
|
6 |
"Language-Team: Van Ons <info@van-ons.nl>\n"
|
|
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
#: Includes/Ajax.php:37
|
12 |
msgid "Missing data."
|
24 |
msgid "Missing value."
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: Includes/Extensions/CF7.php:189 Includes/Extensions/GForms.php:111
|
28 |
+
#: Includes/Extensions/GForms.php:127 Includes/Extensions/GForms.php:146
|
29 |
+
#: Includes/Extensions/WC.php:55 Includes/Extensions/WP.php:65
|
30 |
+
msgid "Not accepted."
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: Includes/Extensions/CF7.php:193 Includes/Extensions/WC.php:53
|
34 |
+
msgid "GDPR accepted on:"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: Includes/Extensions/GForms.php:56 Includes/Extensions/GForms.php:95
|
38 |
msgid "Privacy"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: Includes/Extensions/GForms.php:144
|
42 |
+
#, php-format
|
43 |
+
msgid "Accepted on %s."
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: Includes/Extensions/WP.php:30
|
47 |
#, php-format
|
48 |
msgid "<strong>ERROR</strong>: %s"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: Includes/Extensions/WP.php:33
|
52 |
msgid "Comment Submission Failure"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: Includes/Extensions/WP.php:53
|
56 |
+
msgid "GDPR Accepted On"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: Includes/Helpers.php:83
|
60 |
#, php-format
|
61 |
msgid "You can use: %s"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: Includes/Helpers.php:89
|
65 |
+
msgid "Note"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
#: Includes/Helpers.php:90
|
69 |
+
msgid "No HTML allowed due to plugin limitations."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: Includes/Helpers.php:115
|
73 |
msgid "Do you have a contact form?"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: Includes/Helpers.php:116
|
77 |
msgid ""
|
78 |
"Make sure you add a checkbox specifically asking the user of the form if "
|
79 |
"they consent to you storing and using their personal information to get back "
|
81 |
"if you will send or share the data with any 3rd-parties and which."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: Includes/Helpers.php:119
|
85 |
msgid "Can visitors comment anywhere on your website?"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: Includes/Helpers.php:120
|
89 |
msgid ""
|
90 |
"Make sure you add a checkbox specifically asking the user of the comment "
|
91 |
"section if they consent to storing their message attached to the e-mail "
|
94 |
"which."
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: Includes/Helpers.php:123
|
98 |
msgid "Is there an order form on your website or webshop present?"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: Includes/Helpers.php:124
|
102 |
msgid ""
|
103 |
"Make sure you add a checkbox specifically asking the user of the form if "
|
104 |
"they consent to you storing and using their personal information to ship the "
|
108 |
"which."
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: Includes/Helpers.php:127
|
112 |
msgid "Do you provide a forum or message board?"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: Includes/Helpers.php:128
|
116 |
msgid ""
|
117 |
"Make sure you add a checkbox specifically asking forum / board users if they "
|
118 |
"consent to you storing and using their personal information and messages. "
|
120 |
"share the data with any 3rd-parties and which."
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: Includes/Helpers.php:131
|
124 |
msgid "Can visitors chat with your company directly?"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: Includes/Helpers.php:132
|
128 |
msgid ""
|
129 |
"Make sure you add a checkbox specifically asking chat users if they consent "
|
130 |
"to you storing and using their personal information and messages. The "
|
133 |
"mention if you will send or share the data with any 3rd-parties and which."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: Includes/Integrations.php:121 Includes/Integrations.php:158
|
|
|
|
|
|
|
|
|
137 |
#, php-format
|
138 |
msgid "Form: %s"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: Includes/Integrations.php:122 Includes/Integrations.php:159
|
142 |
msgid "Activate for this form:"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: Includes/Integrations.php:125 Includes/Integrations.php:162
|
146 |
+
#: Includes/Integrations.php:185
|
147 |
msgid "Checkbox text"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: Includes/Integrations.php:129 Includes/Integrations.php:166
|
151 |
+
#: Includes/Integrations.php:189
|
152 |
msgid "Error message"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: Includes/Integrations.php:137 Includes/Integrations.php:174
|
156 |
msgid "No forms found."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: Includes/Integrations.php:213
|
160 |
msgid ""
|
161 |
"By using this form you agree with the storage and handling of your data by "
|
162 |
"this website."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: Includes/Integrations.php:230
|
166 |
+
msgid "Please accept the privacy checkbox."
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: Includes/Integrations.php:265
|
170 |
msgid "WordPress Comments"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: Includes/Integrations.php:266
|
174 |
msgid ""
|
175 |
"When activated the GDPR checkbox will be added automatically just above the "
|
176 |
"submit button."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: Includes/Integrations.php:280
|
180 |
msgid "Contact Form 7"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: Includes/Integrations.php:281 Includes/Integrations.php:288
|
184 |
msgid "A GDPR form tag will be automatically added to every form you activate."
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: Includes/Integrations.php:287
|
188 |
msgid "Gravity Forms"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: Includes/Integrations.php:294
|
192 |
msgid "WooCommerce"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: Includes/Integrations.php:295
|
196 |
msgid ""
|
197 |
"The GDPR checkbox will be added automatically at the end of your checkout "
|
198 |
"page."
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: Includes/Pages.php:63
|
202 |
msgid "Integrations"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: Includes/Pages.php:64
|
206 |
msgid "Checklist"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: Includes/Pages.php:65 wp-gdpr-compliance.php:97
|
210 |
+
msgid "Settings"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: Includes/Pages.php:84
|
214 |
+
msgid "Enable:"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: Includes/Pages.php:105
|
218 |
#, php-format
|
219 |
msgid "This plugin is outdated. %s supports version %s and up."
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: Includes/Pages.php:115
|
223 |
msgid "Couldn't find any supported plugins installed."
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: Includes/Pages.php:116
|
227 |
msgid "The following plugins are supported as of now:"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: Includes/Pages.php:122
|
231 |
msgid "More plugins will be added in the future."
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: Includes/Pages.php:126
|
235 |
msgid ""
|
236 |
"Below we ask you what private data you currently collect and provide you "
|
237 |
"with tips to comply."
|
238 |
msgstr ""
|
239 |
|
240 |
#: Includes/Pages.php:160
|
241 |
+
msgid ""
|
242 |
+
"Use %privacy_policy% if you want to link your Privacy Policy page in the "
|
243 |
+
"GDPR checkbox texts."
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: Includes/Integrations.php:241 Includes/Pages.php:162
|
247 |
+
msgid "Privacy Policy"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: Includes/Pages.php:165
|
251 |
+
msgid "Select an option"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: Includes/Pages.php:172
|
255 |
+
msgid "Link text"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: Includes/Pages.php:183
|
259 |
#, php-format
|
260 |
msgid ""
|
261 |
"This plugin assists website and webshop owners to comply with European "
|
262 |
+
"privacy regulations known as GDPR. By May 24th, 2018 your site or shop has "
|
263 |
"to comply to avoid large fines. The regulation can be read here: %s."
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: Includes/Pages.php:183
|
267 |
msgid "GDPR Key Changes"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: Includes/Pages.php:184
|
271 |
#, php-format
|
272 |
+
msgid "%s currently supports %s."
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: Includes/Pages.php:187
|
276 |
msgid ""
|
277 |
+
"Disclaimer: The creators of this plugin do not have a legal background "
|
278 |
+
"please contact a law firm for rock solid legal advice."
|
|
|
|
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: Includes/Pages.php:193
|
282 |
#, php-format
|
283 |
msgid "You have %s left to comply with GDPR."
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: Includes/Pages.php:193
|
287 |
#, php-format
|
288 |
msgid "%s day"
|
289 |
msgstr ""
|
291 |
#: wp-gdpr-compliance.php:97
|
292 |
msgid "View WP GDPR Compliance settings"
|
293 |
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,10 +12,14 @@ This plugin assists website owners to comply with European privacy regulations (
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
|
|
|
|
16 |
|
17 |
WP GDPR Compliance currently supports Contact Form 7 (>= 4.6), Gravity Forms (>= 1.9), WooCommerce (>= 2.5.0) and WordPress Comments. Additional plugin support will follow soon.
|
18 |
|
|
|
|
|
19 |
== Installation ==
|
20 |
|
21 |
1. Upload the plugin files to the `/wp-content/plugins/wp-gdpr-compliance` directory, or install the plugin through the WordPress plugins screen directly.
|
@@ -28,11 +32,20 @@ You'll find answers to many of your questions on [wpgdprc.com](https://www.wpgdp
|
|
28 |
|
29 |
== Screenshots ==
|
30 |
|
31 |
-
1.
|
32 |
-
2.
|
33 |
|
34 |
== Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
= 1.2.2 =
|
37 |
*Release date: March 2nd, 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.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
ACTIVATION THIS PLUGIN DOES NOT GUARANTEE YOU FULLY COMPLY WITH GDPR. PLEASE CONTACT A GDPR CONSULTANT OR LAW FIRM TO ASSESS NECESSARY MEASURES.
|
16 |
+
|
17 |
+
This plugin assists website and webshop owners to comply with European privacy regulations known as GDPR. By May 24th, 2018 your site or shop has to comply to avoid large fines.
|
18 |
|
19 |
WP GDPR Compliance currently supports Contact Form 7 (>= 4.6), Gravity Forms (>= 1.9), WooCommerce (>= 2.5.0) and WordPress Comments. Additional plugin support will follow soon.
|
20 |
|
21 |
+
We constantly update this plugin to take care of more GDPR related issues. To check our development roadmap please visit [wpgdprc.com](https://www.wpgdprc.com/roadmap/ "Roadmap").
|
22 |
+
|
23 |
== Installation ==
|
24 |
|
25 |
1. Upload the plugin files to the `/wp-content/plugins/wp-gdpr-compliance` directory, or install the plugin through the WordPress plugins screen directly.
|
32 |
|
33 |
== Screenshots ==
|
34 |
|
35 |
+
1. Automatically add GDPR checkboxes to some of your existing plugins, such as Contact Form 7, Gravity Forms, WooCommerce or WordPress Comments.
|
36 |
+
2. We provide you with tips based on the private data you currently collect in order to comply with the GDPR regulations.
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= 1.2.3 =
|
41 |
+
*Release date: March 29th, 2018*
|
42 |
+
* Storage of explicit consent timestamp
|
43 |
+
* Return of the settings tab
|
44 |
+
* Added ability to include your privacy policy page
|
45 |
+
* Added a couple of apply_filters()
|
46 |
+
* Small styling changes
|
47 |
+
* Added .POT file to translate this plugin (Thanks for translating!)
|
48 |
+
|
49 |
= 1.2.2 =
|
50 |
*Release date: March 2nd, 2018*
|
51 |
* Fixed a bug with WordPress Comments
|
wp-gdpr-compliance.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/*
|
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
|
7 |
-
Version: 1.2.
|
8 |
Author: Van Ons
|
9 |
Author URI: https://www.van-ons.nl/
|
10 |
License: GPL2
|
3 |
/*
|
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.3
|
8 |
Author: Van Ons
|
9 |
Author URI: https://www.van-ons.nl/
|
10 |
License: GPL2
|