Gwolle Guestbook - Version 2.3.2

Version Description

  • 2017-09-06
  • Editor: also save when no change was made.
  • Add total counter to frontend list.
Download this release

Release Info

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

Code changes from version 2.3.1 to 2.3.2

admin/gb-page-editor.php CHANGED
@@ -33,7 +33,7 @@ function gwolle_gb_page_editor() {
33
  }
34
  if ( isset($entry_id) && $entry_id > 0 ) {
35
  $result = $entry->load( $entry_id );
36
- if ( !$result ) {
37
  $gwolle_gb_messages .= '<p class="error">' . esc_html__('Entry could not be found.', 'gwolle-gb') . '</p>';
38
  $gwolle_gb_errors = 'error';
39
  $sectionHeading = esc_html__('Guestbook entry (error)', 'gwolle-gb');
@@ -66,12 +66,6 @@ function gwolle_gb_page_editor() {
66
  $gwolle_gb_errors = 'error';
67
  } else if ( $_POST['entry_id'] > 0 && $entry->get_id() > 0 && $continue_on_nonce_checked ) {
68
 
69
- /*
70
- * Check for changes, and update accordingly. This is on an Existing Entry!
71
- */
72
-
73
- $changed = false;
74
-
75
  /* Set as checked or unchecked, and by whom */
76
  if ( isset($_POST['ischecked']) && $_POST['ischecked'] == 'on' ) {
77
  if ( $_POST['ischecked'] == 'on' && $entry->get_ischecked() == 0 ) {
@@ -80,12 +74,10 @@ function gwolle_gb_page_editor() {
80
  $entry->set_checkedby( $user_id );
81
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-checked' );
82
  gwolle_gb_clear_cache( $entry );
83
- $changed = true;
84
  }
85
  } else if ( $entry->get_ischecked() == 1 ) {
86
  $entry->set_ischecked( false );
87
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-unchecked' );
88
- $changed = true;
89
  }
90
 
91
  /* Set as spam or not, and submit as ham or spam to Akismet service */
@@ -97,7 +89,6 @@ function gwolle_gb_page_editor() {
97
  $gwolle_gb_messages .= '<p>' . esc_html__('Submitted as Spam to the Akismet service.', 'gwolle-gb') . '</p>';
98
  }
99
  gwolle_gb_add_log_entry( $entry->get_id(), 'marked-as-spam' );
100
- $changed = true;
101
  }
102
  } else if ( $entry->get_isspam() == 1 ) {
103
  $entry->set_isspam( false );
@@ -106,7 +97,6 @@ function gwolle_gb_page_editor() {
106
  $gwolle_gb_messages .= '<p>' . esc_html__('Submitted as Ham to the Akismet service.', 'gwolle-gb') . '</p>';
107
  }
108
  gwolle_gb_add_log_entry( $entry->get_id(), 'marked-as-not-spam' );
109
- $changed = true;
110
  }
111
 
112
  /* Set as trash or not */
@@ -114,12 +104,10 @@ function gwolle_gb_page_editor() {
114
  if ( $_POST['istrash'] == 'on' && $entry->get_istrash() == 0 ) {
115
  $entry->set_istrash( true );
116
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-trashed' );
117
- $changed = true;
118
  }
119
  } else if ( $entry->get_istrash() == 1 ) {
120
  $entry->set_istrash( false );
121
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-untrashed' );
122
- $changed = true;
123
  }
124
 
125
  /* Check if the content changed, and update accordingly */
@@ -127,7 +115,6 @@ function gwolle_gb_page_editor() {
127
  if ( trim($_POST['gwolle_gb_content']) != $entry->get_content() ) {
128
  $entry_content = gwolle_gb_maybe_encode_emoji( $_POST['gwolle_gb_content'], 'content' );
129
  $entry->set_content( $entry_content );
130
- $changed = true;
131
  }
132
  }
133
 
@@ -139,7 +126,6 @@ function gwolle_gb_page_editor() {
139
  }
140
  if ( $website != $entry->get_author_website() ) {
141
  $entry->set_author_website( $website );
142
- $changed = true;
143
  }
144
 
145
  /* Check if the author_origin changed, and update accordingly */
@@ -147,7 +133,6 @@ function gwolle_gb_page_editor() {
147
  if ( $_POST['gwolle_gb_author_origin'] != $entry->get_author_origin() ) {
148
  $entry_origin = gwolle_gb_maybe_encode_emoji( $_POST['gwolle_gb_author_origin'], 'author_origin' );
149
  $entry->set_author_origin( $entry_origin );
150
- $changed = true;
151
  }
152
  }
153
 
@@ -165,7 +150,6 @@ function gwolle_gb_page_editor() {
165
  gwolle_gb_add_log_entry( $entry->get_id(), 'admin-reply-updated' );
166
  }
167
  $entry->set_admin_reply( $gwolle_gb_admin_reply );
168
- $changed = true;
169
  }
170
  }
