Gwolle Guestbook - Version 4.4.1

Version Description

  • 2022-11-19
  • Quick fix for missing roles.
Download this release

Release Info

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

Code changes from version 4.4.0 to 4.4.1

Files changed (3) hide show
  1. functions/gb-capabilities.php +12 -6
  2. gwolle-gb.php +2 -2
  3. readme.txt +5 -1
functions/gb-capabilities.php CHANGED
@@ -17,16 +17,22 @@ if ( strpos($_SERVER['PHP_SELF'], basename(__FILE__) )) {
17
  function gwolle_gb_custom_capabilities() {
18
 
19
  $role = get_role( 'administrator' );
20
- $role->add_cap( 'gwolle_gb_upload_files', true );
21
- $role->add_cap( 'gwolle_gb_moderate_comments', true );
 
 
22
 
23
  $role = get_role( 'editor' );
24
- $role->add_cap( 'gwolle_gb_upload_files', true );
25
- $role->add_cap( 'gwolle_gb_moderate_comments', true );
 
 
26
 
27
  $role = get_role( 'author' );
28
- $role->add_cap( 'gwolle_gb_upload_files', true );
29
- //$role->add_cap( 'gwolle_gb_moderate_comments', true ); // nope :)
 
 
30
 
31
  }
32
  // priority must be after the initial role definition.
17
  function gwolle_gb_custom_capabilities() {
18
 
19
  $role = get_role( 'administrator' );
20
+ if ( is_object( $role ) && is_a( $role, 'WP_Role' ) ) {
21
+ $role->add_cap( 'gwolle_gb_upload_files', true );
22
+ $role->add_cap( 'gwolle_gb_moderate_comments', true );
23
+ }
24
 
25
  $role = get_role( 'editor' );
26
+ if ( is_object( $role ) && is_a( $role, 'WP_Role' ) ) {
27
+ $role->add_cap( 'gwolle_gb_upload_files', true );
28
+ $role->add_cap( 'gwolle_gb_moderate_comments', true );
29
+ }
30
 
31
  $role = get_role( 'author' );
32
+ if ( is_object( $role ) && is_a( $role, 'WP_Role' ) ) {
33
+ $role->add_cap( 'gwolle_gb_upload_files', true );
34
+ //$role->add_cap( 'gwolle_gb_moderate_comments', true ); // nope :)
35
+ }
36
 
37
  }
38
  // priority must be after the initial role definition.
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.4.0
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.4.0');
35
 
36
 
37
  /*
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.4.1
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.4.1');
35
 
36
 
37
  /*
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: 4.1
5
  Tested up to: 6.1
6
- Stable tag: 4.4.0
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
@@ -434,6 +434,10 @@ But if you don't use standard comments, you can just as easily use the comment s
434
 
435
  == Changelog ==
436
 
 
 
 
 
437
  = 4.4.0 =
438
  * 2022-11-18
439
  * Use custom capabilities 'gwolle_gb_moderate_comments' and 'gwolle_gb_upload_files'.
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.4.1
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
434
 
435
  == Changelog ==
436
 
437
+ = 4.4.1 =
438
+ * 2022-11-19
439
+ * Quick fix for missing roles.
440
+
441
  = 4.4.0 =
442
  * 2022-11-18
443
  * Use custom capabilities 'gwolle_gb_moderate_comments' and 'gwolle_gb_upload_files'.