Version Description
- Fixed bug with menu/metabox checkbox
- Added extra hook to clear the user cache after profile update
- Added drill-down button for Posts & Pages tab
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 3.1.4 |
Comparing to | |
See all releases |
Code changes from version 3.1.3.1 to 3.1.4
- Application/Backend/Filter.php +19 -0
- Application/Backend/Post.php +1 -1
- Application/Backend/view/extension.phtml +1 -1
- Application/Backend/view/object/post.phtml +4 -4
- aam.php +1 -1
- media/css/aam.css +10 -7
- media/font/fontello.eot +0 -0
- media/font/fontello.svg +4 -0
- media/font/fontello.ttf +0 -0
- media/font/fontello.woff +0 -0
- media/font/fontello.woff2 +0 -0
- media/js/aam-ui.js +17 -5
- readme.txt +6 -1
Application/Backend/Filter.php
CHANGED
@@ -54,6 +54,9 @@ class AAM_Backend_Filter {
|
|
54 |
|
55 |
//some additional filter for user capabilities
|
56 |
add_filter('user_has_cap', array($this, 'checkUserCap'), 999, 4);
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -286,6 +289,22 @@ class AAM_Backend_Filter {
|
|
286 |
return $allCaps;
|
287 |
}
|
288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
/**
|
290 |
* Restrict user capabilities
|
291 |
*
|
54 |
|
55 |
//some additional filter for user capabilities
|
56 |
add_filter('user_has_cap', array($this, 'checkUserCap'), 999, 4);
|
57 |
+
|
58 |
+
//user profile update filter
|
59 |
+
add_action('profile_update', array($this, 'profileUpdate'), 10, 2);
|
60 |
}
|
61 |
|
62 |
/**
|
289 |
return $allCaps;
|
290 |
}
|
291 |
|
292 |
+
/**
|
293 |
+
* Profile update hook
|
294 |
+
*
|
295 |
+
* Clear user cache if profile updated
|
296 |
+
*
|
297 |
+
* @param int $user_id
|
298 |
+
* @param array $old_user_data
|
299 |
+
*
|
300 |
+
* @return void
|
301 |
+
*
|
302 |
+
* @access public
|
303 |
+
*/
|
304 |
+
public function profileUpdate($user_id, $old_user_data) {
|
305 |
+
do_action('aam-clear-cache-action', new AAM_Core_Subject_User($user_id));
|
306 |
+
}
|
307 |
+
|
308 |
/**
|
309 |
* Restrict user capabilities
|
310 |
*
|
Application/Backend/Post.php
CHANGED
@@ -130,7 +130,7 @@ class AAM_Backend_Post {
|
|
130 |
null,
|
131 |
'type',
|
132 |
$type->labels->name,
|
133 |
-
'manage'
|
134 |
);
|
135 |
}
|
136 |
}
|
130 |
null,
|
131 |
'type',
|
132 |
$type->labels->name,
|
133 |
+
'drilldown,manage'
|
134 |
);
|
135 |
}
|
136 |
}
|
Application/Backend/view/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_Helper::preparePhrase('One license is limited to one domain only but it can be used for unlimited number of test or development environments where URL is either [localhost] or starts with [dev.], [staging.] or [test.]', 'i', 'i', 'i', 'i'); ?><br/>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12">
|
5 |
<p class="aam-info">
|
6 |
+
<?php echo AAM_Backend_Helper::preparePhrase('One license is limited to one domain only but it can be used for unlimited number of test or development environments where URL is either [localhost] or starts with [dev.], [staging.] or [test.] [Money back guaranteed] within 30 day from the time of purchase.', 'i', 'i', 'i', 'i', 'b'); ?><br/>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
Application/Backend/view/object/post.phtml
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
<span><a href="#aam-inheritance-modal" data-toggle="modal"><?php echo __('Help', AAM_KEY); ?></a></span>
|
25 |
</div>
|
26 |
|
27 |
-
<div class="aam-
|
28 |
<table id="post-list" class="table table-striped table-bordered">
|
29 |
<thead>
|
30 |
<tr>
|
@@ -38,17 +38,17 @@
|
|
38 |
<tbody></tbody>
|
39 |
</table>
|
40 |
|
41 |
-
<div class="aam-
|
42 |
<?php echo apply_filters('aam-post-type-ui-filter', AAM_Backend_View::getInstance()->loadPartial('post-type.phtml')); ?>
|
43 |
<a href="#" class="btn btn-xs btn-primary post-back">≪ <?php echo __('Go Back', AAM_KEY); ?></a>
|
44 |
</div>
|
45 |
|
46 |
-
<div class="aam-
|
47 |
<?php echo apply_filters('aam-term-type-ui-filter', AAM_Backend_View::getInstance()->loadPartial('term-type.phtml')); ?>
|
48 |
<a href="#" class="btn btn-xs btn-primary post-back">≪ <?php echo __('Go Back', AAM_KEY); ?></a>
|
49 |
</div>
|
50 |
|
51 |
-
<div class="aam-
|
52 |
<table class="table table-striped table-bordered">
|
53 |
<tbody>
|
54 |
<tr>
|
24 |
<span><a href="#aam-inheritance-modal" data-toggle="modal"><?php echo __('Help', AAM_KEY); ?></a></span>
|
25 |
</div>
|
26 |
|
27 |
+
<div class="aam-container">
|
28 |
<table id="post-list" class="table table-striped table-bordered">
|
29 |
<thead>
|
30 |
<tr>
|
38 |
<tbody></tbody>
|
39 |
</table>
|
40 |
|
41 |
+
<div class="aam-slide-form" data-type="type">
|
42 |
<?php echo apply_filters('aam-post-type-ui-filter', AAM_Backend_View::getInstance()->loadPartial('post-type.phtml')); ?>
|
43 |
<a href="#" class="btn btn-xs btn-primary post-back">≪ <?php echo __('Go Back', AAM_KEY); ?></a>
|
44 |
</div>
|
45 |
|
46 |
+
<div class="aam-slide-form" data-type="term">
|
47 |
<?php echo apply_filters('aam-term-type-ui-filter', AAM_Backend_View::getInstance()->loadPartial('term-type.phtml')); ?>
|
48 |
<a href="#" class="btn btn-xs btn-primary post-back">≪ <?php echo __('Go Back', AAM_KEY); ?></a>
|
49 |
</div>
|
50 |
|
51 |
+
<div class="aam-slide-form" data-type="post">
|
52 |
<table class="table table-striped table-bordered">
|
53 |
<tbody>
|
54 |
<tr>
|
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.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.1.4
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: http://www.vasyltech.com
|
9 |
|
media/css/aam.css
CHANGED
@@ -62,6 +62,7 @@
|
|
62 |
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
63 |
}
|
64 |
|
|
|
65 |
.icon-spin4:before { content: '\e800'; } /* 'î ' */
|
66 |
.icon-eye-off:before { content: '\e801'; } /* 'î ' */
|
67 |
.icon-attention-circled:before { content: '\e802'; } /* 'î ' */
|
@@ -94,6 +95,8 @@
|
|
94 |
.icon-angle-double-right:before { content: '\e81d'; } /* 'î ' */
|
95 |
.icon-facebook:before { content: '\e81e'; } /* 'î ' */
|
96 |
.icon-star:before { content: '\e81f'; } /* 'î ' */
|
|
|
|
|
97 |
|
98 |
.animate-spin {
|
99 |
-moz-animation: spin 2s infinite linear;
|
@@ -389,12 +392,12 @@ input[type=checkbox] + label:before {
|
|
389 |
font-family: 'fontello';
|
390 |
display: inline-block;
|
391 |
font-size: 1.2em;
|
392 |
-
content: "\
|
393 |
}
|
394 |
|
395 |
input[type=checkbox]:checked + label:before {
|
396 |
font-size: 1.2em;
|
397 |
-
content: "\
|
398 |
}
|
399 |
|
400 |
input[type=checkbox].aam-checkbox-danger:checked + label:before {
|
@@ -632,12 +635,12 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
632 |
color: #a94442;
|
633 |
}
|
634 |
|
635 |
-
.aam-
|
636 |
position: relative;
|
637 |
overflow: hidden;
|
638 |
}
|
639 |
|
640 |
-
.aam-
|
641 |
position: absolute;
|
642 |
width: 100%;
|
643 |
top: 0;
|
@@ -650,13 +653,13 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
650 |
z-index: 2000;
|
651 |
}
|
652 |
|
653 |
-
.aam-
|
654 |
left: 0;
|
655 |
z-index: 1000;
|
656 |
position: relative;
|
657 |
}
|
658 |
|
659 |
-
.aam-
|
660 |
vertical-align: middle;
|
661 |
}
|
662 |
|
@@ -676,7 +679,7 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
676 |
transition: all .5s ease-in-out;
|
677 |
}
|
678 |
|
679 |
-
|
680 |
position: absolute;
|
681 |
opacity: 0;
|
682 |
}
|
62 |
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
63 |
}
|
64 |
|
65 |
+
|
66 |
.icon-spin4:before { content: '\e800'; } /* 'î ' */
|
67 |
.icon-eye-off:before { content: '\e801'; } /* 'î ' */
|
68 |
.icon-attention-circled:before { content: '\e802'; } /* 'î ' */
|
95 |
.icon-angle-double-right:before { content: '\e81d'; } /* 'î ' */
|
96 |
.icon-facebook:before { content: '\e81e'; } /* 'î ' */
|
97 |
.icon-star:before { content: '\e81f'; } /* 'î ' */
|
98 |
+
.icon-list:before { content: '\e820'; } /* 'î ' */
|
99 |
+
.icon-level-down:before { content: '\e821'; } /* 'î ¡' */
|
100 |
|
101 |
.animate-spin {
|
102 |
-moz-animation: spin 2s infinite linear;
|
392 |
font-family: 'fontello';
|
393 |
display: inline-block;
|
394 |
font-size: 1.2em;
|
395 |
+
content: "\e81a"; /* unchecked icon */
|
396 |
}
|
397 |
|
398 |
input[type=checkbox]:checked + label:before {
|
399 |
font-size: 1.2em;
|
400 |
+
content: "\e816"; /* checked icon */
|
401 |
}
|
402 |
|
403 |
input[type=checkbox].aam-checkbox-danger:checked + label:before {
|
635 |
color: #a94442;
|
636 |
}
|
637 |
|
638 |
+
.aam-container {
|
639 |
position: relative;
|
640 |
overflow: hidden;
|
641 |
}
|
642 |
|
643 |
+
.aam-slide-form, .aam-help-context {
|
644 |
position: absolute;
|
645 |
width: 100%;
|
646 |
top: 0;
|
653 |
z-index: 2000;
|
654 |
}
|
655 |
|
656 |
+
.aam-slide-form.active, .aam-help-context.active {
|
657 |
left: 0;
|
658 |
z-index: 1000;
|
659 |
position: relative;
|
660 |
}
|
661 |
|
662 |
+
.aam-slide-form .table td {
|
663 |
vertical-align: middle;
|
664 |
}
|
665 |
|
679 |
transition: all .5s ease-in-out;
|
680 |
}
|
681 |
|
682 |
+
.aam-hidden {
|
683 |
position: absolute;
|
684 |
opacity: 0;
|
685 |
}
|
media/font/fontello.eot
CHANGED
Binary file
|
media/font/fontello.svg
CHANGED
@@ -69,6 +69,10 @@
|
|
69 |
<glyph glyph-name="facebook" unicode="" d="M535 843v-147h-87q-48 0-65-20t-17-60v-106h164l-22-165h-142v-424h-171v424h-142v165h142v122q0 104 58 161t155 57q82 0 127-7z" horiz-adv-x="571.4" />
|
70 |
|
71 |
<glyph glyph-name="star" unicode="" d="M929 489q0-12-15-27l-203-197 48-279q1-4 1-12 0-11-6-19t-17-9q-10 0-22 7l-251 132-250-132q-13-7-23-7-11 0-17 9t-6 19q0 4 1 12l48 279-203 197q-14 15-14 27 0 21 31 26l280 40 126 254q11 23 27 23t28-23l125-254 280-40q32-5 32-26z" horiz-adv-x="928.6" />
|
|
|
|
|
|
|
|
|
72 |
</font>
|
73 |
</defs>
|
74 |
</svg>
|
69 |
<glyph glyph-name="facebook" unicode="" d="M535 843v-147h-87q-48 0-65-20t-17-60v-106h164l-22-165h-142v-424h-171v424h-142v165h142v122q0 104 58 161t155 57q82 0 127-7z" horiz-adv-x="571.4" />
|
70 |
|
71 |
<glyph glyph-name="star" unicode="" d="M929 489q0-12-15-27l-203-197 48-279q1-4 1-12 0-11-6-19t-17-9q-10 0-22 7l-251 132-250-132q-13-7-23-7-11 0-17 9t-6 19q0 4 1 12l48 279-203 197q-14 15-14 27 0 21 31 26l280 40 126 254q11 23 27 23t28-23l125-254 280-40q32-5 32-26z" horiz-adv-x="928.6" />
|
72 |
+
|
73 |
+
<glyph glyph-name="list" unicode="" d="M143 118v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 13t13 5h107q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-107q-7 0-13 6t-5 12v107q0 8 5 13t13 5h107q7 0 13-5t5-13z m857-428v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z m-857 643v-107q0-8-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m857-429v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 13t12 5h750q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-750q-7 0-12 6t-6 12v107q0 8 6 13t12 5h750q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z" horiz-adv-x="1000" />
|
74 |
+
|
75 |
+
<glyph glyph-name="level-down" unicode="" d="M18 707h393q7 0 12-5t6-13v-482h107q22 0 32-20t-5-39l-178-214q-11-13-28-13t-27 13l-179 214q-14 17-5 39 10 20 33 20h107v357h-179q-8 0-14 6l-89 108q-7 7-2 19 5 10 16 10z" horiz-adv-x="571.4" />
|
76 |
</font>
|
77 |
</defs>
|
78 |
</svg>
|
media/font/fontello.ttf
CHANGED
Binary file
|
media/font/fontello.woff
CHANGED
Binary file
|
media/font/fontello.woff2
CHANGED
Binary file
|
media/js/aam-ui.js
CHANGED
@@ -1076,7 +1076,7 @@
|
|
1076 |
*/
|
1077 |
function loadAccessForm(object, id, btn) {
|
1078 |
//reset the form first
|
1079 |
-
var container = $('.aam-
|
1080 |
|
1081 |
$('.aam-row-action', container).each(function () {
|
1082 |
$(this).attr({
|
@@ -1285,7 +1285,7 @@
|
|
1285 |
//visual feedback - show loading icon
|
1286 |
$('td:eq(0)', row).html(
|
1287 |
'<i class="icon-spin4 animate-spin"></i>'
|
1288 |
-
|
1289 |
//set filter
|
1290 |
filter[data[2]] = data[0];
|
1291 |
//reset the ajax queue
|
@@ -1345,6 +1345,18 @@
|
|
1345 |
var container = $('<div/>', {'class': 'aam-row-actions'});
|
1346 |
$.each(actions, function (i, action) {
|
1347 |
switch (action) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1348 |
case 'manage':
|
1349 |
$(container).append($('<i/>', {
|
1350 |
'class': 'aam-row-action text-info icon-cog'
|
@@ -1386,7 +1398,7 @@
|
|
1386 |
filter.type = $(this).data('id');
|
1387 |
$('#post-list').DataTable().ajax.reload();
|
1388 |
$(this).nextAll().remove();
|
1389 |
-
$('.aam-
|
1390 |
$('#post-list_wrapper').removeClass('aam-hidden');
|
1391 |
$('#post-overwritten, #post-inherited').addClass('hidden');
|
1392 |
});
|
@@ -1426,12 +1438,12 @@
|
|
1426 |
});
|
1427 |
|
1428 |
//go back button
|
1429 |
-
$('.aam-
|
1430 |
event.preventDefault();
|
1431 |
|
1432 |
var type = $(this).parent().data('type');
|
1433 |
|
1434 |
-
$('.aam-
|
1435 |
$('#post-list_wrapper').removeClass('aam-hidden');
|
1436 |
$('.aam-post-breadcrumb span:last').remove();
|
1437 |
$('#post-overwritten, #post-inherited').addClass('hidden');
|
1076 |
*/
|
1077 |
function loadAccessForm(object, id, btn) {
|
1078 |
//reset the form first
|
1079 |
+
var container = $('.aam-slide-form[data-type="' + object + '"]');
|
1080 |
|
1081 |
$('.aam-row-action', container).each(function () {
|
1082 |
$(this).attr({
|
1285 |
//visual feedback - show loading icon
|
1286 |
$('td:eq(0)', row).html(
|
1287 |
'<i class="icon-spin4 animate-spin"></i>'
|
1288 |
+
);
|
1289 |
//set filter
|
1290 |
filter[data[2]] = data[0];
|
1291 |
//reset the ajax queue
|
1345 |
var container = $('<div/>', {'class': 'aam-row-actions'});
|
1346 |
$.each(actions, function (i, action) {
|
1347 |
switch (action) {
|
1348 |
+
case 'drilldown':
|
1349 |
+
$(container).append($('<i/>', {
|
1350 |
+
'class': 'aam-row-action text-success icon-level-down'
|
1351 |
+
}).bind('click', function () {
|
1352 |
+
$('td:eq(1) a', row).trigger('click');
|
1353 |
+
$(this).tooltip('hide');
|
1354 |
+
}).attr({
|
1355 |
+
'data-toggle': "tooltip",
|
1356 |
+
'title': aam.__('Drill-Down')
|
1357 |
+
}));
|
1358 |
+
break;
|
1359 |
+
|
1360 |
case 'manage':
|
1361 |
$(container).append($('<i/>', {
|
1362 |
'class': 'aam-row-action text-info icon-cog'
|
1398 |
filter.type = $(this).data('id');
|
1399 |
$('#post-list').DataTable().ajax.reload();
|
1400 |
$(this).nextAll().remove();
|
1401 |
+
$('.aam-slide-form').removeClass('active');
|
1402 |
$('#post-list_wrapper').removeClass('aam-hidden');
|
1403 |
$('#post-overwritten, #post-inherited').addClass('hidden');
|
1404 |
});
|
1438 |
});
|
1439 |
|
1440 |
//go back button
|
1441 |
+
$('.aam-slide-form').delegate('.post-back', 'click', function (event) {
|
1442 |
event.preventDefault();
|
1443 |
|
1444 |
var type = $(this).parent().data('type');
|
1445 |
|
1446 |
+
$('.aam-slide-form[data-type="' + type + '"]').removeClass('active');
|
1447 |
$('#post-list_wrapper').removeClass('aam-hidden');
|
1448 |
$('.aam-post-breadcrumb span:last').remove();
|
1449 |
$('#post-overwritten, #post-inherited').addClass('hidden');
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access, access manager, role, user, capability, admin, page, post, widget
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.4
|
6 |
-
Stable tag: 3.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.
|
@@ -45,6 +45,11 @@ out more about the Advanced Access Manager.
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
|
|
48 |
= 3.1.3.1 =
|
49 |
* One more minor issue
|
50 |
|
3 |
Tags: access, access manager, role, user, capability, admin, page, post, widget
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.4
|
6 |
+
Stable tag: 3.1.4
|
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.
|
45 |
|
46 |
== Changelog ==
|
47 |
|
48 |
+
= 3.1.4 =
|
49 |
+
* Fixed bug with menu/metabox checkbox
|
50 |
+
* Added extra hook to clear the user cache after profile update
|
51 |
+
* Added drill-down button for Posts & Pages tab
|
52 |
+
|
53 |
= 3.1.3.1 =
|
54 |
* One more minor issue
|
55 |
|