171
 
@@ -181,7 +165,6 @@ function gwolle_gb_page_editor() {
181
  if ( $_POST['gwolle_gb_author_name'] != $entry->get_author_name() ) {
182
  $entry_name = gwolle_gb_maybe_encode_emoji( $_POST['gwolle_gb_author_name'], 'author_name' );
183
  $entry->set_author_name( $entry_name );
184
- $changed = true;
185
  }
186
  }
187
 
@@ -189,7 +172,6 @@ function gwolle_gb_page_editor() {
189
  if ( isset($_POST['gwolle_gb_timestamp']) && is_numeric($_POST['gwolle_gb_timestamp']) ) {
190
  if ( $_POST['gwolle_gb_timestamp'] != $entry->get_datetime() ) {
191
  $entry->set_datetime( (int) $_POST['gwolle_gb_timestamp'] );
192
- $changed = true;
193
  }
194
  }
195
 
@@ -197,25 +179,21 @@ function gwolle_gb_page_editor() {
197
  if ( isset($_POST['gwolle_gb_book_id']) && is_numeric($_POST['gwolle_gb_book_id']) ) {
198
  if ( $_POST['gwolle_gb_book_id'] != $entry->get_book_id() ) {
199
  $entry->set_book_id( (int) $_POST['gwolle_gb_book_id'] );
200
- $changed = true;
201
  }
202
  }
203
 
204
  /* Save the entry */
205
- if ( $changed ) {
206
- $result = $entry->save();
207
- if ($result ) {
208
- gwolle_gb_add_log_entry( $entry->get_id(), 'entry-edited' );
209
- $gwolle_gb_messages .= '<p>' . esc_html__('Changes saved.', 'gwolle-gb') . '</p>';
210
- do_action( 'gwolle_gb_save_entry_admin', $entry );
211
- } else {
212
- $gwolle_gb_messages .= '<p>' . esc_html__('Error happened during saving.', 'gwolle-gb') . '</p>';
213
- $gwolle_gb_errors = 'error';
214
- }
215
  } else {
216
- $gwolle_gb_messages .= '<p>' . esc_html__('Entry was not changed.', 'gwolle-gb') . '</p>';
 
217
  }
218
 
 
219
  /* Remove permanently */
220
  if ( isset($_POST['istrash']) && $_POST['istrash'] == 'on' && isset($_POST['remove']) && $_POST['remove'] == 'on' ) {
221
  if ( $entry->get_istrash() == 1 ) {
33
  }
34
  if ( isset($entry_id) && $entry_id > 0 ) {
35
  $result = $entry->load( $entry_id );
36
+ if ( ! $result ) {
37
  $gwolle_gb_messages .= '<p class="error">' . esc_html__('Entry could not be found.', 'gwolle-gb') . '</p>';
38
  $gwolle_gb_errors = 'error';
39
  $sectionHeading = esc_html__('Guestbook entry (error)', 'gwolle-gb');
66
  $gwolle_gb_errors = 'error';
67
  } else if ( $_POST['entry_id'] > 0 && $entry->get_id() > 0 && $continue_on_nonce_checked ) {
68
 
 
 
 
 
 
 
69
  /* Set as checked or unchecked, and by whom */
70
  if ( isset($_POST['ischecked']) && $_POST['ischecked'] == 'on' ) {
71
  if ( $_POST['ischecked'] == 'on' && $entry->get_ischecked() == 0 ) {
74
  $entry->set_checkedby( $user_id );
75
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-checked' );
76
  gwolle_gb_clear_cache( $entry );
 
77
  }
78
  } else if ( $entry->get_ischecked() == 1 ) {
79
  $entry->set_ischecked( false );
80
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-unchecked' );
 
81
  }
82
 
83
  /* Set as spam or not, and submit as ham or spam to Akismet service */
89
  $gwolle_gb_messages .= '<p>' . esc_html__('Submitted as Spam to the Akismet service.', 'gwolle-gb') . '</p>';
90
  }
91
  gwolle_gb_add_log_entry( $entry->get_id(), 'marked-as-spam' );
 
92
  }
93
  } else if ( $entry->get_isspam() == 1 ) {
94
  $entry->set_isspam( false );
97
  $gwolle_gb_messages .= '<p>' . esc_html__('Submitted as Ham to the Akismet service.', 'gwolle-gb') . '</p>';
98
  }
99
  gwolle_gb_add_log_entry( $entry->get_id(), 'marked-as-not-spam' );
 
100
  }
101
 
102
  /* Set as trash or not */
104
  if ( $_POST['istrash'] == 'on' && $entry->get_istrash() == 0 ) {
105
  $entry->set_istrash( true );
106
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-trashed' );
 
107
  }
108
  } else if ( $entry->get_istrash() == 1 ) {
109
  $entry->set_istrash( false );
110
  gwolle_gb_add_log_entry( $entry->get_id(), 'entry-untrashed' );
 
111
  }
