Advanced Access Manager - Version 6.3.2

Version Description

  • Fixed Bug: *_OTHERS posts & terms access options malfunction https://github.com/aamplugin/advanced-access-manager/issues/52
Download this release

Release Info

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

Code changes from version 6.3.1 to 6.3.2

Files changed (3) hide show
  1. aam.php +2 -2
  2. application/Core/Subject.php +11 -10
  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: 6.3.1
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
@@ -264,7 +264,7 @@ if (defined('ABSPATH')) {
264
  //define few common constants
265
  define('AAM_MEDIA', plugins_url('/media', __FILE__));
266
  define('AAM_KEY', 'advanced-access-manager');
267
- define('AAM_VERSION', '6.3.1');
268
  define('AAM_BASEDIR', __DIR__);
269
 
270
  //load vendor
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
+ * Version: 6.3.2
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
264
  //define few common constants
265
  define('AAM_MEDIA', plugins_url('/media', __FILE__));
266
  define('AAM_KEY', 'advanced-access-manager');
267
+ define('AAM_VERSION', '6.3.2');
268
  define('AAM_BASEDIR', __DIR__);
269
 
270
  //load vendor
application/Core/Subject.php CHANGED
@@ -26,11 +26,12 @@
26
  * Subject principal is underlying WordPress core user or role. Not all Subjects have
27
  * principals (e.g. Visitor or Default).
28
  *
 
29
  * @since 6.1.0 Fixed bug with incorrectly managed internal cache
30
  * @since 6.0.0 Initial implementation of the class
31
  *
32
  * @package AAM
33
- * @version 6.1.0
34
  */
35
  abstract class AAM_Core_Subject
36
  {
@@ -276,12 +277,14 @@ abstract class AAM_Core_Subject
276
  *
277
  * @return AAM_Core_Object
278
  *
 
 
279
  * @since 6.1.0 Fixed the bug where initialize object was not cached correctly
280
  * due to $skipInheritance flag
281
  * @since 6.0.0 Initial implementation of the method
282
  *
283
  * @access public
284
- * @version 6.1.0
285
  */
286
  public function getObject($type, $id = null, $skipInheritance = false)
287
  {
@@ -295,15 +298,11 @@ abstract class AAM_Core_Subject
295
  if (class_exists($class_name)) {
296
  $object = new $class_name($this, $id, $skipInheritance);
297
  } else {
298
- $object = null;
 
 
299
  }
300
 
301
- // Run the object through the filter so other plugins can attach to its
302
- // initialization
303
- $object = apply_filters(
304
- 'aam_object_filter', $object, $this, $type, $id, $skipInheritance
305
- );
306
-
307
  if (is_a($object, 'AAM_Core_Object')) {
308
  // Kick in the inheritance chain if needed
309
  if ($skipInheritance === false) {
@@ -311,7 +310,9 @@ abstract class AAM_Core_Subject
311
  }
312
 
313
  // Finally cache the object
314
- $this->_objects[$type . $id . $suffix] = $object;
 
 
315
  }
316
  } else {
317
  $object = $this->_objects[$type . $id . $suffix];
26
  * Subject principal is underlying WordPress core user or role. Not all Subjects have
27
  * principals (e.g. Visitor or Default).
28
  *
29
+ * @since 6.3.2 Added new hook `aam_initialized_{$type}_object_filter`
30
  * @since 6.1.0 Fixed bug with incorrectly managed internal cache
31
  * @since 6.0.0 Initial implementation of the class
32
  *
33
  * @package AAM
34
+ * @version 6.3.2
35
  */
36
  abstract class AAM_Core_Subject
37
  {
277
  *
278
  * @return AAM_Core_Object
279
  *
280
+ * @since 6.3.2 Added new hook `aam_initialized_{$type}_object_filter` to solve
281
+ * https://github.com/aamplugin/advanced-access-manager/issues/52
282
  * @since 6.1.0 Fixed the bug where initialize object was not cached correctly
283
  * due to $skipInheritance flag
284
  * @since 6.0.0 Initial implementation of the method
285
  *
286
  * @access public
287
+ * @version 6.3.2
288
  */
289
  public function getObject($type, $id = null, $skipInheritance = false)
290
  {
298
  if (class_exists($class_name)) {
299
  $object = new $class_name($this, $id, $skipInheritance);
300
  } else {
301
+ $object = apply_filters(
302
+ 'aam_object_filter', null, $this, $type, $id, $skipInheritance
303
+ );
304
  }
305
 
 
 
 
 
 
 
306
  if (is_a($object, 'AAM_Core_Object')) {
307
  // Kick in the inheritance chain if needed
308
  if ($skipInheritance === false) {
310
  }
311
 
312
  // Finally cache the object
313
+ $this->_objects[$type . $id . $suffix] = apply_filters(
314
+ "aam_initialized_{$type}_object_filter", $object
315
+ );
316
  }
317
  } else {
318
  $object = $this->_objects[$type . $id . $suffix];
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: access control, membership, backend menu, user role, restricted content, s
4
  Requires at least: 4.7.0
5
  Requires PHP: 5.6.0
6
  Tested up to: 5.3.2
7
- Stable tag: 6.3.1
8
 
9
  All you need to manage access to WordPress websites on the frontend, backend and API levels for any role, user or visitors.
10
 
@@ -91,6 +91,9 @@ We take security and privacy very seriously, that is why there are several non-n
91
 
92
  == Changelog ==
93
 
 
 
 
94
  = 6.3.1 =
95
  * Fixed Bug: Draft policy still applicable if attached to user or role [https://github.com/aamplugin/advanced-access-manager/issues/49](https://github.com/aamplugin/advanced-access-manager/issues/49)
96
  * Fixed Bug: Resetting all AAM settings still keep legacy settings in DB [https://github.com/aamplugin/advanced-access-manager/issues/48](https://github.com/aamplugin/advanced-access-manager/issues/48)
4
  Requires at least: 4.7.0
5
  Requires PHP: 5.6.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 6.3.2
8
 
9
  All you need to manage access to WordPress websites on the frontend, backend and API levels for any role, user or visitors.
10
 
91
 
92
  == Changelog ==
93
 
94
+ = 6.3.2 =
95
+ * Fixed Bug: *_OTHERS posts & terms access options malfunction [https://github.com/aamplugin/advanced-access-manager/issues/52](https://github.com/aamplugin/advanced-access-manager/issues/52)
96
+
97
  = 6.3.1 =
98
  * Fixed Bug: Draft policy still applicable if attached to user or role [https://github.com/aamplugin/advanced-access-manager/issues/49](https://github.com/aamplugin/advanced-access-manager/issues/49)
99
  * Fixed Bug: Resetting all AAM settings still keep legacy settings in DB [https://github.com/aamplugin/advanced-access-manager/issues/48](https://github.com/aamplugin/advanced-access-manager/issues/48)