Advanced Access Manager - Version 5.2.6

Version Description

  • Dropped support for WordPress versions 3.x. Min supported version is 4.0
  • Fixed bug with Admin Menu access control to Posts list
  • Fixed bug in AAM Core API for get plugins data call
  • Fixed bug with visitors cache auto-flush
  • Minor improvements to the AAM UI
Download this release

Release Info

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

Code changes from version 5.2.5 to 5.2.6

Application/Backend/Authorization.php CHANGED
@@ -66,7 +66,7 @@ class AAM_Backend_Authorization {
66
 
67
  if (!empty($taxonomy)) {
68
  $menu .= '?taxonomy=' . $taxonomy;
69
- } elseif (!empty($postType)) {
70
  $menu .= '?post_type=' . $postType;
71
  } elseif (!empty($page)) {
72
  $menu .= '?page=' . $page;
66
 
67
  if (!empty($taxonomy)) {
68
  $menu .= '?taxonomy=' . $taxonomy;
69
+ } elseif (!empty($postType) && ($postType != 'post')) {
70
  $menu .= '?post_type=' . $postType;
71
  } elseif (!empty($page)) {
72
  $menu .= '?page=' . $page;
Application/Backend/Feature/Settings/Core.php CHANGED
@@ -64,7 +64,7 @@ class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract {
64
  'value' => AAM_Core_Config::get('core.xmlrpc', true)
65
  ),
66
  'core.restful' => array(
67
- 'title' => __('WordPress RESTful API', AAM_KEY),
68
  'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('RESTful interface that is used to manage WordPress website content and features. For more information check %sREST API handbook%s.', 'b'), '<a href="https://developer.wordpress.org/rest-api/">', '</a>'),
69
  'value' => AAM_Core_Config::get('core.restful', true)
70
  ),
64
  'value' => AAM_Core_Config::get('core.xmlrpc', true)
65
  ),
66
  'core.restful' => array(
67
+ 'title' => __('RESTful WordPress API', AAM_KEY),
68
  'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('RESTful interface that is used to manage WordPress website content and features. For more information check %sREST API handbook%s.', 'b'), '<a href="https://developer.wordpress.org/rest-api/">', '</a>'),
69
  'value' => AAM_Core_Config::get('core.restful', true)
70
  ),
Application/Backend/Widget/Login.php CHANGED
@@ -33,7 +33,7 @@ class AAM_Backend_Widget_Login extends WP_Widget {
33
  require(
34
  AAM_Core_Config::get(
35
  'login.widget.template',
36
- dirname(__FILE__) . '/../phtml/widget/login-frontend.phtml'
37
  )
38
  );
39
  }
33
  require(
34
  AAM_Core_Config::get(
35
  'login.widget.template',
36
+ realpath(dirname(__FILE__) . '/../phtml/widget/login-frontend.phtml')
37
  )
38
  );
39
  }
Application/Backend/phtml/main/login-redirect.phtml CHANGED
@@ -8,7 +8,7 @@
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize login redirect for [%s] when the authentication is completed successfully.', 'strong'), AAM_Backend_Subject::getInstance()->getName()); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-login-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize login redirect for [%s] when the authentication is completed successfully. [Please note!] Login redirect works with default WordPress login form or %sAAM Secure Login widget%s. It may [not] work with any other login solutions.', 'strong', 'strong', 'strong'), AAM_Backend_Subject::getInstance()->getName(), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-login-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
Application/Core/API.php CHANGED
@@ -314,7 +314,9 @@ final class AAM_Core_API {
314
  }
315
 
316
  if (function_exists('get_plugin_data')) {
317
- $data = get_plugin_data(dirname(__FILE__) . '/../../aam.php');
 
 
318
  $version = (isset($data['Version']) ? $data['Version'] : null);
319
  }
320
 
314
  }
315
 
316
  if (function_exists('get_plugin_data')) {
317
+ $data = get_plugin_data(
318
+ realpath(dirname(__FILE__) . '/../../aam.php')
319
+ );
320
  $version = (isset($data['Version']) ? $data['Version'] : null);
321
  }