112
 
113
  /* Check if the content changed, and update accordingly */
115
  if ( trim($_POST['gwolle_gb_content']) != $entry->get_content() ) {
116
  $entry_content = gwolle_gb_maybe_encode_emoji( $_POST['gwolle_gb_content'], 'content' );
117
  $entry->set_content( $entry_content );
 
118
  }
119
  }
120
 
126
  }
127
  if ( $website != $entry->get_author_website() ) {
128
  $entry->set_author_website( $website );
 
129
  }
130
 
131
  /* Check if the author_origin changed, and update accordingly */
133
  if ( $_POST['gwolle_gb_author_origin'] != $entry->get_author_origin() ) {
134
  $entry_origin = gwolle_gb_maybe_encode_emoji( $_POST['gwolle_gb_author_origin'], 'author_origin' );
135
  $entry->set_author_origin( $entry_origin );
 
136
  }
137
  }
138
 
150
  gwolle_gb_add_log_entry( $entry->get_id(), 'admin-reply-updated' );
151
  }
152
  $entry->set_admin_reply( $gwolle_gb_admin_reply );
 
153
  }
154
  }
155
 
165
  if ( $_POST['gwolle_gb_author_name'] != $entry->get_author_name() ) {
166
  $entry_name = gwolle_gb_maybe_encode_emoji( $_POST['gwolle_gb_author_name'], 'author_name' );
167
  $entry->set_author_name( $entry_name );
 
168
  }
169
  }
170
 
172
  if ( isset($_POST['gwolle_gb_timestamp']) && is_numeric($_POST['gwolle_gb_timestamp']) ) {
173
  if ( $_POST['gwolle_gb_timestamp'] != $entry->get_datetime() ) {
174
  $entry->set_datetime( (int) $_POST['gwolle_gb_timestamp'] );
 
175
  }
176
  }
177
 
179
  if ( isset($_POST['gwolle_gb_book_id']) && is_numeric($_POST['gwolle_gb_book_id']) ) {
180
  if ( $_POST['gwolle_gb_book_id'] != $entry->get_book_id() ) {
181
  $entry->set_book_id( (int) $_POST['gwolle_gb_book_id'] );
 
182
  }
183
  }
184
 
