Advanced Access Manager - Version 3.4.2

Version Description

  • Fixed bug with post & pages access control
  • Added Extension version indicator
Download this release

Release Info

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

Code changes from version 3.4.1 to 3.4.2

Application/Backend/Feature/Capability.php CHANGED
@@ -63,7 +63,7 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
63
  $response['data'][] = array(
64
  $cap,
65
  $this->getGroup($cap),
66
- AAM_Backend_View_Helper::getHumanText($cap),
67
  $this->prepareActionList($cap)
68
  );
69
  }
63
  $response['data'][] = array(
64
  $cap,
65
  $this->getGroup($cap),
66
+ $cap,
67
  $this->prepareActionList($cap)
68
  );
69
  }
Application/Backend/Feature/ProductList.php CHANGED
@@ -16,7 +16,8 @@ return array(
16
  'currency' => 'USD',
17
  'description' => __('Setup access to unlimited number of posts, pages or custom post types as well as define default access to ALL posts, pages, custom post types, categories or custom taxonomies.', AAM_KEY),
18
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FGAHULDEFZV4U',
19
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Plus Package')
 
20
  ),
21
  array(
22
  'title' => 'AAM Role Filter',
@@ -26,7 +27,8 @@ return array(
26
  'currency' => 'USD',
27
  'description' => __('More advanced user and role administration. Based on user capabilities level, filter list of roles that user can manage. Also prevent from editing, promoting or deleting higher level users.', AAM_KEY),
28
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G9V4BT3T8WJSN',
29
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Role Filter')
 
30
  ),
31
  array(
32
  'title' => 'AAM Support',
@@ -46,7 +48,8 @@ return array(
46
  'currency' => 'USD',
47
  'description' => __('Development license gives you an ability to download all the available extensions and use them up to 5 life domains.', AAM_KEY),
48
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZX9RCWU6BTE52',
49
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Development License')
 
50
  ),
51
  array(
52
  'title' => 'AAM Multisite',
@@ -54,7 +57,8 @@ return array(
54
  'type' => 'GNU',
55
  'license' => 'AAMMULTISITE',
56
  'description' => __('Convenient way to navigate between different sites in the Network Admin Panel. This extension adds additional widget to the AAM page that allows to switch between different sites.', AAM_KEY),
57
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Multisite')
 
58
  ),
59
  array(
60
  'title' => 'AAM Post Filter',
@@ -62,7 +66,8 @@ return array(
62
  'type' => 'GNU',
63
  'license' => 'AAMPOSTFILTER',
64
  'description' => AAM_Backend_View_Helper::preparePhrase('[WARNING!] Please use with caution. This is a supportive exension for the post access option [List]. It adds additional post filtering to fix the issue with large amount of post. [Turned on caching] is strongly recommended.', 'strong', 'strong', 'strong'),
65
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Post Filter')
 
66
  ),
67
  array(
68
  'title' => 'AAM Skeleton Extension',
@@ -70,7 +75,8 @@ return array(
70
  'type' => 'GNU',
71
  'license' => 'SKELETONEXT',
72
  'description' => __('Skeleton for custom AAM extension. Please find all necessary documentation inside the source code.', AAM_KEY),
73
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Skeleton Extension')
 
74
  ),
75
  array(
76
  'title' => 'CodePinch',
16
  'currency' => 'USD',
17
  'description' => __('Setup access to unlimited number of posts, pages or custom post types as well as define default access to ALL posts, pages, custom post types, categories or custom taxonomies.', AAM_KEY),
18
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FGAHULDEFZV4U',
19
+ 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Plus Package'),
20
+ 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Plus Package')
21
  ),
22
  array(
23
  'title' => 'AAM Role Filter',
27
  'currency' => 'USD',
28
  'description' => __('More advanced user and role administration. Based on user capabilities level, filter list of roles that user can manage. Also prevent from editing, promoting or deleting higher level users.', AAM_KEY),
29
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G9V4BT3T8WJSN',
30
+ 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Role Filter'),
31
+ 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Role Filter')
32
  ),
33
  array(
34
  'title' => 'AAM Support',
48
  'currency' => 'USD',
49
  'description' => __('Development license gives you an ability to download all the available extensions and use them up to 5 life domains.', AAM_KEY),
50
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZX9RCWU6BTE52',
51
+ 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Development License'),
52
+ 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Development License')
53
  ),
54
  array(
55
  'title' => 'AAM Multisite',
57
  'type' => 'GNU',
58
  'license' => 'AAMMULTISITE',
59
  'description' => __('Convenient way to navigate between different sites in the Network Admin Panel. This extension adds additional widget to the AAM page that allows to switch between different sites.', AAM_KEY),
60
+ 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Multisite'),
61
+ 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Multisite')
62
  ),
63
  array(
64
  'title' => 'AAM Post Filter',
66
  'type' => 'GNU',
67
  'license' => 'AAMPOSTFILTER',
68
  'description' => AAM_Backend_View_Helper::preparePhrase('[WARNING!] Please use with caution. This is a supportive exension for the post access option [List]. It adds additional post filtering to fix the issue with large amount of post. [Turned on caching] is strongly recommended.', 'strong', 'strong', 'strong'),
69
+ 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Post Filter'),
70
+ 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Post Filter')
71
  ),
72
  array(
73
  'title' => 'AAM Skeleton Extension',
75
  'type' => 'GNU',
76
  'license' => 'SKELETONEXT',
77
  'description' => __('Skeleton for custom AAM extension. Please find all necessary documentation inside the source code.', AAM_KEY),
78
+ 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Skeleton Extension'),
79
+ 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Skeleton Extension')
80
  ),
81
  array(
82
  'title' => 'CodePinch',
Application/Backend/phtml/extension.phtml CHANGED
@@ -35,7 +35,7 @@
35
  <?php foreach ($this->getProductList('commercial') as $product) { ?>
36
  <tr>
37
  <td>
38
- <span class='aam-setting-title'><?php echo $product['title'], ' - ' . ($product['cost'] . ' <small>' . $product['currency'] . '</small>'); ?></span>
39
  <p class="aam-extension-description">
40
  <?php echo $product['description']; ?>
41
  </p>
@@ -60,7 +60,7 @@
60
  <?php foreach ($this->getProductList('GNU') as $product) { ?>
61
  <tr>
62
  <td>
63
- <span class='aam-setting-title'><?php echo $product['title'], ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></span>
64
  <p class="aam-extension-description">
65
  <?php echo $product['description']; ?>
66
  </p>
35
  <?php foreach ($this->getProductList('commercial') as $product) { ?>
36
  <tr>
37
  <td>
38
+ <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''), ' - ' . ($product['cost'] . ' <small>' . $product['currency'] . '</small>'); ?></span>
39
  <p class="aam-extension-description">
40
  <?php echo $product['description']; ?>
41
  </p>
60
  <?php foreach ($this->getProductList('GNU') as $product) { ?>
61
  <tr>
62
  <td>
63
+ <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''), ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></span>
64
  <p class="aam-extension-description">
65
  <?php echo $product['description']; ?>
66
  </p>
Application/Core/Object/Post.php CHANGED
@@ -73,15 +73,17 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
73
  $option = get_post_meta($this->getPost()->ID, $opname, true);
74
  }
75
 
76
- //try to inherit from terms or default first - AAM Plus Package or any
77
- //other extension that use this filter
78
- $option = apply_filters('aam-post-access-filter', $option, $this);
79
-
80
  //try to inherit from parent
81
  if (empty($option)) {
82
  $option = $subject->inheritFromParent('post', $this->getPost()->ID);
83
  $this->setInherited(empty($option) ? null : 'role');
84
  }
 
 
 
 
 
 
85
  }
86
 
87
  $this->setOption($option);
@@ -165,7 +167,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
165
  public function has($action) {
166
  $option = $this->getOption();
167
 
168
- return !empty($option[$action]);
169
  }
170
 
171
  /**
73
  $option = get_post_meta($this->getPost()->ID, $opname, true);
74
  }
75
 
 
 
 
 
76
  //try to inherit from parent
77
  if (empty($option)) {
78
  $option = $subject->inheritFromParent('post', $this->getPost()->ID);
79
  $this->setInherited(empty($option) ? null : 'role');
80
  }
81
+
82
+ //try to inherit from terms or default settings - AAM Plus Package or any
83
+ //other extension that use this filter
84
+ if (empty($option)) {
85
+ $option = apply_filters('aam-post-access-filter', $option, $this);
86
+ }
87
  }
88
 
89
  $this->setOption($option);
167
  public function has($action) {
168
  $option = $this->getOption();
169
 
170
+ return (isset($option[$action]) && $option[$action]);
171
  }
172
 
173
  /**
Application/Core/Repository.php CHANGED
@@ -226,6 +226,17 @@ class AAM_Core_Repository {
226
  return $status;
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
229
  /**
230
  *
231
  * @param type $slug
226
  return $status;
227
  }
228
 
229
+ /**
230
+ *
231
+ * @param type $title
232
+ * @return type
233
+ */
234
+ public function getExtensionVersion($title) {
235
+ $const = str_replace(' ', '_', strtoupper($title));
236
+
237
+ return (defined($const) ? constant($const) : '');
238
+ }
239
+
240
  /**
241
  *
242
  * @param type $slug
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: Manage User and Role Access to WordPress Backend and Frontend.
6
- Version: 3.4.1
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: http://www.vasyltech.com
9
 
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: Manage User and Role Access to WordPress Backend and Frontend.
6
+ Version: 3.4.2
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: http://www.vasyltech.com
9
 
media/css/aam.css CHANGED
@@ -649,6 +649,10 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
649
  display: block;
650
  }
651
 
 
 
 
 
652
  .aam-setting-description, .aam-extension-description {
653
  font-size: 0.9em;
654
  text-align: justify;
649
  display: block;
650
  }
651
 
652
+ .aam-setting-title small {
653
+ font-size: 0.7em;
654
+ }
655
+
656
  .aam-setting-description, .aam-extension-description {
657
  font-size: 0.9em;
658
  text-align: justify;
media/js/aam-ui.js CHANGED
@@ -1316,6 +1316,7 @@
1316
  ordering: false,
1317
  pagingType: 'simple',
1318
  serverSide: false,
 
1319
  ajax: {
1320
  url: aamLocal.ajaxurl,
1321
  type: 'POST',
1316
  ordering: false,
1317
  pagingType: 'simple',
1318
  serverSide: false,
1319
+ stateSave: true,
1320
  ajax: {
1321
  url: aamLocal.ajaxurl,
1322
  type: 'POST',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
3
  Tags: access, role, user, capability, page, post, permission, security
4
  Requires at least: 3.8
5
  Tested up to: 4.5.3
6
- Stable tag: 3.4.1
7
 
8
  One of the best tools in WordPress repository to manage access to your posts,
9
  pages, categories and backend area for users, roles and visitors.
@@ -59,6 +59,10 @@ out more about the Advanced Access Manager.
59
 
60
  == Changelog ==
61
 
 
 
 
 
62
  = 3.4.1 =
63
  * Fixed bug with visitor access control
64
 
3
  Tags: access, role, user, capability, page, post, permission, security
4
  Requires at least: 3.8
5
  Tested up to: 4.5.3
6
+ Stable tag: 3.4.2
7
 
8
  One of the best tools in WordPress repository to manage access to your posts,
9
  pages, categories and backend area for users, roles and visitors.
59
 
60
  == Changelog ==
61
 
62
+ = 3.4.2 =
63
+ * Fixed bug with post & pages access control
64
+ * Added Extension version indicator
65
+
66
  = 3.4.1 =
67
  * Fixed bug with visitor access control
68