Advanced Access Manager - Version 5.0.3

Version Description

  • Fixed bug with LIST option
  • Fixed bug with incompatible PHP 5.3 or lower
Download this release

Release Info

Developer vasyl_m
Plugin Icon 128x128 Advanced Access Manager
Version 5.0.3
Comparing to
See all releases

Code changes from version 5.0.2 to 5.0.3

Application/Core/API.php CHANGED
@@ -356,6 +356,15 @@ final class AAM_Core_API {
356
  }
357
  }
358
 
 
 
 
 
 
 
 
 
 
359
  return (is_array($filtered) ? $filtered : array());
360
  }
361
 
356
  }
357
  }
358
 
359
+ if (is_single()) {
360
+ $post = self::getCurrentPost();
361
+ $in = ($post ? array_search($post->ID, $filtered) : false);
362
+
363
+ if ($in !== false) {
364
+ $filtered = array_splice($filtered, $in, 1);
365
+ }
366
+ }
367
+
368
  return (is_array($filtered) ? $filtered : array());
369
  }
370
 
Application/Core/Object/Menu.php CHANGED
@@ -129,7 +129,8 @@ class AAM_Core_Object_Menu extends AAM_Core_Object {
129
  }
130
 
131
  if (count($filtered)) { //make sure that the parent points to the first sub
132
- $parent[2] = array_values($filtered)[0][2];
 
133
  }
134
 
135
  return $filtered;
129
  }
130
 
131
  if (count($filtered)) { //make sure that the parent points to the first sub
132
+ $values = array_values($filtered);
133
+ $parent[2] = $values[0][2];
134
  }
135
 
136
  return $filtered;
Application/Frontend/Filter.php CHANGED
@@ -135,7 +135,7 @@ class AAM_Frontend_Filter {
135
  public function filterPostList($posts) {
136
  $current = AAM_Core_API::getCurrentPost();
137
 
138
- if (is_array($posts) && !$this->isMainWP()) {
139
  foreach ($posts as $i => $post) {
140
  if ($current && ($current->ID == $post->ID)) { continue; }
141
 
@@ -188,7 +188,7 @@ class AAM_Frontend_Filter {
188
  public function preparePostQuery($query) {
189
  static $skip = false;
190
 
191
- if (($skip === false) && $this->isMainWP()) { // avoid loop
192
  $skip = true;
193
  $filtered = AAM_Core_API::getFilteredPostList($query);
194
  $skip = false;
@@ -328,7 +328,7 @@ class AAM_Frontend_Filter {
328
  break;
329
  }
330
  }
331
-
332
  return $result;
333
  }
334
 
135
  public function filterPostList($posts) {
136
  $current = AAM_Core_API::getCurrentPost();
137
 
138
+ if (is_array($posts)) {
139
  foreach ($posts as $i => $post) {
140
  if ($current && ($current->ID == $post->ID)) { continue; }
141
 
188
  public function preparePostQuery($query) {
189
  static $skip = false;
190
 
191
+ if ($skip === false && !$this->isMainWP()) { // avoid loop
192
  $skip = true;
193
  $filtered = AAM_Core_API::getFilteredPostList($query);
194
  $skip = false;
328
  break;
329
  }
330
  }
331
+
332
  return $result;
333
  }
334
 
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: All you need to manage access to your WordPress website
6
- Version: 5.0.2
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: All you need to manage access to your WordPress website
6
+ Version: 5.0.3
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
3
  Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
4
  Requires at least: 3.8
5
  Tested up to: 4.9.1
6
- Stable tag: 5.0.2
7
 
8
  The most powerful access management plugin for WordPress websites.
9
 
@@ -60,6 +60,10 @@ https://www.youtube.com/watch?v=yiOhjaacNJc
60
 
61
  == Changelog ==
62
 
 
 
 
 
63
  = 5.0.2 =
64
  * Fixed bug with admin menu reported by Andrew
65
  * Fixed possible bug with theTitle filter
3
  Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
4
  Requires at least: 3.8
5
  Tested up to: 4.9.1
6
+ Stable tag: 5.0.3
7
 
8
  The most powerful access management plugin for WordPress websites.
9
 
60
 
61
  == Changelog ==
62
 
63
+ = 5.0.3 =
64
+ * Fixed bug with LIST option
65
+ * Fixed bug with incompatible PHP 5.3 or lower
66
+
67
  = 5.0.2 =
68
  * Fixed bug with admin menu reported by Andrew
69
  * Fixed possible bug with theTitle filter