Gwolle Guestbook - Version 2.6.2

Version Description

  • 2018-07-19
  • Fix form for "button
Download this release

Release Info

Developer mpol
Plugin Icon 128x128 Gwolle Guestbook
Version 2.6.2
Comparing to
See all releases

Code changes from version 2.6.1 to 2.6.2

add-on/gb-add-on.php CHANGED
@@ -246,6 +246,10 @@ Entry content:
246
  esc_html__('Remove and moderate', 'gwolle-gb');
247
  /* translators: Commercial Add-On */
248
  esc_html__('Already moderated', 'gwolle-gb');
 
 
 
 
249
 
250
  // function gwolle_gb_addon_starrating_average_html()
251
  /* translators: Commercial Add-On. %s is the value/number of votes. */
246
  esc_html__('Remove and moderate', 'gwolle-gb');
247
  /* translators: Commercial Add-On */
248
  esc_html__('Already moderated', 'gwolle-gb');
249
+ /* translators: Commercial Add-On */
250
+ esc_html_e('Enable report abuse link in Metabox.', 'gwolle-gb');
251
+ /* translators: Commercial Add-On */
252
+ esc_html_e('Vistors can report abusive entries through a link in the metabox.', 'gwolle-gb');
253
 
254
  // function gwolle_gb_addon_starrating_average_html()
255
  /* translators: Commercial Add-On. %s is the value/number of votes. */
docs/filters/gwolle_gb_mail_author_body.txt CHANGED
@@ -16,7 +16,7 @@ Where 'filter_function_name' is the function WordPress should call when the filt
16
  ==Examples==
17
 
18
 
