Gwolle Guestbook - Version 3.1.4

Version Description

  • 2019-05-03
  • Make it possible to set entry to moderated with the gwolle_gb_new_entry_frontend filter.
  • Update strings for add-on.
Download this release

Release Info

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

Code changes from version 3.1.3 to 3.1.4

add-on/gb-add-on.php CHANGED
@@ -36,7 +36,7 @@ function gwolle_gb_addon_translation_strings() {
36
  /* translators: Commercial Add-On: Settings page tab */
37
  esc_html_e('Strings', 'gwolle-gb');
38
  /* translators: Commercial Add-On: Settings page tab */
39
- esc_html_e('Ideas?', 'gwolle-gb');
40
 
41
  // function gwolle_gb_entry_metabox_lines_admin_reply( $gb_metabox, $entry ) {
42
  /* translators: Commercial Add-On */
@@ -110,10 +110,6 @@ Entry content:
110
  /* translators: Commercial Add-On. %s is a version number. */
111
  esc_html__( 'Gwolle Guestbook: The Add-On requires Gwolle Guestbook version %s. You have version %s. Go to your %sPlugins%s page to update Gwolle Guestbook.', 'gwolle-gb' );
112
 
113
- // function gwolle_gb_addon_page_settingstab_empty() {
114
- /* translators: Commercial Add-On. %s is a link. */
115
- esc_html__( 'Please place them on the %ssupport forum%s. I will see what I can do.', 'gwolle-gb' );
116
-
117
  // function gwolle_gb_addon_page_settingstab_form() {
118
  /* translators: Commercial Add-On */
119
  esc_html_e('Configure the extra fields that you want.', 'gwolle-gb');
@@ -246,6 +242,20 @@ Entry content:
246
  /* translators: Commercial Add-On */
247
  esc_html_e('+ Add new string.', 'gwolle-gb');
248
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  // gwolle_gb_addon_editor_metabox_meta()
250
  /* translators: Commercial Add-On, metabox on editor */
251
  esc_html__('Abuse Reports', 'gwolle-gb');
@@ -253,12 +263,6 @@ Entry content:
253
  esc_html__('Remove and moderate', 'gwolle-gb');
254
  /* translators: Commercial Add-On */
255
  esc_html__('Already moderated', 'gwolle-gb');
256
- /* translators: Commercial Add-On */
257
- esc_html_e('Enable report abuse link in Metabox.', 'gwolle-gb');
258
- /* translators: Commercial Add-On */
259
- esc_html_e('Vistors can report abusive entries through a link in the metabox.', 'gwolle-gb'); // in version 1.2.1 and older.
260
- /* translators: Commercial Add-On */
261
- esc_html_e('Visitors can report abusive entries through a link in the metabox.', 'gwolle-gb');
262
 
263
  // function gwolle_gb_addon_starrating_average_html()
264
  /* translators: Commercial Add-On. %s is the value/number of votes. */
36
  /* translators: Commercial Add-On: Settings page tab */
37
  esc_html_e('Strings', 'gwolle-gb');
38
  /* translators: Commercial Add-On: Settings page tab */
39
+ esc_html_e('Abuse', 'gwolle-gb');
40
 
41
  // function gwolle_gb_entry_metabox_lines_admin_reply( $gb_metabox, $entry ) {
42
  /* translators: Commercial Add-On */
110
  /* translators: Commercial Add-On. %s is a version number. */
111
  esc_html__( 'Gwolle Guestbook: The Add-On requires Gwolle Guestbook version %s. You have version %s. Go to your %sPlugins%s page to update Gwolle Guestbook.', 'gwolle-gb' );
112
 
 
 
 
 
113
  // function gwolle_gb_addon_page_settingstab_form() {
114
  /* translators: Commercial Add-On */
115
  esc_html_e('Configure the extra fields that you want.', 'gwolle-gb');
242
  /* translators: Commercial Add-On */
243
  esc_html_e('+ Add new string.', 'gwolle-gb');
244
 
245
+ // function gwolle_gb_addon_page_settingstab_abuse() {
246
+ /* translators: Commercial Add-On */
247
+ esc_html_e('Enable report abuse link in Metabox.', 'gwolle-gb');
248
+ /* translators: Commercial Add-On, obsoleted because of typo */
249
+ esc_html_e('Vistors can report abusive entries through a link in the metabox.', 'gwolle-gb'); // in version 1.2.1 and older.
250
+ /* translators: Commercial Add-On */
251
+ esc_html_e('Visitors can report abusive entries through a link in the metabox.', 'gwolle-gb');
252
+ /* translators: Commercial Add-On */
253
+ esc_html_e( 'Blacklist Moderation', 'gwolle-gb' );
254
+ /* translators: Commercial Add-On */
255
+ esc_html_e('Enter words for the blacklist.', 'gwolle-gb');
256
+ /* translators: Commercial Add-On */
257
+ esc_html_e( 'When an entry contains any of these words in its content, name, URL, email, or IP address, it will be held in the moderation queue. One word or IP address per line. It will match inside words, so “press” will match “WordPress”.', 'gwolle-gb' );
258
+
259
  // gwolle_gb_addon_editor_metabox_meta()
260
  /* translators: Commercial Add-On, metabox on editor */
261
  esc_html__('Abuse Reports', 'gwolle-gb');
263
  esc_html__('Remove and moderate', 'gwolle-gb');
264
  /* translators: Commercial Add-On */
265
  esc_html__('Already moderated', 'gwolle-gb');
 
 
 
 
 
 
266
 
267
  // function gwolle_gb_addon_starrating_average_html()
268
  /* translators: Commercial Add-On. %s is the value/number of votes. */
admin/gb-page-add-on.php CHANGED
@@ -85,6 +85,7 @@ function gwolle_gb_addon_features() {
85
  <li>' . esc_html__('Preview for the admin editor form.','gwolle-gb').'</li>
86
  <li>' . esc_html__('Admin reply on the frontend with AJAX.','gwolle-gb').'</li>
87
  <li>' . esc_html__('Report Abuse.','gwolle-gb').'</li>
 
88
  <li>' . esc_html__('Easy String Replacement in the default text so you can make this guestbook into a review section or anything you want.','gwolle-gb').'</li>
89
  <li>' . esc_html__('Delete button in each entry for the moderator and author (optional).','gwolle-gb').'</li>
90
  <li>' . esc_html__('Permalink button in each entry for easy access (optional).','gwolle-gb').'</li>
85
  <li>' . esc_html__('Preview for the admin editor form.','gwolle-gb').'</li>
86
  <li>' . esc_html__('Admin reply on the frontend with AJAX.','gwolle-gb').'</li>
87
  <li>' . esc_html__('Report Abuse.','gwolle-gb').'</li>
88
+ <li>' . esc_html__('Blacklist for words and IP address.','gwolle-gb').'</li>
89
  <li>' . esc_html__('Easy String Replacement in the default text so you can make this guestbook into a review section or anything you want.','gwolle-gb').'</li>
90
  <li>' . esc_html__('Delete button in each entry for the moderator and author (optional).','gwolle-gb').'</li>
91
  <li>' . esc_html__('Permalink button in each entry for easy access (optional).','gwolle-gb').'</li>
frontend/gb-form-posthandling.php CHANGED
@@ -200,6 +200,23 @@ function gwolle_gb_frontend_posthandling() {
200
  }
201
 
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  /*
204
  * Use this hook to do your own magic on the frontend submission.
205
  *
@@ -298,21 +315,6 @@ function gwolle_gb_frontend_posthandling() {
298
  }
299
 
300
 
301
- /* If Moderation is off, set it to "ischecked" */
302
- $user_id = get_current_user_id(); // Returns 0 if no current user.
303
- if ( get_option('gwolle_gb-moderate-entries', 'true') == 'true' ) {
304
- // Moderation, only set to checked for moderators.
305
- if ( gwolle_gb_is_moderator($user_id) ) {
306
- $entry->set_ischecked( true );
307
- } else {
308
- $entry->set_ischecked( false );
309
- }
310
- } else {
311
- // No moderation, set to checked.
312
- $entry->set_ischecked( true );
313
- }
314
-
315
-
316
  /* Scan for long and abusive text. */
317
  $marked_by_longtext = false;
318
  if ( get_option( 'gwolle_gb-longtext', 'true') == 'true' ) {
200
  }
201
 
202
 
203
+ /* If Moderation is off, set it to "ischecked"
204
+ * Do this before the gwolle_gb_new_entry_frontend hook, so we can change it again if a hook needs to.
205
+ */
206
+ $user_id = get_current_user_id(); // Returns 0 if no current user.
207
+ if ( get_option('gwolle_gb-moderate-entries', 'true') == 'true' ) {
208
+ // Moderation, only set to checked for moderators.
209
+ if ( gwolle_gb_is_moderator($user_id) ) {
210
+ $entry->set_ischecked( true );
211
+ } else {
212
+ $entry->set_ischecked( false );
213
+ }
214
+ } else {
215
+ // No moderation, set to checked.
216
+ $entry->set_ischecked( true );
217
+ }
218
+
219
+
220
  /*
221
  * Use this hook to do your own magic on the frontend submission.
222
  *
315
  }
316
 
317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  /* Scan for long and abusive text. */
319
  $marked_by_longtext = false;
320
  if ( get_option( 'gwolle_gb-longtext', 'true') == 'true' ) {
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: 3.1.3
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', '3.1.3');
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: 3.1.4
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', '3.1.4');
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: 5.2
6
- Stable tag: 3.1.3
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
@@ -83,6 +83,7 @@ Current features include:
83
  * Preview for the admin editor form.
84
  * Admin reply on the frontend with AJAX.
85
  * Report Abuse.
 
86
  * Easy String Replacement in the default text so you can make this guestbook into a review section or anything you want.
87
  * Delete button in each entry for the moderator and author (optional).
88
  * Permalink button in each entry for easy access (optional).
@@ -424,6 +425,11 @@ But if you don't use standard comments, you can just as easily use the comment s
424
 
425
  == Changelog ==
426
 
 
 
 
 
 
427
  = 3.1.3 =
428
  * 2019-04-16
429
  * Small fix for silly mistake.
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, review
4
  Requires at least: 3.7
5
  Tested up to: 5.2
6
+ Stable tag: 3.1.4
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
83
  * Preview for the admin editor form.
84
  * Admin reply on the frontend with AJAX.
85
  * Report Abuse.
86
+ * Blacklist for words and IP address.
87
  * Easy String Replacement in the default text so you can make this guestbook into a review section or anything you want.
88
  * Delete button in each entry for the moderator and author (optional).
89
  * Permalink button in each entry for easy access (optional).
425
 
426
  == Changelog ==
427
 
428
+ = 3.1.4 =
429
+ * 2019-05-03
430
+ * Make it possible to set entry to moderated with the gwolle_gb_new_entry_frontend filter.
431
+ * Update strings for add-on.
432
+
433
  = 3.1.3 =
434
  * 2019-04-16
435
  * Small fix for silly mistake.