Version Description
- Improved UI
- Completely protect Admin Menu if restricted
- Tiny core refactoring
- Rewrote UI descriptions
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 3.3 |
Comparing to | |
See all releases |
Code changes from version 3.2.3 to 3.3
- Application/Backend/Extension.php +15 -2
- Application/Backend/Filter.php +1 -14
- Application/Backend/Manager.php +42 -3
- Application/Backend/Menu.php +7 -9
- Application/Backend/ProductList.php +2 -2
- Application/Backend/view/contact.phtml +3 -3
- Application/Backend/view/extension.phtml +88 -46
- Application/Backend/view/index.phtml +11 -43
- Application/Backend/view/object/menu.phtml +0 -8
- Application/Backend/view/partial/post-type.phtml +2 -0
- Application/Backend/view/partial/term-type.phtml +2 -0
- Application/Core/API.php +9 -4
- Lang/advanced-access-manager-en_US.mo +0 -0
- Lang/advanced-access-manager-en_US.po +1 -1
- aam.php +1 -1
- media/css/aam.css +15 -1
- media/js/aam-ui.js +0 -6
- readme.txt +8 -2
Application/Backend/Extension.php
CHANGED
@@ -58,8 +58,21 @@ class AAM_Backend_Extension {
|
|
58 |
*
|
59 |
* @access protected
|
60 |
*/
|
61 |
-
protected function getProductList() {
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
58 |
*
|
59 |
* @access protected
|
60 |
*/
|
61 |
+
protected function getProductList($filter) {
|
62 |
+
static $products = null;
|
63 |
+
|
64 |
+
if (is_null($products)) {
|
65 |
+
$products = require(dirname(__FILE__) . '/ProductList.php');
|
66 |
+
}
|
67 |
+
|
68 |
+
$filtered = array();
|
69 |
+
foreach($products as $product) {
|
70 |
+
if ($product['type'] == $filter) {
|
71 |
+
$filtered[] = $product;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
return $filtered;
|
76 |
}
|
77 |
|
78 |
/**
|
Application/Backend/Filter.php
CHANGED
@@ -195,20 +195,7 @@ class AAM_Backend_Filter {
|
|
195 |
* @access public
|
196 |
*/
|
197 |
public function backendDie($function) {
|
198 |
-
|
199 |
-
$message = AAM_Core_ConfigPress::get(
|
200 |
-
'backend.access.deny.message', __('Access Denied', 'aam')
|
201 |
-
);
|
202 |
-
|
203 |
-
if (filter_var($redirect, FILTER_VALIDATE_URL)) {
|
204 |
-
wp_redirect($redirect);
|
205 |
-
exit;
|
206 |
-
} elseif (is_int($redirect)) {
|
207 |
-
wp_redirect(get_post_permalink($redirect));
|
208 |
-
exit;
|
209 |
-
} else {
|
210 |
-
call_user_func($function, $message, '', array());
|
211 |
-
}
|
212 |
}
|
213 |
|
214 |
/**
|
195 |
* @access public
|
196 |
*/
|
197 |
public function backendDie($function) {
|
198 |
+
AAM_Core_API::reject('backend', $function);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
|
201 |
/**
|
Application/Backend/Manager.php
CHANGED
@@ -49,6 +49,9 @@ class AAM_Backend_Manager {
|
|
49 |
//manage access action to the user list
|
50 |
add_filter('user_row_actions', array($this, 'userActions'), 10, 2);
|
51 |
|
|
|
|
|
|
|
52 |
//check extension version
|
53 |
$this->checkExtensionList();
|
54 |
|
@@ -61,6 +64,40 @@ class AAM_Backend_Manager {
|
|
61 |
}
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* Enqueue global js
|
66 |
*
|
@@ -101,7 +138,7 @@ class AAM_Backend_Manager {
|
|
101 |
}
|
102 |
}
|
103 |
|
104 |
-
//TODO - Remove in
|
105 |
$this->checkRedundantExtensions();
|
106 |
}
|
107 |
|
@@ -177,7 +214,9 @@ class AAM_Backend_Manager {
|
|
177 |
* @access public
|
178 |
*/
|
179 |
public function userActions($actions, $user) {
|
180 |
-
|
|
|
|
|
181 |
$url = admin_url('admin.php?page=aam&user=' . $user->ID);
|
182 |
|
183 |
$actions['aam'] = '<a href="' . $url . '">';
|
@@ -304,7 +343,7 @@ class AAM_Backend_Manager {
|
|
304 |
AAM_MEDIA . '/active-menu.png'
|
305 |
);
|
306 |
}
|
307 |
-
|
308 |
/**
|
309 |
* Render Main Content page
|
310 |
*
|
49 |
//manage access action to the user list
|
50 |
add_filter('user_row_actions', array($this, 'userActions'), 10, 2);
|
51 |
|
52 |
+
//control admin area
|
53 |
+
add_action('admin_init', array($this, 'adminInit'));
|
54 |
+
|
55 |
//check extension version
|
56 |
$this->checkExtensionList();
|
57 |
|
64 |
}
|
65 |
}
|
66 |
|
67 |
+
/**
|
68 |
+
* Control Admin Area access
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*
|
72 |
+
* @access public
|
73 |
+
*/
|
74 |
+
public function adminInit() {
|
75 |
+
global $plugin_page;
|
76 |
+
|
77 |
+
//compile menu
|
78 |
+
if (empty($plugin_page)){
|
79 |
+
$menu = basename(AAM_Core_Request::server('SCRIPT_NAME'));
|
80 |
+
|
81 |
+
$taxonomy = AAM_Core_Request::get('taxonomy');
|
82 |
+
$postType = AAM_Core_Request::get('post_type');
|
83 |
+
$page = AAM_Core_Request::get('page');
|
84 |
+
|
85 |
+
if (!empty($taxonomy)) {
|
86 |
+
$menu .= '?taxonomy=' . $taxonomy;
|
87 |
+
} elseif (!empty($postType)) {
|
88 |
+
$menu .= '?post_type=' . $postType;
|
89 |
+
} elseif (!empty($page)) {
|
90 |
+
$menu .= '?page=' . $page;
|
91 |
+
}
|
92 |
+
} else {
|
93 |
+
$menu = $plugin_page;
|
94 |
+
}
|
95 |
+
|
96 |
+
if (AAM::getUser()->getObject('menu')->has($menu)) {
|
97 |
+
AAM_Core_API::reject('backend');
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
/**
|
102 |
* Enqueue global js
|
103 |
*
|
138 |
}
|
139 |
}
|
140 |
|
141 |
+
//TODO - Remove in Dec 2016
|
142 |
$this->checkRedundantExtensions();
|
143 |
}
|
144 |
|
214 |
* @access public
|
215 |
*/
|
216 |
public function userActions($actions, $user) {
|
217 |
+
$cap = AAM_Core_ConfigPress::get('aam.page.capability', 'administrator');
|
218 |
+
|
219 |
+
if (current_user_can($cap, $user->ID)) {
|
220 |
$url = admin_url('admin.php?page=aam&user=' . $user->ID);
|
221 |
|
222 |
$actions['aam'] = '<a href="' . $url . '">';
|
343 |
AAM_MEDIA . '/active-menu.png'
|
344 |
);
|
345 |
}
|
346 |
+
|
347 |
/**
|
348 |
* Render Main Content page
|
349 |
*
|
Application/Backend/Menu.php
CHANGED
@@ -94,13 +94,13 @@ class AAM_Backend_Menu {
|
|
94 |
|
95 |
if ($allowed || count($submenu) > 0) {
|
96 |
$response[] = array(
|
97 |
-
'name' => $this->filterMenuName($item[0]),
|
98 |
//add menu- prefix to define that this is the top level menu
|
99 |
//WordPress by default gives the same menu id to the first
|
100 |
//submenu
|
101 |
-
'id'
|
102 |
-
'
|
103 |
-
'
|
|
|
104 |
);
|
105 |
}
|
106 |
}
|
@@ -128,11 +128,9 @@ class AAM_Backend_Menu {
|
|
128 |
foreach ($submenu[$menu] as $item) {
|
129 |
if ($subject->hasCapability($item[1])) {
|
130 |
$response[] = array(
|
131 |
-
'
|
132 |
-
'
|
133 |
-
'capability' =>
|
134 |
-
$item[1]
|
135 |
-
)
|
136 |
);
|
137 |
}
|
138 |
}
|
94 |
|
95 |
if ($allowed || count($submenu) > 0) {
|
96 |
$response[] = array(
|
|
|
97 |
//add menu- prefix to define that this is the top level menu
|
98 |
//WordPress by default gives the same menu id to the first
|
99 |
//submenu
|
100 |
+
'id' => 'menu-' . $item[2],
|
101 |
+
'name' => $this->filterMenuName($item[0]),
|
102 |
+
'submenu' => $submenu,
|
103 |
+
'capability' => $item[1]
|
104 |
);
|
105 |
}
|
106 |
}
|
128 |
foreach ($submenu[$menu] as $item) {
|
129 |
if ($subject->hasCapability($item[1])) {
|
130 |
$response[] = array(
|
131 |
+
'id' => $item[2],
|
132 |
+
'name' => $this->filterMenuName($item[0]),
|
133 |
+
'capability' => $item[1]
|
|
|
|
|
134 |
);
|
135 |
}
|
136 |
}
|
Application/Backend/ProductList.php
CHANGED
@@ -14,7 +14,7 @@ return array(
|
|
14 |
'type' => 'commercial',
|
15 |
'cost' => '$30',
|
16 |
'currency' => 'USD',
|
17 |
-
'description' => __('
|
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 |
),
|
@@ -34,7 +34,7 @@ return array(
|
|
34 |
'type' => 'commercial',
|
35 |
'cost' => '$5',
|
36 |
'currency' => 'USD',
|
37 |
-
'description' => __('
|
38 |
'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G9V4BT3T8WJSN',
|
39 |
'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Role Filter')
|
40 |
),
|
14 |
'type' => 'commercial',
|
15 |
'cost' => '$30',
|
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 |
),
|
34 |
'type' => 'commercial',
|
35 |
'cost' => '$5',
|
36 |
'currency' => 'USD',
|
37 |
+
'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),
|
38 |
'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G9V4BT3T8WJSN',
|
39 |
'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Role Filter')
|
40 |
),
|
Application/Backend/view/contact.phtml
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12">
|
5 |
<p class="aam-info">
|
6 |
-
<?php echo __('Feel free to contact
|
7 |
</p>
|
8 |
-
<ol>
|
9 |
<li>Keep your message short. As longer message as longer it will take for us to response;</li>
|
10 |
<li>Use English, Polish, Russian or Ukrainian language. Otherwise we may ignore your message;</li>
|
11 |
-
<li>Yes, you can hire us to do some
|
12 |
<li>In case of issues with the plugin, if possible, include screenshots or videos that show the problem;</li>
|
13 |
<li>Be patient. It might take up to 3 business days for us to response.</li>
|
14 |
</ol>
|
3 |
<div class="row">
|
4 |
<div class="col-xs-12">
|
5 |
<p class="aam-info">
|
6 |
+
<?php echo __('Feel free to contact us if you have any questions or hire when you are looking for custom functionality but follow few simple rules:'); ?>
|
7 |
</p>
|
8 |
+
<ol class="text-larger">
|
9 |
<li>Keep your message short. As longer message as longer it will take for us to response;</li>
|
10 |
<li>Use English, Polish, Russian or Ukrainian language. Otherwise we may ignore your message;</li>
|
11 |
+
<li>Yes, you can hire us to do some custom functionality for your needs but please be clear with your requirements;</li>
|
12 |
<li>In case of issues with the plugin, if possible, include screenshots or videos that show the problem;</li>
|
13 |
<li>Be patient. It might take up to 3 business days for us to response.</li>
|
14 |
</ol>
|
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.] [Money back guaranteed] within 30 day from the time of purchase.', 'i', 'i', 'i', 'i', 'b'); ?><br/>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
@@ -20,51 +20,91 @@
|
|
20 |
</div>
|
21 |
</div>
|
22 |
|
23 |
-
<
|
24 |
-
<
|
25 |
-
<
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
<?php } ?>
|
55 |
-
</
|
56 |
-
</
|
57 |
-
|
|
|
58 |
|
59 |
-
|
60 |
-
<td colspan="2">
|
61 |
-
<p class="aam-notification-message text-center">
|
62 |
-
<?php echo __('All extensions are installed and up to date.', AAM_KEY); ?>
|
63 |
-
</p>
|
64 |
-
</td>
|
65 |
-
</tr>
|
66 |
-
</tbody>
|
67 |
-
</table>
|
68 |
|
69 |
<div class="modal fade" id="extension-notification-modal" tabindex="-1" role="dialog">
|
70 |
<div class="modal-dialog" role="document">
|
@@ -98,11 +138,13 @@
|
|
98 |
<div class="modal-content">
|
99 |
<div class="modal-header">
|
100 |
<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">×</span></button>
|
101 |
-
<h4 class="modal-title"><?php echo __('Install Extension
|
102 |
</div>
|
103 |
<div class="modal-body aam-info-modal">
|
104 |
<p>
|
105 |
-
<?php echo __('
|
|
|
|
|
106 |
</p>
|
107 |
</div>
|
108 |
<div class="modal-footer">
|
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.] (contact us if your development environment is different). [Money back guaranteed] within 30 day from the time of purchase.', 'i', 'i', 'i', 'i', 'b'); ?><br/>
|
7 |
</p>
|
8 |
</div>
|
9 |
</div>
|
20 |
</div>
|
21 |
</div>
|
22 |
|
23 |
+
<div>
|
24 |
+
<ul class="nav nav-tabs" role="tablist">
|
25 |
+
<li role="presentation" class="active"><a href="#premium-extensions" aria-controls="premium-extensions" role="tab" data-toggle="tab"><?php echo __('Premium', AAM_KEY); ?></a></li>
|
26 |
+
<li role="presentation"><a href="#free-extensions" aria-controls="free-extensions" role="tab" data-toggle="tab"><?php echo __('Free', AAM_KEY); ?></a></li>
|
27 |
+
<li role="presentation"><a href="#useful-plugins" aria-controls="help-plugins" role="tab" data-toggle="tab"><?php echo __('Userful Plugins', AAM_KEY); ?></a></li>
|
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 ($this->getProductList('commercial') as $product) { ?>
|
36 |
+
<tr>
|
37 |
+
<td>
|
38 |
+
<h4><?php echo $product['title'], ' - ' . ($product['cost'] . ' <small>' . $product['currency'] . '</small>'); ?></h4>
|
39 |
+
<p class="text-justify text-larger">
|
40 |
+
<?php echo $product['description']; ?>
|
41 |
+
</p>
|
42 |
+
</td>
|
43 |
+
<td>
|
44 |
+
<?php if ($product['status'] == AAM_Core_Repository::STATUS_INSTALLED) { ?>
|
45 |
+
<span class="aam-extension-installed"><i class="icon-check"></i> <?php echo __('Installed', AAM_KEY); ?></span>
|
46 |
+
<?php } elseif ($product['status'] == AAM_Core_Repository::STATUS_UPDATE) { ?>
|
47 |
+
<a href="#" class="btn btn-sm btn-warning btn-block aam-update-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-arrows-cw"></i> <?php echo __('Update', AAM_KEY); ?></a>
|
48 |
+
<?php } else { ?>
|
49 |
+
<a href="<?php echo $product['storeURL']; ?>" target="_blank" class="btn btn-sm btn-success btn-block"><i class="icon-basket"></i> <?php echo __('Purchase', AAM_KEY); ?></a>
|
50 |
+
<?php } ?>
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
<?php } ?>
|
54 |
+
</tbody>
|
55 |
+
</table>
|
56 |
+
</div>
|
57 |
+
<div role="tabpanel" class="tab-pane" id="free-extensions">
|
58 |
+
<table class="table table-striped table-bordered">
|
59 |
+
<tbody>
|
60 |
+
<?php foreach ($this->getProductList('GNU') as $product) { ?>
|
61 |
+
<tr>
|
62 |
+
<td>
|
63 |
+
<h4><?php echo $product['title'], ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></h4>
|
64 |
+
<p class="text-justify text-larger">
|
65 |
+
<?php echo $product['description']; ?>
|
66 |
+
</p>
|
67 |
+
</td>
|
68 |
+
<td>
|
69 |
+
<?php if ($product['status'] == AAM_Core_Repository::STATUS_INSTALLED) { ?>
|
70 |
+
<span class="aam-extension-installed"><i class="icon-check"></i> <?php echo __('Installed', AAM_KEY); ?></span>
|
71 |
+
<?php } elseif ($product['status'] == AAM_Core_Repository::STATUS_UPDATE) { ?>
|
72 |
+
<a href="#" class="btn btn-sm btn-warning btn-block aam-update-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-arrows-cw"></i> <?php echo __('Update', AAM_KEY); ?></a>
|
73 |
+
<?php } else { ?>
|
74 |
+
<a href="#" class="btn btn-sm btn-success btn-block aam-download-extension" data-license="<?php echo $product['license']; ?>"><i class="icon-download-cloud"></i> <?php echo __('Download', AAM_KEY); ?></a>
|
75 |
+
<?php } ?>
|
76 |
+
</td>
|
77 |
+
</tr>
|
78 |
+
<?php } ?>
|
79 |
+
</tbody>
|
80 |
+
</table>
|
81 |
+
</div>
|
82 |
+
<div role="tabpanel" class="tab-pane" id="useful-plugins">
|
83 |
+
<table class="table table-striped table-bordered">
|
84 |
+
<tbody>
|
85 |
+
<?php foreach ($this->getProductList('plugin') as $product) { ?>
|
86 |
+
<tr>
|
87 |
+
<td>
|
88 |
+
<h4><?php echo $product['title'], ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></h4>
|
89 |
+
<p class="text-justify text-larger">
|
90 |
+
<?php echo $product['description']; ?>
|
91 |
+
</p>
|
92 |
+
</td>
|
93 |
+
<td>
|
94 |
+
<?php if ($product['status']['status'] == 'install') { ?>
|
95 |
+
<a href="<?php echo $product['status']['url']; ?>" class="btn btn-sm btn-success btn-block"><i class="icon-plus"></i> <?php echo __('Install', AAM_KEY); ?></a>
|
96 |
+
<?php } else { ?>
|
97 |
+
<span class="aam-extension-installed"><i class="icon-check"></i> <?php echo __('Installed', AAM_KEY); ?></span>
|
98 |
+
<?php } ?>
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
<?php } ?>
|
102 |
+
</tbody>
|
103 |
+
</table>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
|
107 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
<div class="modal fade" id="extension-notification-modal" tabindex="-1" role="dialog">
|
110 |
<div class="modal-dialog" role="document">
|
138 |
<div class="modal-content">
|
139 |
<div class="modal-header">
|
140 |
<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">×</span></button>
|
141 |
+
<h4 class="modal-title"><?php echo __('Install Extension', AAM_KEY); ?></h4>
|
142 |
</div>
|
143 |
<div class="modal-body aam-info-modal">
|
144 |
<p>
|
145 |
+
<?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); ?>
|
146 |
+
<br /> <br />
|
147 |
+
<img src="http://vasyltech.com/img/email-confirmation.jpg" class="img-responsive" />
|
148 |
</p>
|
149 |
</div>
|
150 |
<div class="modal-footer">
|
Application/Backend/view/index.phtml
CHANGED
@@ -55,39 +55,13 @@
|
|
55 |
<div class="inside" id="access-manager-inside">
|
56 |
<div class="aam-postbox-inside" id="aam-content"></div>
|
57 |
<div class="aam-help-context" >
|
58 |
-
<
|
59 |
-
<
|
60 |
-
|
61 |
-
<
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<p class="text-justify">
|
67 |
-
<strong><?php echo __('Backend Menu', AAM_KEY); ?></strong><br/>
|
68 |
-
<?php echo __('Filter the admin menu. Please notice that it only filters the menu but does not restrict a direct access to the filtered menus. In order to completely restrict access to the menu, make sure that your role or user does not have capability that is assigned by WordPress core to that menu (the capability name is right next to the menu name).', AAM_KEY); ?>
|
69 |
-
</p>
|
70 |
-
|
71 |
-
<p class="text-justify">
|
72 |
-
<strong><?php echo __('Metaboxes & Widgets', AAM_KEY); ?></strong><br/>
|
73 |
-
<?php echo __('Filter backend metaboxes and frontend widgets. If the list of metaboxes and widgets is empty, click the “Refresh” button. This will reinitialize the list. It is a possibility that this feature will not work on servers that fails to execute WordPress remote request function “wp_remote_request”.', AAM_KEY); ?>
|
74 |
-
</p>
|
75 |
-
|
76 |
-
<p class="text-justify">
|
77 |
-
<strong><?php echo __('Capabilities', AAM_KEY); ?></strong><br/>
|
78 |
-
<?php echo __('This is probably the most important and powerful feature that manages list of capabilities for roles and users. Please make sure that you are familiar with WordPress Roles and Capabilities before using this feature. Do not try to un-check any capability for the Administrator role because your might lose access to your backend. While creating a new capability, AAM takes the capability name without any additional processing or normalization; which means that if you created new capability “Manage Boats”, internally it retains the same exact name.', AAM_KEY); ?>
|
79 |
-
</p>
|
80 |
-
|
81 |
-
<p class="text-justify">
|
82 |
-
<strong><?php echo __('Posts & Pages', AAM_KEY); ?></strong><br/>
|
83 |
-
<?php echo __('Manage access to your posts, pages and custom post types.', AAM_KEY); ?> <span class="aam-highlight"><?php echo __('Please notice!', AAM_KEY); ?></span> <?php echo __('This feature has limitations without AAM Plus Package extension.', AAM_KEY); ?>
|
84 |
-
</p>
|
85 |
-
|
86 |
-
<p class="text-justify">
|
87 |
-
<strong><?php echo __('Extensions', AAM_KEY); ?></strong><br/>
|
88 |
-
<?php echo sprintf(__('Extend AAM functionality with variety of extensions that can be either downloaded for free or purchased. All payment transactions are handled securely through PayPal and the PayPal Transaction ID is used to obtain the purchased extension (you can find Transaction ID in the email that PayPal send you after the purchase). Most of the time the extension is available for download almost immediately but it might take up to 2 hours for PayPal to notify our server about your payment. You are allowed to get the full refund within 30 days after the purchase, if extension did not meet your expectation. Please submit the %srefund form%s and we will issue a refund within next 3 business days.', AAM_KEY), '<a href="http://vasyltech.com/advanced-access-manager" target="_blank">', '</a>'); ?>
|
89 |
-
</p>
|
90 |
-
|
91 |
<div class="aam-info aam-social">
|
92 |
<a target="_blank" href="http://wpaam.com"><i class="icon-home"></i></a>
|
93 |
<a target="_blank" href="http://twitter.com/vasyltech"><i class="icon-twitter"></i></a>
|
@@ -249,7 +223,7 @@
|
|
249 |
<div role="tabpanel" class="tab-pane" id="visitor">
|
250 |
<div class="visitor-message">
|
251 |
<span><?php echo __('Manage access to your website for visitors (any user that is not authenticated)', AAM_KEY); ?>.</span>
|
252 |
-
<button class="btn btn-primary btn-block" id="manage-visitor"><i class="icon-cog"></i> <?php echo __('Manage
|
253 |
</div>
|
254 |
</div>
|
255 |
</div>
|
@@ -266,24 +240,18 @@
|
|
266 |
|
267 |
<p class="text-justify">
|
268 |
<strong><?php echo __('User Manager', AAM_KEY); ?></strong><br/>
|
269 |
-
<?php echo __('Manage access for any user. As a bonus feature, you can block user. It means that user will be not able to login to your website anymore.
|
270 |
</p>
|
271 |
|
272 |
<p class="text-justify">
|
273 |
<strong><?php echo __('Visitor Manager', AAM_KEY); ?></strong><br/>
|
274 |
-
<?php echo __('Visitor
|
275 |
</p>
|
276 |
-
|
277 |
-
<div class="aam-info aam-social">
|
278 |
-
<a href="http://vasyltech.com" target="_blank"><i class="icon-home"></i></a>
|
279 |
-
<a href="http://twitter.com/vasyltech" target="_blank"><i class="icon-twitter"></i></a>
|
280 |
-
<a href="https://github.com/VasylTech/advanced-access-manager" target="_blank"><i class="icon-github"></i></a>
|
281 |
-
</div>
|
282 |
</div>
|
283 |
</div>
|
284 |
</div>
|
285 |
<?php do_action('aam-sidebar-ui-action', 'bottom'); ?>
|
286 |
-
|
287 |
<!-- Error Fix Promotion: begin -->
|
288 |
<div class="postbox hidden" id="errorfix-promotion">
|
289 |
<h3 class="hndle">
|
55 |
<div class="inside" id="access-manager-inside">
|
56 |
<div class="aam-postbox-inside" id="aam-content"></div>
|
57 |
<div class="aam-help-context" >
|
58 |
+
<div class="text-justify aam-large-padding">
|
59 |
+
<p class="text-larger"><?php echo __('Appreciate your interest in Advanced Access Manager (aka AAM). With strong knowledge and experience in WordPress, AAM becomes a very powerful tool to manage access to your frontend and backend.', AAM_KEY); ?></p>
|
60 |
+
<p class="text-larger"><span class="aam-highlight"><?php echo __('Please notice!', AAM_KEY); ?></span> <?php echo AAM_Backend_Helper::preparePhrase('Power comes with responsibility. Make sure that you have enough knowledge in WordPress Roles and Capabilities because AAM is very closely intergrated with WordPress core. It is also very important [to have backup of your database before you start working with AAM] (there is no need to backup your files, AAM does not modify any physical files on your server and never did).', 'b'); ?></p>
|
61 |
+
<p class="text-larger"><?php echo __('AAM was thoroughly tested on the fresh installation of WordPress and in the latest versions of Chrome, Safari, IE and Firefox. If you have any issues, the most typical case is the conflict with other plugins or themes.', AAM_KEY); ?></p>
|
62 |
+
<p class="text-larger"><?php echo sprintf(__('For more information check our %sIntroduction to AAM%s.', AAM_KEY), '<a href="http://vasyltech.com/blog/introduction-to-aam" target="_blank">', '</a>'); ?></p>
|
63 |
+
</div>
|
64 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
<div class="aam-info aam-social">
|
66 |
<a target="_blank" href="http://wpaam.com"><i class="icon-home"></i></a>
|
67 |
<a target="_blank" href="http://twitter.com/vasyltech"><i class="icon-twitter"></i></a>
|
223 |
<div role="tabpanel" class="tab-pane" id="visitor">
|
224 |
<div class="visitor-message">
|
225 |
<span><?php echo __('Manage access to your website for visitors (any user that is not authenticated)', AAM_KEY); ?>.</span>
|
226 |
+
<button class="btn btn-primary btn-block" id="manage-visitor"><i class="icon-cog"></i> <?php echo __('Manage Visitors', AAM_KEY); ?></button>
|
227 |
</div>
|
228 |
</div>
|
229 |
</div>
|
240 |
|
241 |
<p class="text-justify">
|
242 |
<strong><?php echo __('User Manager', AAM_KEY); ?></strong><br/>
|
243 |
+
<?php echo __('Manage access for any user. As a bonus feature, you can block user. It means that user will be not able to login to your website anymore.', AAM_KEY); ?>
|
244 |
</p>
|
245 |
|
246 |
<p class="text-justify">
|
247 |
<strong><?php echo __('Visitor Manager', AAM_KEY); ?></strong><br/>
|
248 |
+
<?php echo __('Visitor can be considered any user that is not authenticated to your website.', AAM_KEY); ?>
|
249 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
</div>
|
251 |
</div>
|
252 |
</div>
|
253 |
<?php do_action('aam-sidebar-ui-action', 'bottom'); ?>
|
254 |
+
|
255 |
<!-- Error Fix Promotion: begin -->
|
256 |
<div class="postbox hidden" id="errorfix-promotion">
|
257 |
<h3 class="hndle">
|
Application/Backend/view/object/menu.phtml
CHANGED
@@ -9,14 +9,6 @@
|
|
9 |
</div>
|
10 |
</div>
|
11 |
|
12 |
-
<div class="row">
|
13 |
-
<div class="col-xs-12">
|
14 |
-
<p class="aam-info" id="admin-menu-help" data-readmore="<?php echo AAM_Backend_Helper::preparePhrase('[Please notice]! This does not restrict direct access to the page but rather filters it from the menu. In order to completely restrict access to the desired page, un-check the capability that is assigned to the menu [(the capability is shown right next to the menu title)].', 'strong', 'small'); ?>">
|
15 |
-
<?php echo __('If checked, then menu is filtered.', AAM_KEY); ?>
|
16 |
-
</p>
|
17 |
-
</div>
|
18 |
-
</div>
|
19 |
-
|
20 |
<div class="panel-group" id="admin-menu" role="tablist" aria-multiselectable="true">
|
21 |
<?php
|
22 |
$object = AAM_Backend_View::getSubject()->getObject('menu');
|
9 |
</div>
|
10 |
</div>
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<div class="panel-group" id="admin-menu" role="tablist" aria-multiselectable="true">
|
13 |
<?php
|
14 |
$object = AAM_Backend_View::getSubject()->getObject('menu');
|
Application/Backend/view/partial/post-type.phtml
CHANGED
@@ -4,6 +4,8 @@
|
|
4 |
<p class="aam-info">
|
5 |
<?php echo AAM_Backend_Helper::preparePhrase('Define the default access to your posts, pages, custom post types or categories. This feature is available only with [AAM Plus Package] extension. But you can still manage access to individual posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>
|
6 |
</p>
|
|
|
|
|
7 |
</div>
|
8 |
</div>
|
9 |
<?php
|
4 |
<p class="aam-info">
|
5 |
<?php echo AAM_Backend_Helper::preparePhrase('Define the default access to your posts, pages, custom post types or categories. This feature is available only with [AAM Plus Package] extension. But you can still manage access to individual posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>
|
6 |
</p>
|
7 |
+
|
8 |
+
<img src="http://vasyltech.com/img/aam-default-access-form.jpg" class="img-responsive" />
|
9 |
</div>
|
10 |
</div>
|
11 |
<?php
|
Application/Backend/view/partial/term-type.phtml
CHANGED
@@ -4,6 +4,8 @@
|
|
4 |
<p class="aam-info">
|
5 |
<?php echo AAM_Backend_Helper::preparePhrase('Managing default access to categories (terms) is available in [AAM Plus Package] only. But you can still manage access to individual posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>
|
6 |
</p>
|
|
|
|
|
7 |
</div>
|
8 |
</div>
|
9 |
<?php
|
4 |
<p class="aam-info">
|
5 |
<?php echo AAM_Backend_Helper::preparePhrase('Managing default access to categories (terms) is available in [AAM Plus Package] only. But you can still manage access to individual posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>
|
6 |
</p>
|
7 |
+
|
8 |
+
<img src="http://vasyltech.com/img/aam-term-access-form.jpg" class="img-responsive" />
|
9 |
</div>
|
10 |
</div>
|
11 |
<?php
|
Application/Core/API.php
CHANGED
@@ -186,22 +186,27 @@ final class AAM_Core_API {
|
|
186 |
* Reject the request
|
187 |
*
|
188 |
* Redirect or die the execution based on ConfigPress settings
|
|
|
|
|
|
|
189 |
*
|
190 |
* @return void
|
191 |
*
|
192 |
* @access public
|
193 |
*/
|
194 |
-
public static function reject($area = 'frontend') {
|
195 |
$redirect = AAM_Core_ConfigPress::get("{$area}.access.deny.redirect");
|
|
|
|
|
|
|
196 |
|
197 |
if (filter_var($redirect, FILTER_VALIDATE_URL)) {
|
198 |
wp_redirect($redirect);
|
199 |
} elseif (is_int($redirect)) {
|
200 |
wp_redirect(get_post_permalink($redirect));
|
|
|
|
|
201 |
} else {
|
202 |
-
$message = AAM_Core_ConfigPress::get(
|
203 |
-
"{$area}.access.deny.message", __('Access Denied', AAM_KEY)
|
204 |
-
);
|
205 |
wp_die($message);
|
206 |
}
|
207 |
exit;
|
186 |
* Reject the request
|
187 |
*
|
188 |
* Redirect or die the execution based on ConfigPress settings
|
189 |
+
*
|
190 |
+
* @param string $area
|
191 |
+
* @param callback $callback
|
192 |
*
|
193 |
* @return void
|
194 |
*
|
195 |
* @access public
|
196 |
*/
|
197 |
+
public static function reject($area = 'frontend', $callback = null) {
|
198 |
$redirect = AAM_Core_ConfigPress::get("{$area}.access.deny.redirect");
|
199 |
+
$message = AAM_Core_ConfigPress::get(
|
200 |
+
"{$area}.access.deny.message", __('Access Denied', AAM_KEY)
|
201 |
+
);
|
202 |
|
203 |
if (filter_var($redirect, FILTER_VALIDATE_URL)) {
|
204 |
wp_redirect($redirect);
|
205 |
} elseif (is_int($redirect)) {
|
206 |
wp_redirect(get_post_permalink($redirect));
|
207 |
+
} elseif (!empty($callback)) {
|
208 |
+
call_user_func($callback, $message, '', array());
|
209 |
} else {
|
|
|
|
|
|
|
210 |
wp_die($message);
|
211 |
}
|
212 |
exit;
|
Lang/advanced-access-manager-en_US.mo
CHANGED
Binary file
|
Lang/advanced-access-manager-en_US.po
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: AAM\n"
|
4 |
-
"POT-Creation-Date: 2016-06-
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Language-Team: WP AAM <vasyl@vasyltech.com>\n"
|
7 |
"MIME-Version: 1.0\n"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: AAM\n"
|
4 |
+
"POT-Creation-Date: 2016-06-27 05:53-0400\n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Language-Team: WP AAM <vasyl@vasyltech.com>\n"
|
7 |
"MIME-Version: 1.0\n"
|
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.
|
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.3
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: http://www.vasyltech.com
|
9 |
|
media/css/aam.css
CHANGED
@@ -569,6 +569,11 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
569 |
background-color: #5cb85c;
|
570 |
}
|
571 |
|
|
|
|
|
|
|
|
|
|
|
572 |
.aam-submenu-item label {
|
573 |
display: inline-block;
|
574 |
width: 80%;
|
@@ -602,6 +607,14 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
602 |
font-style: normal;
|
603 |
}
|
604 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
.aam-notification-message {
|
606 |
font-size: 1.2em;
|
607 |
border: 1px solid #E5E5E5;
|
@@ -611,7 +624,7 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
611 |
.aam-extension-installed {
|
612 |
border: 1px solid transparent;
|
613 |
display: inline-block;
|
614 |
-
font-size:
|
615 |
font-weight: 400;
|
616 |
line-height: 1.42857;
|
617 |
margin-bottom: 0;
|
@@ -698,6 +711,7 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
|
|
698 |
-moz-hyphens: auto;
|
699 |
word-wrap: break-word;
|
700 |
text-align: justify;
|
|
|
701 |
}
|
702 |
|
703 |
.aam-notification {
|
569 |
background-color: #5cb85c;
|
570 |
}
|
571 |
|
572 |
+
.aam-submenu-item .aam-menu-capability {
|
573 |
+
display: block;
|
574 |
+
margin-top: -4px;
|
575 |
+
}
|
576 |
+
|
577 |
.aam-submenu-item label {
|
578 |
display: inline-block;
|
579 |
width: 80%;
|
607 |
font-style: normal;
|
608 |
}
|
609 |
|
610 |
+
.text-larger {
|
611 |
+
font-size: 1.2em;
|
612 |
+
}
|
613 |
+
|
614 |
+
.aam-large-padding {
|
615 |
+
padding: 25px 50px;
|
616 |
+
}
|
617 |
+
|
618 |
.aam-notification-message {
|
619 |
font-size: 1.2em;
|
620 |
border: 1px solid #E5E5E5;
|
624 |
.aam-extension-installed {
|
625 |
border: 1px solid transparent;
|
626 |
display: inline-block;
|
627 |
+
font-size: 12px;
|
628 |
font-weight: 400;
|
629 |
line-height: 1.42857;
|
630 |
margin-bottom: 0;
|
711 |
-moz-hyphens: auto;
|
712 |
word-wrap: break-word;
|
713 |
text-align: justify;
|
714 |
+
padding: 15px;
|
715 |
}
|
716 |
|
717 |
.aam-notification {
|
media/js/aam-ui.js
CHANGED
@@ -1503,12 +1503,6 @@
|
|
1503 |
* @returns {undefined}
|
1504 |
*/
|
1505 |
function initialize() {
|
1506 |
-
|
1507 |
-
//check if extension list is empty
|
1508 |
-
if ($('#extension-list tbody tr').length === 1) {
|
1509 |
-
$('#extension-list-empty').removeClass('hidden');
|
1510 |
-
}
|
1511 |
-
|
1512 |
//init refresh list button
|
1513 |
$('#install-extension').bind('click', function (event) {
|
1514 |
event.preventDefault();
|
1503 |
* @returns {undefined}
|
1504 |
*/
|
1505 |
function initialize() {
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
//init refresh list button
|
1507 |
$('#install-extension').bind('click', function (event) {
|
1508 |
event.preventDefault();
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: vasyltech
|
3 |
Tags: access, role, user, capability, page, post, permission, security
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to: 4.5.
|
6 |
-
Stable tag: 3.
|
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,12 @@ out more about the Advanced Access Manager.
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
= 3.2.3 =
|
49 |
* Quick fix for extensions ajax calls
|
50 |
|
2 |
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.3
|
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.3 =
|
49 |
+
* Improved UI
|
50 |
+
* Completely protect Admin Menu if restricted
|
51 |
+
* Tiny core refactoring
|
52 |
+
* Rewrote UI descriptions
|
53 |
+
|
54 |
= 3.2.3 =
|
55 |
* Quick fix for extensions ajax calls
|
56 |
|