Strong Testimonials - Version 2.31.4

Version Description

  • May 22, 2018 =
  • Add integration with WordPress privacy exporter and eraser features.
Download this release

Release Info

Developer cdillon27
Plugin Icon 128x128 Strong Testimonials
Version 2.31.4
Comparing to
See all releases

Code changes from version 2.31.3 to 2.31.4

admin/about/class-strong-testimonials-about.php CHANGED
@@ -76,6 +76,8 @@ class Strong_Testimonials_About {
76
 
77
  <a href="<?php echo add_query_arg( 'tab', 'how-to', $url ); ?>" class="nav-tab <?php echo $active_tab == 'how-to' ? 'nav-tab-active' : ''; ?>"><?php _e( 'How To', 'strong-testimonials' ); ?></a>
78
 
 
 
79
  </h2>
80
 
81
  <!--
@@ -85,6 +87,9 @@ class Strong_Testimonials_About {
85
 
86
  <?php
87
  switch( $active_tab ) {
 
 
 
88
  case 'how-to':
89
  include WPMTST_ADMIN . 'about/how-to.php';
90
  break;
76
 
77
  <a href="<?php echo add_query_arg( 'tab', 'how-to', $url ); ?>" class="nav-tab <?php echo $active_tab == 'how-to' ? 'nav-tab-active' : ''; ?>"><?php _e( 'How To', 'strong-testimonials' ); ?></a>
78
 
79
+ <a href="<?php echo add_query_arg( 'tab', 'privacy', $url ); ?>" class="nav-tab <?php echo $active_tab == 'privacy' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Privacy' ); ?></a>
80
+
81
  </h2>
82
 
83
  <!--
87
 
88
  <?php
89
  switch( $active_tab ) {
90
+ case 'privacy':
91
+ include WPMTST_ADMIN . 'about/privacy.php';
92
+ break;
93
  case 'how-to':
94
  include WPMTST_ADMIN . 'about/how-to.php';
95
  break;
admin/about/privacy.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2><?php _e( 'Privacy and GDPR', 'strong-testimonials' ); ?></h2>
2
+ <p class="lead-description"><?php _e( 'Compliance is entirely in your control.', 'strong-testimonials' ); ?></p>
3
+ <div class="feature-section one-col">
4
+ <div class="col">
5
+ <p><?php _e( 'By default, this plugin does not store any user or visitor data, does not send any data to remote servers, act as a service or embed content, does not edit the comments form in any way.', 'strong-testimonials' ); ?></p>
6
+ <p><?php _e( 'The plugin also prevents displaying email addresses in your testimonials on the front end.', 'strong-testimonials' ); ?></p>
7
+ <p><strong><?php _e( 'However, this plugin provides features that may involve private data.', 'strong-testimonials' ); ?></strong></p>
8
+ <p><?php _e( 'If you use the testimonial submission form, the data collected on that form will be stored in your database.', 'strong-testimonials' ); ?></p>
9
+ <p><?php _e( 'If you enable the administrator notification email upon new testimonial submission, the data collected on your form, at your selection, may be included in that notification email.', 'strong-testimonials' ); ?></p>
10
+ <p><?php _e( 'If you enable comments on testimonials, the plugin will use your theme\'s single post template and comment form.', 'strong-testimonials' ); ?></p>
11
+ <p><?php _e( 'If you embed third-party posts such as Twitter, YouTube and FaceBook in your testimonials, you will be agreeing to the Terms of Use of those third-party sites.', 'strong-testimonials' ); ?></p>
12
+ </div>
13
+ </div>
admin/about/whats-new.php CHANGED
@@ -9,7 +9,21 @@
9
  <p>NEW: Use the Load Event option to potentially fix problems with sliders and Masonry in complex themes.</p>
10
  <p>NEW: Use the Lazy Loading option to potentially fix problems with testimonial images being cut off.</p>
11
  <p>IMPROVED: The star ratings now use an empty star instead of a gray full star. This is the more popular approach.</p>
12
- <p>IMPROVED: Minor style tweaks in both admin and in some templates for small screens.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  </div>
14
  </div>
15
 
9
  <p>NEW: Use the Load Event option to potentially fix problems with sliders and Masonry in complex themes.</p>
10
  <p>NEW: Use the Lazy Loading option to potentially fix problems with testimonial images being cut off.</p>
11
  <p>IMPROVED: The star ratings now use an empty star instead of a gray full star. This is the more popular approach.</p>
12
+ <p>IMPROVED: Minor style tweaks in both admin and some templates for small screens.</p>
13
+ <div class="feature-section-sub">
14
+
15
+ <h3 class="heading">Point Releases</h3>
16
+
17
+ <p>Bug fixes and improved compatibility. <a href="https://wordpress.org/plugins/strong-testimonials/#developers" target="_blank">Read changelog on wordpress.org</a>.</p>
18
+
19
+ <ul>
20
+ <li>Version 2.31.1</li>
21
+ <li>Version 2.31.2</li>
22
+ <li>Version 2.31.3</li>
23
+ <li>Version 2.31.4</li>
24
+ </ul>
25
+
26
+ </div>
27
  </div>
28
  </div>
29
 
admin/views-validate.php CHANGED
@@ -153,8 +153,8 @@ function wpmtst_sanitize_view( $input ) {
153
  // Thumbnail
154
  $data['thumbnail'] = isset( $input['thumbnail'] ) ? 1 : 0;
155
  $data['thumbnail_size'] = sanitize_text_field( $input['thumbnail_size'] );
156
- $data['thumbnail_width'] = sanitize_text_field( $input['thumbnail_width'] );
157
- $data['thumbnail_height'] = sanitize_text_field( $input['thumbnail_height'] );
158
  $data['lightbox'] = isset( $input['lightbox'] ) ? 1 : 0;
159
  $data['lightbox_class'] = sanitize_text_field( $input['lightbox_class'] );
160
  $data['gravatar'] = sanitize_text_field( $input['gravatar'] );
153
  // Thumbnail
154
  $data['thumbnail'] = isset( $input['thumbnail'] ) ? 1 : 0;
155
  $data['thumbnail_size'] = sanitize_text_field( $input['thumbnail_size'] );
156
+ $data['thumbnail_width'] = max( 0, sanitize_text_field( $input['thumbnail_width'] ) );
157
+ $data['thumbnail_height'] = max( 0, sanitize_text_field( $input['thumbnail_height'] ) );
158
  $data['lightbox'] = isset( $input['lightbox'] ) ? 1 : 0;
159
  $data['lightbox_class'] = sanitize_text_field( $input['lightbox_class'] );
160
  $data['gravatar'] = sanitize_text_field( $input['gravatar'] );
includes/class-strong-testimonials-privacy.php ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Class Strong_Testimonials_Privacy
9
+ *
10
+ * @since 2.31.4
11
+ */
12
+ class Strong_Testimonials_Privacy {
13
+
14
+ public function __construct() {
15
+ $this->add_hooks();
16
+ }
17
+
18
+ /**
19
+ * @since 2.31.4
20
+ */
21
+ public function add_hooks() {
22
+ add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'register_exporter' ) );
23
+ add_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_eraser' ) );
24
+ }
25
+
26
+ /**
27
+ * @since 2.31.4
28
+ * @return string
29
+ */
30
+ public function get_friendly_name() {
31
+ return __( 'Strong Testimonials Plugin', 'strong-testimonials' );
32
+ }
33
+
34
+ /**
35
+ * @param $email_address
36
+ * @param int $page
37
+ *
38
+ * @since 2.31.4
39
+ * @return array
40
+ */
41
+ public function exporter( $email_address, $page = 1 ) {
42
+ $number = 100; // Limit us to avoid timing out
43
+ $page = (int) $page;
44
+
45
+ $export_items = array();
46
+
47
+ $args = array(
48
+ 'post_type' => 'wpm-testimonial',
49
+ 'post_status' => 'publish',
50
+ 'posts_per_page' => $number,
51
+ 'offset' => $number * ( $page - 1 ),
52
+ 'suppress_filters' => true,
53
+ );
54
+
55
+ $testimonials = get_posts( $args );
56
+
57
+ foreach ( (array) $testimonials as $testimonial ) {
58
+ $post_meta = get_post_meta( $testimonial->ID );
59
+
60
+ $item_id = "testimonial-{$testimonial->ID}";
61
+ $group_id = 'testimonials';
62
+ $group_label = __( 'Testimonials', 'strong-testimonials' );
63
+
64
+ $data = array();
65
+
66
+ foreach ( $post_meta as $key => $value ) {
67
+ $found = array_search( $email_address, $value );
68
+ if ( false !== $found ) {
69
+ $data[] = array(
70
+ 'name' => $key,
71
+ 'value' => $value[ $found ],
72
+ );
73
+ }
74
+ }
75
+
76
+ if ( $data ) {
77
+ $export_items[] = array(
78
+ 'group_id' => $group_id,
79
+ 'group_label' => $group_label,
80
+ 'item_id' => $item_id,
81
+ 'data' => $data,
82
+ );
83
+ }
84
+
85
+ }
86
+
87
+ // Tell core if we have more comments to work on still
88
+ $done = count( $testimonials ) < $number;
89
+
90
+ return array(
91
+ 'data' => $export_items,
92
+ 'done' => $done,
93
+ );
94
+ }
95
+
96
+ /**
97
+ * @param $email_address
98
+ * @param int $page
99
+ *
100
+ * @since 2.31.4
101
+ * @return array
102
+ */
103
+ public function eraser( $email_address, $page = 1 ) {
104
+ $number = 100; // Limit us to avoid timing out
105
+ $page = (int) $page;
106
+
107
+ $items_removed = false;
108
+
109
+ $args = array(
110
+ 'post_type' => 'wpm-testimonial',
111
+ 'post_status' => 'publish',
112
+ 'posts_per_page' => $number,
113
+ 'offset' => $number * ( $page - 1 ),
114
+ 'suppress_filters' => true,
115
+ );
116
+
117
+ $testimonials = get_posts( $args );
118
+
119
+ foreach ( (array) $testimonials as $testimonial ) {
120
+ $post_meta = get_post_meta( $testimonial->ID );
121
+
122
+ foreach ( $post_meta as $key => $value ) {
123
+ if ( in_array( $email_address, $value ) ) {
124
+ delete_post_meta( $testimonial->ID, $key, $email_address );
125
+ $items_removed = true;
126
+ }
127
+ }
128
+
129
+ }
130
+
131
+ // Tell core if we have more comments to work on still
132
+ $done = count( $testimonials ) < $number;
133
+
134
+ return array(
135
+ 'items_removed' => $items_removed,
136
+ 'items_retained' => false, // always false in this example
137
+ 'messages' => array(), // no messages in this example
138
+ 'done' => $done,
139
+ );
140
+ }
141
+
142
+ /**
143
+ * @param array $exporters
144
+ *
145
+ * @since 2.31.4
146
+ * @return array
147
+ */
148
+ public function register_exporter( $exporters ) {
149
+ $exporters['strong-testimonials'] = array(
150
+ 'exporter_friendly_name' => $this->get_friendly_name(),
151
+ 'callback' => array( $this, 'exporter' ),
152
+ );
153
+
154
+ return $exporters;
155
+ }
156
+
157
+ /**
158
+ * @param array $erasers
159
+ * @since 2.31.4
160
+ * @return array
161
+ */
162
+ function register_eraser( $erasers ) {
163
+ $erasers['strong-testimonials'] = array(
164
+ 'eraser_friendly_name' => $this->get_friendly_name(),
165
+ 'callback' => array( $this, 'eraser' ),
166
+ );
167
+
168
+ return $erasers;
169
+ }
170
+
171
+ }
readme.txt CHANGED
@@ -2,8 +2,9 @@
2
  Contributors: cdillon27
3
  Tags: testimonials, testimonial slider, testimonial form, reviews, star ratings
4
  Requires at least: 3.7
 
5
  Tested up to: 4.9.6
6
- Stable tag: 2.31.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -80,6 +81,23 @@ The template function will add a view to your custome theme templates:
80
  strong_testimonials_view( $id );
81
  } ?>`
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  ### Pro Add-ons
84
 
85
  #### Assignment
@@ -197,6 +215,9 @@ If you prefer, start a private support ticket at [support.strongplugins.com](htt
197
 
198
  == Changelog ==
199
 
 
 
 
200
  = 2.31.3 - May 19, 2018 =
201
  * Fix missing submit button.
202
 
@@ -284,3 +305,6 @@ See changelog.txt for previous versions.
284
 
285
  = 2.31 =
286
  New [testimonial_average_rating] shortcode. More compatibility options.
 
 
 
2
  Contributors: cdillon27
3
  Tags: testimonials, testimonial slider, testimonial form, reviews, star ratings
4
  Requires at least: 3.7
5
+ Requires PHP: 5.2
6
  Tested up to: 4.9.6
7
+ Stable tag: 2.31.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
81
  strong_testimonials_view( $id );
82
  } ?>`
83
 
84
+ ### Privacy and GDPR
85
+
86
+ By default, this plugin:
87
+
88
+ * does not store any user or visitor data,
89
+ * does not send any data to remote servers, act as a service or embed content,
90
+ * does not edit the comments form in any way.
91
+
92
+ The plugin also prevents displaying email addresses in your testimonials on the front end.
93
+
94
+ However, this plugin provides features that may involve private data.
95
+
96
+ * If you use the testimonial submission form, the data collected on that form will be stored in your database.
97
+ * If you enable the administrator notification email upon new testimonial submission, the data collected on your form, at your selection, may be included in that notification email.
98
+ * If you enable comments on testimonials, the plugin will use your theme's single post template and comment form.
99
+ * If you embed third-party posts such as Twitter, YouTube and FaceBook in your testimonials, you will be agreeing to the Terms of Use of those third-party sites.
100
+
101
  ### Pro Add-ons
102
 
103
  #### Assignment
215
 
216
  == Changelog ==
217
 
218
+ = 2.31.4 - May 22, 2018 =
219
+ * Add integration with WordPress privacy exporter and eraser features.
220
+
221
  = 2.31.3 - May 19, 2018 =
222
  * Fix missing submit button.
223
 
305
 
306
  = 2.31 =
307
  New [testimonial_average_rating] shortcode. More compatibility options.
308
+
309
+ = 2.31.4 =
310
+ Privacy exporter and eraser integration.
strong-testimonials.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: Chris Dillon
7
- * Version: 2.31.3
8
  *
9
  * Author URI: https://strongplugins.com/
10
  * Text Domain: strong-testimonials
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  exit;
35
  }
36
 
37
- define( 'WPMTST_VERSION', '2.31.3' );
38
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
39
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
40
  define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
@@ -198,6 +198,7 @@ final class Strong_Testimonials {
198
 
199
  new Strong_Testimonials_Count_Shortcode();
200
  new Strong_Testimonials_Average_Shortcode();
 
201
  }
202
 
203
  /**
@@ -210,6 +211,8 @@ final class Strong_Testimonials {
210
  private function includes() {
211
  require_once WPMTST_INC . 'class-strong-log.php';
212
 
 
 
213
  require_once WPMTST_INC . 'class-strong-testimonials-shortcode.php';
214
  require_once WPMTST_INC . 'class-strong-testimonials-shortcode-count.php';
215
  require_once WPMTST_INC . 'class-strong-testimonials-shortcode-average.php';
4
  * Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: Chris Dillon
7
+ * Version: 2.31.4
8
  *
9
  * Author URI: https://strongplugins.com/
10
  * Text Domain: strong-testimonials
34
  exit;
35
  }
36
 
37
+ define( 'WPMTST_VERSION', '2.31.4' );
38
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
39
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
40
  define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
198
 
199
  new Strong_Testimonials_Count_Shortcode();
200
  new Strong_Testimonials_Average_Shortcode();
201
+ new Strong_Testimonials_Privacy();
202
  }
203
 
204
  /**
211
  private function includes() {
212
  require_once WPMTST_INC . 'class-strong-log.php';
213
 
214
+ require_once WPMTST_INC . 'class-strong-testimonials-privacy.php';
215
+
216
  require_once WPMTST_INC . 'class-strong-testimonials-shortcode.php';
217
  require_once WPMTST_INC . 'class-strong-testimonials-shortcode-count.php';
218
  require_once WPMTST_INC . 'class-strong-testimonials-shortcode-average.php';