Version Description
Release date: January 19th, 2018 * Added default error message. * Small bugfixes.
Download this release
Release Info
Developer | donnyoexman |
Plugin | WP GDPR Compliance |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- Includes/Extensions/CF7.php +3 -1
- Includes/Extensions/WC.php +5 -4
- Includes/Extensions/WP.php +5 -4
- Includes/Helpers.php +16 -8
- Includes/Pages.php +2 -2
- languages/wp-gdpr-compliance-nl_NL.mo +0 -0
- languages/wp-gdpr-compliance-nl_NL.po +8 -4
- readme.txt +7 -2
- wp-gdpr-compliance.php +1 -1
Includes/Extensions/CF7.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class CF7
|
7 |
* @package WPGDPRC\Includes\Extensions
|
@@ -145,7 +147,7 @@ class CF7 {
|
|
145 |
$name = $tag->name;
|
146 |
$value = (isset($_POST[$name])) ? filter_var($_POST[$name], FILTER_VALIDATE_BOOLEAN) : false;
|
147 |
if ($value === false) {
|
148 |
-
$result->invalidate($tag,
|
149 |
}
|
150 |
break;
|
151 |
}
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
5 |
+
use WPGDPRC\Includes\Helpers;
|
6 |
+
|
7 |
/**
|
8 |
* Class CF7
|
9 |
* @package WPGDPRC\Includes\Extensions
|
147 |
$name = $tag->name;
|
148 |
$value = (isset($_POST[$name])) ? filter_var($_POST[$name], FILTER_VALIDATE_BOOLEAN) : false;
|
149 |
if ($value === false) {
|
150 |
+
$result->invalidate($tag, Helpers::getErrorText());
|
151 |
}
|
152 |
break;
|
153 |
}
|
Includes/Extensions/WC.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class WC
|
7 |
* @package WPGDPRC\Includes\Extensions
|
@@ -30,7 +32,7 @@ class WC {
|
|
30 |
array(
|
31 |
'type' => 'checkbox',
|
32 |
'class' => array('wpgdprc-checkbox'),
|
33 |
-
'label' =>
|
34 |
'required' => true,
|
35 |
),
|
36 |
$checkout->get_value('wpgdprc')
|
@@ -39,7 +41,7 @@ class WC {
|
|
39 |
|
40 |
public function checkPost() {
|
41 |
if (!isset($_POST['wpgdprc'])) {
|
42 |
-
wc_add_notice(sprintf(
|
43 |
}
|
44 |
}
|
45 |
|
@@ -47,8 +49,7 @@ class WC {
|
|
47 |
* @return mixed
|
48 |
*/
|
49 |
public function getLabelText() {
|
50 |
-
$default = __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
|
51 |
$option = get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_text');
|
52 |
-
return !empty($option) ? $option :
|
53 |
}
|
54 |
}
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
5 |
+
use WPGDPRC\Includes\Helpers;
|
6 |
+
|
7 |
/**
|
8 |
* Class WC
|
9 |
* @package WPGDPRC\Includes\Extensions
|
32 |
array(
|
33 |
'type' => 'checkbox',
|
34 |
'class' => array('wpgdprc-checkbox'),
|
35 |
+
'label' => self::getLabelText(),
|
36 |
'required' => true,
|
37 |
),
|
38 |
$checkout->get_value('wpgdprc')
|
41 |
|
42 |
public function checkPost() {
|
43 |
if (!isset($_POST['wpgdprc'])) {
|
44 |
+
wc_add_notice(sprintf(Helpers::getErrorText()), 'error');
|
45 |
}
|
46 |
}
|
47 |
|
49 |
* @return mixed
|
50 |
*/
|
51 |
public function getLabelText() {
|
|
|
52 |
$option = get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_text');
|
53 |
+
return (!empty($option)) ? esc_html($option) : __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
|
54 |
}
|
55 |
}
|
Includes/Extensions/WP.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class WP
|
7 |
* @package WPGDPRC\Includes\Extensions
|
@@ -26,7 +28,7 @@ class WP {
|
|
26 |
* @return string
|
27 |
*/
|
28 |
public function addField($field = '') {
|
29 |
-
$field .= apply_filters('wpgdprc_wordpress_field', '<p class="wpgdprc-checkbox"><label><input type="checkbox" name="wpgdprc" id="wpgdprc" value="1" />' .
|
30 |
return $field;
|
31 |
}
|
32 |
|
@@ -36,7 +38,7 @@ class WP {
|
|
36 |
*/
|
37 |
public function checkPost($post = array()) {
|
38 |
if (!isset($_POST['wpgdprc'])) {
|
39 |
-
wp_die(
|
40 |
}
|
41 |
return $post;
|
42 |
}
|
@@ -45,8 +47,7 @@ class WP {
|
|
45 |
* @return mixed
|
46 |
*/
|
47 |
public function getLabelText() {
|
48 |
-
$default = __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
|
49 |
$option = get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_text');
|
50 |
-
return !empty($option) ? $option :
|
51 |
}
|
52 |
}
|
2 |
|
3 |
namespace WPGDPRC\Includes\Extensions;
|
4 |
|
5 |
+
use WPGDPRC\Includes\Helpers;
|
6 |
+
|
7 |
/**
|
8 |
* Class WP
|
9 |
* @package WPGDPRC\Includes\Extensions
|
28 |
* @return string
|
29 |
*/
|
30 |
public function addField($field = '') {
|
31 |
+
$field .= apply_filters('wpgdprc_wordpress_field', '<p class="wpgdprc-checkbox"><label><input type="checkbox" name="wpgdprc" id="wpgdprc" value="1" />' . self::getLabelText() . ' <abbr class="required" title="required">*</abbr></label></p>', $field);
|
32 |
return $field;
|
33 |
}
|
34 |
|
38 |
*/
|
39 |
public function checkPost($post = array()) {
|
40 |
if (!isset($_POST['wpgdprc'])) {
|
41 |
+
wp_die(Helpers::getErrorText());
|
42 |
}
|
43 |
return $post;
|
44 |
}
|
47 |
* @return mixed
|
48 |
*/
|
49 |
public function getLabelText() {
|
|
|
50 |
$option = get_option(WP_GDPR_C_PREFIX . '_integrations_' . self::ID . '_text');
|
51 |
+
return (!empty($option)) ? esc_html($option) : __('By using this form you agree with the storage and handling of your data by this website.', WP_GDPR_C_SLUG);
|
52 |
}
|
53 |
}
|
Includes/Helpers.php
CHANGED
@@ -110,7 +110,7 @@ class Helpers {
|
|
110 |
/**
|
111 |
* @return array
|
112 |
*/
|
113 |
-
public static function
|
114 |
return array(
|
115 |
array(
|
116 |
'id' => 'wordpress',
|
@@ -153,31 +153,31 @@ class Helpers {
|
|
153 |
* @return array
|
154 |
*/
|
155 |
public static function getSupported() {
|
156 |
-
return array_merge(self::getSupportedPlugins(), self::
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
-
* @param array $output
|
161 |
* @return array
|
162 |
*/
|
163 |
-
public static function getActivatedPlugins(
|
164 |
-
$
|
|
|
165 |
foreach (self::getSupportedPlugins() as $plugin) {
|
166 |
if (in_array($plugin['file'], $activePlugins)) {
|
167 |
$output[] = $plugin;
|
168 |
}
|
169 |
}
|
170 |
-
foreach (self::
|
171 |
$output[] = $wp;
|
172 |
}
|
173 |
return $output;
|
174 |
}
|
175 |
|
176 |
/**
|
177 |
-
* @param array $output
|
178 |
* @return array
|
179 |
*/
|
180 |
-
public static function getEnabledPlugins(
|
|
|
181 |
foreach (self::getActivatedPlugins() as $plugin) {
|
182 |
if (self::isEnabled($plugin['id'])) {
|
183 |
$output[] = $plugin;
|
@@ -193,4 +193,12 @@ class Helpers {
|
|
193 |
public static function getAdvancedOption($option = '') {
|
194 |
return get_option(WP_GDPR_C_PREFIX . '_advanced_' . $option);
|
195 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
110 |
/**
|
111 |
* @return array
|
112 |
*/
|
113 |
+
public static function getSupportedWordPress() {
|
114 |
return array(
|
115 |
array(
|
116 |
'id' => 'wordpress',
|
153 |
* @return array
|
154 |
*/
|
155 |
public static function getSupported() {
|
156 |
+
return array_merge(self::getSupportedPlugins(), self::getSupportedWordPress());
|
157 |
}
|
158 |
|
159 |
/**
|
|
|
160 |
* @return array
|
161 |
*/
|
162 |
+
public static function getActivatedPlugins() {
|
163 |
+
$output = array();
|
164 |
+
$activePlugins = (array) get_option('active_plugins', array());
|
165 |
foreach (self::getSupportedPlugins() as $plugin) {
|
166 |
if (in_array($plugin['file'], $activePlugins)) {
|
167 |
$output[] = $plugin;
|
168 |
}
|
169 |
}
|
170 |
+
foreach (self::getSupportedWordPress() as $wp) {
|
171 |
$output[] = $wp;
|
172 |
}
|
173 |
return $output;
|
174 |
}
|
175 |
|
176 |
/**
|
|
|
177 |
* @return array
|
178 |
*/
|
179 |
+
public static function getEnabledPlugins() {
|
180 |
+
$output = array();
|
181 |
foreach (self::getActivatedPlugins() as $plugin) {
|
182 |
if (self::isEnabled($plugin['id'])) {
|
183 |
$output[] = $plugin;
|
193 |
public static function getAdvancedOption($option = '') {
|
194 |
return get_option(WP_GDPR_C_PREFIX . '_advanced_' . $option);
|
195 |
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* @return mixed
|
199 |
+
*/
|
200 |
+
public static function getErrorText() {
|
201 |
+
$errorText = self::getAdvancedOption('error');
|
202 |
+
return (!empty($errorText)) ? esc_html($errorText) : __('Please accept the privacy checkbox.', WP_GDPR_C_SLUG);
|
203 |
+
}
|
204 |
}
|
Includes/Pages.php
CHANGED
@@ -41,7 +41,7 @@ class Pages {
|
|
41 |
public function generatePage() {
|
42 |
$pluginData = Helpers::getPluginData();
|
43 |
$activatedPlugins = Helpers::getActivatedPlugins();
|
44 |
-
$errorMessage = Helpers::
|
45 |
?>
|
46 |
<div class="wrap">
|
47 |
<div class="wpgdprc">
|
@@ -154,7 +154,7 @@ class Pages {
|
|
154 |
<li>
|
155 |
<p class="wpgdprc-setting">
|
156 |
<label for="wpgdprc_advanced_error"><?php _e('Error message', WP_GDPR_C_SLUG); ?></label>
|
157 |
-
<input name="wpgdprc_advanced_error" class="regular-text" id="wpgdprc_advanced_error" placeholder="<?php echo $errorMessage; ?>" value="<?php echo $errorMessage; ?>"
|
158 |
</p>
|
159 |
</li>
|
160 |
</ul>
|
41 |
public function generatePage() {
|
42 |
$pluginData = Helpers::getPluginData();
|
43 |
$activatedPlugins = Helpers::getActivatedPlugins();
|
44 |
+
$errorMessage = Helpers::getErrorText();
|
45 |
?>
|
46 |
<div class="wrap">
|
47 |
<div class="wpgdprc">
|
154 |
<li>
|
155 |
<p class="wpgdprc-setting">
|
156 |
<label for="wpgdprc_advanced_error"><?php _e('Error message', WP_GDPR_C_SLUG); ?></label>
|
157 |
+
<input type="text" name="wpgdprc_advanced_error" class="regular-text" id="wpgdprc_advanced_error" placeholder="<?php echo $errorMessage; ?>" value="<?php echo $errorMessage; ?>" />
|
158 |
</p>
|
159 |
</li>
|
160 |
</ul>
|
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-01-
|
5 |
-
"PO-Revision-Date: 2018-01-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Van Ons <info@van-ons.nl>\n"
|
8 |
"Language: nl_NL\n"
|
@@ -33,8 +33,8 @@ msgstr ""
|
|
33 |
msgid "Missing value."
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: Includes/Extensions/CF7.php:
|
37 |
-
#: Includes/Extensions/WP.php:
|
38 |
msgid ""
|
39 |
"By using this form you agree with the storage and handling of your data by "
|
40 |
"this website."
|
@@ -136,6 +136,10 @@ msgid ""
|
|
136 |
"page."
|
137 |
msgstr ""
|
138 |
|
|
|
|
|
|
|
|
|
139 |
#: Includes/Pages.php:53
|
140 |
msgid ""
|
141 |
"This plugin assists website and webshop owners to comply with European "
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP GDPR Compliance\n"
|
4 |
+
"POT-Creation-Date: 2018-01-19 22:14+0100\n"
|
5 |
+
"PO-Revision-Date: 2018-01-19 22:14+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Van Ons <info@van-ons.nl>\n"
|
8 |
"Language: nl_NL\n"
|
33 |
msgid "Missing value."
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: Includes/Extensions/CF7.php:187 Includes/Extensions/WC.php:53
|
37 |
+
#: Includes/Extensions/WP.php:51 Includes/Helpers.php:96
|
38 |
msgid ""
|
39 |
"By using this form you agree with the storage and handling of your data by "
|
40 |
"this website."
|
136 |
"page."
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: Includes/Helpers.php:202
|
140 |
+
msgid "Please accept the privacy checkbox."
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
#: Includes/Pages.php:53
|
144 |
msgid ""
|
145 |
"This plugin assists website and webshop owners to comply with European "
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: donnyoexman, michaelvt, jeffreyvisser, van-ons
|
3 |
Tags: gdpr, law, regulations, compliance, data, protection, privacy, data protection, eu, avg, comments, woocommerce, wc, contact form 7, cf7
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 4.9.
|
6 |
Requires PHP: 5.2.4
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -33,6 +33,11 @@ You'll find answers to many of your questions on [wpgdprc.com](https://www.wpgdp
|
|
33 |
|
34 |
== Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
36 |
= 1.1.1 =
|
37 |
*Release date: January 16th, 2018*
|
38 |
* Added screenshots.
|
2 |
Contributors: donnyoexman, michaelvt, jeffreyvisser, van-ons
|
3 |
Tags: gdpr, law, regulations, compliance, data, protection, privacy, data protection, eu, avg, comments, woocommerce, wc, contact form 7, cf7
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 4.9.2
|
6 |
Requires PHP: 5.2.4
|
7 |
+
Stable tag: 1.1.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.1.2 =
|
37 |
+
*Release date: January 19th, 2018*
|
38 |
+
* Added default error message.
|
39 |
+
* Small bugfixes.
|
40 |
+
|
41 |
= 1.1.1 =
|
42 |
*Release date: January 16th, 2018*
|
43 |
* Added screenshots.
|
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.1.
|
8 |
Author: Donny Oexman, Michael van Tulder, Jeffrey Visser, Van Ons
|
9 |
Author URI: https://www.van-ons.nl/
|
10 |
License: GPL2
|
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.1.2
|
8 |
Author: Donny Oexman, Michael van Tulder, Jeffrey Visser, Van Ons
|
9 |
Author URI: https://www.van-ons.nl/
|
10 |
License: GPL2
|