Version Description
- Bug fixing
- Internal code improvements
- Extended list of post & pages access options
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 3.9.2 |
Comparing to | |
See all releases |
Code changes from version 3.9.1 to 3.9.2
- Application/Backend/Feature/Capability.php +5 -3
- Application/Backend/Feature/Extension.php +1 -1
- Application/Backend/Feature/Post.php +19 -0
- Application/Backend/Feature/User.php +5 -3
- Application/Backend/Filter.php +49 -7
- Application/Backend/View.php +10 -6
- Application/Backend/View/PostOptionList.php +71 -0
- Application/Backend/{Feature → View}/ProductList.php +0 -0
- Application/Backend/phtml/extension.phtml +2 -2
- Application/Backend/phtml/object/post.phtml +15 -63
- Application/Core/Subject/Visitor.php +0 -7
- Application/Frontend/Manager.php +1 -1
- aam.php +1 -1
- media/css/aam.css +2 -2
- media/js/aam-ui.js +15 -13
- readme.txt +9 -22
Application/Backend/Feature/Capability.php
CHANGED
@@ -211,9 +211,11 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
|
|
211 |
|
212 |
$names = AAM_Core_API::getRoles()->get_names();
|
213 |
|
214 |
-
|
215 |
-
|
216 |
-
|
|
|
|
|
217 |
}
|
218 |
}
|
219 |
|
211 |
|
212 |
$names = AAM_Core_API::getRoles()->get_names();
|
213 |
|
214 |
+
if (is_array($roles)) {
|
215 |
+
foreach($roles as $role) {
|
216 |
+
if (isset($names[$role])) {
|
217 |
+
$response[] = translate_user_role($names[$role]);
|
218 |
+
}
|
219 |
}
|
220 |
}
|
221 |
|
Application/Backend/Feature/Extension.php
CHANGED
@@ -40,7 +40,7 @@ class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
|
|
40 |
static $products = null;
|
41 |
|
42 |
if (is_null($products)) {
|
43 |
-
$products = require(dirname(__FILE__) . '/ProductList.php');
|
44 |
}
|
45 |
|
46 |
$filtered = array();
|
40 |
static $products = null;
|
41 |
|
42 |
if (is_null($products)) {
|
43 |
+
$products = require(dirname(__FILE__) . '/../View/ProductList.php');
|
44 |
}
|
45 |
|
46 |
$filtered = array();
|
Application/Backend/Feature/Post.php
CHANGED
@@ -333,6 +333,25 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
|
|
333 |
return 'object/post.phtml';
|
334 |
}
|
335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
/**
|
337 |
*
|
338 |
* @return type
|
333 |
return 'object/post.phtml';
|
334 |
}
|
335 |
|
336 |
+
/**
|
337 |
+
*
|
338 |
+
* @staticvar type $list
|
339 |
+
* @param type $area
|
340 |
+
* @return type
|
341 |
+
*/
|
342 |
+
public function getAccessOptionList($area) {
|
343 |
+
static $list = null;
|
344 |
+
|
345 |
+
if (is_null($list)) {
|
346 |
+
$list = apply_filters(
|
347 |
+
'aam-post-access-options-filter',
|
348 |
+
require_once dirname(__FILE__) . '/../View/PostOptionList.php'
|
349 |
+
);
|
350 |
+
}
|
351 |
+
|
352 |
+
return $list[$area];
|
353 |
+
}
|
354 |
+
|
355 |
/**
|
356 |
*
|
357 |
* @return type
|
Application/Backend/Feature/User.php
CHANGED
@@ -78,9 +78,11 @@ class AAM_Backend_Feature_User {
|
|
78 |
|
79 |
$names = AAM_Core_API::getRoles()->get_names();
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
84 |
}
|
85 |
}
|
86 |
|
78 |
|
79 |
$names = AAM_Core_API::getRoles()->get_names();
|
80 |
|
81 |
+
if (is_array($roles)) {
|
82 |
+
foreach($roles as $role) {
|
83 |
+
if (isset($names[$role])) {
|
84 |
+
$response[] = translate_user_role($names[$role]);
|
85 |
+
}
|
86 |
}
|
87 |
}
|
88 |
|
Application/Backend/Filter.php
CHANGED
@@ -122,7 +122,7 @@ class AAM_Backend_Filter {
|
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
-
*
|
126 |
*
|
127 |
* @return void
|
128 |
*
|
@@ -158,8 +158,11 @@ class AAM_Backend_Filter {
|
|
158 |
public function postRowActions($actions, $post) {
|
159 |
$object = AAM::getUser()->getObject('post', $post->ID);
|
160 |
|
|
|
|
|
|
|
161 |
//filter edit menu
|
162 |
-
if ($
|
163 |
if (isset($actions['edit'])) {
|
164 |
unset($actions['edit']);
|
165 |
}
|
@@ -167,9 +170,12 @@ class AAM_Backend_Filter {
|
|
167 |
unset($actions['inline hide-if-no-js']);
|
168 |
}
|
169 |
}
|
|
|
|
|
|
|
170 |
|
171 |
//filter delete menu
|
172 |
-
if ($
|
173 |
if (isset($actions['trash'])) {
|
174 |
unset($actions['trash']);
|
175 |
}
|
@@ -177,6 +183,16 @@ class AAM_Backend_Filter {
|
|
177 |
unset($actions['delete']);
|
178 |
}
|
179 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
return $actions;
|
182 |
}
|
@@ -195,7 +211,9 @@ class AAM_Backend_Filter {
|
|
195 |
|
196 |
if (is_a($post, 'WP_Post')) {
|
197 |
$object = AAM::getUser()->getObject('post', $post->ID);
|
198 |
-
|
|
|
|
|
199 |
AAM_Core_API::reject(
|
200 |
'backend',
|
201 |
array('object' => $object, 'action' => 'backend.edit')
|
@@ -282,7 +300,7 @@ class AAM_Backend_Filter {
|
|
282 |
public function preparePostQuery($query) {
|
283 |
if ($this->skip === false) {
|
284 |
$filtered = array();
|
285 |
-
|
286 |
foreach ($this->fetchPosts($query) as $id) {
|
287 |
if (AAM::getUser()->getObject('post', $id)->has('backend.list')) {
|
288 |
$filtered[] = $id;
|
@@ -344,22 +362,46 @@ class AAM_Backend_Filter {
|
|
344 |
* @access public
|
345 |
*/
|
346 |
public function checkUserCap($allCaps, $metaCaps, $args) {
|
|
|
|
|
347 |
//make sure that $args[2] is actually post ID
|
348 |
if (isset($args[2]) && is_scalar($args[2])) {
|
349 |
switch($args[0]) {
|
350 |
case 'edit_post':
|
351 |
$object = AAM::getUser()->getObject('post', $args[2]);
|
352 |
-
|
|
|
|
|
353 |
$allCaps = $this->restrictPostActions($allCaps, $metaCaps);
|
354 |
}
|
355 |
break;
|
356 |
|
357 |
case 'delete_post' :
|
358 |
$object = AAM::getUser()->getObject('post', $args[2]);
|
359 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
$allCaps = $this->restrictPostActions($allCaps, $metaCaps);
|
361 |
}
|
362 |
break;
|
|
|
|
|
|
|
363 |
}
|
364 |
}
|
365 |
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
+
* Handle metabox initialization process
|
126 |
*
|
127 |
* @return void
|
128 |
*
|
158 |
public function postRowActions($actions, $post) {
|
159 |
$object = AAM::getUser()->getObject('post', $post->ID);
|
160 |
|
161 |
+
$edit = $object->has('backend.edit');
|
162 |
+
$others = $object->has('backend.edit_others');
|
163 |
+
|
164 |
//filter edit menu
|
165 |
+
if ($edit || ($others && !$this->isAuthor($post))) {
|
166 |
if (isset($actions['edit'])) {
|
167 |
unset($actions['edit']);
|
168 |
}
|
170 |
unset($actions['inline hide-if-no-js']);
|
171 |
}
|
172 |
}
|
173 |
+
|
174 |
+
$delete = $object->has('backend.delete');
|
175 |
+
$others = $object->has('backend.delete_others');
|
176 |
|
177 |
//filter delete menu
|
178 |
+
if ($delete || ($others && !$this->isAuthor($post))) {
|
179 |
if (isset($actions['trash'])) {
|
180 |
unset($actions['trash']);
|
181 |
}
|
183 |
unset($actions['delete']);
|
184 |
}
|
185 |
}
|
186 |
+
|
187 |
+
$publish = $object->has('backend.publish');
|
188 |
+
$others = $object->has('backend.publish_others');
|
189 |
+
|
190 |
+
//filter edit menu
|
191 |
+
if ($publish || ($others && !$this->isAuthor($post))) {
|
192 |
+
if (isset($actions['inline hide-if-no-js'])) {
|
193 |
+
unset($actions['inline hide-if-no-js']);
|
194 |
+
}
|
195 |
+
}
|
196 |
|
197 |
return $actions;
|
198 |
}
|
211 |
|
212 |
if (is_a($post, 'WP_Post')) {
|
213 |
$object = AAM::getUser()->getObject('post', $post->ID);
|
214 |
+
$edit = $object->has('backend.edit');
|
215 |
+
$others = $object->has('backend.edit_others');
|
216 |
+
if ($edit || ($others && !$this->isAuthor($post))) {
|
217 |
AAM_Core_API::reject(
|
218 |
'backend',
|
219 |
array('object' => $object, 'action' => 'backend.edit')
|
300 |
public function preparePostQuery($query) {
|
301 |
if ($this->skip === false) {
|
302 |
$filtered = array();
|
303 |
+
|
304 |
foreach ($this->fetchPosts($query) as $id) {
|
305 |
if (AAM::getUser()->getObject('post', $id)->has('backend.list')) {
|
306 |
$filtered[] = $id;
|
362 |
* @access public
|
363 |
*/
|
364 |
public function checkUserCap($allCaps, $metaCaps, $args) {
|
365 |
+
global $post;
|
366 |
+
|
367 |
//make sure that $args[2] is actually post ID
|
368 |
if (isset($args[2]) && is_scalar($args[2])) {
|
369 |
switch($args[0]) {
|
370 |
case 'edit_post':
|
371 |
$object = AAM::getUser()->getObject('post', $args[2]);
|
372 |
+
$edit = $object->has('backend.edit');
|
373 |
+
$others = $object->has('backend.edit_others');
|
374 |
+
if ($edit || ($others && !$this->isAuthor($object->getPost()))) {
|
375 |
$allCaps = $this->restrictPostActions($allCaps, $metaCaps);
|
376 |
}
|
377 |
break;
|
378 |
|
379 |
case 'delete_post' :
|
380 |
$object = AAM::getUser()->getObject('post', $args[2]);
|
381 |
+
$delete = $object->has('backend.delete');
|
382 |
+
$others = $object->has('backend.delete_others');
|
383 |
+
if ($delete || ($others && !$this->isAuthor($object->getPost()))) {
|
384 |
+
$allCaps = $this->restrictPostActions($allCaps, $metaCaps);
|
385 |
+
}
|
386 |
+
break;
|
387 |
+
|
388 |
+
default:
|
389 |
+
break;
|
390 |
+
}
|
391 |
+
} elseif (is_a($post, 'WP_Post')) {
|
392 |
+
switch ($args[0]) {
|
393 |
+
case 'publish_posts':
|
394 |
+
case 'publish_pages':
|
395 |
+
$object = AAM::getUser()->getObject('post', $post->ID);
|
396 |
+
$publish = $object->has('backend.publish');
|
397 |
+
$others = $object->has('backend.publish_others');
|
398 |
+
if ($publish || ($others && !$this->isAuthor($post))) {
|
399 |
$allCaps = $this->restrictPostActions($allCaps, $metaCaps);
|
400 |
}
|
401 |
break;
|
402 |
+
|
403 |
+
default:
|
404 |
+
break;
|
405 |
}
|
406 |
}
|
407 |
|
Application/Backend/View.php
CHANGED
@@ -91,12 +91,16 @@ class AAM_Backend_View {
|
|
91 |
public function renderMetabox() {
|
92 |
global $post;
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
100 |
|
101 |
return $content;
|
102 |
}
|
91 |
public function renderMetabox() {
|
92 |
global $post;
|
93 |
|
94 |
+
if (is_a($post, 'WP_Post')) {
|
95 |
+
$url = admin_url('admin.php?page=aam&oid=' . $post->ID . '#post');
|
96 |
+
|
97 |
+
ob_start();
|
98 |
+
require_once(dirname(__FILE__) . '/phtml/metabox.phtml');
|
99 |
+
$content = ob_get_contents();
|
100 |
+
ob_end_clean();
|
101 |
+
} else {
|
102 |
+
$content = null;
|
103 |
+
}
|
104 |
|
105 |
return $content;
|
106 |
}
|
Application/Backend/View/PostOptionList.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* ======================================================================
|
5 |
+
* LICENSE: This file is subject to the terms and conditions defined in *
|
6 |
+
* file 'license.txt', which is part of this source code package. *
|
7 |
+
* ======================================================================
|
8 |
+
*/
|
9 |
+
|
10 |
+
return array(
|
11 |
+
'frontend' => array(
|
12 |
+
'list' => array(
|
13 |
+
'title' => __('List', AAM_KEY),
|
14 |
+
'descr' => __('Hide %s.', AAM_KEY)
|
15 |
+
),
|
16 |
+
'list_others' => array(
|
17 |
+
'title' => __('List To Others', AAM_KEY),
|
18 |
+
'descr' => __('Hide %s for users that are not %s authors.', AAM_KEY)
|
19 |
+
),
|
20 |
+
'read' => array(
|
21 |
+
'title' => __('Read', AAM_KEY),
|
22 |
+
'descr' => __('Restrict access to read %s.', AAM_KEY)
|
23 |
+
),
|
24 |
+
'read_others' => array(
|
25 |
+
'title' => __('Read By Others', AAM_KEY),
|
26 |
+
'descr' => __('Restrict access to read %s by not %s authors.', AAM_KEY)
|
27 |
+
),
|
28 |
+
'limit' => array(
|
29 |
+
'title' => __('Limit', AAM_KEY),
|
30 |
+
'descr' => __('If checked, show defined in the Content Teaser tab teaser message instead of %s content.', AAM_KEY)
|
31 |
+
),
|
32 |
+
'comment' => array(
|
33 |
+
'title' => __('Comment', AAM_KEY),
|
34 |
+
'descr' => __('Restrict access to comment on %s if commenting feature is enabled.', AAM_KEY)
|
35 |
+
)
|
36 |
+
),
|
37 |
+
'backend' => array(
|
38 |
+
'list' => array(
|
39 |
+
'title' => __('List', AAM_KEY),
|
40 |
+
'descr' => __('Hide %s.', AAM_KEY)
|
41 |
+
),
|
42 |
+
'list_others' => array(
|
43 |
+
'title' => __('List To Others', AAM_KEY),
|
44 |
+
'descr' => __('Hide %s for users that are not %s authors.', AAM_KEY)
|
45 |
+
),
|
46 |
+
'edit' => array(
|
47 |
+
'title' => __('Edit', AAM_KEY),
|
48 |
+
'descr' => __('Restrict access to edit %s.', AAM_KEY)
|
49 |
+
),
|
50 |
+
'edit_others' => array(
|
51 |
+
'title' => __('Edit By Others', AAM_KEY),
|
52 |
+
'descr' => __('Restrict access to edit %s by not %s author.', AAM_KEY)
|
53 |
+
),
|
54 |
+
'delete' => array(
|
55 |
+
'title' => __('Delete', AAM_KEY),
|
56 |
+
'descr' => __('Restrict access to trash or permanently delete %s.', AAM_KEY)
|
57 |
+
),
|
58 |
+
'delete_others' => array(
|
59 |
+
'title' => __('Delete By Others', AAM_KEY),
|
60 |
+
'descr' => __('Restrict access to trash or permanently delete %s by not %s authors.', AAM_KEY)
|
61 |
+
),
|
62 |
+
'publish' => array(
|
63 |
+
'title' => __('Publish', AAM_KEY),
|
64 |
+
'descr' => __('Restrict access to publish %s. Quick Edit inline action is also removed.', AAM_KEY)
|
65 |
+
),
|
66 |
+
'publish_others' => array(
|
67 |
+
'title' => __('Publish By Others', AAM_KEY),
|
68 |
+
'descr' => __('Restrict access to publish %s by not authors of %s. Quick Edit inline action is also removed.', AAM_KEY)
|
69 |
+
)
|
70 |
+
)
|
71 |
+
);
|
Application/Backend/{Feature → View}/ProductList.php
RENAMED
File without changes
|
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('
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
@@ -148,7 +148,7 @@
|
|
148 |
<p>
|
149 |
<?php echo __('Insert license key that you recieved after the payment (find the email example below). It might take up to 2 hours to process the payment. Please remember that license key is limited only to one life domain.', AAM_KEY); ?>
|
150 |
<br /> <br />
|
151 |
-
<img src="https://vasyltech.com/img/email-confirmation.jpg" class="img-responsive" />
|
152 |
</p>
|
153 |
</div>
|
154 |
<div class="modal-footer">
|
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 a license that does not expire but is limited to one website. However, the license can be used for unlimited number of test or development environments where URL is either [localhost] or starts with [dev.], [staging.], [test.] or [demo.] Contact us immediately if you have troubles installing license on your website. [Money back guaranteed] within 30 day from the time of purchase.', 'i', 'i', 'i', 'i', 'i', 'b'); ?><br/>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
148 |
<p>
|
149 |
<?php echo __('Insert license key that you recieved after the payment (find the email example below). It might take up to 2 hours to process the payment. Please remember that license key is limited only to one life domain.', AAM_KEY); ?>
|
150 |
<br /> <br />
|
151 |
+
<img src="https://vasyltech.com/media/img/email-confirmation.jpg" class="img-responsive" />
|
152 |
</p>
|
153 |
</div>
|
154 |
<div class="modal-footer">
|
Application/Backend/phtml/object/post.phtml
CHANGED
@@ -72,50 +72,20 @@
|
|
72 |
</td>
|
73 |
</tr>
|
74 |
|
|
|
75 |
<tr>
|
76 |
<td width="90%">
|
77 |
-
<strong class="aam-block aam-highlight text-uppercase"><?php echo
|
78 |
-
<p class="aam-hint" data-dynamic-post-label="
|
79 |
</td>
|
80 |
<td>
|
81 |
<div class="aam-row-actions">
|
82 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="frontend
|
83 |
-
</div>
|
84 |
-
</td>
|
85 |
-
</tr>
|
86 |
-
<tr>
|
87 |
-
<td>
|
88 |
-
<strong class="aam-block aam-highlight text-uppercase"><?php echo __('Read', AAM_KEY); ?></strong>
|
89 |
-
<p class="aam-hint" data-dynamic-post-label="Restrict access to read %s. If List option is not checked, %s will be still listed on your website frontend."></p>
|
90 |
-
</td>
|
91 |
-
<td>
|
92 |
-
<div class="aam-row-actions">
|
93 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="frontend.read"></i>
|
94 |
-
</div>
|
95 |
-
</td>
|
96 |
-
</tr>
|
97 |
-
<tr>
|
98 |
-
<td>
|
99 |
-
<strong class="aam-block aam-highlight text-uppercase"><?php echo __('LIMIT', AAM_KEY); ?></strong>
|
100 |
-
<p class="aam-hint" data-dynamic-post-label="If checked, show defined in Content Teaser tab teaser message while reading %s instead of its content."></p>
|
101 |
-
</td>
|
102 |
-
<td>
|
103 |
-
<div class="aam-row-actions">
|
104 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="frontend.limit"></i>
|
105 |
-
</div>
|
106 |
-
</td>
|
107 |
-
</tr>
|
108 |
-
<tr>
|
109 |
-
<td>
|
110 |
-
<strong class="aam-block aam-highlight text-uppercase"><?php echo __('Comment', AAM_KEY); ?></strong>
|
111 |
-
<p class="aam-hint" data-dynamic-post-label="Restrict access to comment on %s (if commenting feature is activated)."></p>
|
112 |
-
</td>
|
113 |
-
<td>
|
114 |
-
<div class="aam-row-actions">
|
115 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="frontend.comment"></i>
|
116 |
</div>
|
117 |
</td>
|
118 |
</tr>
|
|
|
|
|
119 |
<?php do_action('aam-post-access-option-action', 'post', 'frontend'); ?>
|
120 |
|
121 |
<tr class="aam-backend-post-access">
|
@@ -124,40 +94,22 @@
|
|
124 |
</td>
|
125 |
</tr>
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
<
|
131 |
-
|
132 |
-
<td>
|
133 |
-
<div class="aam-row-actions">
|
134 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="backend.list"></i>
|
135 |
-
</div>
|
136 |
-
</td>
|
137 |
-
</tr>
|
138 |
-
<tr class="aam-backend-post-access">
|
139 |
-
<td>
|
140 |
-
<strong class="aam-block aam-highlight text-uppercase"><?php echo __('Edit', AAM_KEY); ?></strong>
|
141 |
-
<p class="aam-hint" data-dynamic-post-label="Restrict access to edit %s (also the link Edit and Quick Edit will be removed below the %s title)."></p>
|
142 |
-
</td>
|
143 |
-
<td>
|
144 |
-
<div class="aam-row-actions">
|
145 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="backend.edit"></i>
|
146 |
-
</div>
|
147 |
-
</td>
|
148 |
-
</tr>
|
149 |
-
<tr class="aam-backend-post-access">
|
150 |
-
<td>
|
151 |
-
<strong class="aam-block aam-highlight text-uppercase"><?php echo __('Delete', AAM_KEY); ?></strong>
|
152 |
-
<p class="aam-hint" data-dynamic-post-label="Restrict access to trash or permanently delete %s (also the link Trash or Delete Permanently will be removed below the %s title)."></p>
|
153 |
</td>
|
154 |
<td>
|
155 |
<div class="aam-row-actions">
|
156 |
-
<i class="aam-row-action text-muted icon-check-empty" data-property="backend
|
157 |
</div>
|
158 |
</td>
|
159 |
</tr>
|
|
|
|
|
160 |
<?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
|
|
|
161 |
</tbody>
|
162 |
</table>
|
163 |
|
72 |
</td>
|
73 |
</tr>
|
74 |
|
75 |
+
<?php foreach($this->getAccessOptionList('frontend') as $option => $data) { ?>
|
76 |
<tr>
|
77 |
<td width="90%">
|
78 |
+
<strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
|
79 |
+
<p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>"></p>
|
80 |
</td>
|
81 |
<td>
|
82 |
<div class="aam-row-actions">
|
83 |
+
<i class="aam-row-action text-muted icon-check-empty" data-property="frontend.<?php echo $option; ?>"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
</div>
|
85 |
</td>
|
86 |
</tr>
|
87 |
+
<?php } ?>
|
88 |
+
|
89 |
<?php do_action('aam-post-access-option-action', 'post', 'frontend'); ?>
|
90 |
|
91 |
<tr class="aam-backend-post-access">
|
94 |
</td>
|
95 |
</tr>
|
96 |
|
97 |
+
<?php foreach($this->getAccessOptionList('backend') as $option => $data) { ?>
|
98 |
+
<tr>
|
99 |
+
<td width="90%">
|
100 |
+
<strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
|
101 |
+
<p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>"></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</td>
|
103 |
<td>
|
104 |
<div class="aam-row-actions">
|
105 |
+
<i class="aam-row-action text-muted icon-check-empty" data-property="backend.<?php echo $option; ?>"></i>
|
106 |
</div>
|
107 |
</td>
|
108 |
</tr>
|
109 |
+
<?php } ?>
|
110 |
+
|
111 |
<?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
|
112 |
+
|
113 |
</tbody>
|
114 |
</table>
|
115 |
|
Application/Core/Subject/Visitor.php
CHANGED
@@ -82,11 +82,4 @@ class AAM_Core_Subject_Visitor extends AAM_Core_Subject {
|
|
82 |
return self::UID;
|
83 |
}
|
84 |
|
85 |
-
/**
|
86 |
-
* @inheritdoc
|
87 |
-
*/
|
88 |
-
public function getParent() {
|
89 |
-
return null;
|
90 |
-
}
|
91 |
-
|
92 |
}
|
82 |
return self::UID;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
Application/Frontend/Manager.php
CHANGED
@@ -75,7 +75,7 @@ class AAM_Frontend_Manager {
|
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
-
* Main
|
79 |
*
|
80 |
* @return void
|
81 |
*
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
+
* Main frontend access control hook
|
79 |
*
|
80 |
* @return void
|
81 |
*
|
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.9.
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://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.9.2
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://www.vasyltech.com
|
9 |
|
media/css/aam.css
CHANGED
@@ -560,7 +560,7 @@ input[type=radio]:checked + label:before {
|
|
560 |
}
|
561 |
|
562 |
.aam-overwrite {
|
563 |
-
padding: 5px 15px;
|
564 |
background-color: #f0ad4e;
|
565 |
color: #FFFFFF;
|
566 |
font-weight: 700;
|
@@ -811,7 +811,7 @@ input[type=radio]:checked + label:before {
|
|
811 |
padding: 10px;
|
812 |
position: relative;
|
813 |
font-size: 1em;
|
814 |
-
margin-bottom: 20px;
|
815 |
}
|
816 |
|
817 |
.aam-info-modal, .aam-info-modal p, .aam-info-modal ul {
|
560 |
}
|
561 |
|
562 |
.aam-overwrite {
|
563 |
+
padding: 5px 5px 5px 15px;
|
564 |
background-color: #f0ad4e;
|
565 |
color: #FFFFFF;
|
566 |
font-weight: 700;
|
811 |
padding: 10px;
|
812 |
position: relative;
|
813 |
font-size: 1em;
|
814 |
+
margin-bottom: 20px !important;
|
815 |
}
|
816 |
|
817 |
.aam-info-modal, .aam-info-modal p, .aam-info-modal ul {
|
media/js/aam-ui.js
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
*
|
30 |
* @returns {undefined}
|
31 |
*/
|
32 |
-
function fetchRoleList() {
|
33 |
$.ajax(aamLocal.ajaxurl, {
|
34 |
type: 'POST',
|
35 |
dataType: 'json',
|
@@ -37,7 +37,7 @@
|
|
37 |
action: 'aam',
|
38 |
sub_action: 'Role.getList',
|
39 |
_ajax_nonce: aamLocal.nonce,
|
40 |
-
exclude:
|
41 |
},
|
42 |
beforeSend: function () {
|
43 |
$('.inherit-role-list').html(
|
@@ -240,7 +240,7 @@
|
|
240 |
});
|
241 |
|
242 |
$('#edit-role-modal').on('shown.bs.modal', function (e) {
|
243 |
-
fetchRoleList();
|
244 |
$('input[name="name"]', '#edit-role-modal').focus();
|
245 |
});
|
246 |
|
@@ -1355,6 +1355,12 @@
|
|
1355 |
if (typeof callback === 'function') {
|
1356 |
callback.call();
|
1357 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
},
|
1359 |
error: function () {
|
1360 |
aam.notification('danger', aam.__('Application error'));
|
@@ -1363,12 +1369,6 @@
|
|
1363 |
$(btn).attr('class', 'aam-row-action text-info icon-cog');
|
1364 |
}
|
1365 |
});
|
1366 |
-
|
1367 |
-
//update dynamic labels
|
1368 |
-
var marker = '<b>' + $('.aam-post-breadcrumb span').text() + '</b>';
|
1369 |
-
$('[data-dynamic-post-label]').each(function() {
|
1370 |
-
$(this).html($(this).attr('data-dynamic-post-label').replace(/%s/g, marker));
|
1371 |
-
});
|
1372 |
}
|
1373 |
|
1374 |
/**
|
@@ -1501,10 +1501,12 @@
|
|
1501 |
}).bind('click', function () {
|
1502 |
if (!$(this).prop('disabled')) {
|
1503 |
$(this).prop('disabled', true);
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
|
|
|
|
1508 |
}
|
1509 |
}).attr({
|
1510 |
'data-toggle': "tooltip",
|
29 |
*
|
30 |
* @returns {undefined}
|
31 |
*/
|
32 |
+
function fetchRoleList(exclude) {
|
33 |
$.ajax(aamLocal.ajaxurl, {
|
34 |
type: 'POST',
|
35 |
dataType: 'json',
|
37 |
action: 'aam',
|
38 |
sub_action: 'Role.getList',
|
39 |
_ajax_nonce: aamLocal.nonce,
|
40 |
+
exclude: exclude
|
41 |
},
|
42 |
beforeSend: function () {
|
43 |
$('.inherit-role-list').html(
|
240 |
});
|
241 |
|
242 |
$('#edit-role-modal').on('shown.bs.modal', function (e) {
|
243 |
+
fetchRoleList(aam.getSubject().id);
|
244 |
$('input[name="name"]', '#edit-role-modal').focus();
|
245 |
});
|
246 |
|
1355 |
if (typeof callback === 'function') {
|
1356 |
callback.call();
|
1357 |
}
|
1358 |
+
|
1359 |
+
//update dynamic labels
|
1360 |
+
var marker = '<b>' + $('.aam-post-breadcrumb span').text() + '</b>';
|
1361 |
+
$('[data-dynamic-post-label]').each(function() {
|
1362 |
+
$(this).html($(this).attr('data-dynamic-post-label').replace(/%s/g, marker));
|
1363 |
+
});
|
1364 |
},
|
1365 |
error: function () {
|
1366 |
aam.notification('danger', aam.__('Application error'));
|
1369 |
$(btn).attr('class', 'aam-row-action text-info icon-cog');
|
1370 |
}
|
1371 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
1372 |
}
|
1373 |
|
1374 |
/**
|
1501 |
}).bind('click', function () {
|
1502 |
if (!$(this).prop('disabled')) {
|
1503 |
$(this).prop('disabled', true);
|
1504 |
+
//set filter
|
1505 |
+
filter[data[2]] = data[0];
|
1506 |
+
//finally reload the data
|
1507 |
+
$('#post-list').DataTable().ajax.reload();
|
1508 |
+
//update the breadcrumb
|
1509 |
+
addBreadcrumbLevel('type', data[0], data[3]);
|
1510 |
}
|
1511 |
}).attr({
|
1512 |
'data-toggle': "tooltip",
|
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.9.
|
7 |
|
8 |
The great WordPress plugin to manage access to your posts, pages, categories and
|
9 |
backend area for users, roles and visitors.
|
@@ -64,6 +64,14 @@ out more about the Advanced Access Manager.
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
= 3.9.1 =
|
68 |
* Replaced AAM Post Filter extension with core option "Large Post Number Support"
|
69 |
* Removed redundant HTML permalink support
|
@@ -335,17 +343,6 @@ out more about the Advanced Access Manager.
|
|
335 |
* Added AAM Plugin Manager Extension
|
336 |
* Removed Deprecated ConfigPress Object from the core
|
337 |
|
338 |
-
= 2.7.3 =
|
339 |
-
* Added ConfigPress Reference Page
|
340 |
-
|
341 |
-
= 2.7.2 =
|
342 |
-
* Maintenance release
|
343 |
-
|
344 |
-
= 2.7.1 =
|
345 |
-
* Improved SSL handling
|
346 |
-
* Added ConfigPress property aam.native_role_id
|
347 |
-
* Fixed bug with countryCode in AAM Security Extension
|
348 |
-
|
349 |
= 2.7 =
|
350 |
* Fixed bug with subject managing check
|
351 |
* Fixed bug with update hook
|
@@ -363,16 +360,6 @@ out more about the Advanced Access Manager.
|
|
363 |
* Optimized CSS
|
364 |
* Regenerated translation pot file
|
365 |
|
366 |
-
= 2.5.2 =
|
367 |
-
* Fixed issue with AAM Media Manager
|
368 |
-
|
369 |
-
= 2.5.1 =
|
370 |
-
* Extended AAM Media Manager Extension
|
371 |
-
* Adjusted control_area to AAM Media Manager
|
372 |
-
* Fixed issue with mb_* functions
|
373 |
-
* Added Contextual Help Menu
|
374 |
-
* Updated My Feature extension
|
375 |
-
|
376 |
= 2.5 =
|
377 |
* Fixed issue with AAM Plus Package and Multisite
|
378 |
* Introduced Development License
|
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.9.2
|
7 |
|
8 |
The great WordPress plugin to manage access to your posts, pages, categories and
|
9 |
backend area for users, roles and visitors.
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 3.9.2 =
|
68 |
+
* Bug fixing
|
69 |
+
* Internal code improvements
|
70 |
+
* Extended list of post & pages access options
|
71 |
+
|
72 |
+
= 3.9.1.1 =
|
73 |
+
* Minor bug fix to cover uncommon scenario when user without role
|
74 |
+
|
75 |
= 3.9.1 =
|
76 |
* Replaced AAM Post Filter extension with core option "Large Post Number Support"
|
77 |
* Removed redundant HTML permalink support
|
343 |
* Added AAM Plugin Manager Extension
|
344 |
* Removed Deprecated ConfigPress Object from the core
|
345 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
= 2.7 =
|
347 |
* Fixed bug with subject managing check
|
348 |
* Fixed bug with update hook
|
360 |
* Optimized CSS
|
361 |
* Regenerated translation pot file
|
362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
= 2.5 =
|
364 |
* Fixed issue with AAM Plus Package and Multisite
|
365 |
* Introduced Development License
|