Gwolle Guestbook - Version 2.6.3

Version Description

  • 2018-09-07
  • Better test if akismet is active.
  • Set timeout check from 7s to 4s.
  • Break email address in entries list as well.
  • Better CSS colors in admin overview.
  • Add support for Dark Mode beta plugin.
Download this release

Release Info

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

Code changes from version 2.6.2 to 2.6.3

add-on/gb-add-on.php CHANGED
@@ -167,6 +167,9 @@ Entry content:
167
  esc_html_e('This setting will enable automatic anonymization of entries older than a certain date.', 'gwolle-gb');
168
  /* translators: Commercial Add-On, option for auto anonymize */
169
  esc_html_e('Be very carefull with this option.', 'gwolle-gb');
 
 
 
170
 
171
  /* translators: Commercial Add-On */
172
  esc_html_e('Auto Delete', 'gwolle-gb');
@@ -257,6 +260,7 @@ Entry content:
257
 
258
  // function gwolle_gb_addon_add_privacy_policy_content() {
259
  /* translators: Commercial Add-On. Text for privacy policy. */
260
- __( 'When visitors report an entry as abusive, the entry ID will be stored in a cookie in the browser. For fallback, the IP address will be saved temporarily as a transient in the database together with the number of reports.', 'gwolle-gb' );
261
-
 
262
  }
167
  esc_html_e('This setting will enable automatic anonymization of entries older than a certain date.', 'gwolle-gb');
168
  /* translators: Commercial Add-On, option for auto anonymize */
169
  esc_html_e('Be very carefull with this option.', 'gwolle-gb');
170
+ /* translators: Commercial Add-On, option for auto anonymize */
171
+ esc_html_e('Auto Anonymize entries older than:', 'gwolle-gb');
172
+
173
 
174
  /* translators: Commercial Add-On */
175
  esc_html_e('Auto Delete', 'gwolle-gb');
260
 
261
  // function gwolle_gb_addon_add_privacy_policy_content() {
262
  /* translators: Commercial Add-On. Text for privacy policy. */
263
+ __( 'When visitors report an entry as abusive, the entry ID will be stored in a cookie in the browser. For fallback, the IP address will be saved temporarily as a transient in the database together with the number of reports.', 'gwolle-gb' ); // 1.2.1 and older
264
+ /* translators: Commercial Add-On. Text for privacy policy. */
265
+ __( 'When visitors report an entry as abusive, the entry ID will be stored in a cookie in the browser. Also, the IP address will be saved temporarily in the database together with the number of reports.', 'gwolle-gb' );
266
  }
admin/css/gwolle-gb-admin.css CHANGED
@@ -34,6 +34,28 @@ body #dashboard-widgets .postbox#gwolle_gb_notification ul {
34
  list-style-type: disc;
35
  padding-left: 14px;
36
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
 
39
  /* Editor.php */
@@ -113,7 +135,8 @@ body #dashboard-widgets .postbox#gwolle_gb_notification ul {
113
  .gwolle_gb .entry-author-name {
114
  min-width: 92px;
115
  }
116
- .gwolle_gb td.entry-author-name{
 
117
  word-break: break-word;
118
  }
119
  .gwolle_gb td.entry-content {
@@ -130,16 +153,19 @@ body #dashboard-widgets .postbox#gwolle_gb_notification ul {
130
  cursor: move;
131
  }
132
 
 
133
  .gwolle_gb #gwolle_gb_entries .admin-entry {
134
  color: #333;
135
  background-color: #e6e6e6;
136
  background-repeat: repeat-x;
137
- background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
138
- background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6);
139
- background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
140
- background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6);
141
  background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
142
  }
 
 
 
 
 
 
143
 
144
  /* Entries actions */
145
  td.gwolle_gb_actions {
34
  list-style-type: disc;
35
  padding-left: 14px;
36
  }
37
+ .gwolle-gb-overview td {
38
+ padding: 2px 6px;
39
+ }
40
+ #wpbody .gwolle-gb-overview tr.gwolle-gb-overview-all td.colored {
41
+ color: #0000f0;
42
+ }
43
+ #wpbody .gwolle-gb-overview tr.gwolle-gb-overview-checked td.colored {
44
+ color: #008000;;
45
+ }
46
+ #wpbody .gwolle-gb-overview tr.gwolle-gb-overview-unchecked td.colored {
47
+ color: #ff6f00;;
48
+ }
49
+ #wpbody .gwolle-gb-overview tr.gwolle-gb-overview-spam td.colored {
50
+ color: #FF0000;;
51
+ }
52
+ #wpbody .gwolle-gb-overview tr.gwolle-gb-overview-trash td.colored {
53
+ color: #FF0000;;
54
+ }
55
+ /* Dark Mode */
56
+ #wpbody .gwolle-gb-overview tr.gwolle-gb-overview-all td.colored {
57
+ color: #3030ff;
58
+ }
59
 
60
 
61
  /* Editor.php */
135
  .gwolle_gb .entry-author-name {
136
  min-width: 92px;
137
  }
