Gwolle Guestbook - Version 4.3.0

Version Description

  • 2022-09-01
  • Dependency for jquery should be an array.
  • Make sure setting for admin list is always shown correctly.
  • Move setting for antispam security question to antispam settings tab.
  • Set max-height for images as well.
  • Add class to form if user is logged in or not.
  • Add 'clear:both' to metabox lines.
  • Support Siteground Cache plugin for clearing cache.
  • Use html5 on all themes.
  • Add filter 'gwolle_gb_header_text'.
  • Add function 'widget_single_view()' to widget to avoid duplicate code.
  • Only use 'gwolle_gb_ajax_callback' for callbacks.
  • Update strings for add-on.
Download this release

Release Info

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

Code changes from version 4.2.2 to 4.3.0

add-on/gb-add-on.php CHANGED
@@ -76,6 +76,29 @@ Entry content:
76
  "
77
  , 'gwolle-gb');
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  // function gwolle_gb_entry_metabox_lines_delete_link( $gb_metabox, $entry ) {
80
  /* translators: Commercial Add-On */
81
  esc_attr__('Delete entry', 'gwolle-gb');
@@ -244,7 +267,10 @@ Entry content:
244
  /* translators: Commercial Add-On */
245
  esc_html_e('None.','gwolle-gb');
246
  /* translators: Commercial Add-On */
247
- esc_html_e('There are no Meta Fields saved yet. Please go to the Form tab, enter a field and save it.','gwolle-gb');
 
 
 
248
 
249
  // function gwolle_gb_addon_page_settingstab_social() {
250
  /* translators: Commercial Add-On */
76
  "
77
  , 'gwolle-gb');
78
 
79
+ /* translators: Commercial Add-On, mail notification on media upload */
80
+ esc_html__("
81
+ Hello,
82
+
83
+ An image has been uploaded into the Media Library at %blog_name%.
84
+
85
+ Media Library: %media_library%.
86
+ Image file: %attachment_src_large%.
87
+ Attachment ID: %attachment_id%.
88
+
89
+ Have a nice day.
90
+ Your Gwolle-GB-Mailer
91
+
92
+
93
+ Website address: %blog_url%
94
+ User name: %user_name%
95
+ User email: %user_email%
96
+ User IP address: %author_ip%
97
+ ", 'gwolle-gb');
98
+ /* translators: Commercial Add-On, mail notification on media upload */
99
+ esc_html__('Media file was uploaded for the guestbook', 'gwolle-gb');
100
+
101
+
102
  // function gwolle_gb_entry_metabox_lines_delete_link( $gb_metabox, $entry ) {
103
  /* translators: Commercial Add-On */
104
  esc_attr__('Delete entry', 'gwolle-gb');
267
  /* translators: Commercial Add-On */
268
  esc_html_e('None.','gwolle-gb');
269
  /* translators: Commercial Add-On */
270
+ esc_html_e('Which fields should be added to the guestbook widget.', 'gwolle-gb');
271
+ /* translators: Commercial Add-On */
272
+ esc_html_e('There are no Meta Fields saved yet. Please go to the Form tab, enter a field and save it.', 'gwolle-gb');
273
+
274
 
275
  // function gwolle_gb_addon_page_settingstab_social() {
276
  /* translators: Commercial Add-On */
admin/gb-page-add-on.php CHANGED
@@ -86,6 +86,7 @@ function gwolle_gb_addon_features() {
86
  <li>' . esc_html__('Like an entry and view likes for each entry.', 'gwolle-gb') . '</li>
87
  <li>' . esc_html__('Preview for the frontend form.', 'gwolle-gb') . '</li>
88
  <li>' . esc_html__('Preview for the admin editor form.', 'gwolle-gb') . '</li>
 
89
  <li>' . esc_html__('Admin reply on the frontend with AJAX.', 'gwolle-gb') . '</li>
90
  <li>' . esc_html__('Edit content/author/origin of entry on the frontend with AJAX.', 'gwolle-gb') . '</li>
91
  <li>' . esc_html__('Report Abuse.', 'gwolle-gb') . '</li>
86
  <li>' . esc_html__('Like an entry and view likes for each entry.', 'gwolle-gb') . '</li>
87
  <li>' . esc_html__('Preview for the frontend form.', 'gwolle-gb') . '</li>
88
  <li>' . esc_html__('Preview for the admin editor form.', 'gwolle-gb') . '</li>
89
+ <li>' . esc_html__('Automatic Refresh of guestbook list with new entries.', 'gwolle-gb') . '</li>
90
  <li>' . esc_html__('Admin reply on the frontend with AJAX.', 'gwolle-gb') . '</li>
91
  <li>' . esc_html__('Edit content/author/origin of entry on the frontend with AJAX.', 'gwolle-gb') . '</li>
92
  <li>' . esc_html__('Report Abuse.', 'gwolle-gb') . '</li>
admin/gb-page-settings.php CHANGED
@@ -171,6 +171,7 @@ function gwolle_gb_page_settings_update() {
171
  gwolle_gb_add_message( '<p>' . esc_html__('IP address and hostname was removed from all the entries.', 'gwolle-gb') . '</p>', false, false);
172
  }
173
 
 
174
  $list = array(
175
  'form_name_enabled',
176
  'form_name_mandatory',
@@ -184,7 +185,6 @@ function gwolle_gb_page_settings_update() {
184
  'form_message_mandatory',
185
  'form_message_maxlength',
186
  'form_bbcode_enabled',
187
- 'form_antispam_enabled',
188
  'form_privacy_enabled',
189
  );
190
  $form_setting = array();
@@ -196,6 +196,10 @@ function gwolle_gb_page_settings_update() {
196
  $form_setting["$item"] = 'false';
197
  }
198
  }
 
 
 
 
199
  // select with options, 0 is default.
200
  if ( isset($_POST['form_message_maxlength']) && is_numeric($_POST['form_message_maxlength']) && $_POST['form_message_maxlength'] > 0 ) {
201
  $form_setting['form_message_maxlength'] = (int) $_POST['form_message_maxlength'];
@@ -371,6 +375,14 @@ function gwolle_gb_page_settings_update() {
371
  update_option('gwolle_gb-sfs', 'false');
372
  }
373
 
 
 
 
 
 
 
 
 
374
  if ( isset($_POST['antispam-question']) ) {
375
  update_option('gwolle_gb-antispam-question', gwolle_gb_sanitize_input($_POST['antispam-question']));
376
  }
171
  gwolle_gb_add_message( '<p>' . esc_html__('IP address and hostname was removed from all the entries.', 'gwolle-gb') . '</p>', false, false);
172
  }
173
 
174
+ $form_setting_from_db = gwolle_gb_get_setting( 'form' );
175
  $list = array(
176
  'form_name_enabled',
177
  'form_name_mandatory',
185
  'form_message_mandatory',
186
  'form_message_maxlength',
187
  'form_bbcode_enabled',
 
188
  'form_privacy_enabled',
189
  );
190
  $form_setting = array();
196
  $form_setting["$item"] = 'false';
197
  }
198
  }