322
 
Application/Core/Cache.php CHANGED
@@ -97,7 +97,7 @@ class AAM_Core_Cache {
97
  public static function clear($user = null) {
98
  global $wpdb;
99
 
100
- if (is_null($user)) {
101
  //clear visitor cache
102
  $query = "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE %s";
103
  $wpdb->query($wpdb->prepare($query, '_transient_aam_%' ));
@@ -132,7 +132,7 @@ class AAM_Core_Cache {
132
  protected static function getCacheOption($id = null) {
133
  $option = self::POST_CACHE . '_';
134
 
135
- if (is_null($id)) {
136
  $option .= AAM::getUser()->isVisitor() ? 'visitor' : AAM::getUser()->ID;
137
  } else {
138
  $option .= $id;
97
  public static function clear($user = null) {
98
  global $wpdb;
99
 
100
+ if (empty($user)) {
101
  //clear visitor cache
102
  $query = "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE %s";
103
  $wpdb->query($wpdb->prepare($query, '_transient_aam_%' ));
132
  protected static function getCacheOption($id = null) {
133
  $option = self::POST_CACHE . '_';
134
 
135
+ if (empty($id)) {
136
  $option .= AAM::getUser()->isVisitor() ? 'visitor' : AAM::getUser()->ID;
137
  } else {
138
  $option .= $id;
Application/Shortcode/Strategy/Login.php CHANGED
@@ -46,7 +46,6 @@ class AAM_Shortcode_Strategy_Login implements AAM_Shortcode_Strategy_Interface {
46
 
47
  /**
48
  * Process shortcode
49
- *
50
  */
51
  public function run() {
52
  $this->args['id'] = isset($this->args['id']) ? $this->args['id'] : uniqid();
@@ -65,7 +64,7 @@ class AAM_Shortcode_Strategy_Login implements AAM_Shortcode_Strategy_Interface {
65
  ob_start();
66
  require AAM_Core_Config::get(
67
  'login.shortcode.template',
68
- dirname(__FILE__) . '/../../Frontend/phtml/login.phtml'
69
  );
70
  $content = ob_get_contents();
71
  ob_end_clean();
46
 
47
  /**
48
  * Process shortcode
 
49
  */
50
  public function run() {
51
  $this->args['id'] = isset($this->args['id']) ? $this->args['id'] : uniqid();
64
  ob_start();
65
  require AAM_Core_Config::get(
66
  'login.shortcode.template',
67
+ realpath(dirname(__FILE__) . '/../../Frontend/phtml/login.phtml')
68
  );
69
  $content = ob_get_contents();
70
  ob_end_clean();
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.2.5
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
@@ -191,8 +191,8 @@ class AAM {
191
  //check PHP Version
192
  if (version_compare(PHP_VERSION, '5.3.0') == -1) {
193
  exit(__('PHP 5.3.0 or higher is required.', AAM_KEY));
194
- } elseif (version_compare($wp_version, '3.8') == -1) {
195
- exit(__('WP 3.8 or higher is required.', AAM_KEY));
196
  }
197
  }
198
 
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: All you need to manage access to your WordPress website
6
+ Version: 5.2.6
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
191
  //check PHP Version
192
  if (version_compare(PHP_VERSION, '5.3.0') == -1) {
193
  exit(__('PHP 5.3.0 or higher is required.', AAM_KEY));
194
+ } elseif (version_compare($wp_version, '4.0') == -1) {
195
+ exit(__('WP 4.0 or higher is required.', AAM_KEY));
196
  }
197
  }
198
 
media/js/aam.js CHANGED
@@ -1011,7 +1011,7 @@
1011
 
1012
  //reset button
1013
  $('#menu-reset').bind('click', function () {
1014
- aam.reset('menu');
1015
  });
1016
  }
1017
  }
@@ -1132,7 +1132,7 @@
1132
 
1133
  //reset button
1134
  $('#metabox-reset').bind('click', function () {
1135
- aam.reset('metabox');
1136
  });
1137
 
1138
  $('input[type="checkbox"]', '#metabox-list').each(function () {
@@ -1444,7 +1444,7 @@
1444
 
1445
  //reset button
1446
  $('#capability-reset').bind('click', function () {
1447
- aam.reset('capability');
1448
  });
1449
  }
1450
  }
@@ -1848,11 +1848,21 @@
1848
  subject: aam.getSubject().type,
1849
  subjectId: aam.getSubject().id
1850
  },
 
 
 
 
 
1851
  success: function (response) {
1852
  if (response.status === 'success') {
1853
  $('#post-overwritten').addClass('hidden');
1854
  $.aam.loadAccessForm(type, id);
1855
  }
 
 
 
 
 
1856
  }
1857
  });
1858
  });
@@ -1986,7 +1996,7 @@
1986
  });
1987
 
1988
  $('#redirect-reset').bind('click', function () {
1989
- aam.reset('redirect');
1990
  });
1991
  }
1992
  }
@@ -2059,7 +2069,7 @@
2059
  });