185
  /* Save the entry */
186
+ $result = $entry->save();
187
+ if ($result ) {
188
+ gwolle_gb_add_log_entry( $entry->get_id(), 'entry-edited' );
189
+ $gwolle_gb_messages .= '<p>' . esc_html__('Changes saved.', 'gwolle-gb') . '</p>';
190
+ do_action( 'gwolle_gb_save_entry_admin', $entry );
 
 
 
 
 
191
  } else {
192
+ $gwolle_gb_messages .= '<p>' . esc_html__('Error happened during saving.', 'gwolle-gb') . '</p>';
193
+ $gwolle_gb_errors = 'error';
194
  }
195
 
196
+
197
  /* Remove permanently */
198
  if ( isset($_POST['istrash']) && $_POST['istrash'] == 'on' && isset($_POST['remove']) && $_POST['remove'] == 'on' ) {
199
  if ( $entry->get_istrash() == 1 ) {
admin/gb-page-gwolle-gb.php CHANGED
@@ -30,7 +30,7 @@ function gwolle_gb_welcome() {
30
 
31
  add_meta_box('gwolle_gb_help', esc_html__('Help', 'gwolle-gb'), 'gwolle_gb_overview_help', 'gwolle_gb_welcome', 'right');
32
  add_meta_box('gwolle_gb_support', esc_html__('Support and Translations', 'gwolle-gb'), 'gwolle_gb_overview_support', 'gwolle_gb_welcome', 'right');
33
- add_meta_box('gwolle_gb_donate', esc_html__('Review and Donate', 'gwolle-gb'), 'gwolle_gb_overview_donate', 'gwolle_gb_welcome', 'right');
34
 
35
  ?>
36
  <div class="wrap gwolle_gb">
@@ -175,11 +175,11 @@ function gwolle_gb_overview(){
175
  $permalinks = $wp_rewrite->permalink_structure;
176
  if ( $permalinks ) {
177
  ?>
178
- <a href="<?php bloginfo('url'); ?>/feed/gwolle_gb" /><?php esc_html_e('Subscribe to RSS Feed', 'gwolle-gb'); ?></a>
179
  <?php
180
  } else {
181
  ?>
182
- <a href="<?php bloginfo('url'); ?>/?feed=gwolle_gb" /><?php esc_html_e('Subscribe to RSS Feed', 'gwolle-gb'); ?></a>
183
  <?php
184
  } ?>
185
  </p>
@@ -206,26 +206,24 @@ function gwolle_gb_overview_notification() {
206
  }
207
  }
208
  } ?>
209
- <p>
210
- <form name="gwolle_gb_welcome" method="post" action="">
211
- <?php
212
- settings_fields( 'gwolle_gb_options' );
213
- do_settings_sections( 'gwolle_gb_options' );
214
-
215
- /* Nonce */
216
- $nonce = wp_create_nonce( 'gwolle_gb_page_gwolle' );
217
- echo '<input type="hidden" id="gwolle_gb_wpnonce" name="gwolle_gb_wpnonce" value="' . $nonce . '" />';
218
- ?>
219
- <input name="notify_by_mail" type="checkbox" id="notify_by_mail" <?php
220
- if ( $currentUserNotification ) {
221
- echo 'checked="checked"';
222
- } ?> >
223
- <label for="notify_by_mail" class="setting-description"><?php esc_html_e('Send me an e-mail when a new entry has been posted.', 'gwolle-gb'); ?></label>
224
- <p class="submit">
225
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save setting', 'gwolle-gb'); ?>" />
226
- </p>
227
- </form>
228
- </p>
229
  <div>
230
  <?php esc_html_e('The following users have subscribed to this service:', 'gwolle-gb');
231
 
@@ -320,18 +318,6 @@ function gwolle_gb_overview_donate() {
320
  $review = 'https://wordpress.org/support/view/plugin-reviews/gwolle-gb?rate=5#postform';
321
  echo sprintf( __( 'If this plugin has any value to you, then please leave a review at <a href="%s" target="_blank">the plugin page at wordpress.org</a>.', 'gwolle-gb' ), $review ); ?>
322
  </p>
323
-
324
- <h3><?php esc_html_e('Donate to the maintainer.', 'gwolle-gb'); ?></h3>
325
- <p><?php
326
- $link = 'http://zenoweb.nl';
327
- $name = 'ZenoWeb';
328
- echo sprintf( __( 'This plugin is being maintained by Marcel Pol from <a href="%s" target="_blank">%s</a>.', 'gwolle-gb' ), $link, $name ); ?></br />
329
- <?php
330
- $link = '<a href="https://www.paypal.com" target="_blank">';
331
- $link_end = '</a>';
332
- $email = 'marcel@timelord.nl';
333
- echo sprintf( esc_html__( 'If you want to donate to the maintainer of the plugin, you can donate through %sPayPal%s to %s.', 'gwolle-gb' ), $link, $link_end, $email ); ?>
334
- </p>
335
  <?php
336
  }
337
 
30
 
31
  add_meta_box('gwolle_gb_help', esc_html__('Help', 'gwolle-gb'), 'gwolle_gb_overview_help', 'gwolle_gb_welcome', 'right');
32
  add_meta_box('gwolle_gb_support', esc_html__('Support and Translations', 'gwolle-gb'), 'gwolle_gb_overview_support', 'gwolle_gb_welcome', 'right');
33
+ add_meta_box('gwolle_gb_donate', esc_html__('Review', 'gwolle-gb'), 'gwolle_gb_overview_donate', 'gwolle_gb_welcome', 'right');
34
 
35
  ?>
36
  <div class="wrap gwolle_gb">
175
  $permalinks = $wp_rewrite->permalink_structure;
176
  if ( $permalinks ) {
177
  ?>
178
+ <a href="<?php bloginfo('url'); ?>/feed/gwolle_gb"><?php esc_html_e('Subscribe to RSS Feed', 'gwolle-gb'); ?></a>
179
  <?php
180
  } else {
181
  ?>
182
+ <a href="<?php bloginfo('url'); ?>/?feed=gwolle_gb"><?php esc_html_e('Subscribe to RSS Feed', 'gwolle-gb'); ?></a>
183
  <?php
184
  } ?>
185
  </p>
206
  }
207
  }
