Advanced Access Manager - Version 5.9.7.2

Version Description

  • Cover incompatibility with themes/plugins that do funky stuff with roles and capabilities
Download this release

Release Info

Developer vasyltech
Plugin Icon 128x128 Advanced Access Manager
Version 5.9.7.2
Comparing to
See all releases

Code changes from version 5.9.7.1 to 5.9.7.2

Files changed (3) hide show
  1. aam.php +1 -1
  2. application/Backend/Manager.php +20 -0
  3. readme.txt +4 -1
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
- * Version: 5.9.7.1
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
+ * Version: 5.9.7.2
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
application/Backend/Manager.php CHANGED
@@ -57,6 +57,7 @@ class AAM_Backend_Manager {
57
 
58
  //cover any kind of surprize things by other funky plugins
59
  add_filter('pre_update_option', array($this, 'updateOption'), 10, 3);
 
60
 
61
  //permalink manager
62
  add_filter('get_sample_permalink_html', array($this, 'getPermalinkHtml'), 10, 5);
@@ -153,6 +154,25 @@ class AAM_Backend_Manager {
153
  }
154
  }
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  /**
157
  * Undocumented function
158
  *
57
 
58
  //cover any kind of surprize things by other funky plugins
59
  add_filter('pre_update_option', array($this, 'updateOption'), 10, 3);
60
+ add_filter('role_has_cap', array($this, 'roleHasCap'), 1, 3);
61
 
62
  //permalink manager
63
  add_filter('get_sample_permalink_html', array($this, 'getPermalinkHtml'), 10, 5);
154
  }
155
  }
156
 
157
+ /**
158
+ * Undocumented function
159
+ *
160
+ * @param [type] $caps
161
+ * @param [type] $cap
162
+ *
163
+ * @return void
164
+ */
165
+ public function roleHasCap($caps, $cap) {
166
+ if (strpos($cap, 'aam|') === 0) {
167
+ $parts = explode('|', $cap);
168
+ if (isset($caps[$parts[2]])) {
169
+ $caps[$cap] = $caps[$parts[2]];
170
+ }
171
+ }
172
+
173
+ return $caps;
174
+ }
175
+
176
  /**
177
  * Undocumented function
178
  *
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
3
  Tags: access control, membership, backend menu, user role, restricted content, security, jwt
4
  Requires at least: 4.0
5
  Tested up to: 5.2.1
6
- Stable tag: 5.9.7.1
7
 
8
  All you need to manage access to you WordPress websites on frontend, backend and API levels for any role, user or visitors.
9
 
@@ -80,6 +80,9 @@ https://www.youtube.com/watch?v=mj5Xa_Wc16Y
80
 
81
  == Changelog ==
82
 
 
 
 
83
  = 5.9.7.1 =
84
  * Fixed the bug with Access Policy for Capability resource
85
  * Fixed the bug with Nginx redirect rules for media access
3
  Tags: access control, membership, backend menu, user role, restricted content, security, jwt
4
  Requires at least: 4.0
5
  Tested up to: 5.2.1
6
+ Stable tag: 5.9.7.2
7
 
8
  All you need to manage access to you WordPress websites on frontend, backend and API levels for any role, user or visitors.
9
 
80
 
81
  == Changelog ==
82
 
83
+ = 5.9.7.2 =
84
+ * Cover incompatibility with themes/plugins that do funky stuff with roles and capabilities
85
+
86
  = 5.9.7.1 =
87
  * Fixed the bug with Access Policy for Capability resource
88
  * Fixed the bug with Nginx redirect rules for media access