Version Description
- Fixed the PHP bug reported by CodePinch service
- Fixed the bug with Posts & Pages redirect URL
- Fixed the bug related to extensions update status
- Optimized cron procedure for AAM maintenance needs
- Added ability to restore default capabilities for users
- Move AAM User Activity to the free extension suite
- Introduced Development Package for unlimited number of sites
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 4.7.1 |
Comparing to | |
See all releases |
Code changes from version 4.7 to 4.7.1
- Application/Backend/Feature/Capability.php +26 -1
- Application/Backend/Feature/Extension.php +1 -0
- Application/Backend/Feature/Post.php +5 -1
- Application/Backend/View/Helper.php +3 -2
- Application/Backend/phtml/extension.phtml +2 -2
- Application/Backend/phtml/main-panel.phtml +1 -1
- Application/Backend/phtml/object/capability.phtml +12 -0
- Application/Core/Object/Capability.php +10 -0
- Application/Core/Subject/User.php +8 -0
- Application/Extension/List.php +26 -29
- Application/Extension/Repository.php +19 -11
- Application/Extension/Server.php +2 -1
- aam.php +9 -5
- media/css/aam.css +4 -0
- media/js/aam-interface.js +22 -0
- readme.txt +10 -1
Application/Backend/Feature/Capability.php
CHANGED
@@ -129,6 +129,18 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
|
|
129 |
return json_encode($response);
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
/**
|
133 |
* @inheritdoc
|
134 |
*/
|
@@ -276,7 +288,20 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
|
|
276 |
'aam-capability-group-filter', $response, $capability
|
277 |
);
|
278 |
}
|
279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
/**
|
281 |
* Register capability feature
|
282 |
*
|
129 |
return json_encode($response);
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
*
|
134 |
+
* @return type
|
135 |
+
*/
|
136 |
+
public function reset() {
|
137 |
+
$subject = AAM_Backend_View::getSubject();
|
138 |
+
|
139 |
+
return json_encode(array(
|
140 |
+
'status' => ($subject->resetCapabilities() ? 'success' : 'failure')
|
141 |
+
));
|
142 |
+
}
|
143 |
+
|
144 |
/**
|
145 |
* @inheritdoc
|
146 |
*/
|
288 |
'aam-capability-group-filter', $response, $capability
|
289 |
);
|
290 |
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Check overwritten status
|
294 |
+
*
|
295 |
+
* @return boolean
|
296 |
+
*
|
297 |
+
* @access protected
|
298 |
+
*/
|
299 |
+
protected function isOverwritten() {
|
300 |
+
$object = AAM_Backend_View::getSubject()->getObject('capability');
|
301 |
+
|
302 |
+
return $object->isOverwritten();
|
303 |
+
}
|
304 |
+
|
305 |
/**
|
306 |
* Register capability feature
|
307 |
*
|
Application/Backend/Feature/Extension.php
CHANGED
@@ -163,6 +163,7 @@ class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
|
|
163 |
'position' => 999,
|
164 |
'title' => __('Extensions', AAM_KEY),
|
165 |
'capability' => $cap,
|
|
|
166 |
'notification' => ($updated ? $updated : 'NEW'),
|
167 |
'subjects' => array(
|
168 |
'AAM_Core_Subject_Role',
|
163 |
'position' => 999,
|
164 |
'title' => __('Extensions', AAM_KEY),
|
165 |
'capability' => $cap,
|
166 |
+
'class' => 'highlight',
|
167 |
'notification' => ($updated ? $updated : 'NEW'),
|
168 |
'subjects' => array(
|
169 |
'AAM_Core_Subject_Role',
|
Application/Backend/Feature/Post.php
CHANGED
@@ -327,7 +327,11 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
|
|
327 |
//prepare the response object
|
328 |
if (is_a($object, 'AAM_Core_Object')) {
|
329 |
foreach($object->getOption() as $key => $value) {
|
330 |
-
$
|
|
|
|
|
|
|
|
|
331 |
}
|
332 |
$metadata = array('overwritten' => $object->isOverwritten());
|
333 |
}
|
327 |
//prepare the response object
|
328 |
if (is_a($object, 'AAM_Core_Object')) {
|
329 |
foreach($object->getOption() as $key => $value) {
|
330 |
+
if (is_numeric($value) || is_bool($value)) {
|
331 |
+
$access[$key] = ($value ? 1 : 0); //TODO - to support legacy
|
332 |
+
} else {
|
333 |
+
$access[$key] = $value;
|
334 |
+
}
|
335 |
}
|
336 |
$metadata = array('overwritten' => $object->isOverwritten());
|
337 |
}
|
Application/Backend/View/Helper.php
CHANGED
@@ -27,8 +27,9 @@ class AAM_Backend_View_Helper {
|
|
27 |
*/
|
28 |
public static function preparePhrase($phrase) {
|
29 |
//prepare search patterns
|
30 |
-
$num
|
31 |
-
$search = array_fill(0, ($num - 1) * 2, null);
|
|
|
32 |
array_walk($search, 'AAM_Backend_View_Helper::prepareWalk');
|
33 |
|
34 |
$replace = array();
|
27 |
*/
|
28 |
public static function preparePhrase($phrase) {
|
29 |
//prepare search patterns
|
30 |
+
$num = func_num_args();
|
31 |
+
$search = ($num > 1 ? array_fill(0, ($num - 1) * 2, null) : array());
|
32 |
+
|
33 |
array_walk($search, 'AAM_Backend_View_Helper::prepareWalk');
|
34 |
|
35 |
$replace = array();
|
Application/Backend/phtml/extension.phtml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12">
|
5 |
<p class="aam-info">
|
6 |
-
<?php echo AAM_Backend_View_Helper::preparePhrase('By purchasing any extension below you obtain the license
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
@@ -43,7 +43,7 @@
|
|
43 |
<tr>
|
44 |
<td>
|
45 |
<span class='aam-setting-title'><?php echo $product['title'], (!empty($product['new']) ? ' <span class="badge">NEW</span> ' : ''), (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''), ' - ' . ($product['price'] . ' <small>' . $product['currency'] . '</small>'); ?></span>
|
46 |
-
<?php if (!empty($product['license'])) { ?><small class="aam-license-key"><b>License
|
47 |
<p class="aam-extension-description">
|
48 |
<?php echo $product['description']; ?>
|
49 |
</p>
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12">
|
5 |
<p class="aam-info">
|
6 |
+
<?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('By purchasing any extension below you obtain the license to use it [for one life site] unless you purchased %sdevelopment package%s. The license can be used for unlimited number of test or development sites where URL is either [localhost] or starts with [dev.], [staging.], [test.] or [demo.] [before it is activated on the life site]. Contact us immediately if you have troubles installing extension. [Money back guaranteed] within 30 day from the time of purchase.', 'b', 'i', 'i', 'i', 'i', 'i', 'b', 'b'), '<a href="https://aamplugin.com/development-package" target="_blank">', '</a>'); ?><br/>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
43 |
<tr>
|
44 |
<td>
|
45 |
<span class='aam-setting-title'><?php echo $product['title'], (!empty($product['new']) ? ' <span class="badge">NEW</span> ' : ''), (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''), ' - ' . ($product['price'] . ' <small>' . $product['currency'] . '</small>'); ?></span>
|
46 |
+
<?php if (!empty($product['license'])) { ?><small class="aam-license-key"><b>License:</b> <?php echo $product['license'] . (!empty($product['expire']) ? " (expires {$product['expire']})" : ''); ?></small><?php } ?>
|
47 |
<p class="aam-extension-description">
|
48 |
<?php echo $product['description']; ?>
|
49 |
</p>
|
Application/Backend/phtml/main-panel.phtml
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
<ul class="list-group" id="feature-list">
|
6 |
<?php
|
7 |
foreach (AAM_Backend_Feature::retriveList() as $i => $feature) {
|
8 |
-
echo '<li class="list-group-item" data-feature="' . $feature->uid . '">';
|
9 |
echo $feature->title;
|
10 |
echo (empty($feature->notification) ? '' : ' <span class="badge">' . $feature->notification . '</span>');
|
11 |
echo '</li>';
|
5 |
<ul class="list-group" id="feature-list">
|
6 |
<?php
|
7 |
foreach (AAM_Backend_Feature::retriveList() as $i => $feature) {
|
8 |
+
echo '<li class="list-group-item' . (isset($feature->class) ? ' ' . $feature->class : '') . '" data-feature="' . $feature->uid . '">';
|
9 |
echo $feature->title;
|
10 |
echo (empty($feature->notification) ? '' : ' <span class="badge">' . $feature->notification . '</span>');
|
11 |
echo '</li>';
|
Application/Backend/phtml/object/capability.phtml
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php if (defined('AAM_KEY')) { ?>
|
2 |
<div class="aam-feature" id="capability-content">
|
3 |
<?php $subject = AAM_Backend_View::getSubject(); ?>
|
|
|
4 |
<div class="aam-feature-top-actions text-right">
|
5 |
<div class="btn-group">
|
6 |
<a href="#" class="btn btn-xs btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="capability-filter">
|
@@ -16,6 +17,17 @@
|
|
16 |
</div>
|
17 |
<a href="#" class="btn btn-xs btn-primary" id="add-capability"><i class="icon-plus"></i> <?php echo __('Create', AAM_KEY); ?></a>
|
18 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
<table id="capability-list" class="table table-striped table-bordered">
|
21 |
<thead>
|
1 |
<?php if (defined('AAM_KEY')) { ?>
|
2 |
<div class="aam-feature" id="capability-content">
|
3 |
<?php $subject = AAM_Backend_View::getSubject(); ?>
|
4 |
+
|
5 |
<div class="aam-feature-top-actions text-right">
|
6 |
<div class="btn-group">
|
7 |
<a href="#" class="btn btn-xs btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="capability-filter">
|
17 |
</div>
|
18 |
<a href="#" class="btn btn-xs btn-primary" id="add-capability"><i class="icon-plus"></i> <?php echo __('Create', AAM_KEY); ?></a>
|
19 |
</div>
|
20 |
+
|
21 |
+
<?php if ($this->isOverwritten()) { ?>
|
22 |
+
<div class="row">
|
23 |
+
<div class="col-xs-12">
|
24 |
+
<div class="aam-overwrite">
|
25 |
+
<span><i class="icon-check"></i> <?php echo __('Capabilities are customized', AAM_KEY); ?></span>
|
26 |
+
<span><a href="#" id="capability-reset" class="btn btn-xs btn-danger"><?php echo __('Reset To Default', AAM_KEY); ?></a>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
<?php } ?>
|
31 |
|
32 |
<table id="capability-list" class="table table-striped table-bordered">
|
33 |
<thead>
|
Application/Core/Object/Capability.php
CHANGED
@@ -28,6 +28,16 @@ class AAM_Core_Object_Capability extends AAM_Core_Object {
|
|
28 |
parent::__construct($subject);
|
29 |
|
30 |
$this->setOption($this->getSubject()->getCapabilities());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
28 |
parent::__construct($subject);
|
29 |
|
30 |
$this->setOption($this->getSubject()->getCapabilities());
|
31 |
+
|
32 |
+
//check if capabilities are overwritten but only for user subject
|
33 |
+
if (is_a($this->getSubject(), 'AAM_Core_Subject_User')) {
|
34 |
+
$caps = get_user_option(
|
35 |
+
AAM_Core_Subject_User::AAM_CAPKEY, $this->getSubject()->getId()
|
36 |
+
);
|
37 |
+
if (!empty($caps)) {
|
38 |
+
$this->setOverwritten(true);
|
39 |
+
}
|
40 |
+
}
|
41 |
}
|
42 |
|
43 |
/**
|
Application/Core/Subject/User.php
CHANGED
@@ -161,6 +161,14 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
|
|
161 |
//save and return the result of operation
|
162 |
return update_user_option($this->getId(), self::AAM_CAPKEY, $caps);
|
163 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
/**
|
166 |
* Update user's option
|
161 |
//save and return the result of operation
|
162 |
return update_user_option($this->getId(), self::AAM_CAPKEY, $caps);
|
163 |
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
*
|
167 |
+
* @return type
|
168 |
+
*/
|
169 |
+
public function resetCapabilities() {
|
170 |
+
return delete_user_option($this->getId(), self::AAM_CAPKEY);
|
171 |
+
}
|
172 |
|
173 |
/**
|
174 |
* Update user's option
|
Application/Extension/List.php
CHANGED
@@ -12,62 +12,51 @@ return array(
|
|
12 |
'title' => 'AAM Complete Package',
|
13 |
'id' => 'AAM_COMPLETE_PACKAGE',
|
14 |
'type' => 'commercial',
|
15 |
-
'price' => '$
|
16 |
'currency' => 'USD',
|
17 |
-
'description' => 'Get list of all available premium extensions in one package. Any additional premium extensions in the future will be available for free. Get complete package today and instantly save
|
18 |
-
'storeURL' => 'https://
|
19 |
'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null)
|
20 |
),
|
21 |
'AAM_PLUS_PACKAGE' => array(
|
22 |
'title' => 'AAM Plus Package',
|
23 |
'id' => 'AAM_PLUS_PACKAGE',
|
24 |
'type' => 'commercial',
|
25 |
-
'price' => '$
|
26 |
'currency' => 'USD',
|
27 |
-
'description' => 'Our best selling extension that allows you to manage access to unlimited number of posts, pages, custom post types, categories, custom hierarchical taxonomies or define the default access to all.
|
28 |
-
'storeURL' => 'https://
|
29 |
'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null)
|
30 |
),
|
31 |
'AAM_IP_CHECK' => array(
|
32 |
'title' => 'AAM IP Check',
|
33 |
'id' => 'AAM_IP_CHECK',
|
34 |
'type' => 'commercial',
|
35 |
-
'price' => '$
|
36 |
'currency' => 'USD',
|
37 |
'new' => true,
|
38 |
-
'description' => 'Manage access to your website based on a visitor geo-location, refered host or IP address.
|
39 |
-
'storeURL' => 'https://
|
40 |
'version' => (defined('AAM_IP_CHECK') ? constant('AAM_IP_CHECK') : null)
|
41 |
),
|
42 |
-
'AAM_USER_ACTIVITY' => array(
|
43 |
-
'title' => 'AAM User Activity',
|
44 |
-
'id' => 'AAM_USER_ACTIVITY',
|
45 |
-
'type' => 'commercial',
|
46 |
-
'price' => '$10',
|
47 |
-
'currency' => 'USD',
|
48 |
-
'new' => true,
|
49 |
-
'description' => 'Track any kind of user or visitor activity on your website. <a href="https://aamplugin.com/help/how-to-track-any-wordpress-user-activity" target="_blank">Read more.</a>',
|
50 |
-
'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WUZ7XBWHDNWS2',
|
51 |
-
'version' => (defined('AAM_USER_ACTIVITY') ? constant('AAM_USER_ACTIVITY') : null)
|
52 |
-
),
|
53 |
'AAM_ROLE_HIERARCHY' => array(
|
54 |
'title' => 'AAM Role Hierarchy',
|
55 |
'id' => 'AAM_ROLE_HIERARCHY',
|
56 |
'type' => 'commercial',
|
57 |
-
'price' => '$
|
58 |
'currency' => 'USD',
|
59 |
-
'description' => 'Create complex role hierarchy and automatically inherit access settings from parent roles.
|
60 |
-
'storeURL' => 'https://
|
61 |
'version' => (defined('AAM_ROLE_HIERARCHY') ? constant('AAM_ROLE_HIERARCHY') : null)
|
62 |
),
|
63 |
'AAM_ROLE_FILTER' => array(
|
64 |
'title' => 'AAM Role Filter',
|
65 |
'id' => 'AAM_ROLE_FILTER',
|
66 |
'type' => 'commercial',
|
67 |
-
'price' => '$
|
68 |
'currency' => 'USD',
|
69 |
-
'description' => 'Based on user levels, restrict access to manage list of roles and users that have higher user level.
|
70 |
-
'storeURL' => 'https://
|
71 |
'version' => (defined('AAM_ROLE_FILTER') ? constant('AAM_ROLE_FILTER') : null)
|
72 |
),
|
73 |
'AAM_PAYMENT' => array(
|
@@ -77,8 +66,8 @@ return array(
|
|
77 |
'price' => '$20',
|
78 |
'new' => true,
|
79 |
'currency' => 'USD',
|
80 |
-
'description' => 'Start selling access to your posts, categories or user levels.
|
81 |
-
'storeURL' => 'https://
|
82 |
'version' => (defined('AAM_PAYMENT') ? constant('AAM_PAYMENT') : null)
|
83 |
),
|
84 |
'AAM_MULTISITE' => array(
|
@@ -96,5 +85,13 @@ return array(
|
|
96 |
'license' => 'AAMCONFIGPRESS',
|
97 |
'description' => 'Extension to manage AAM core functionality with advanced configuration settings.',
|
98 |
'version' => (defined('AAM_CONFIGPRESS') ? constant('AAM_CONFIGPRESS') : null)
|
99 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
);
|
12 |
'title' => 'AAM Complete Package',
|
13 |
'id' => 'AAM_COMPLETE_PACKAGE',
|
14 |
'type' => 'commercial',
|
15 |
+
'price' => '$99',
|
16 |
'currency' => 'USD',
|
17 |
+
'description' => 'Get list of all available premium extensions in one package. Any additional premium extensions in the future will be available for free. Get complete package today and instantly save over 50%.',
|
18 |
+
'storeURL' => 'https://aamplugin.com/complete-package',
|
19 |
'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null)
|
20 |
),
|
21 |
'AAM_PLUS_PACKAGE' => array(
|
22 |
'title' => 'AAM Plus Package',
|
23 |
'id' => 'AAM_PLUS_PACKAGE',
|
24 |
'type' => 'commercial',
|
25 |
+
'price' => '$50',
|
26 |
'currency' => 'USD',
|
27 |
+
'description' => 'Our best selling extension that allows you to manage access to unlimited number of posts, pages, custom post types, categories, custom hierarchical taxonomies or define the default access to all.',
|
28 |
+
'storeURL' => 'https://aamplugin.com/extension/plus-package',
|
29 |
'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null)
|
30 |
),
|
31 |
'AAM_IP_CHECK' => array(
|
32 |
'title' => 'AAM IP Check',
|
33 |
'id' => 'AAM_IP_CHECK',
|
34 |
'type' => 'commercial',
|
35 |
+
'price' => '$30',
|
36 |
'currency' => 'USD',
|
37 |
'new' => true,
|
38 |
+
'description' => 'Manage access to your website based on a visitor geo-location, refered host or IP address.',
|
39 |
+
'storeURL' => 'https://aamplugin.com/extension/ip-check',
|
40 |
'version' => (defined('AAM_IP_CHECK') ? constant('AAM_IP_CHECK') : null)
|
41 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
'AAM_ROLE_HIERARCHY' => array(
|
43 |
'title' => 'AAM Role Hierarchy',
|
44 |
'id' => 'AAM_ROLE_HIERARCHY',
|
45 |
'type' => 'commercial',
|
46 |
+
'price' => '$30',
|
47 |
'currency' => 'USD',
|
48 |
+
'description' => 'Create complex role hierarchy and automatically inherit access settings from parent roles.',
|
49 |
+
'storeURL' => 'https://aamplugin.com/extension/role-hierarchy',
|
50 |
'version' => (defined('AAM_ROLE_HIERARCHY') ? constant('AAM_ROLE_HIERARCHY') : null)
|
51 |
),
|
52 |
'AAM_ROLE_FILTER' => array(
|
53 |
'title' => 'AAM Role Filter',
|
54 |
'id' => 'AAM_ROLE_FILTER',
|
55 |
'type' => 'commercial',
|
56 |
+
'price' => '$30',
|
57 |
'currency' => 'USD',
|
58 |
+
'description' => 'Based on user levels, restrict access to manage list of roles and users that have higher user level.',
|
59 |
+
'storeURL' => 'https://aamplugin.com/extension/role-filter',
|
60 |
'version' => (defined('AAM_ROLE_FILTER') ? constant('AAM_ROLE_FILTER') : null)
|
61 |
),
|
62 |
'AAM_PAYMENT' => array(
|
66 |
'price' => '$20',
|
67 |
'new' => true,
|
68 |
'currency' => 'USD',
|
69 |
+
'description' => 'Start selling access to your posts, categories or user levels.',
|
70 |
+
'storeURL' => 'https://aamplugin.com/extension/payment',
|
71 |
'version' => (defined('AAM_PAYMENT') ? constant('AAM_PAYMENT') : null)
|
72 |
),
|
73 |
'AAM_MULTISITE' => array(
|
85 |
'license' => 'AAMCONFIGPRESS',
|
86 |
'description' => 'Extension to manage AAM core functionality with advanced configuration settings.',
|
87 |
'version' => (defined('AAM_CONFIGPRESS') ? constant('AAM_CONFIGPRESS') : null)
|
88 |
+
),
|
89 |
+
'AAM_USER_ACTIVITY' => array(
|
90 |
+
'title' => 'AAM User Activities',
|
91 |
+
'id' => 'AAM_USER_ACTIVITY',
|
92 |
+
'type' => 'GNU',
|
93 |
+
'license' => 'AAMUSERACTIVITY',
|
94 |
+
'description' => 'Track any kind of user or visitor activity on your website. <a href="https://aamplugin.com/help/how-to-track-any-wordpress-user-activity" target="_blank">Read more.</a>',
|
95 |
+
'version' => (defined('AAM_USER_ACTIVITY') ? constant('AAM_USER_ACTIVITY') : null)
|
96 |
+
),
|
97 |
);
|
Application/Extension/Repository.php
CHANGED
@@ -150,7 +150,9 @@ class AAM_Extension_Repository {
|
|
150 |
//retrieve the installed list of extensions
|
151 |
$list = AAM_Core_Compatibility::getLicenseList();
|
152 |
|
153 |
-
$list[$package->id] = array(
|
|
|
|
|
154 |
|
155 |
//update the extension list
|
156 |
AAM_Core_API::updateOption('aam-extensions', $list);
|
@@ -208,17 +210,18 @@ class AAM_Extension_Repository {
|
|
208 |
$check = AAM_Core_API::getOption('aam-check', array(), 'site');
|
209 |
|
210 |
foreach ($list as $id => &$item) {
|
211 |
-
//update extension status
|
212 |
-
$item['status'] = $this->checkStatus($item, $check);
|
213 |
-
|
214 |
//get premium license from the stored license index
|
215 |
if (empty($item['license'])) {
|
216 |
if (!empty($index[$id]['license'])) {
|
217 |
$item['license'] = $index[$id]['license'];
|
|
|
218 |
} else {
|
219 |
$item['license'] = '';
|
220 |
}
|
221 |
}
|
|
|
|
|
|
|
222 |
}
|
223 |
|
224 |
$this->list = $list;
|
@@ -229,19 +232,24 @@ class AAM_Extension_Repository {
|
|
229 |
|
230 |
/**
|
231 |
*
|
232 |
-
* @param type $
|
233 |
* @param type $index
|
234 |
* @return type
|
235 |
*/
|
236 |
-
protected function checkStatus($
|
237 |
-
$id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
if (defined($id)) { //extension is installed
|
240 |
-
if (isset($index->$id)
|
241 |
&& version_compare(constant($id), $index->$id->version) == -1) {
|
242 |
-
|
243 |
-
} else {
|
244 |
-
$status = AAM_Extension_Repository::STATUS_INSTALLED;
|
245 |
}
|
246 |
} else {
|
247 |
$status = AAM_Extension_Repository::STATUS_DOWNLOAD;
|
150 |
//retrieve the installed list of extensions
|
151 |
$list = AAM_Core_Compatibility::getLicenseList();
|
152 |
|
153 |
+
$list[$package->id] = array(
|
154 |
+
'license' => $license, 'expire' => $package->expire
|
155 |
+
);
|
156 |
|
157 |
//update the extension list
|
158 |
AAM_Core_API::updateOption('aam-extensions', $list);
|
210 |
$check = AAM_Core_API::getOption('aam-check', array(), 'site');
|
211 |
|
212 |
foreach ($list as $id => &$item) {
|
|
|
|
|
|
|
213 |
//get premium license from the stored license index
|
214 |
if (empty($item['license'])) {
|
215 |
if (!empty($index[$id]['license'])) {
|
216 |
$item['license'] = $index[$id]['license'];
|
217 |
+
$item['expire'] = (isset($index[$id]['expire']) ? $index[$id]['expire'] : null);
|
218 |
} else {
|
219 |
$item['license'] = '';
|
220 |
}
|
221 |
}
|
222 |
+
|
223 |
+
//update extension status
|
224 |
+
$item['status'] = $this->checkStatus($item, $check);
|
225 |
}
|
226 |
|
227 |
$this->list = $list;
|
232 |
|
233 |
/**
|
234 |
*
|
235 |
+
* @param type $item
|
236 |
* @param type $index
|
237 |
* @return type
|
238 |
*/
|
239 |
+
protected function checkStatus($item, $index) {
|
240 |
+
$id = $item['id'];
|
241 |
+
$status = AAM_Extension_Repository::STATUS_INSTALLED;
|
242 |
+
|
243 |
+
if ($item['type'] == 'commercial') {
|
244 |
+
$valid = !empty($item['license']);
|
245 |
+
} else {
|
246 |
+
$valid = true;
|
247 |
+
}
|
248 |
|
249 |
if (defined($id)) { //extension is installed
|
250 |
+
if ($valid && isset($index->$id)
|
251 |
&& version_compare(constant($id), $index->$id->version) == -1) {
|
252 |
+
$status = AAM_Extension_Repository::STATUS_UPDATE;
|
|
|
|
|
253 |
}
|
254 |
} else {
|
255 |
$status = AAM_Extension_Repository::STATUS_DOWNLOAD;
|
Application/Extension/Server.php
CHANGED
@@ -97,7 +97,8 @@ final class AAM_Extension_Server {
|
|
97 |
*/
|
98 |
protected static function send($request, $params) {
|
99 |
//add AAM UID
|
100 |
-
$params['uid']
|
|
|
101 |
|
102 |
$response = self::parseResponse(
|
103 |
AAM_Core_API::cURL(self::SERVER_URL . $request, false, $params)
|
97 |
*/
|
98 |
protected static function send($request, $params) {
|
99 |
//add AAM UID
|
100 |
+
$params['uid'] = AAM_Core_API::getOption('aam-uid', null, 'site');
|
101 |
+
$params['email'] = AAM_Core_API::getOption('admin_email');
|
102 |
|
103 |
$response = self::parseResponse(
|
104 |
AAM_Core_API::cURL(self::SERVER_URL . $request, false, $params)
|
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: 4.7
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
@@ -151,10 +151,14 @@ class AAM {
|
|
151 |
* @access public
|
152 |
*/
|
153 |
public static function cron() {
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
|
160 |
/**
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: All you need to manage access to your WordPress website
|
6 |
+
Version: 4.7.1
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
151 |
* @access public
|
152 |
*/
|
153 |
public static function cron() {
|
154 |
+
$extensions = AAM_Core_API::getOption('aam-extensions', null, 'site');
|
155 |
+
|
156 |
+
if (!empty($extensions)) {
|
157 |
+
//grab the server extension list
|
158 |
+
AAM_Core_API::updateOption(
|
159 |
+
'aam-check', AAM_Extension_Server::check(), 'site'
|
160 |
+
);
|
161 |
+
}
|
162 |
}
|
163 |
|
164 |
/**
|
media/css/aam.css
CHANGED
@@ -409,6 +409,10 @@ a.btn:focus, a.btn:active {
|
|
409 |
margin-bottom: 0;
|
410 |
}
|
411 |
|
|
|
|
|
|
|
|
|
412 |
/** DATATABLES **/
|
413 |
.dataTables_info {
|
414 |
float: left;
|
409 |
margin-bottom: 0;
|
410 |
}
|
411 |
|
412 |
+
.list-group-item.highlight {
|
413 |
+
background-color: #F7D3A1;
|
414 |
+
}
|
415 |
+
|
416 |
/** DATATABLES **/
|
417 |
.dataTables_info {
|
418 |
float: left;
|
media/js/aam-interface.js
CHANGED
@@ -1285,6 +1285,28 @@
|
|
1285 |
}
|
1286 |
});
|
1287 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1288 |
}
|
1289 |
|
1290 |
aam.addHook('init', initialize);
|
1285 |
}
|
1286 |
});
|
1287 |
});
|
1288 |
+
|
1289 |
+
//reset button
|
1290 |
+
$('#capability-reset').bind('click', function (event) {
|
1291 |
+
event.preventDefault();
|
1292 |
+
|
1293 |
+
$.ajax(aamLocal.ajaxurl, {
|
1294 |
+
type: 'POST',
|
1295 |
+
dataType: 'json',
|
1296 |
+
data: {
|
1297 |
+
action: 'aam',
|
1298 |
+
sub_action: 'Capability.reset',
|
1299 |
+
_ajax_nonce: aamLocal.nonce,
|
1300 |
+
subject: aam.getSubject().type,
|
1301 |
+
subjectId: aam.getSubject().id
|
1302 |
+
},
|
1303 |
+
success: function (response) {
|
1304 |
+
if (response.status === 'success') {
|
1305 |
+
aam.fetchContent();
|
1306 |
+
}
|
1307 |
+
}
|
1308 |
+
});
|
1309 |
+
});
|
1310 |
}
|
1311 |
|
1312 |
aam.addHook('init', initialize);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access, role, user, capability, page access, post access, 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.7.4
|
6 |
-
Stable tag: 4.7
|
7 |
|
8 |
Manage access to your website for any user, role or visitors for both frontend and backend.
|
9 |
|
@@ -110,6 +110,15 @@ Check our [help page](https://aamplugin.com/help) to find out more about AAM.
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
= 4.7 =
|
114 |
* Significantly improved the ability to manage access to AAM interface
|
115 |
* Added new group of capabilities AAM Interface
|
3 |
Tags: access, role, user, capability, page access, post access, 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.7.4
|
6 |
+
Stable tag: 4.7.1
|
7 |
|
8 |
Manage access to your website for any user, role or visitors for both frontend and backend.
|
9 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 4.7.1 =
|
114 |
+
* Fixed the PHP bug reported by CodePinch service
|
115 |
+
* Fixed the bug with Posts & Pages redirect URL
|
116 |
+
* Fixed the bug related to extensions update status
|
117 |
+
* Optimized cron procedure for AAM maintenance needs
|
118 |
+
* Added ability to restore default capabilities for users
|
119 |
+
* Move AAM User Activity to the free extension suite
|
120 |
+
* Introduced Development Package for unlimited number of sites
|
121 |
+
|
122 |
= 4.7 =
|
123 |
* Significantly improved the ability to manage access to AAM interface
|
124 |
* Added new group of capabilities AAM Interface
|