208
  } ?>
209
+ <form name="gwolle_gb_welcome" method="post" action="">
210
+ <?php
211
+ settings_fields( 'gwolle_gb_options' );
212
+ do_settings_sections( 'gwolle_gb_options' );
213
+
214
+ /* Nonce */
215
+ $nonce = wp_create_nonce( 'gwolle_gb_page_gwolle' );
216
+ echo '<input type="hidden" id="gwolle_gb_wpnonce" name="gwolle_gb_wpnonce" value="' . $nonce . '" />';
217
+ ?>
218
+ <input name="notify_by_mail" type="checkbox" id="notify_by_mail" <?php
219
+ if ( $currentUserNotification ) {
220
+ echo 'checked="checked"';
221
+ } ?> >
222
+ <label for="notify_by_mail" class="setting-description"><?php esc_html_e('Send me an e-mail when a new entry has been posted.', 'gwolle-gb'); ?></label>
223
+ <p class="submit">
224
+ <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save setting', 'gwolle-gb'); ?>" />
225
+ </p>
226
+ </form>
 
 
227
  <div>
228
  <?php esc_html_e('The following users have subscribed to this service:', 'gwolle-gb');
229
 
318
  $review = 'https://wordpress.org/support/view/plugin-reviews/gwolle-gb?rate=5#postform';
319
  echo sprintf( __( 'If this plugin has any value to you, then please leave a review at <a href="%s" target="_blank">the plugin page at wordpress.org</a>.', 'gwolle-gb' ), $review ); ?>
320
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
321
  <?php
322
  }
323
 
