Gwolle Guestbook - Version 2.3.9

Version Description

  • 2018-01-26
  • Support book_id for export and import (thanks therab).
Download this release

Release Info

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

Code changes from version 2.3.8 to 2.3.9

admin/gb-page-export.php CHANGED
@@ -180,7 +180,8 @@ function gwolle_gb_export_callback() {
180
  'isspam',
181
  'ischecked',
182
  'istrash',
183
- 'admin_reply'
 
184
  ));
185
 
186
  $saved = 0;
@@ -201,6 +202,7 @@ function gwolle_gb_export_callback() {
201
  $row[] = $entry->get_ischecked();
202
  $row[] = $entry->get_istrash();
203
  $row[] = $entry->get_admin_reply();
 
204
 
205
  fputcsv($output, $row);
206
 
180
  'isspam',
181
  'ischecked',
182
  'istrash',
183
+ 'admin_reply',
184
+ 'book_id'
185
  ));
186
 
187
  $saved = 0;
202
  $row[] = $entry->get_ischecked();
203
  $row[] = $entry->get_istrash();
204
  $row[] = $entry->get_admin_reply();
205
+ $row[] = $entry->get_book_id();
206
 
207
  fputcsv($output, $row);
208
 
admin/gb-page-import.php CHANGED
@@ -550,7 +550,23 @@ function gwolle_gb_page_import_post() {
550
  'istrash',
551
  'admin_reply'
552
  );
553
- if ( $data != $testrow_1_0 && $data != $testrow_1_4_1 && $data != $testrow_1_4_8 ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
554
  gwolle_gb_add_message( '<p>' . esc_html__('It seems your CSV file is from an export that is not compatible with this version of Gwolle-GB.', 'gwolle-gb') . '</p>', true, false);
555
  break;
556
  }
@@ -558,7 +574,7 @@ function gwolle_gb_page_import_post() {
558
  continue;
559
  }
560
 
561
- if ( $num != 12 && $num != 13 ) {
562
  gwolle_gb_add_message( '<p>' . esc_html__('Your data seems to be corrupt. Import failed.', 'gwolle-gb') . '</p>', true, false);
563
  break;
564
  }
@@ -587,6 +603,9 @@ function gwolle_gb_page_import_post() {
587
  if ( isset( $data[12] ) ) {
588
  $entry->set_admin_reply( $data[12] ); // admin_reply is only since 1.4.8
589
  }
 
 
 
590
 
591
  /* Save the instance */
592
  $save = $entry->save();
550
  'istrash',
551
  'admin_reply'
552
  );
553
+ $testrow_2_3_9 = array(
554
+ 'id',
555
+ 'author_name',
556
+ 'author_email',
557
+ 'author_origin',
558
+ 'author_website',
559
+ 'author_ip',
560
+ 'author_host',
561
+ 'content',
562
+ 'datetime',
563
+ 'isspam',
564
+ 'ischecked',
565
+ 'istrash',
566
+ 'admin_reply',
567
+ 'book_id'
568
+ );
569
+ if ( $data != $testrow_1_0 && $data != $testrow_1_4_1 && $data != $testrow_1_4_8 && $data != $testrow_2_3_9 ) {
570
  gwolle_gb_add_message( '<p>' . esc_html__('It seems your CSV file is from an export that is not compatible with this version of Gwolle-GB.', 'gwolle-gb') . '</p>', true, false);
571
  break;
572
  }
574
  continue;
575
  }
576
 
577
+ if ( $num != 12 && $num != 13 && $num != 14 ) {
578
  gwolle_gb_add_message( '<p>' . esc_html__('Your data seems to be corrupt. Import failed.', 'gwolle-gb') . '</p>', true, false);
579
  break;
580
  }
603
  if ( isset( $data[12] ) ) {
604
  $entry->set_admin_reply( $data[12] ); // admin_reply is only since 1.4.8
605
  }
606
+ if ( isset( $data[13] ) ) {
607
+ $entry->set_book_id( $data[13] ); // book_id is only since 2.3.9
608
+ }
609
 
610
  /* Save the instance */
611
  $save = $entry->save();
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.8
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.8');
36
 
37
 
38
  /*
@@ -47,9 +47,10 @@ define('GWOLLE_GB_VER', '2.3.8');
47
  * - On Page editor, have a postbox with link to the guestbook admin entries.
48
  * - BBcode: have sublists work.
49
  * - BBcode: add width and height to images.
50
- * - On admin pages, have separate functions for $_POST. (editor, entries)
51
  * - Localize admin ajax script.
52
  * - Add Filter for get_entry_count SQL, like get_entries.
 
53
  * - Add datetime WHERE clause in get_functions? Support filter for the function parameters inside the function?
54
  *
55
  * 2.4.0:
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.9
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.9');
36
 
37
 
38
  /*
47
  * - On Page editor, have a postbox with link to the guestbook admin entries.
48
  * - BBcode: have sublists work.
49
  * - BBcode: add width and height to images.
50
+ * - On admin pages, have separate functions for $_POST update. (editor, entries)
51
  * - Localize admin ajax script.
52
  * - Add Filter for get_entry_count SQL, like get_entries.
53
+ * - Add filters similar to pre_get_posts.
54
  * - Add datetime WHERE clause in get_functions? Support filter for the function parameters inside the function?
55
  *
56
  * 2.4.0:
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.9
6
- Stable tag: 2.3.8
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
@@ -176,7 +176,8 @@ The header needs to look like this:
176
  'isspam',
177
  'ischecked',
178
  'istrash',
179
- 'admin_reply'
 
180
  )
181
  ?>
182
 
@@ -395,6 +396,10 @@ But if you don't use standard comments, you can just as easily use the comment s
395
 
396
  == Changelog ==
397
 
 
 
 
 
398
  = 2.3.8 =
399
  * 2018-01-18
400
  * Editor.php: Heading for City should really be City.
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, libro de visitas
4
  Requires at least: 3.7
5
  Tested up to: 4.9
6
+ Stable tag: 2.3.9
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
176
  'isspam',
177
  'ischecked',
178
  'istrash',
179
+ 'admin_reply',
180
+ 'book_id'
181
  )
182
  ?>
183
 
396
 
397
  == Changelog ==
398
 
399
+ = 2.3.9 =
400
+ * 2018-01-26
401
+ * Support book_id for export and import (thanks therab).
402
+
403
  = 2.3.8 =
404
  * 2018-01-18
405
  * Editor.php: Heading for City should really be City.