Version Description
- Minor refactoring
- UI improvements
- Bug fixing
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 3.8.1 |
Comparing to | |
See all releases |
Code changes from version 3.8 to 3.8.1
- Application/Backend/Feature/Utility.php +1 -5
- Application/Backend/phtml/extension.phtml +11 -7
- Application/Backend/phtml/index.phtml +1 -1
- Application/Backend/phtml/utility.phtml +3 -1
- Application/Core/Repository.php +1 -8
- Application/Frontend/Manager.php +1 -1
- aam.php +2 -2
- media/css/aam.css +12 -2
- media/js/aam-ui.js +31 -16
- readme.txt +7 -2
Application/Backend/Feature/Utility.php
CHANGED
@@ -32,17 +32,13 @@ class AAM_Backend_Feature_Utility extends AAM_Backend_Feature_Abstract {
|
|
32 |
/**
|
33 |
* Save AAM utility options
|
34 |
*
|
35 |
-
* Important notice! This function excepts "value" to be only boolean value
|
36 |
-
*
|
37 |
* @return string
|
38 |
*
|
39 |
* @access public
|
40 |
*/
|
41 |
public function save() {
|
42 |
$param = AAM_Core_Request::post('param');
|
43 |
-
$value =
|
44 |
-
AAM_Core_Request::post('value'), FILTER_VALIDATE_BOOLEAN
|
45 |
-
);
|
46 |
|
47 |
AAM_Core_Config::set($param, $value);
|
48 |
|
32 |
/**
|
33 |
* Save AAM utility options
|
34 |
*
|
|
|
|
|
35 |
* @return string
|
36 |
*
|
37 |
* @access public
|
38 |
*/
|
39 |
public function save() {
|
40 |
$param = AAM_Core_Request::post('param');
|
41 |
+
$value = AAM_Core_Request::post('value');
|
|
|
|
|
42 |
|
43 |
AAM_Core_Config::set($param, $value);
|
44 |
|
Application/Backend/phtml/extension.phtml
CHANGED
@@ -19,20 +19,24 @@
|
|
19 |
<button class="btn btn-primary btn-block" id="install-extension"><i class="icon-download-cloud"></i> <?php echo __('Install', AAM_KEY); ?></button>
|
20 |
</div>
|
21 |
</div>
|
|
|
|
|
|
|
|
|
22 |
|
23 |
<div>
|
24 |
<ul class="nav nav-tabs" role="tablist">
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
</ul>
|
29 |
|
30 |
<!-- Tab panes -->
|
31 |
<div class="tab-content">
|
32 |
-
<div role="tabpanel" class="tab-pane active" id="premium-extensions">
|
33 |
<table class="table table-striped table-bordered">
|
34 |
<tbody>
|
35 |
-
<?php foreach ($
|
36 |
<tr>
|
37 |
<td>
|
38 |
<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']); ?></span>
|
@@ -57,7 +61,7 @@
|
|
57 |
<div role="tabpanel" class="tab-pane" id="free-extensions">
|
58 |
<table class="table table-striped table-bordered">
|
59 |
<tbody>
|
60 |
-
<?php foreach ($
|
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>
|
@@ -82,7 +86,7 @@
|
|
82 |
<div role="tabpanel" class="tab-pane" id="useful-plugins">
|
83 |
<table class="table table-striped table-bordered">
|
84 |
<tbody>
|
85 |
-
<?php foreach ($
|
86 |
<tr>
|
87 |
<td>
|
88 |
<span class='aam-setting-title'><?php echo $product['title'], ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></span>
|
19 |
<button class="btn btn-primary btn-block" id="install-extension"><i class="icon-download-cloud"></i> <?php echo __('Install', AAM_KEY); ?></button>
|
20 |
</div>
|
21 |
</div>
|
22 |
+
|
23 |
+
<?php $commercial = $this->getProductList('commercial'); ?>
|
24 |
+
<?php $free = $this->getProductList('GNU'); ?>
|
25 |
+
<?php $plugins = $this->getProductList('plugin'); ?>
|
26 |
|
27 |
<div>
|
28 |
<ul class="nav nav-tabs" role="tablist">
|
29 |
+
<?php if(count($commercial)) { ?><li role="presentation" class="active"><a href="#premium-extensions" aria-controls="premium-extensions" role="tab" data-toggle="tab"><i class='icon-basket'></i> <?php echo __('Premium', AAM_KEY); ?></a></li><?php } ?>
|
30 |
+
<?php if(count($free)) { ?><li role="presentation" <?php echo (!count($commercial) ? 'class="active"' : ''); ?>><a href="#free-extensions" aria-controls="free-extensions" role="tab" data-toggle="tab"><i class='icon-download-cloud'></i> <?php echo __('Free', AAM_KEY); ?></a></li><?php } ?>
|
31 |
+
<?php if(count($plugins)) { ?><li role="presentation" <?php echo (!count($commercial) && !count($free) ? 'class="active"' : ''); ?>><a href="#useful-plugins" aria-controls="help-plugins" role="tab" data-toggle="tab"><i class='icon-thumbs-up-alt'></i> <?php echo __('Useful Plugins', AAM_KEY); ?></a></li><?php } ?>
|
32 |
</ul>
|
33 |
|
34 |
<!-- Tab panes -->
|
35 |
<div class="tab-content">
|
36 |
+
<div role="tabpanel" class="tab-pane<?php echo (count($commercial) ? 'active' : ''); ?>" id="premium-extensions">
|
37 |
<table class="table table-striped table-bordered">
|
38 |
<tbody>
|
39 |
+
<?php foreach ($commercial as $product) { ?>
|
40 |
<tr>
|
41 |
<td>
|
42 |
<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']); ?></span>
|
61 |
<div role="tabpanel" class="tab-pane" id="free-extensions">
|
62 |
<table class="table table-striped table-bordered">
|
63 |
<tbody>
|
64 |
+
<?php foreach ($free as $product) { ?>
|
65 |
<tr>
|
66 |
<td>
|
67 |
<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>
|
86 |
<div role="tabpanel" class="tab-pane" id="useful-plugins">
|
87 |
<table class="table table-striped table-bordered">
|
88 |
<tbody>
|
89 |
+
<?php foreach ($plugins as $product) { ?>
|
90 |
<tr>
|
91 |
<td>
|
92 |
<span class='aam-setting-title'><?php echo $product['title'], ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></span>
|
Application/Backend/phtml/index.phtml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<div class="wrap">
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12 col-md-8">
|
5 |
-
<
|
6 |
</div>
|
7 |
</div>
|
8 |
|
2 |
<div class="wrap">
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12 col-md-8">
|
5 |
+
<div class="aam-current-subject"></div>
|
6 |
</div>
|
7 |
</div>
|
8 |
|
Application/Backend/phtml/utility.phtml
CHANGED
@@ -7,9 +7,10 @@
|
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
10 |
-
|
11 |
<table class="table table-striped table-bordered">
|
12 |
<tbody>
|
|
|
13 |
<tr>
|
14 |
<td>
|
15 |
<span class='aam-setting-title'><?php echo __('Edit/Delete Capabilities', AAM_KEY); ?></span>
|
@@ -55,6 +56,7 @@
|
|
55 |
</td>
|
56 |
</tr>
|
57 |
<?php do_action('aam-utilities-setting'); ?>
|
|
|
58 |
<tr>
|
59 |
<td>
|
60 |
<span class='aam-setting-title'><?php echo __('Clear All Settings', AAM_KEY); ?></span>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
10 |
+
|
11 |
<table class="table table-striped table-bordered">
|
12 |
<tbody>
|
13 |
+
<?php do_action('aam-pre-utilities-setting'); ?>
|
14 |
<tr>
|
15 |
<td>
|
16 |
<span class='aam-setting-title'><?php echo __('Edit/Delete Capabilities', AAM_KEY); ?></span>
|
56 |
</td>
|
57 |
</tr>
|
58 |
<?php do_action('aam-utilities-setting'); ?>
|
59 |
+
<tr><td colspan="2"></td></tr>
|
60 |
<tr>
|
61 |
<td>
|
62 |
<span class='aam-setting-title'><?php echo __('Clear All Settings', AAM_KEY); ?></span>
|
Application/Core/Repository.php
CHANGED
@@ -37,11 +37,6 @@ class AAM_Core_Repository {
|
|
37 |
*/
|
38 |
const STATUS_UPDATE = 'update';
|
39 |
|
40 |
-
/**
|
41 |
-
* Relative path to extension directory
|
42 |
-
*/
|
43 |
-
const RELPATH = '/aam/extension';
|
44 |
-
|
45 |
/**
|
46 |
* Single instance of itself
|
47 |
*
|
@@ -307,9 +302,7 @@ class AAM_Core_Repository {
|
|
307 |
* @return type
|
308 |
*/
|
309 |
public function getBasedir() {
|
310 |
-
|
311 |
-
|
312 |
-
return AAM_Core_Config::get('extentionDir', $basedir);
|
313 |
}
|
314 |
|
315 |
}
|
37 |
*/
|
38 |
const STATUS_UPDATE = 'update';
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* Single instance of itself
|
42 |
*
|
302 |
* @return type
|
303 |
*/
|
304 |
public function getBasedir() {
|
305 |
+
return AAM_Core_Config::get('extentionDir', AAM_EXTENSION_BASE);
|
|
|
|
|
306 |
}
|
307 |
|
308 |
}
|
Application/Frontend/Manager.php
CHANGED
@@ -65,7 +65,7 @@ class AAM_Frontend_Manager {
|
|
65 |
public function wp() {
|
66 |
global $post;
|
67 |
|
68 |
-
if ((
|
69 |
$this->checkPostReadAccess($post);
|
70 |
}
|
71 |
}
|
65 |
public function wp() {
|
66 |
global $post;
|
67 |
|
68 |
+
if (is_a($post, 'WP_Post')) {
|
69 |
$this->checkPostReadAccess($post);
|
70 |
}
|
71 |
}
|
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.8
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://www.vasyltech.com
|
9 |
|
@@ -205,7 +205,7 @@ if (defined('ABSPATH')) {
|
|
205 |
//define few common constants
|
206 |
define('AAM_MEDIA', plugins_url('/media', __FILE__));
|
207 |
define('AAM_KEY', 'advanced-access-manager');
|
208 |
-
define('
|
209 |
|
210 |
//register autoloader
|
211 |
require (dirname(__FILE__) . '/autoloader.php');
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: Manage User and Role Access to WordPress Backend and Frontend.
|
6 |
+
Version: 3.8.1
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://www.vasyltech.com
|
9 |
|
205 |
//define few common constants
|
206 |
define('AAM_MEDIA', plugins_url('/media', __FILE__));
|
207 |
define('AAM_KEY', 'advanced-access-manager');
|
208 |
+
define('AAM_EXTENSION_BASE', WP_CONTENT_DIR . '/aam/extension');
|
209 |
|
210 |
//register autoloader
|
211 |
require (dirname(__FILE__) . '/autoloader.php');
|
media/css/aam.css
CHANGED
@@ -405,6 +405,10 @@ a.btn:focus, a.btn:active {
|
|
405 |
vertical-align: middle;
|
406 |
}
|
407 |
|
|
|
|
|
|
|
|
|
408 |
.btn-group-xs > .btn, .btn-xs {
|
409 |
border-radius: 0;
|
410 |
}
|
@@ -922,12 +926,18 @@ input[type=radio]:checked + label:before {
|
|
922 |
}
|
923 |
|
924 |
.aam-current-subject {
|
925 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
}
|
927 |
|
928 |
.aam-current-subject strong {
|
929 |
text-transform: capitalize;
|
930 |
-
|
931 |
}
|
932 |
|
933 |
.table h4 {
|
405 |
vertical-align: middle;
|
406 |
}
|
407 |
|
408 |
+
.table .form-group {
|
409 |
+
margin: 5px 0 0 0;
|
410 |
+
}
|
411 |
+
|
412 |
.btn-group-xs > .btn, .btn-xs {
|
413 |
border-radius: 0;
|
414 |
}
|
926 |
}
|
927 |
|
928 |
.aam-current-subject {
|
929 |
+
background-color: #337ab7;
|
930 |
+
padding: 5px 15px 4px 10px;
|
931 |
+
font-size: 23px;
|
932 |
+
font-weight: 400;
|
933 |
+
line-height: 29px;
|
934 |
+
margin: 0;
|
935 |
+
color: #FFFFFF;
|
936 |
}
|
937 |
|
938 |
.aam-current-subject strong {
|
939 |
text-transform: capitalize;
|
940 |
+
letter-spacing: 1px;
|
941 |
}
|
942 |
|
943 |
.table h4 {
|
media/js/aam-ui.js
CHANGED
@@ -866,6 +866,7 @@
|
|
866 |
},
|
867 |
success: function (response) {
|
868 |
if (response.status === 'success') {
|
|
|
869 |
getContent();
|
870 |
} else {
|
871 |
aam.notification(
|
@@ -1860,31 +1861,45 @@
|
|
1860 |
* @returns {undefined}
|
1861 |
*/
|
1862 |
(function ($) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1863 |
|
1864 |
/**
|
1865 |
*
|
1866 |
* @returns {undefined}
|
1867 |
*/
|
1868 |
function initialize() {
|
1869 |
-
$('input[data-toggle="toggle"]').bootstrapToggle({
|
1870 |
size: 'normal',
|
1871 |
width: '100%'
|
1872 |
}).bind('change', function () {
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
action: 'aam',
|
1879 |
-
sub_action: 'Utility.save',
|
1880 |
-
_ajax_nonce: aamLocal.nonce,
|
1881 |
-
param: $(this).attr('name'),
|
1882 |
-
value: $(this).prop('checked')
|
1883 |
-
},
|
1884 |
-
error: function () {
|
1885 |
-
aam.notification('danger', aam.__('Application Error'));
|
1886 |
-
}
|
1887 |
-
});
|
1888 |
});
|
1889 |
|
1890 |
$('#clear-settings').bind('click', function () {
|
866 |
},
|
867 |
success: function (response) {
|
868 |
if (response.status === 'success') {
|
869 |
+
$('#init-url-modal').modal('hide');
|
870 |
getContent();
|
871 |
} else {
|
872 |
aam.notification(
|
1861 |
* @returns {undefined}
|
1862 |
*/
|
1863 |
(function ($) {
|
1864 |
+
|
1865 |
+
/**
|
1866 |
+
*
|
1867 |
+
* @param {type} param
|
1868 |
+
* @param {type} value
|
1869 |
+
* @returns {undefined}
|
1870 |
+
*/
|
1871 |
+
function save(param, value) {
|
1872 |
+
$.ajax(aamLocal.ajaxurl, {
|
1873 |
+
type: 'POST',
|
1874 |
+
dataType: 'json',
|
1875 |
+
async: false,
|
1876 |
+
data: {
|
1877 |
+
action: 'aam',
|
1878 |
+
sub_action: 'Utility.save',
|
1879 |
+
_ajax_nonce: aamLocal.nonce,
|
1880 |
+
param: param,
|
1881 |
+
value: value
|
1882 |
+
},
|
1883 |
+
error: function () {
|
1884 |
+
aam.notification('danger', aam.__('Application Error'));
|
1885 |
+
}
|
1886 |
+
});
|
1887 |
+
}
|
1888 |
|
1889 |
/**
|
1890 |
*
|
1891 |
* @returns {undefined}
|
1892 |
*/
|
1893 |
function initialize() {
|
1894 |
+
$('input[data-toggle="toggle"]', '#utilities-content').bootstrapToggle({
|
1895 |
size: 'normal',
|
1896 |
width: '100%'
|
1897 |
}).bind('change', function () {
|
1898 |
+
save($(this).attr('name'), ($(this).prop('checked') ? 1 : 0));
|
1899 |
+
});
|
1900 |
+
|
1901 |
+
$('input[type="text"]', '#utilities-content').bind('change', function() {
|
1902 |
+
save($(this).attr('name'), $(this).val());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1903 |
});
|
1904 |
|
1905 |
$('#clear-settings').bind('click', function () {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access, role, user, visitor, capability, page, post, permission, security, redirect
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.6.1
|
6 |
-
Stable tag: 3.8
|
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.
|
@@ -14,7 +14,7 @@ pages, categories and backend area for users, roles and visitors.
|
|
14 |
> control access to your posts, pages or backend area on user, visitor and role
|
15 |
> levels.
|
16 |
|
17 |
-
AAM is well documented so even
|
18 |
how to use it in the most efficient way.
|
19 |
|
20 |
Notice! Some of the features are limited with the basic version and you may
|
@@ -64,6 +64,11 @@ out more about the Advanced Access Manager.
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
= 3.8 =
|
68 |
* Added Clone Role feature
|
69 |
* Added auto cache clearing on term or post update
|
3 |
Tags: access, role, user, visitor, capability, page, post, permission, security, redirect
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.6.1
|
6 |
+
Stable tag: 3.8.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.
|
14 |
> control access to your posts, pages or backend area on user, visitor and role
|
15 |
> levels.
|
16 |
|
17 |
+
AAM is well documented so even inexperienced WordPress user can easily understand
|
18 |
how to use it in the most efficient way.
|
19 |
|
20 |
Notice! Some of the features are limited with the basic version and you may
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 3.8.1 =
|
68 |
+
* Minor refactoring
|
69 |
+
* UI improvements
|
70 |
+
* Bug fixing
|
71 |
+
|
72 |
= 3.8 =
|
73 |
* Added Clone Role feature
|
74 |
* Added auto cache clearing on term or post update
|