docs/import_example/gwolle_gb_export_1.6.9_2016-05-06_20-38.csv DELETED
@@ -1,3 +0,0 @@
1
- id,author_name,author_email,author_origin,author_website,author_ip,author_host,content,datetime,isspam,ischecked,istrash,admin_reply
2
- 1,"Marcel Pol",marcel@timelord.nl,Zwolle,http://timelord.nl,192.168.1.254,timelord.nl,"Test entry, delete if you wish.",1462567132,0,0,1,"Just a test"
3
- 2,"Marcel Pol",marcel@timelord.nl,Zwolle,http://timelord.nl,192.168.1.254,timelord.nl,"Test entry, delete if you wish. 😄👍👌",1462567132,0,0,1,"Just a test"
 
 
 
docs/import_example/gwolle_gb_export_2.2.1_2017-09-04_08-33-part_1_of_1.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ id,author_name,author_email,author_origin,author_website,author_ip,author_host,content,datetime,isspam,ischecked,istrash,admin_reply
2
+ 13,You,test@example.com,Zwolle,http://example.com,127.0.0.1,example.com,"Testbericht, verwijder het als je dat wilt. 😄👍👌",1504521217,0,0,1,"Alleen maar een test"
3
+ 12,You,test@example.com,Zwolle,http://example.com,127.0.0.1,example.com,"Testbericht, verwijder het als je dat wilt.",1504521217,0,0,1,"Alleen maar een test"
frontend/gb-total.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ *
4
+ */
5
+
6
+
7
+ // No direct calls to this script
8
+ if ( strpos($_SERVER['PHP_SELF'], basename(__FILE__) )) {
9
+ die('No direct calls allowed!');
10
+ }
11
+
12
+
13
+ /*
14
+ * Display the total number of entries.
15
+ *
16
+ * @param string $html html content of the filter.
17
+ * array $args the parameters of the query for visible entries
18
+ * @return array
19
+ *
20
+ * @since 2.3.2
21
+ */
22
+ function gwolle_gb_addon_get_total_entries( $html, $args ) {
23
+ $key = 'gwolle_gb_frontend_pagination_book_' . $args['book_id'];
24
+ $entries_total = get_transient( $key );
25
+ if ( false === $entries_total ) {
26
+ $entries_total = gwolle_gb_get_entry_count(
27
+ array(
28
+ 'checked' => 'checked',
29
+ 'trash' => 'notrash',
30
+ 'spam' => 'nospam',
31
+ 'book_id' => $args['book_id']
32
+ )
33
+ );
34
+ set_transient( $key, $entries_total, DAY_IN_SECONDS );
35
+ }
36
+ $html .= '<div id="gwolle-gb-total">' .
37
+ sprintf( _n( '%d entry.', '%d entries.', $entries_total, 'gwolle-gb' ), $entries_total )
38
+ . '</div>';
39
+ return $html;
40
+ }
41
+ add_filter( 'gwolle_gb_entries_list_before', 'gwolle_gb_addon_get_total_entries', 8, 2 );
functions/gb-class-entry.php CHANGED
@@ -321,11 +321,12 @@ class gwolle_gb_entry {
321
  }
322
 
323
 
324
- if ($result > 0) {
325
- return $this->get_id();
 
326
  }
327
 
328
- return false;
329
  }
330
 
331
 
321
  }
322
 
323
 
324
+ if ( $result === false ) {
325
+ // result = 0 when no change was made. We still want to return the ID.
326
+ return false;
327
  }
328
 
329
+ return $this->get_id();
330
  }
331
 
332
 