19
- function my_gwolle_gb_mail_author_body( $body ) {
20
  // this is the default;
21
  $body = esc_html__("
22
  Hello,
@@ -37,5 +37,5 @@ Entry content:
37
 
38
  return $body;
39
  }
40
- add_filter( 'gwolle_gb_mail_author_body', 'my_gwolle_gb_mail_author_body', 10,1 );
41
 
16
  ==Examples==
17
 
18
 
19
+ function my_gwolle_gb_mail_author_body( $body, $entry ) {
20
  // this is the default;
21
  $body = esc_html__("
22
  Hello,
37
 
38
  return $body;
39
  }
40
+ add_filter( 'gwolle_gb_mail_author_body', 'my_gwolle_gb_mail_author_body', 10, 2 );
41
 
docs/filters/gwolle_gb_mail_author_on_admin_reply_body.txt CHANGED
@@ -16,7 +16,7 @@ Where 'filter_function_name' is the function WordPress should call when the filt
16
  ==Examples==
17
 
18
 
19
- function my_gwolle_gb_mail_author_on_admin_reply_body( $body ) {
20
  // this is the default;
21
  $body = esc_html__("
22
  Hello,
@@ -39,5 +39,5 @@ Original entry posted on %date%:
39
 
40
  return $body;
41
  }
42
- add_filter( 'gwolle_gb_mail_author_on_admin_reply_body', 'my_gwolle_gb_mail_author_on_admin_reply_body', 10,1 );
43
 
16
  ==Examples==
17
 
18
 
19
+ function my_gwolle_gb_mail_author_on_admin_reply_body( $body, $entry ) {
20
  // this is the default;
21
  $body = esc_html__("
22
  Hello,
39
 
40
  return $body;
41
  }
42
+ add_filter( 'gwolle_gb_mail_author_on_admin_reply_body', 'my_gwolle_gb_mail_author_on_admin_reply_body', 10, 2 );
43
 
docs/filters/gwolle_gb_mail_moderator_body.txt CHANGED
@@ -16,7 +16,7 @@ Where 'filter_function_name' is the function WordPress should call when the filt
16
  ==Examples==
17
 
18
 
19
- function my_gwolle_gb_mail_moderators_body( $body ) {
20
  // this is the default;
21
  $body = esc_html__("
22
  Hello,
@@ -39,5 +39,5 @@ Entry content:
39
 
40
  return $body;
41
  }
42
- add_filter( 'gwolle_gb_mail_moderators_body', 'my_gwolle_gb_mail_moderators_body', 10,1 );
43
 
16
  ==Examples==
17
 
18
 
19
+ function my_gwolle_gb_mail_moderators_body( $body, $entry ) {
20
  // this is the default;
21
  $body = esc_html__("
22
  Hello,
39
 
40
  return $body;
41
  }
42
+ add_filter( 'gwolle_gb_mail_moderators_body', 'my_gwolle_gb_mail_moderators_body', 10 ,2 );
43
 
frontend/gb-form.php CHANGED
@@ -119,7 +119,6 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
119
  * Button 'write a new entry.'
120
  * Only show when shortcode [gwolle_gb] is used and there are no errors.
121
  */
122
-
123
  $formclass = '';
124
  if ( ( $shortcode_atts['button'] == 'true' ) && ( ! $gwolle_gb_errors ) ) {
125
  $button = '
@@ -133,9 +132,8 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
133
 
134
 
135
  /*
136
- * Build up Form including possible error_fields
137
  */
138
-
139
  $form_setting = gwolle_gb_get_setting( 'form' );
140
  $autofocus = ' autofocus="autofocus"';
141
  if ( get_option( 'gwolle_gb-labels_float', 'true' ) === 'true' ) {
@@ -145,19 +143,21 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
145
  $formclass .= ' gwolle_gb_form_ajax gwolle-gb-form-ajax';
146
  }
147
 
148
- // Form for submitting new entries
149
  $header = gwolle_gb_sanitize_output( get_option('gwolle_gb-header', false) );
150
  if ( $header == false ) {
151
  $header = esc_html__('Write a new entry for the Guestbook', 'gwolle-gb');
152
  }
153
 
 
154
  if ( ( $shortcode_atts['button'] == 'true' ) ) {
155
- $output .= '
 
 
 
156
  <form id="gwolle_gb_new_entry" action="#" method="POST" class="' . $formclass . '">
157
  <h3>' . $header . '</h3>
158
- <button type="button" class="gb-notice-dismiss"><span class="screen-reader-text">' . esc_html__('Hide this form.', 'gwolle-gb') . '</span></button>
159
  <input type="hidden" name="gwolle_gb_function" id="gwolle_gb_function" value="add_entry" />';
160
- }
161
 
162
  // The book_id from the shortcode, to be used by the posthandling function again.
163
  $output .= '<input type="hidden" name="gwolle_gb_book_id" id="gwolle_gb_book_id" value="' . $shortcode_atts['book_id'] . '" />';
119
  * Button 'write a new entry.'
120
  * Only show when shortcode [gwolle_gb] is used and there are no errors.
121
  */
 
122
  $formclass = '';
123
  if ( ( $shortcode_atts['button'] == 'true' ) && ( ! $gwolle_gb_errors ) ) {
124
  $button = '
132
 
133
 
134
  /*
135
+ * Build up Form including possible error_fields.
136
  */
 
137
  $form_setting = gwolle_gb_get_setting( 'form' );
138
  $autofocus = ' autofocus="autofocus"';
139
  if ( get_option( 'gwolle_gb-labels_float', 'true' ) === 'true' ) {
143
  $formclass .= ' gwolle_gb_form_ajax gwolle-gb-form-ajax';
144
  }
145
 
 
146
  $header = gwolle_gb_sanitize_output( get_option('gwolle_gb-header', false) );
147
  if ( $header == false ) {
148
  $header = esc_html__('Write a new entry for the Guestbook', 'gwolle-gb');
149
  }
150
 
151
+ $screenreadertext = '';
152
  if ( ( $shortcode_atts['button'] == 'true' ) ) {
153
+ $screenreadertext = '<button type="button" class="gb-notice-dismiss"><span class="screen-reader-text">' . esc_html__('Hide this form.', 'gwolle-gb') . '</span></button>
154
+ ';
155
+ }
156
+ $output .= '
157
  <form id="gwolle_gb_new_entry" action="#" method="POST" class="' . $formclass . '">
158
  <h3>' . $header . '</h3>
159
+ ' . $screenreadertext . '
160
  <input type="hidden" name="gwolle_gb_function" id="gwolle_gb_function" value="add_entry" />';
 
161
 
162
  // The book_id from the shortcode, to be used by the posthandling function again.
163
  $output .= '<input type="hidden" name="gwolle_gb_book_id" id="gwolle_gb_book_id" value="' . $shortcode_atts['book_id'] . '" />';
frontend/js/gwolle-gb-frontend.js CHANGED
@@ -188,7 +188,7 @@ function gwolle_gb_timout_clock() {
188
  * AJAX Submit for Gwolle Guestbook Frontend.
189
  */
190
  var gwolle_gb_ajax_callback = jQuery.Callbacks(); // Callback function to be fired after AJAX request.
191
- // Use an object, arrays are only indexed by integers.
192
  var gwolle_gb_ajax_data = {
193
  permalink: window.location.href,
194
  action: 'gwolle_gb_form_ajax'
188
  * AJAX Submit for Gwolle Guestbook Frontend.
189
  */
190
  var gwolle_gb_ajax_callback = jQuery.Callbacks(); // Callback function to be fired after AJAX request.
191
+ // Use an object, arrays are only indexed by integers. This var is kept for compatibility with add-on 1.0.0 till 1.1.1.
192
  var gwolle_gb_ajax_data = {
193
  permalink: window.location.href,
194
  action: 'gwolle_gb_form_ajax'
functions/gb-class-entry.php CHANGED
@@ -436,10 +436,8 @@ class gwolle_gb_entry {
436
  }
437
  public function set_author_email($author_email) {
438
  $author_email = gwolle_gb_sanitize_input($author_email);
439
- $author_email = filter_var($author_email, FILTER_VALIDATE_EMAIL);
440
- if ($author_email) {
441
- $this->author_email = $author_email;
442
- }
443
  }
444
  public function set_author_origin($author_origin) {
445
  $author_origin = gwolle_gb_sanitize_input($author_origin);
436
  }
437
  public function set_author_email($author_email) {
438
  $author_email = gwolle_gb_sanitize_input($author_email);
439
+ //$author_email = filter_var($author_email, FILTER_VALIDATE_EMAIL);
440
+ $this->author_email = $author_email;
 
 
441
  }
442
  public function set_author_origin($author_origin) {
443
  $author_origin = gwolle_gb_sanitize_input($author_origin);
functions/gb-privacy.php CHANGED
@@ -305,9 +305,9 @@ function gwolle_gb_personal_data_eraser( $email_address, $page = 1 ) {
305
  function gwolle_gb_privacy_anonymize_entry( $entry ) {
306
  $entry->set_author_name( /* translators: Username */ __( 'Anonymous', 'gwolle-gb' ) );
307
  $entry->set_author_id( 0 );
308
- $entry->set_author_email( 'deleted@site.invalid' );
309
  $entry->set_author_origin( '' );
310
- $entry->set_author_website( 'https://site.invalid' );
311
  $entry->set_author_ip( '' );
312
  $entry->set_author_host( '' );
313
 
305
  function gwolle_gb_privacy_anonymize_entry( $entry ) {
306
  $entry->set_author_name( /* translators: Username */ __( 'Anonymous', 'gwolle-gb' ) );
307
  $entry->set_author_id( 0 );
308
+ $entry->set_author_email( '' );
309
  $entry->set_author_origin( '' );
310
+ $entry->set_author_website( '' );
311
  $entry->set_author_ip( '' );
312
  $entry->set_author_host( '' );
313
 
gwolle-gb.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Gwolle Guestbook
4
  Plugin URI: http://zenoweb.nl
5
  Description: Gwolle Guestbook is not just another guestbook for WordPress. The goal is to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.
6
- Version: 2.6.1
7
  Author: Marcel Pol
8
  Author URI: http://zenoweb.nl
9
  License: GPLv2 or later
@@ -32,7 +32,7 @@ Domain Path: /lang/
32
 
33
 
34
  // Plugin Version
35
- define('GWOLLE_GB_VER', '2.6.1');
36
 
37
 
38
  /*
@@ -62,6 +62,7 @@ define('GWOLLE_GB_VER', '2.6.1');
62
  * - Emoji: Sinterklaas and Zwarte Piet.
63
  * - Someday, do something with the REST API. Someday.
64
  * - Test and possibly add support for Gutenberg editor.
 
65
  *
66
  */
67
 
3
  Plugin Name: Gwolle Guestbook
4
  Plugin URI: http://zenoweb.nl
5
  Description: Gwolle Guestbook is not just another guestbook for WordPress. The goal is to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.
6
+ Version: 2.6.2
7
  Author: Marcel Pol
8
  Author URI: http://zenoweb.nl
9
  License: GPLv2 or later
32
 
33
 
34
  // Plugin Version
35
+ define('GWOLLE_GB_VER', '2.6.2');
36
 
37
 
38
  /*
62
  * - Emoji: Sinterklaas and Zwarte Piet.
63
  * - Someday, do something with the REST API. Someday.
64
  * - Test and possibly add support for Gutenberg editor.
65
+ * - Add <noscript> for when JS is disbaled.
66
  *
67
  */
68
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Gwolle, mpol
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, review
4
  Requires at least: 3.7
5
  Tested up to: 4.9
6
- Stable tag: 2.6.1
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
@@ -416,6 +416,11 @@ But if you don't use standard comments, you can just as easily use the comment s
416
 
417
  == Changelog ==
418
 
 
 
 
 
 
419
  = 2.6.1 =
420
  * 2018-07-09
421
  * Add screen-reader-text to frontend metabox.
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, review
4
  Requires at least: 3.7
5
  Tested up to: 4.9
6
+ Stable tag: 2.6.2
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
416
 
417
  == Changelog ==
418
 
419
+ = 2.6.2 =
420
+ * 2018-07-19
421
+ * Fix form for "button = false" forms.
422
+ * Don't replace author URL and email with anything (follow WP core 4.9.8).
423
+
424
  = 2.6.1 =
425
  * 2018-07-09
426
  * Add screen-reader-text to frontend metabox.