2060
 
2061
  $('#login-redirect-reset').bind('click', function () {
2062
- aam.reset('loginRedirect');
2063
  });
2064
  }
2065
  }
@@ -2126,7 +2136,7 @@
2126
  });
2127
 
2128
  $('#logout-redirect-reset').bind('click', function () {
2129
- aam.reset('logoutRedirect');
2130
  });
2131
  }
2132
  }
@@ -2343,7 +2353,7 @@
2343
 
2344
  //reset button
2345
  $('#route-reset').bind('click', function () {
2346
- aam.reset('route');
2347
  });
2348
  }
2349
  }
@@ -2627,7 +2637,10 @@
2627
  },
2628
  success: function(response) {
2629
  if (response.status === 'success') {
2630
- aam.notification('success', aam.__('All settings were cleared successfully'));
 
 
 
2631
  } else {
2632
  aam.notification('danger', response.reason);
2633
  }
@@ -2658,7 +2671,10 @@
2658
  },
2659
  success: function(response) {
2660
  if (response.status === 'success') {
2661
- aam.notification('success', aam.__('The cache was cleared successfully'));
 
 
 
2662
  } else {
2663
  aam.notification('danger', response.reason);
2664
  }
@@ -3146,7 +3162,7 @@
3146
  * @param {type} object
3147
  * @returns {undefined}
3148
  */
3149
- AAM.prototype.reset = function(object) {
3150
  $.ajax(aamLocal.ajaxurl, {
3151
  type: 'POST',
3152
  data: {
@@ -3157,11 +3173,19 @@
3157
  subjectId: this.getSubject().id,
3158
  object: object
3159
  },
 
 
 
 
 
3160
  success: function () {
3161
  aam.fetchContent('main');
3162
  },
3163
  error: function () {
3164
  aam.notification('danger', aam.__('Application error'));
 
 
 
3165
  }
3166
  });
3167
  };
1011
 
1012
  //reset button
1013
  $('#menu-reset').bind('click', function () {
1014
+ aam.reset('menu', $(this));
1015
  });
1016
  }
1017
  }
1132
 
1133
  //reset button
1134
  $('#metabox-reset').bind('click', function () {
1135
+ aam.reset('metabox', $(this));
1136
  });
1137
 
1138
  $('input[type="checkbox"]', '#metabox-list').each(function () {
1444
 
1445
  //reset button
1446
  $('#capability-reset').bind('click', function () {
1447
+ aam.reset('capability', $(this));
1448
  });
1449
  }
1450
  }
1848
  subject: aam.getSubject().type,
1849
  subjectId: aam.getSubject().id
1850
  },
1851
+ beforeSend: function() {
1852
+ var label = $('#post-reset').text();
1853
+ $('#post-reset').attr('data-original-label', label);
1854
+ $('#post-reset').text(aam.__('Resetting...'));
1855
+ },
1856
  success: function (response) {
1857
  if (response.status === 'success') {
1858
  $('#post-overwritten').addClass('hidden');
1859
  $.aam.loadAccessForm(type, id);
1860
  }
1861
+ },
1862
+ complete: function() {
1863
+ $('#post-reset').text(
1864
+ $('#post-reset').attr('data-original-label')
1865
+ );
1866
  }