gwolle-gb-hooks.php CHANGED
@@ -38,9 +38,10 @@ function gwolle_gb_adminmenu() {
38
 
39
  // Main navigation entry
40
  // Admin page: admin/welcome.php
 
41
  add_menu_page(
42
  esc_html__('Guestbook', 'gwolle-gb'), /* translators: Menu entry */
43
- esc_html__('Guestbook', 'gwolle-gb') . "<span class='awaiting-mod count-" . $count_unchecked . "'><span>" . $count_unchecked . "</span></span>",
44
  'moderate_comments',
45
  GWOLLE_GB_FOLDER . '/gwolle-gb.php',
46
  'gwolle_gb_welcome',
@@ -48,10 +49,11 @@ function gwolle_gb_adminmenu() {
48
  );
49
 
50
  // Admin page: admin/entries.php
 
51
  add_submenu_page(
52
  GWOLLE_GB_FOLDER . '/gwolle-gb.php',
53
  esc_html__('Entries', 'gwolle-gb'), /* translators: Menu entry */
54
- esc_html__('Entries', 'gwolle-gb') . "<span class='awaiting-mod count-" . $count_unchecked . "'><span>" . $count_unchecked . "</span></span>",
55
  'moderate_comments',
56
  GWOLLE_GB_FOLDER . '/entries.php',
57
  'gwolle_gb_page_entries'
38
 
39
  // Main navigation entry
40
  // Admin page: admin/welcome.php
41
+ $menu_text = esc_html__('Guestbook', 'gwolle-gb') . '<span class="awaiting-mod count-' . $count_unchecked . '"><span>' . $count_unchecked . '</span></span>';
42
  add_menu_page(
43
  esc_html__('Guestbook', 'gwolle-gb'), /* translators: Menu entry */
44
+ $menu_text,
45
  'moderate_comments',
46
  GWOLLE_GB_FOLDER . '/gwolle-gb.php',
47
  'gwolle_gb_welcome',
49
  );
50
 
51
  // Admin page: admin/entries.php
52
+ $menu_text = esc_html__('Entries', 'gwolle-gb') . '<span class="awaiting-mod count-' . $count_unchecked . '"><span>' . $count_unchecked . '</span></span>';
53
  add_submenu_page(
54
  GWOLLE_GB_FOLDER . '/gwolle-gb.php',
55
  esc_html__('Entries', 'gwolle-gb'), /* translators: Menu entry */
56
+ $menu_text,
57
  'moderate_comments',
58
  GWOLLE_GB_FOLDER . '/entries.php',
59
  'gwolle_gb_page_entries'
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.3.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.3.1');
36
 
37
 
38
  /*
@@ -91,6 +91,7 @@ include_once( GWOLLE_GB_DIR . '/frontend/gb-shortcodes.php' );
91
  include_once( GWOLLE_GB_DIR . '/frontend/gb-pagination.php' );
92
  include_once( GWOLLE_GB_DIR . '/frontend/gb-read.php' );
93
  include_once( GWOLLE_GB_DIR . '/frontend/gb-rss.php' );
 
94
  include_once( GWOLLE_GB_DIR . '/frontend/gb-widget.php' );
95
 
96
  // Functions and pages for the backend
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.3.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.3.2');
36
 
37
 
38
  /*
91
  include_once( GWOLLE_GB_DIR . '/frontend/gb-pagination.php' );
92
  include_once( GWOLLE_GB_DIR . '/frontend/gb-read.php' );
93
  include_once( GWOLLE_GB_DIR . '/frontend/gb-rss.php' );
94
+ include_once( GWOLLE_GB_DIR . '/frontend/gb-total.php' );
95
  include_once( GWOLLE_GB_DIR . '/frontend/gb-widget.php' );
96
 
97
  // Functions and pages for the backend
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Gwolle, mpol
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, libro de visitas
4
  Requires at least: 3.7
5
  Tested up to: 4.8
6
- Stable tag: 2.3.1
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
@@ -369,6 +369,11 @@ But if you don't use standard comments, you can just as easily use the comment s
369
 
370
  == Changelog ==
371
 
 
 
 
 
 
372
  = 2.3.1 =
373
  * 2017-08-29
374
  * Use correct class for menu-counters.
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, libro de visitas
4
  Requires at least: 3.7
5
  Tested up to: 4.8
6
+ Stable tag: 2.3.2
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
369
 
370
  == Changelog ==
371
 
372
+ = 2.3.2 =
373
+ * 2017-09-06
374
+ * Editor: also save when no change was made.
375
+ * Add total counter to frontend list.
376
+
377
  = 2.3.1 =
378
  * 2017-08-29
379
  * Use correct class for menu-counters.