199
+
200
+ /* form-antispam-enabled moved to antispam tab, simply restore it here from old setting. */
201
+ $form_setting['form_antispam_enabled'] = $form_setting_from_db['form_antispam_enabled'];
202
+
203
  // select with options, 0 is default.
204
  if ( isset($_POST['form_message_maxlength']) && is_numeric($_POST['form_message_maxlength']) && $_POST['form_message_maxlength'] > 0 ) {
205
  $form_setting['form_message_maxlength'] = (int) $_POST['form_message_maxlength'];
375
  update_option('gwolle_gb-sfs', 'false');
376
  }
377
 
378
+ $form_setting = gwolle_gb_get_setting( 'form' );
379
+ if ( isset($_POST['form-antispam-enabled']) && $_POST['form-antispam-enabled'] === 'on' ) {
380
+ $form_setting['form_antispam_enabled'] = 'true';
381
+ } else {
382
+ $form_setting['form_antispam_enabled'] = 'false';
383
+ }
384
+ update_option( 'gwolle_gb-form', $form_setting );
385
+
386
  if ( isset($_POST['antispam-question']) ) {
387
  update_option('gwolle_gb-antispam-question', gwolle_gb_sanitize_input($_POST['antispam-question']));
388
  }
admin/tabs/gb-admintab.php CHANGED
@@ -34,7 +34,8 @@ function gwolle_gb_page_settingstab_admin() {
34
  <th scope="row"><label for="entries_per_page"><?php esc_html_e('Entries per page in the admin', 'gwolle-gb'); ?></label></th>
35
  <td>
36
  <select name="entries_per_page" id="entries_per_page">
37
- <?php $entries_per_page = get_option( 'gwolle_gb-entries_per_page', 20 );
 
38
  $presets = array( 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100, 120, 150, 200, 250 );
39
  $presets_count = count($presets);
40
  for ($i = 0; $i < $presets_count; $i++) {
34
  <th scope="row"><label for="entries_per_page"><?php esc_html_e('Entries per page in the admin', 'gwolle-gb'); ?></label></th>
35
  <td>
36
  <select name="entries_per_page" id="entries_per_page">
37
+ <?php
38
+ $entries_per_page = (int) get_option( 'gwolle_gb-entries_per_page', 20 );
39
  $presets = array( 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100, 120, 150, 200, 250 );
40
  $presets_count = count($presets);
41
  for ($i = 0; $i < $presets_count; $i++) {
admin/tabs/gb-antispamtab.php CHANGED
@@ -233,13 +233,21 @@ function gwolle_gb_page_settingstab_antispam() {
233
  </tr>
234
 
235
  <?php
 
236
  $antispam_question = gwolle_gb_sanitize_output( get_option('gwolle_gb-antispam-question') );
237
  $antispam_answer = gwolle_gb_sanitize_output( get_option('gwolle_gb-antispam-answer') );
238
  ?>
239
  <tr>
240
- <th scope="row"><label for="antispam-question"><?php esc_html_e('Custom Anti-Spam Security Question', 'gwolle-gb'); ?></label></th>
241
  <td>
242
  <div>
 
 
 
 
 
 
 
243
  <label for="antispam-question" class="setting-description"><?php esc_html_e('Custom security question to battle spam:', 'gwolle-gb'); ?></label><br />
244
  <input name="antispam-question" type="text" id="antispam-question" value="<?php echo esc_attr( $antispam_question ); ?>" class="regular-text" placeholder="<?php esc_attr_e('12 + six =', 'gwolle-gb'); ?>" /><br />
245
  <label for="antispam-answer" class="setting-description"><?php esc_html_e('The answer to your security question:', 'gwolle-gb'); ?></label><br />
233
  </tr>
234
 
235
  <?php
236
+ $form_setting = gwolle_gb_get_setting( 'form' );
237
  $antispam_question = gwolle_gb_sanitize_output( get_option('gwolle_gb-antispam-question') );
238
  $antispam_answer = gwolle_gb_sanitize_output( get_option('gwolle_gb-antispam-answer') );
239
  ?>
240
  <tr>
241
+ <th scope="row"><label for="form-antispam-enabled"><?php esc_html_e('Security Question', 'gwolle-gb'); ?></label></th>
242
  <td>
243
  <div>
244
+ <input type="checkbox" id="form-antispam-enabled" name="form-antispam-enabled"<?php
245
+ if ( isset($form_setting['form_antispam_enabled']) && $form_setting['form_antispam_enabled'] === 'true' ) {
246
+ echo ' checked="checked"';
247
+ }
248
+ ?> />
249
+ <label for="form-antispam-enabled"><?php esc_html_e('Use Custom Anti-Spam Security Question.', 'gwolle-gb'); ?></label><br />
250
+
251
  <label for="antispam-question" class="setting-description"><?php esc_html_e('Custom security question to battle spam:', 'gwolle-gb'); ?></label><br />
252
  <input name="antispam-question" type="text" id="antispam-question" value="<?php echo esc_attr( $antispam_question ); ?>" class="regular-text" placeholder="<?php esc_attr_e('12 + six =', 'gwolle-gb'); ?>" /><br />
253
  <label for="antispam-answer" class="setting-description"><?php esc_html_e('The answer to your security question:', 'gwolle-gb'); ?></label><br />
admin/tabs/gb-formtab.php CHANGED
@@ -290,21 +290,6 @@ We reserve the right to edit, delete, or not publish entries.
290
  </td>
291
  </tr>
292
 
293
- <tr>
294
- <th scope="row"><label for="form_antispam_enabled"><?php esc_html_e('Custom Anti-spam', 'gwolle-gb'); ?>:</label></th>
295
- <td>
296
- <input type="checkbox" id="form_antispam_enabled" name="form_antispam_enabled"<?php
297
- if ( isset($form_setting['form_antispam_enabled']) && $form_setting['form_antispam_enabled'] === 'true' ) {
298
- echo ' checked="checked"';
299
- }
300
- ?> />
301
- <label for="form_antispam_enabled"><?php esc_html_e('Enabled', 'gwolle-gb'); ?></label>
302
- </td>
303
- <td>
304
- <?php esc_html_e('When enabled it is mandatory.', 'gwolle-gb'); ?>
305
- </td>
306
- </tr>
307
-
308
  <tr>
309
  <th scope="row"><label for="form_privacy_enabled"><?php esc_html_e('Privacy checkbox', 'gwolle-gb'); ?>:</label></th>
310
  <td>
290
  </td>
291
  </tr>
292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  <tr>
294
  <th scope="row"><label for="form_privacy_enabled"><?php esc_html_e('Privacy checkbox', 'gwolle-gb'); ?>:</label></th>
295
  <td>
docs/filters/gwolle_gb_header_text.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ==Description==
4
+
5
+ The <b>"gwolle_gb_header_text"</b> filter is used to change the header for the form at the frontend.
6
+
7
+ You can use this filter as:
8
+
9
+ <code><?php add_filter( 'gwolle_gb_header_text', 'filter_function_name' ) ?></code>
10
+
11
+ Where 'filter_function_name' is the function WordPress should call when the filter is being used.
12
+
13
+ '''filter_function_name''' should be a unique function name. It cannot match any other function name already declared.
14
+
15
+
16
+ ==Examples==
17
+
18
+
19
+ function my_gwolle_gb_header_text( $header_text ) {
20
+ // $header_text is a string
21
+
22
+ // value from the settings page:
23
+ //$header_text = gwolle_gb_sanitize_output( get_option('gwolle_gb-header', false) );
24
+
25
+ // default text if no setting was saved:
26
+ //$header_text = esc_html__('Write a new entry for the Guestbook', 'gwolle-gb');
27
+
28
+ $header_text = 'Write a new message.';
29
+
30
+ return $header_text;
31
+
32
+ }
33
+ add_filter( 'gwolle_gb_header_text', 'my_gwolle_gb_header_text', 10, 1 );
34
+
frontend/css/gwolle-gb-frontend.css CHANGED
@@ -242,6 +242,7 @@ body .gwolle-gb-content a {
242
  }
243
  .gwolle-gb .gb-entry .gb-entry-content img {
244
  max-width: 100%;
 
245
  }
246
  .gwolle-gb .gb-entry .gb-highlight {
247
  background-color: #ddff00;
@@ -285,6 +286,7 @@ div.gb-metabox-line {
285
  background-color: #fff;
286
  color: #333;
287
  box-sizing: border-box;
 
288
  }
289
  div.gb-metabox-line a {
290
  text-decoration: none;
242
  }
243
  .gwolle-gb .gb-entry .gb-entry-content img {
244
  max-width: 100%;
245
+ max-height: 500px;
246
  }
247
  .gwolle-gb .gb-entry .gb-highlight {
248
  background-color: #ddff00;
286
  background-color: #fff;
287
  color: #333;
288
  box-sizing: border-box;
289
+ clear: both;
290
  }
291
  div.gb-metabox-line a {
292
  text-decoration: none;
frontend/gb-form.php CHANGED
@@ -22,7 +22,6 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
22
  $gwolle_gb_error_fields = gwolle_gb_get_error_fields();
23
  $gwolle_gb_formdata = gwolle_gb_get_formdata();
24
 
25
- $html5 = current_theme_supports( 'html5' );
26
  $output = '';
27
  $button_class = (string) apply_filters( 'gwolle_gb_button_class', '' );
28
 
@@ -146,11 +145,20 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
146
  if ( get_option( 'gwolle_gb-form_ajax', 'true' ) === 'true' ) {
147
  $formclass .= ' gwolle_gb_form_ajax gwolle-gb-form-ajax gwolle-gb-ajax';
148
  }
 
 
 
 
 
149
 
 
 
 
150
  $header = gwolle_gb_sanitize_output( get_option('gwolle_gb-header', false) );
151
  if ( $header === false ) {
152
  $header = esc_html__('Write a new entry for the Guestbook', 'gwolle-gb');
153
  }
 
154
 
155
  $hidebutton = '';
156
  if ( ( $shortcode_atts['button'] === 'true' ) ) {
@@ -237,7 +245,7 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
237
  if (in_array($field_name, $gwolle_gb_error_fields)) {
238
  $output .= ' error';
239
  }
240
- $output .= '" value="' . esc_attr( $email ) . '" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' name="' . esc_attr( $field_name ) . '"';
241
  if ( in_array($field_name, $gwolle_gb_error_fields) && isset($autofocus) ) {
242
  $output .= $autofocus;
243
  $autofocus = false; // disable it for the next error.
@@ -269,7 +277,7 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
269
  if (in_array($field_name, $gwolle_gb_error_fields)) {
270
  $output .= ' error';
271
  }
272
- $output .= '" value="' . esc_attr( $website ) . '" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' name="' . esc_attr( $field_name ) . '"';
273
  if ( in_array($field_name, $gwolle_gb_error_fields) && isset($autofocus) ) {
274
  $output .= $autofocus;
275
  $autofocus = false; // disable it for the next error.
22
  $gwolle_gb_error_fields = gwolle_gb_get_error_fields();
23
  $gwolle_gb_formdata = gwolle_gb_get_formdata();
24
 
 
25
  $output = '';
26
  $button_class = (string) apply_filters( 'gwolle_gb_button_class', '' );
27
 
145
  if ( get_option( 'gwolle_gb-form_ajax', 'true' ) === 'true' ) {
146
  $formclass .= ' gwolle_gb_form_ajax gwolle-gb-form-ajax gwolle-gb-ajax';
147
  }
148
+ if ( is_user_logged_in() ) {
149
+ $formclass .= ' gwolle-gb-logged-in';
150
+ } else {
151
+ $formclass .= ' gwolle-gb-not-logged-in';
152
+ }
153
 
154
+ /*
155
+ * Header text 'Write a new entry for the Guestbook'
156
+ */
157
  $header = gwolle_gb_sanitize_output( get_option('gwolle_gb-header', false) );
158
  if ( $header === false ) {
159
  $header = esc_html__('Write a new entry for the Guestbook', 'gwolle-gb');
160
  }
161
+ $header = apply_filters( 'gwolle_gb_header_text', $header);
162
 
163
  $hidebutton = '';
164
  if ( ( $shortcode_atts['button'] === 'true' ) ) {
245
  if (in_array($field_name, $gwolle_gb_error_fields)) {
246
  $output .= ' error';
247
  }
248
+ $output .= '" value="' . esc_attr( $email ) . '" type="email" name="' . esc_attr( $field_name ) . '"';
249
  if ( in_array($field_name, $gwolle_gb_error_fields) && isset($autofocus) ) {
250
  $output .= $autofocus;
251
  $autofocus = false; // disable it for the next error.
277
  if (in_array($field_name, $gwolle_gb_error_fields)) {
278
  $output .= ' error';
279
  }
280
+ $output .= '" value="' . esc_attr( $website ) . '" type="url" name="' . esc_attr( $field_name ) . '"';
281
  if ( in_array($field_name, $gwolle_gb_error_fields) && isset($autofocus) ) {
282
  $output .= $autofocus;
283
  $autofocus = false; // disable it for the next error.
frontend/gb-read.php CHANGED
@@ -27,6 +27,8 @@ function gwolle_gb_frontend_read( $shortcode_atts, $shortcode ) {
27
  /* Show single entry if requested and is not search. */
28
  if ( ( (int) $shortcode_atts['entry_id'] > 0 && ! $is_search ) || ( isset($_GET['entry_id']) && (int) $_GET['entry_id'] > 0 && ! $is_search ) ) {
29
 
 
 
30
  if ( (int) $shortcode_atts['entry_id'] > 0 ) {
31
  $entry_id = (int) $shortcode_atts['entry_id'];
32
  } else {
@@ -115,6 +117,11 @@ function gwolle_gb_frontend_read( $shortcode_atts, $shortcode ) {
115
  $offset = ( $page_num - 1 ) * $num_entries;
116
  }
117
 
 
 
 
 
 
118
 
119
  /* Get the entries for the frontend */
120
  if ( $is_search ) {
@@ -185,7 +192,8 @@ function gwolle_gb_frontend_read( $shortcode_atts, $shortcode ) {
185
  } else {
186
  $first = true;
187
 
188
- $output .= '<div class="' . esc_attr( $entries_list_class ) . '" data-book_id="' . (int) $shortcode_atts['book_id'] . '">';
 
189
 
190
  $args = array(
191
  'checked' => 'checked',
27
  /* Show single entry if requested and is not search. */
28
  if ( ( (int) $shortcode_atts['entry_id'] > 0 && ! $is_search ) || ( isset($_GET['entry_id']) && (int) $_GET['entry_id'] > 0 && ! $is_search ) ) {
29
 
30
+ $entries_list_class .= ' gwolle-gb-single-entry';
31
+
32
  if ( (int) $shortcode_atts['entry_id'] > 0 ) {
33
  $entry_id = (int) $shortcode_atts['entry_id'];
34
  } else {
117
  $offset = ( $page_num - 1 ) * $num_entries;
118
  }
119
 
120
+ if ( $is_search ) {
121
+ $entries_list_class .= ' gwolle-gb-entries-list-search';
122
+ } else {
123
+ $entries_list_class .= ' gwolle-gb-entries-list';
124
+ }
125
 
126
  /* Get the entries for the frontend */
127
  if ( $is_search ) {
192
  } else {
193
  $first = true;
194
 
195
+ $output .= '<div class="' . esc_attr( $entries_list_class ) . '" data-book_id="' . (int) $shortcode_atts['book_id'] . '" data-page_id="' . (int) $page_num . '">
196
+ ';
197
 
198
  $args = array(
199
  'checked' => 'checked',
frontend/gb-shortcode-widget.php CHANGED
@@ -54,8 +54,6 @@ function get_gwolle_gb_shortcode_widget( $atts ) {
54
  $num_words = $shortcode_atts['num_words'];
55
  $postid = 0;
56
 
57
- $html5 = current_theme_supports( 'html5' );
58
-
59
  $widget_class = 'gwolle_gb_widget gwolle-gb-widget';
60
  $widget_class = apply_filters( 'gwolle_gb_widget_list_class', $widget_class );
61
  $widget_item_class = 'gwolle_gb_widget gwolle-gb-widget';
@@ -85,10 +83,8 @@ function get_gwolle_gb_shortcode_widget( $atts ) {
85
  $widget_html .= '
86
  <li class="' . $widget_item_class . '">';
87
 
88
- if ( $html5 ) {
89
- $widget_html .= '
90
  <article>';
91
- }
92
 
93
  // Use this filter to just add something
94
  $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_before', '', $entry );
@@ -115,10 +111,8 @@ function get_gwolle_gb_shortcode_widget( $atts ) {
115
  // Use this filter to just add something
116
  $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_after', '', $entry );
117
 
118
- if ( $html5 ) {
119
- $widget_html .= '
120
  </article>';
121
- }
122
 
123
  $widget_html .= '
124
  </li>';
54
  $num_words = $shortcode_atts['num_words'];
55
  $postid = 0;
56
 
 
 
57
  $widget_class = 'gwolle_gb_widget gwolle-gb-widget';
58
  $widget_class = apply_filters( 'gwolle_gb_widget_list_class', $widget_class );
59
  $widget_item_class = 'gwolle_gb_widget gwolle-gb-widget';
83
  $widget_html .= '
84
  <li class="' . $widget_item_class . '">';
85
 
86
+ $widget_html .= '
 
87
  <article>';
 
88
 
89
  // Use this filter to just add something
90
  $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_before', '', $entry );
111
  // Use this filter to just add something
112
  $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_after', '', $entry );
113
 
114
+ $widget_html .= '
 
115
  </article>';
 
116
 
117
  $widget_html .= '
118
  </li>';
frontend/gb-widget.php CHANGED
@@ -59,8 +59,6 @@ if (function_exists('register_sidebar') && class_exists('WP_Widget')) {
59
  $link_text = esc_attr($instance['link_text']);
60
  $postid = (int) esc_attr($instance['postid']);
61
 
62
- $html5 = current_theme_supports( 'html5' );
63
-
64
  // Prepare for SSS Slider. Registers Script with WordPress to wp_footer().
65
  $widget_class = 'gwolle_gb_widget gwolle-gb-widget';
66
  if ( $slider ) {
@@ -79,7 +77,7 @@ if (function_exists('register_sidebar') && class_exists('WP_Widget')) {
79
  $widget_html .= '
80
  <div class="gwolle_gb_widget gwolle-gb-widget">';
81
 
82
- if ($widget_title !== FALSE) {
83
  $widget_html .= $args['before_title'] . apply_filters('widget_title', $widget_title) . $args['after_title'];
84
  }
85
 
@@ -109,59 +107,8 @@ if (function_exists('register_sidebar') && class_exists('WP_Widget')) {
109
  // No entry loaded
110
  continue;
111
  }
112
- // Main Content
113
- $widget_html .= '
114
- <li class="' . $widget_item_class . '">';
115
-
116
- if ( $html5 ) {
117
- $widget_html .= '
118
- <article>';
119
- }
120
 
121
- // Use this filter to just add something
122
- $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_before', '', $entry );
123
-
124
- if ( $name ) {
125
- $widget_html .= '
126
- <span class="gb-author-name">' . $entry->get_author_name() . '</span>';
127
- }
128
- if ( $name && $date ) {
129
- $widget_html .= '<span class="gb-author-date-separator"> / </span>';
130
- }
131
- if ( $date ) {
132
- $widget_html .= '
133
- <span class="gb-date">' . date_i18n( get_option('date_format'), $entry->get_datetime() ) . '</span>';
134
- }
135
- if ( $name || $date ) {
136
- $widget_html .= '<br />';
137
- }
138
-
139
- if ( $num_words > 0 ) {
140
- $entry_content = gwolle_gb_get_excerpt( gwolle_gb_bbcode_strip( $entry->get_content() ), $num_words );
141
- } else {
142
- $entry_content = gwolle_gb_bbcode_strip( $entry->get_content() );
143
- }
144
- if ( get_option('gwolle_gb-showSmilies', 'true') === 'true' ) {
145
- $entry_content = convert_smilies($entry_content);
146
- }
147
- $widget_html .= '
148
- <span class="gb-entry-content">' . $entry_content . $link;
149
-
150
- // Use this filter to just add something
151
- $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_content', '', $entry );
152
-
153
- $widget_html .= '</span>';
154
-
155
- // Use this filter to just add something
156
- $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_after', '', $entry );
157
-
158
- if ( $html5 ) {
159
- $widget_html .= '
160
- </article>';
161
- }
162
-
163
- $widget_html .= '
164
- </li>';
165
 
166
  $counter++;
167
  }
@@ -188,59 +135,8 @@ if (function_exists('register_sidebar') && class_exists('WP_Widget')) {
188
  if ( is_array( $best) && in_array( $entry->get_id(), $best ) ) {
189
  continue; // already listed
190
  }
191
- // Main Content
192
- $widget_html .= '
193
- <li class="' . $widget_item_class . '">';
194
-
195
- if ( $html5 ) {
196
- $widget_html .= '
197
- <article>';
198
- }
199
-
200
- // Use this filter to just add something
201
- $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_before', '', $entry );
202
-
203
- if ( $name ) {
204
- $widget_html .= '
205
- <span class="gb-author-name">' . $entry->get_author_name() . '</span>';
206
- }
207
- if ( $name && $date ) {
208
- $widget_html .= '<span class="gb-author-date-separator"> / </span>';
209
- }
210
- if ( $date ) {
211
- $widget_html .= '
212
- <span class="gb-date">' . date_i18n( get_option('date_format'), $entry->get_datetime() ) . '</span>';
213
- }
214
- if ( $name || $date ) {
215
- $widget_html .= '<br />';
216
- }
217
-
218
- if ( $num_words > 0 ) {
219
- $entry_content = gwolle_gb_get_excerpt( gwolle_gb_bbcode_strip( $entry->get_content() ), $num_words );
220
- } else {
221
- $entry_content = gwolle_gb_bbcode_strip( $entry->get_content() );
222
- }
223
- if ( get_option('gwolle_gb-showSmilies', 'true') === 'true' ) {
224
- $entry_content = convert_smilies($entry_content);
225
- }
226
- $widget_html .= '
227
- <span class="gb-entry-content">' . $entry_content . $link;
228
-
229
- // Use this filter to just add something
230
- $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_content', '', $entry );
231
-
232
- $widget_html .= '</span>';
233
-
234
- // Use this filter to just add something
235
- $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_after', '', $entry );
236
-
237
- if ( $html5 ) {
238
- $widget_html .= '
239
- </article>';
240
- }
241
 
242
- $widget_html .= '
243
- </li>';
244
 
245
  $counter++;
246
  }
@@ -273,6 +169,65 @@ if (function_exists('register_sidebar') && class_exists('WP_Widget')) {
273
  }
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  /** @see WP_Widget::update */
277
  public function update( $new_instance, $old_instance ) {
278
  $instance = $old_instance;
59
  $link_text = esc_attr($instance['link_text']);
60
  $postid = (int) esc_attr($instance['postid']);
61
 
 
 
62
  // Prepare for SSS Slider. Registers Script with WordPress to wp_footer().
63
  $widget_class = 'gwolle_gb_widget gwolle-gb-widget';
64
  if ( $slider ) {
77
  $widget_html .= '
78
  <div class="gwolle_gb_widget gwolle-gb-widget">';
79
 
80
+ if ($widget_title !== false) {
81
  $widget_html .= $args['before_title'] . apply_filters('widget_title', $widget_title) . $args['after_title'];
82
  }
83
 
107
  // No entry loaded
108
  continue;
109
  }
 
 
 
 
 
 
 
 
110
 
111
+ $widget_html .= $this->widget_single_view( $entry, $instance, $widget_item_class, $link );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  $counter++;
114
  }
135
  if ( is_array( $best) && in_array( $entry->get_id(), $best ) ) {
136
  continue; // already listed
137
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
+ $widget_html .= $this->widget_single_view( $entry, $instance, $widget_item_class, $link );
 
140
 
141
  $counter++;
142
  }
169
  }
170
  }
171
 
172
+ public function widget_single_view( $entry, $instance, $widget_item_class, $link ) {
173
+
174
+ $name = (int) esc_attr($instance['name']);
175
+ $date = (int) esc_attr($instance['date']);
176
+ $num_words = (int) esc_attr($instance['num_words']);
177
+
178
+ $widget_html = '
179
+ <li class="' . $widget_item_class . '">';
180
+
181
+ $widget_html .= '
182
+ <article>';
183
+
184
+ // Use this filter to just add something
185
+ $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_before', '', $entry );
186
+
187
+ if ( $name ) {
188
+ $widget_html .= '
189
+ <span class="gb-author-name">' . $entry->get_author_name() . '</span>';
190
+ }
191
+ if ( $name && $date ) {
192
+ $widget_html .= '<span class="gb-author-date-separator"> / </span>';
193
+ }
194
+ if ( $date ) {
195
+ $widget_html .= '
196
+ <span class="gb-date">' . date_i18n( get_option('date_format'), $entry->get_datetime() ) . '</span>';
197
+ }
198
+ if ( $name || $date ) {
199
+ $widget_html .= '<br />';
200
+ }
201
+
202
+ if ( $num_words > 0 ) {
203
+ $entry_content = gwolle_gb_get_excerpt( gwolle_gb_bbcode_strip( $entry->get_content() ), $num_words );
204
+ } else {
205
+ $entry_content = gwolle_gb_bbcode_strip( $entry->get_content() );
206
+ }
207
+ if ( get_option('gwolle_gb-showSmilies', 'true') === 'true' ) {
208
+ $entry_content = convert_smilies($entry_content);
209
+ }
210
+ $widget_html .= '
211
+ <span class="gb-entry-content">' . $entry_content . $link;
212
+
213
+ // Use this filter to just add something
214
+ $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_content', '', $entry );
215
+
216
+ $widget_html .= '</span>';
217
+
218
+ // Use this filter to just add something
219
+ $widget_html .= apply_filters( 'gwolle_gb_entry_widget_add_after', '', $entry );
220
+
221
+ $widget_html .= '
222
+ </article>';
223
+
224
+ $widget_html .= '
225
+ </li>';
226
+
227
+ return $widget_html;
228
+
229
+ }
230
+
231
  /** @see WP_Widget::update */
232
  public function update( $new_instance, $old_instance ) {
233
  $instance = $old_instance;
frontend/gwolle_gb-entry.php CHANGED
@@ -26,15 +26,15 @@ if ( ! function_exists('gwolle_gb_entry_template') ) {
26
  */
27
  function gwolle_gb_entry_template( $entry, $first, $counter ) {
28
 
29
- $html5 = current_theme_supports( 'html5' );
30
-
31
  // Get the needed settings.
32
  $form_setting = gwolle_gb_get_setting( 'form' );
33
  $read_setting = gwolle_gb_get_setting( 'read' );
34
 
35
  // Main Author div
36
- $entry_output = '<div class="gb-entry';
37
- $entry_class = ' gb-entry_' . $entry->get_id();
 
 
38
  $entry_class .= ' gb-entry-count_' . $counter;
39
  if ( is_int( $counter / 2 ) ) {
40
  $entry_class .= ' gwolle_gb_even gwolle-gb-even';
@@ -42,7 +42,7 @@ if ( ! function_exists('gwolle_gb_entry_template') ) {
42
  $entry_class .= ' gwolle_gb_uneven gwolle-gb-uneven';
43
  }
44
  if ( $first === true ) {
45
- $entry_class .= ' gwolle_gb_first gwolle-gb-first';
46
  }
47
 
48
  if ( get_option( 'gwolle_gb-admin_style', 'false' ) === 'true' ) {
@@ -53,12 +53,10 @@ if ( ! function_exists('gwolle_gb_entry_template') ) {
53
  }
54
  }
55
  $entry_class = apply_filters( 'gwolle_gb_entry_class', $entry_class );
56
- $entry_output .= $entry_class . '">';
57
 
58
- if ( $html5 ) {
59
- $entry_output .= '
60
  <article>';
61
- }
62
 
63
  // Use this filter to just add something
64
  $entry_output .= apply_filters( 'gwolle_gb_entry_read_add_before', '', $entry );
@@ -253,10 +251,8 @@ if ( ! function_exists('gwolle_gb_entry_template') ) {
253
  /* Use this filter to just add something. */
254
  $entry_output .= apply_filters( 'gwolle_gb_entry_read_add_after', '', $entry );
255
 
256
- if ( $html5 ) {
257
- $entry_output .= '
258
  </article>';
259
- }
260
 
261
  $entry_output .= '
262
  </div>
26
  */
27
  function gwolle_gb_entry_template( $entry, $first, $counter ) {
28
 
 
 
29
  // Get the needed settings.
30
  $form_setting = gwolle_gb_get_setting( 'form' );
31
  $read_setting = gwolle_gb_get_setting( 'read' );
32
 
33
  // Main Author div
34
+ $entry_output = '';
35
+
36
+ $entry_class = 'gb-entry';
37
+ $entry_class .= ' gb-entry_' . $entry->get_id();
38
  $entry_class .= ' gb-entry-count_' . $counter;
39
  if ( is_int( $counter / 2 ) ) {
40
  $entry_class .= ' gwolle_gb_even gwolle-gb-even';
42
  $entry_class .= ' gwolle_gb_uneven gwolle-gb-uneven';
43
  }
44
  if ( $first === true ) {
45
+ $entry_class .= ' gwolle-gb-first';
46
  }
47
 
48
  if ( get_option( 'gwolle_gb-admin_style', 'false' ) === 'true' ) {
53
  }
54
  }
55
  $entry_class = apply_filters( 'gwolle_gb_entry_class', $entry_class );
 
56
 
57
+ $entry_output .= '<div class="' . $entry_class . '" data-entry_id="' . (int) $entry->get_id() . '">';
58
+ $entry_output .= '
59
  <article>';
 
60
 
61
  // Use this filter to just add something
62
  $entry_output .= apply_filters( 'gwolle_gb_entry_read_add_before', '', $entry );
251
  /* Use this filter to just add something. */
252
  $entry_output .= apply_filters( 'gwolle_gb_entry_read_add_after', '', $entry );
253
 
254
+ $entry_output .= '
 
255
  </article>';
 
256
 
257
  $entry_output .= '
258
  </div>
frontend/js/gwolle-gb-frontend.js CHANGED
@@ -22,9 +22,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
  * JavaScript for Gwolle Guestbook Frontend.
23
  */
24
 
 
 
25
 
26
  /*
27
- * Event for clicking the button, and getting the form visible.
28
  */
29
  jQuery(document).ready(function($) {
30
  jQuery( "div.gwolle-gb-write-button input" ).on( 'click', function() {
@@ -45,11 +47,10 @@ jQuery(document).ready(function($) {
45
 
46
 
47
  /*
48
- * Event for clicking the readmore, and getting the full content of that entry visible.
49
  */
50
  jQuery(document).ready(function($) {
51
  gwolle_gb_readmore();
52
- gwolle_gb_scroll_callback.add( gwolle_gb_readmore );
53
  gwolle_gb_ajax_callback.add( gwolle_gb_readmore );
54
  });
55
  function gwolle_gb_readmore() {
@@ -72,11 +73,10 @@ function gwolle_gb_readmore() {
72
 
73
 
74
  /*
75
- * Event for the metabox, toggle on and off.
76
  */
77
  jQuery(document).ready(function($) {
78
  gwolle_gb_metabox_handle();
79
- gwolle_gb_scroll_callback.add( gwolle_gb_metabox_handle );
80
  gwolle_gb_ajax_callback.add( gwolle_gb_metabox_handle );
81
  });
82
  function gwolle_gb_metabox_handle() {
@@ -103,11 +103,12 @@ jQuery(document).ready(function($) {
103
 
104
 
105
  /*
106
- * Event for Infinite Scroll. Get more pages when you are at the bottom.
107
  * This function does not support multiple lists on one page.
108
  */
109
  var gwolle_gb_scroll_on = true; // The end has not been reached yet. We still get entries back.
110
  var gwolle_gb_scroll_busy = false; // Handle async well. Only one request at a time.
 
111
  var gwolle_gb_scroll_callback = jQuery.Callbacks(); // Callback function to be fired after AJAX request.
112
 
113
  jQuery(document).ready(function($) {
@@ -151,14 +152,14 @@ jQuery(document).ready(function($) {
151
  }
152
 
153
  /*
154
- * Add callback for after infinite scroll event. Used for metabox-handle for new entries.
155
  *
156
  * @since 2.3.0
157
  *
158
  * Example code for using the callback:
159
  *
160
  * jQuery(document).ready(function($) {
161
- * gwolle_gb_scroll_callback.add( my_callback_function );
162
  * });
163
  *
164
  * function my_callback_function() {
@@ -167,7 +168,7 @@ jQuery(document).ready(function($) {
167
  * }
168
  *
169
  */
170
- gwolle_gb_scroll_callback.fire();
171
 
172
  gwolle_gb_scroll_busy = false;
173
 
@@ -217,7 +218,6 @@ jQuery(document).ready(function($) {
217
  /*
218
  * AJAX Submit for Gwolle Guestbook Frontend.
219
  */
220
- var gwolle_gb_ajax_callback = jQuery.Callbacks(); // Callback function to be fired after AJAX request.
221
  // 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.
222
  var gwolle_gb_ajax_data = {
223
  permalink: window.location.href,
@@ -371,6 +371,9 @@ jQuery(document).ready(function($) {
371
  });
372
 
373
 
 
 
 
374
  jQuery(document).ready(function($) {
375
  jQuery( 'form.gwolle-gb-write textarea.maxlength' ).on( 'keyup', function( textarea ) {
376
  var div_input = jQuery( textarea.target ).closest( 'div.input' );
22
  * JavaScript for Gwolle Guestbook Frontend.
23
  */
24
 
25
+ var gwolle_gb_ajax_callback = jQuery.Callbacks(); // Callback function to be fired after AJAX request.
26
+
27
 
28
  /*
29
+ * Click the button and the form becomes visible.
30
  */
31
  jQuery(document).ready(function($) {
32
  jQuery( "div.gwolle-gb-write-button input" ).on( 'click', function() {
47
 
48
 
49
  /*
50
+ * Click the readmore and the full content of that entry becomes visible.
51
  */
52
  jQuery(document).ready(function($) {
53
  gwolle_gb_readmore();
 
54
  gwolle_gb_ajax_callback.add( gwolle_gb_readmore );
55
  });
56
  function gwolle_gb_readmore() {
73
 
74
 
75
  /*
76
+ * Metabox, toggle on and off.
77
  */
78
  jQuery(document).ready(function($) {
79
  gwolle_gb_metabox_handle();
 
80
  gwolle_gb_ajax_callback.add( gwolle_gb_metabox_handle );
81
  });
82
  function gwolle_gb_metabox_handle() {
103
 
104
 
105
  /*
106
+ * Infinite Scroll. Get more pages when you are at the bottom.
107
  * This function does not support multiple lists on one page.
108
  */
109
  var gwolle_gb_scroll_on = true; // The end has not been reached yet. We still get entries back.
110
  var gwolle_gb_scroll_busy = false; // Handle async well. Only one request at a time.
111
+ // deprecated since 4.3.0, remove this callback sometime soon.
112
  var gwolle_gb_scroll_callback = jQuery.Callbacks(); // Callback function to be fired after AJAX request.
113
 
114
  jQuery(document).ready(function($) {
152
  }
153
 
154
  /*
155
+ * Add callback for after ajax event. Used for metabox-handle for new entries.
156
  *
157
  * @since 2.3.0
158
  *
159
  * Example code for using the callback:
160
  *
161
  * jQuery(document).ready(function($) {
162
+ * gwolle_gb_ajax_callback.add( my_callback_function );
163
  * });
164
  *
165
  * function my_callback_function() {
168
  * }
169
  *
170
  */
171
+ gwolle_gb_ajax_callback.fire();
172
 
173
  gwolle_gb_scroll_busy = false;
174
 
218
  /*
219
  * AJAX Submit for Gwolle Guestbook Frontend.
220
  */
 
221
  // 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.
222
  var gwolle_gb_ajax_data = {
223
  permalink: window.location.href,
371
  });
372
 
373
 
374
+ /*
375
+ * Maxlength for text in textarea content.
376
+ */
377
  jQuery(document).ready(function($) {
378
  jQuery( 'form.gwolle-gb-write textarea.maxlength' ).on( 'keyup', function( textarea ) {
379
  var div_input = jQuery( textarea.target ).closest( 'div.input' );
functions/gb-cache.php CHANGED
@@ -73,6 +73,11 @@ function gwolle_gb_clear_cache( $entry = false ) {
73
  rocket_clean_domain();
74
  }
75
 
 
 
 
 
 
76
  }
77
  add_action( 'gwolle_gb_save_entry_admin', 'gwolle_gb_clear_cache' );
78
  add_action( 'gwolle_gb_save_entry_frontend', 'gwolle_gb_clear_cache' );
73
  rocket_clean_domain();
74
  }
75
 
76
+ /* Siteground Cache */
77
+ if (function_exists('sg_cachepress_purge_cache')) {
78
+ sg_cachepress_purge_cache();
79
+ }
80
+
81
  }
82
  add_action( 'gwolle_gb_save_entry_admin', 'gwolle_gb_clear_cache' );
83
  add_action( 'gwolle_gb_save_entry_frontend', 'gwolle_gb_clear_cache' );
gwolle-gb-hooks.php CHANGED
@@ -80,7 +80,7 @@ function gwolle_gb_register() {
80
  wp_enqueue_script('jquery');
81
 
82
  // Register script for frontend. Load it later.
83
- wp_register_script( 'gwolle_gb_frontend_js', GWOLLE_GB_URL . 'frontend/js/gwolle-gb-frontend.js', 'jquery', GWOLLE_GB_VER, true );
84
  $data_to_be_passed = array(
85
  'ajax_url' => admin_url('admin-ajax.php'),
86
  'load_message' => /* translators: Infinite Scroll */ esc_html__('Loading more...', 'gwolle-gb'),
80
  wp_enqueue_script('jquery');
81
 
82
  // Register script for frontend. Load it later.
83
+ wp_register_script( 'gwolle_gb_frontend_js', GWOLLE_GB_URL . 'frontend/js/gwolle-gb-frontend.js', array('jquery'), GWOLLE_GB_VER, true );
84
  $data_to_be_passed = array(
85
  'ajax_url' => admin_url('admin-ajax.php'),
86
  'load_message' => /* translators: Infinite Scroll */ esc_html__('Loading more...', 'gwolle-gb'),
gwolle-gb.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Gwolle Guestbook
4
  Plugin URI: https://wordpress.org/plugins/gwolle-gb/
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: 4.2.2
7
  Author: Marcel Pol
8
  Author URI: https://zenoweb.nl
9
  License: GPLv2 or later
@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
 
32
 
33
  // Plugin Version
34
- define('GWOLLE_GB_VER', '4.2.2');
35
 
36
 
37
  /*
@@ -47,10 +47,10 @@ define('GWOLLE_GB_VER', '4.2.2');
47
  * - Consider SQL IN when emptying spam/trash.
48
  * - Someday, do something with the REST API. Someday.
49
  * - Unify statuses in one status column like WP_Posts.
50
- * - Add status 'private', only visible for author and moderators.
51
- * - Add status 'revision' to support that too. Add metabox to editor to restore old revision.
52
  * - More smooth import from third parties.
53
- * - Test and possibly add support for Gutenberg editor (shortcode block).
54
  * - Support sticky entries.
55
  * - https://wordpress.org/support/topic/pin-entries/
56
  * - Support mark-as-ham for Stop Forum Spam. Needs API key.
@@ -66,17 +66,18 @@ define('GWOLLE_GB_VER', '4.2.2');
66
  * - https://wordpress.org/support/topic/gwolle-and-onepager/
67
  * - https://wordpress.org/support/topic/ajax-reload-on-entry-pagination/
68
  * - Using AJAX for pagination would solve this.
69
- * - Instant update of entry list after submitting an entry, for all visitors.
70
- * - https://wordpress.org/support/topic/instant-update-of-new-messages/
71
- * - Would be compatible with using a video stream on that same page.
72
  * - Use more CSS transitions and SVG icons.
 
73
  * - Use CSS classes from contactform plugins, when they are active.
74
  * - Have custom capability through a filter instead of `moderate_comments`.
75
  * - https://wordpress.org/support/topic/user-roles-changing/
76
  * - Use new capability options in WP_User_Query in WP 5.9.
77
  * - https://make.wordpress.org/core/2022/01/05/new-capability-queries-in-wordpress-5-9/
78
- * - Consider moving checkbox for custom antispam to antispam-tab, to avoid confusion.
79
- * - https://wordpress.org/support/topic/question-anti-spam-personnalisee/
 
 
 
80
  *
81
  */
82
 
3
  Plugin Name: Gwolle Guestbook
4
  Plugin URI: https://wordpress.org/plugins/gwolle-gb/
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: 4.3.0
7
  Author: Marcel Pol
8
  Author URI: https://zenoweb.nl
9
  License: GPLv2 or later
31
 
32
 
33
  // Plugin Version
34
+ define('GWOLLE_GB_VER', '4.3.0');
35
 
36
 
37
  /*
47
  * - Consider SQL IN when emptying spam/trash.
48
  * - Someday, do something with the REST API. Someday.
49
  * - Unify statuses in one status column like WP_Posts.
50
+ * Add status 'private', only visible for author and moderators.
51
+ * Add status 'revision' to support that too. Add metabox to editor to restore old revision.
52
  * - More smooth import from third parties.
53
+ * - Test and possibly add support for Gutenberg editor (shortcode block and widgets).
54
  * - Support sticky entries.
55
  * - https://wordpress.org/support/topic/pin-entries/
56
  * - Support mark-as-ham for Stop Forum Spam. Needs API key.
66
  * - https://wordpress.org/support/topic/gwolle-and-onepager/
67
  * - https://wordpress.org/support/topic/ajax-reload-on-entry-pagination/
68
  * - Using AJAX for pagination would solve this.
 
 
 
69
  * - Use more CSS transitions and SVG icons.
70
+ * https://stackoverflow.com/questions/15979235/css-transition-show-div-smoothly
71
  * - Use CSS classes from contactform plugins, when they are active.
72
  * - Have custom capability through a filter instead of `moderate_comments`.
73
  * - https://wordpress.org/support/topic/user-roles-changing/
74
  * - Use new capability options in WP_User_Query in WP 5.9.
75
  * - https://make.wordpress.org/core/2022/01/05/new-capability-queries-in-wordpress-5-9/
76
+ * - Automatically convert links and images to bbcode after cut-and-paste into the textarea.
77
+ * - https://zenoweb.nl/forums/topic/automatic-link-creation/
78
+ * - Redo the "visitor from city wrote on datetime" into better translatable text with placeholders.
79
+ * - Editor: really fix timezone issues, new entry should follow given options and data.
80
+ * https://wordpress.org/support/topic/problem-with-message-via-backend-timezone-and-editing-details/
81
  *
82
  */
83
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Gwolle Guestbook ===
2
  Contributors: Gwolle, mpol
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, review
4
- Requires at least: 3.7
5
- Tested up to: 6.0
6
- Stable tag: 4.2.2
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
@@ -82,6 +82,7 @@ Current features include:
82
  * Like an entry and view likes for each entry.
83
  * Preview for the frontend form.
84
  * Preview for the admin editor form.
 
85
  * Admin reply on the frontend with AJAX.
86
  * Edit content/author/origin of entry on the frontend with AJAX.
87
  * Report Abuse.
@@ -106,7 +107,7 @@ This plugin is compatible with [ClassicPress](https://www.classicpress.net).
106
 
107
  = Contributions =
108
 
109
- This plugin is also available in [GitLab](https://gitlab.com/toomanybicycles/gwolle-gb).
110
 
111
 
112
  == Installation ==
@@ -433,6 +434,25 @@ But if you don't use standard comments, you can just as easily use the comment s
433
 
434
  == Changelog ==
435
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
  = 4.2.2 =
437
  * 2022-03-16
438
  * Change options for number of words in widget to more reasonable options.
1
  === Gwolle Guestbook ===
2
  Contributors: Gwolle, mpol
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, review
4
+ Requires at least: 4.1
5
+ Tested up to: 6.1
6
+ Stable tag: 4.3.0
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
82
  * Like an entry and view likes for each entry.
83
  * Preview for the frontend form.
84
  * Preview for the admin editor form.
85
+ * Automatic Refresh of guestbook list with new entries.
86
  * Admin reply on the frontend with AJAX.
87
  * Edit content/author/origin of entry on the frontend with AJAX.
88
  * Report Abuse.
107
 
108
  = Contributions =
109
 
110
+ This plugin is also available in [Codeberg](https://codeberg.org/cyclotouriste/gwolle-gb).
111
 
112
 
113
  == Installation ==
434
 
435
  == Changelog ==
436
 
437
+ = 4.4.0 =
438
+ * 2022-
439
+ * Refactor Admin Editor, saving new entry saves more options.
440
+
441
+ = 4.3.0 =
442
+ * 2022-09-01
443
+ * Dependency for jquery should be an array.
444
+ * Make sure setting for admin list is always shown correctly.
445
+ * Move setting for antispam security question to antispam settings tab.
446
+ * Set max-height for images as well.
447
+ * Add class to form if user is logged in or not.
448
+ * Add 'clear:both' to metabox lines.
449
+ * Support Siteground Cache plugin for clearing cache.
450
+ * Use html5 on all themes.
451
+ * Add filter 'gwolle_gb_header_text'.
452
+ * Add function 'widget_single_view()' to widget to avoid duplicate code.
453
+ * Only use 'gwolle_gb_ajax_callback' for callbacks.
454
+ * Update strings for add-on.
455
+
456
  = 4.2.2 =
457
  * 2022-03-16
458
  * Change options for number of words in widget to more reasonable options.