138
+ .gwolle_gb td.entry-author-name {
139
+ word-break: break-all;
140
  word-break: break-word;
141
  }
142
  .gwolle_gb td.entry-content {
153
  cursor: move;
154
  }
155
 
156
+ /* Admin entry */
157
  .gwolle_gb #gwolle_gb_entries .admin-entry {
158
  color: #333;
159
  background-color: #e6e6e6;
160
  background-repeat: repeat-x;
 
 
 
 
161
  background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
162
  }
163
+ /* Dark Mode */
164
+ .dark-mode .gwolle_gb #gwolle_gb_entries .admin-entry {
165
+ border: 1px solid #191f25;
166
+ background-color: #32373c;
167
+ color: #bbc8dd;
168
+ }
169
 
170
  /* Entries actions */
171
  td.gwolle_gb_actions {
admin/gb-page-gwolle-gb.php CHANGED
@@ -91,71 +91,60 @@ function gwolle_gb_overview(){
91
  $count['all'] = gwolle_gb_get_entry_count(array( 'all' => 'all' ));
92
  ?>
93
 
94
- <div class="table table_content gwolle_gb">
95
  <h3><?php esc_html_e('Overview','gwolle-gb'); ?></h3>
96
 
97
  <table>
98
  <tbody>
99
- <tr class="first">
100
- <td class="first b">
101
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=all' ); ?>">
102
  <?php echo $count['all']; ?>
103
  </a>
104
  </td>
105
-
106
- <td class="t" style="color:#0000f0;">
107
  <?php echo _n( 'Entry total', 'Entries total', $count['all'], 'gwolle-gb' ); ?>
108
  </td>
109
- <td class="b"></td>
110
- <td class="last"></td>
111
  </tr>
112
 
113
- <tr>
114
- <td class="first b">
115
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=checked' ); ?>">
116
  <?php echo $count['checked']; ?>
117
  </a></td>
118
- <td class="t" style="color:#008000;">
119
  <?php echo _n( 'Unlocked entry', 'Unlocked entries', $count['checked'], 'gwolle-gb' ); ?>
120
  </td>
121
- <td class="b"></td>
122
- <td class="last"></td>
123
  </tr>
124
 
125
- <tr>
126
- <td class="first b">
127
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=unchecked' ); ?>">
128
  <?php echo $count['unchecked']; ?>
129
  </a></td>
130
- <td class="t" style="color:#ff6f00;">
131
  <?php echo _n( 'New entry', 'New entries', $count['unchecked'], 'gwolle-gb' ); ?>
132
  </td>
133
- <td class="b"></td>
134
- <td class="last"></td>
135
  </tr>
136
 
137
- <tr>
138
- <td class="first b">
139
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=spam' ); ?>">
140
  <?php echo $count['spam']; ?>
141
  </a></td>
142
- <td class="t" style="color:#FF0000;">
143
  <?php echo _n( 'Spam entry', 'Spam entries', $count['spam'], 'gwolle-gb' ); ?>
144
  </td>
145
- <td class="b"></td>
146
- <td class="last"></td>
147
  </tr>
148
 
149
- <tr>
150
- <td class="first b">
151
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=trash' ); ?>">
152
  <?php echo $count['trash']; ?>
153
  </a></td>
154
- <td class="t" style="color:#FF0000;">
155
  <?php echo _n( 'Trashed entry', 'Trashed entries', $count['trash'], 'gwolle-gb' ); ?>
156
  </td>
157
- <td class="b"></td>
158
- <td class="last"></td>
159
  </tr>
160
 
161
  </tbody>
91
  $count['all'] = gwolle_gb_get_entry_count(array( 'all' => 'all' ));
92
  ?>
93
 
94
+ <div class="table table_content gwolle_gb gwolle-gb-overview">
95
  <h3><?php esc_html_e('Overview','gwolle-gb'); ?></h3>
96
 
97
  <table>
98
  <tbody>
99
+ <tr class="gwolle-gb-overview-all">
100
+ <td>
101
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=all' ); ?>">
102
  <?php echo $count['all']; ?>
103
  </a>
104
  </td>
105
+ <td class="colored">
 
106
  <?php echo _n( 'Entry total', 'Entries total', $count['all'], 'gwolle-gb' ); ?>
107
  </td>
 
 
108
  </tr>
109
 
110
+ <tr class="gwolle-gb-overview-checked">
111
+ <td>
112
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=checked' ); ?>">
113
  <?php echo $count['checked']; ?>
114
  </a></td>
115
+ <td class="colored">
116
  <?php echo _n( 'Unlocked entry', 'Unlocked entries', $count['checked'], 'gwolle-gb' ); ?>
117
  </td>
 
 
118
  </tr>
119
 
120
+ <tr class="gwolle-gb-overview-unchecked">
121
+ <td>
122
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=unchecked' ); ?>">
123
  <?php echo $count['unchecked']; ?>
124
  </a></td>
125
+ <td class="colored">
126
  <?php echo _n( 'New entry', 'New entries', $count['unchecked'], 'gwolle-gb' ); ?>
127
  </td>
 
 
128
  </tr>
129
 
130
+ <tr class="gwolle-gb-overview-spam">
131
+ <td>
132
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=spam' ); ?>">
133
  <?php echo $count['spam']; ?>
134
  </a></td>
135
+ <td class="colored">
136
  <?php echo _n( 'Spam entry', 'Spam entries', $count['spam'], 'gwolle-gb' ); ?>
137
  </td>
 
 
138
  </tr>
139
 
140
+ <tr class="gwolle-gb-overview-trash">
141
+ <td>
142
  <a href="<?php echo admin_url( 'admin.php?page=' . GWOLLE_GB_FOLDER . '/entries.php&amp;show=trash' ); ?>">
143
  <?php echo $count['trash']; ?>
144
  </a></td>
145
+ <td class="colored">
146
  <?php echo _n( 'Trashed entry', 'Trashed entries', $count['trash'], 'gwolle-gb' ); ?>
147
  </td>
 
 
148
  </tr>
149
 
150
  </tbody>
frontend/gb-form-posthandling.php CHANGED
@@ -397,8 +397,8 @@ function gwolle_gb_frontend_posthandling() {
397
  // Input fields were filled in, so continue.
398
  $timeout = (int) $_POST["$field_name"];
399
  $timeout2 = (int) $_POST["$field_name2"];
400
- if ( ($timeout2 - $timeout) < 14 ) {
401
- // Submitted less then 7 seconds after loading. Considered spam.
402
  $entry->set_isspam(true);
403
  $marked_by_timeout = true;
404
  if (get_option( 'gwolle_gb-refuse-spam', 'false') == 'true') {
397
  // Input fields were filled in, so continue.
398
  $timeout = (int) $_POST["$field_name"];
399
  $timeout2 = (int) $_POST["$field_name2"];
400
+ if ( ($timeout2 - $timeout) < 8 ) {
401
+ // Submitted less then 4 seconds after loading. Considered spam.
402
  $entry->set_isspam(true);
403
  $marked_by_timeout = true;
404
  if (get_option( 'gwolle_gb-refuse-spam', 'false') == 'true') {
frontend/gb-form.php CHANGED
@@ -148,15 +148,15 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
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.
148
  $header = esc_html__('Write a new entry for the Guestbook', 'gwolle-gb');
149
  }
150
 
151
+ $hidebutton = '';
152
  if ( ( $shortcode_atts['button'] == 'true' ) ) {
153
+ $hidebutton = '<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
+ ' . $hidebutton . '
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.
functions/gb-akismet.php CHANGED
@@ -30,13 +30,17 @@ function gwolle_gb_akismet( $entry, $action ) {
30
  'submit-spam'
31
  );
32
 
33
- if ( !in_array( $action, $actions ) ) {
 
 
 
 
 
34
  return false;
35
  }
36
 
37
  $akismet_active = get_option( 'gwolle_gb-akismet-active', 'false' );
38
  if ( $akismet_active != 'true' ) {
39
- // Akismet is not active, so we don't do anything
40
  return false;
41
  }
42
 
@@ -46,12 +50,12 @@ function gwolle_gb_akismet( $entry, $action ) {
46
  $api_key = (bool) akismet_get_key();
47
  }
48
 
49
- if ( !$api_key ) {
50
  // No api key, no glory
51
  return false;
52
  }
53
 
54
- if ( !is_object( $entry ) ) {
55
  // No object, no fuss
56
  return false;
57
  }
30
  'submit-spam'
31
  );
32
 
33
+ if ( ! in_array( $action, $actions ) ) {
34
+ return false;
35
+ }
36
+
37
+ $active_plugins = get_option('active_plugins');
38
+ if ( ! in_array('akismet/akismet.php', $active_plugins)) {
39
  return false;
40
  }
41
 
42
  $akismet_active = get_option( 'gwolle_gb-akismet-active', 'false' );
43
  if ( $akismet_active != 'true' ) {
 
44
  return false;
45
  }
46
 
50
  $api_key = (bool) akismet_get_key();
51
  }
52
 
53
+ if ( ! $api_key ) {
54
  // No api key, no glory
55
  return false;
56
  }
57
 
58
+ if ( ! is_object( $entry ) ) {
59
  // No object, no fuss
60
  return false;
61
  }
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.2
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.2');
36
 
37
 
38
  /*
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.3
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.3');
36
 
37
 
38
  /*
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.2
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,14 @@ But if you don't use standard comments, you can just as easily use the comment s
416
 
417
  == Changelog ==
418
 
 
 
 
 
 
 
 
 
419
  = 2.6.2 =
420
  * 2018-07-19
421
  * Fix form for "button = false" forms.
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.3
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.3 =
420
+ * 2018-09-07
421
+ * Better test if akismet is active.
422
+ * Set timeout check from 7s to 4s.
423
+ * Break email address in entries list as well.
424
+ * Better CSS colors in admin overview.
425
+ * Add support for Dark Mode beta plugin.
426
+
427
  = 2.6.2 =
428
  * 2018-07-19
429
  * Fix form for "button = false" forms.