1867
  });
1868
  });
1996
  });
1997
 
1998
  $('#redirect-reset').bind('click', function () {
1999
+ aam.reset('redirect', $(this));
2000
  });
2001
  }
2002
  }
2069
  });
2070
 
2071
  $('#login-redirect-reset').bind('click', function () {
2072
+ aam.reset('loginRedirect', $(this));
2073
  });
2074
  }
2075
  }
2136
  });
2137
 
2138
  $('#logout-redirect-reset').bind('click', function () {
2139
+ aam.reset('logoutRedirect', $(this));
2140
  });
2141
  }
2142
  }
2353
 
2354
  //reset button
2355
  $('#route-reset').bind('click', function () {
2356
+ aam.reset('route', $(this));
2357
  });
2358
  }
2359
  }
2637
  },
2638
  success: function(response) {
2639
  if (response.status === 'success') {
2640
+ aam.notification(
2641
+ 'success',
2642
+ aam.__('All settings has been cleared successfully')
2643
+ );
2644
  } else {
2645
  aam.notification('danger', response.reason);
2646
  }
2671
  },
2672
  success: function(response) {
2673
  if (response.status === 'success') {
2674
+ aam.notification(
2675
+ 'success',
2676
+ aam.__('The cache has been cleared successfully')
2677
+ );
2678
  } else {
2679
  aam.notification('danger', response.reason);
2680
  }
3162
  * @param {type} object
3163
  * @returns {undefined}
3164
  */
3165
+ AAM.prototype.reset = function(object, btn) {
3166
  $.ajax(aamLocal.ajaxurl, {
3167
  type: 'POST',
3168
  data: {
3173
  subjectId: this.getSubject().id,
3174
  object: object
3175
  },
3176
+ beforeSend: function() {
3177
+ var label = btn.text();
3178
+ btn.attr('data-original-label', label);
3179
+ btn.text(aam.__('Resetting...'));
3180
+ },
3181
  success: function () {
3182
  aam.fetchContent('main');
3183
  },
3184
  error: function () {
3185
  aam.notification('danger', aam.__('Application error'));
3186
+ },
3187
+ complete: function() {
3188
+ btn.text(btn.attr('data-original-label'));
3189
  }
3190
  });
3191
  };
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Advanced Access Manager ===
2
  Contributors: vasyltech
3
  Tags: access, role, user, capability, page access, post access, content access, comments, security, login redirect, membership, backend lockdown, wp-admin, 404, rest api, xml rpc
4
- Requires at least: 3.8
5
- Tested up to: 4.9.4
6
- Stable tag: 5.2.5
7
 
8
  The most powerful access management plugin for WordPress websites.
9
 
@@ -65,6 +65,13 @@ https://www.youtube.com/watch?v=yiOhjaacNJc
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
 
 
68
  = 5.2.5 =
69
  * Fixed the bug with JWT authentication
70
  * Added the ability to enable/disable XML-RPC
1
  === Advanced Access Manager ===
2
  Contributors: vasyltech
3
  Tags: access, role, user, capability, page access, post access, content access, comments, security, login redirect, membership, backend lockdown, wp-admin, 404, rest api, xml rpc
4
+ Requires at least: 4.0
5
+ Tested up to: 4.9.5
6
+ Stable tag: 5.2.6
7
 
8
  The most powerful access management plugin for WordPress websites.
9
 
65
 
66
  == Changelog ==
67
 
68
+ = 5.2.6 =
69
+ * Dropped support for WordPress versions 3.x. Min supported version is 4.0
70
+ * Fixed bug with Admin Menu access control to Posts list
71
+ * Fixed bug in AAM Core API for get plugins data call
72
+ * Fixed bug with visitors cache auto-flush
73
+ * Minor improvements to the AAM UI
74
+
75
  = 5.2.5 =
76
  * Fixed the bug with JWT authentication
77
  * Added the ability to enable/disable XML-RPC