Version Description
- Fixed the bug with Posts & Terms feature that hides it when Manage Frontend & Backend Access are disabled however API is enabled
- Fixed the bug that cached objects while managing them on AAM page. That was causing inconsistency sometimes
- Fixed the bug with content shortcode that was defining incorrectly if wrapped content should be hidden or not for specific user
- Fixed the bug with AAM not being able to apply translations for other languages
- Added new option "Support AAM Extensions" that allows to enables/disables Extensions feature
- Added new option "Get Started Feature" that toggle the Get Started tab
- Added new option "AAM Cron Job" that enables/disables the internal AAM cron job
- Added Get Started tab with some basic introduction to AAM plugin
- Added ability to set "hard" user login time
- Added ability to sort posts and terms list by title
- Enhanced JWT authentication with ability to set also cookie that contains JWT token or define signing algorithm
- Refactored Metaboxes & Widget feature so initialization process is handled with client side
- Refactored Admin Toolbar feature so initialization process is handled with client side
- Improved the Post & Terms feature by enabling to manage more post types out-of-box
- Improved the Import/Export feature that eliminates issues with incompatible AAM versions
- Refactored internal implementation to make it compatible with strict and secure environments like WordPress VIP
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 5.4.3 |
Comparing to | |
See all releases |
Code changes from version 5.4.2 to 5.4.3
- Application/Api/Manager.php +1 -1
- Application/Api/Rest/Resource/Post.php +8 -8
- Application/Backend/Authorization.php +1 -1
- Application/Backend/Feature.php +3 -3
- Application/Backend/Feature/Extension/Manager.php +20 -9
- Application/Backend/Feature/Main/404Redirect.php +1 -1
- Application/Backend/Feature/Main/Capability.php +10 -10
- Application/Backend/Feature/Main/GetStarted.php +49 -0
- Application/Backend/Feature/Main/LoginRedirect.php +1 -1
- Application/Backend/Feature/Main/LogoutRedirect.php +1 -1
- Application/Backend/Feature/Main/Menu.php +3 -3
- Application/Backend/Feature/Main/Metabox.php +20 -50
- Application/Backend/Feature/Main/Post.php +51 -36
- Application/Backend/Feature/Main/Redirect.php +2 -2
- Application/Backend/Feature/Main/Route.php +2 -2
- Application/Backend/Feature/Main/Toolbar.php +3 -36
- Application/Backend/Feature/Settings/Core.php +15 -0
- Application/Backend/Feature/Settings/Manager.php +2 -2
- Application/Backend/Feature/Settings/Tools.php +10 -10
- Application/Backend/Feature/Subject/Role.php +6 -6
- Application/Backend/Feature/Subject/User.php +3 -3
- Application/Backend/Filter.php +9 -10
- Application/Backend/Manager.php +14 -17
- Application/Backend/View.php +12 -11
- Application/Backend/Widget/Login.php +4 -6
- Application/Backend/phtml/index.phtml +1 -10
- Application/Backend/phtml/main/get-started.phtml +19 -0
- Application/Backend/phtml/main/metabox.phtml +1 -2
- Application/Backend/phtml/main/post.phtml +2 -2
- Application/Core/API.php +17 -32
- Application/Core/Api/Area.php +3 -3
- Application/Core/Compatibility.php +2 -3
- Application/Core/ConfigPress/Evaluator.php +3 -3
- Application/Core/Exporter.php +22 -22
- Application/Core/Importer.php +32 -12
- Application/Core/JwtAuth.php +49 -14
- Application/Core/Login.php +16 -2
- Application/Core/Media.php +7 -5
- Application/Core/Object/Cache.php +4 -2
- Application/Core/Object/Menu.php +1 -1
- Application/Core/Object/Metabox.php +1 -1
- Application/Core/Object/Post.php +8 -7
- Application/Core/Object/Visibility.php +2 -2
- Application/Core/Server.php +6 -6
- Application/Core/Subject.php +4 -2
- Application/Core/Subject/User.php +38 -18
- Application/Extension/List.php +13 -13
- Application/Extension/Repository.php +8 -8
- Application/Frontend/Authorization.php +7 -7
- Application/Frontend/Filter.php +5 -5
- Application/Shared/Manager.php +64 -8
- Application/Shortcode/Strategy/Content.php +8 -8
- Application/Shortcode/Strategy/Login.php +1 -1
- Lang/advanced-access-manager-en_US.mo +0 -0
- Lang/advanced-access-manager-en_US.po +543 -397
- aam.php +9 -12
- media/css/aam.css +4 -5
- media/js/aam-login.js +0 -1
- media/js/aam.js +504 -482
- readme.txt +19 -1
Application/Api/Manager.php
CHANGED
@@ -127,7 +127,7 @@ class AAM_Api_Manager {
|
|
127 |
$method = $request->get_method();
|
128 |
|
129 |
foreach(array_keys($server->get_routes()) as $route) {
|
130 |
-
if ($route
|
131 |
if ($object->has('restful', $route, $method)) {
|
132 |
$response = new WP_Error(
|
133 |
'rest_access_denied',
|
127 |
$method = $request->get_method();
|
128 |
|
129 |
foreach(array_keys($server->get_routes()) as $route) {
|
130 |
+
if ($route === $matched || preg_match("#^{$route}$#i", $matched)) {
|
131 |
if ($object->has('restful', $route, $method)) {
|
132 |
$response = new WP_Error(
|
133 |
'rest_access_denied',
|
Application/Api/Rest/Resource/Post.php
CHANGED
@@ -182,7 +182,7 @@ class AAM_Api_Rest_Resource_Post {
|
|
182 |
$read = $post->has('api.read');
|
183 |
$others = $post->has('api.read_others');
|
184 |
|
185 |
-
if ($read || ($others && ($post->post_author
|
186 |
$result = new WP_Error(
|
187 |
'rest_post_cannot_read',
|
188 |
"User is unauthorized to read the post. Access denied.",
|
@@ -246,13 +246,13 @@ class AAM_Api_Rest_Resource_Post {
|
|
246 |
if ($post->has('api.redirect')) {
|
247 |
$rule = explode('|', $post->get('api.location'));
|
248 |
|
249 |
-
if (count($rule)
|
250 |
$redirect = $rule[0];
|
251 |
-
} elseif ($rule[0]
|
252 |
$redirect = get_page_link($rule[1]);
|
253 |
-
} elseif ($rule[0]
|
254 |
$redirect = $rule[1];
|
255 |
-
} elseif (($rule[0]
|
256 |
$redirect = call_user_func($rule[1], $post);
|
257 |
} else {
|
258 |
$redirect = null;
|
@@ -292,7 +292,7 @@ class AAM_Api_Rest_Resource_Post {
|
|
292 |
require_once( ABSPATH . 'wp-includes/class-phpass.php' );
|
293 |
$hasher = new PasswordHash(8, true);
|
294 |
|
295 |
-
if ($pass
|
296 |
&& !$hasher->CheckPassword($pass, $request['password'])) {
|
297 |
$result = new WP_Error(
|
298 |
'rest_post_cannot_read',
|
@@ -328,7 +328,7 @@ class AAM_Api_Rest_Resource_Post {
|
|
328 |
$edit = $post->has('api.edit');
|
329 |
$others = $post->has('api.edit_others');
|
330 |
|
331 |
-
if ($edit || ($others && ($post->post_author
|
332 |
$result = new WP_Error(
|
333 |
'rest_post_cannot_update',
|
334 |
"User is unauthorized to update the post. Access denied.",
|
@@ -357,7 +357,7 @@ class AAM_Api_Rest_Resource_Post {
|
|
357 |
$delete = $post->has('api.delete');
|
358 |
$others = $post->has('api.delete_others');
|
359 |
|
360 |
-
if ($delete || ($others && ($post->post_author
|
361 |
$result = new WP_Error(
|
362 |
'rest_post_cannot_delete',
|
363 |
"User is unauthorized to delete the post. Access denied.",
|
182 |
$read = $post->has('api.read');
|
183 |
$others = $post->has('api.read_others');
|
184 |
|
185 |
+
if ($read || ($others && ($post->post_author !== get_current_user_id()))) {
|
186 |
$result = new WP_Error(
|
187 |
'rest_post_cannot_read',
|
188 |
"User is unauthorized to read the post. Access denied.",
|
246 |
if ($post->has('api.redirect')) {
|
247 |
$rule = explode('|', $post->get('api.location'));
|
248 |
|
249 |
+
if (count($rule) === 1) { // TODO: legacy. Remove in Jul 2020
|
250 |
$redirect = $rule[0];
|
251 |
+
} elseif ($rule[0] === 'page') {
|
252 |
$redirect = get_page_link($rule[1]);
|
253 |
+
} elseif ($rule[0] === 'url') {
|
254 |
$redirect = $rule[1];
|
255 |
+
} elseif (($rule[0] === 'callback') && is_callable($rule[1])) {
|
256 |
$redirect = call_user_func($rule[1], $post);
|
257 |
} else {
|
258 |
$redirect = null;
|
292 |
require_once( ABSPATH . 'wp-includes/class-phpass.php' );
|
293 |
$hasher = new PasswordHash(8, true);
|
294 |
|
295 |
+
if ($pass !== $request['password']
|
296 |
&& !$hasher->CheckPassword($pass, $request['password'])) {
|
297 |
$result = new WP_Error(
|
298 |
'rest_post_cannot_read',
|
328 |
$edit = $post->has('api.edit');
|
329 |
$others = $post->has('api.edit_others');
|
330 |
|
331 |
+
if ($edit || ($others && ($post->post_author !== get_current_user_id()))) {
|
332 |
$result = new WP_Error(
|
333 |
'rest_post_cannot_update',
|
334 |
"User is unauthorized to update the post. Access denied.",
|
357 |
$delete = $post->has('api.delete');
|
358 |
$others = $post->has('api.delete_others');
|
359 |
|
360 |
+
if ($delete || ($others && ($post->post_author !== get_current_user_id()))) {
|
361 |
$result = new WP_Error(
|
362 |
'rest_post_cannot_delete',
|
363 |
"User is unauthorized to delete the post. Access denied.",
|
Application/Backend/Authorization.php
CHANGED
@@ -60,7 +60,7 @@ class AAM_Backend_Authorization {
|
|
60 |
|
61 |
if (!empty($taxonomy)) {
|
62 |
$menu .= '?taxonomy=' . $taxonomy;
|
63 |
-
} elseif (!empty($postType) && ($postType
|
64 |
$menu .= '?post_type=' . $postType;
|
65 |
} elseif (!empty($page)) {
|
66 |
$menu .= '?page=' . $page;
|
60 |
|
61 |
if (!empty($taxonomy)) {
|
62 |
$menu .= '?taxonomy=' . $taxonomy;
|
63 |
+
} elseif (!empty($postType) && ($postType !== 'post')) {
|
64 |
$menu .= '?post_type=' . $postType;
|
65 |
} elseif (!empty($page)) {
|
66 |
$menu .= '?page=' . $page;
|
Application/Backend/Feature.php
CHANGED
@@ -118,8 +118,8 @@ class AAM_Backend_Feature {
|
|
118 |
$subject = AAM_Backend_Subject::getInstance()->getUID();
|
119 |
foreach (self::$_features as $feature) {
|
120 |
$ftype = (!empty($feature->type) ? $feature->type : 'main'); //TODO - legacy Nov 2018
|
121 |
-
if ($ftype
|
122 |
-
&& (empty($feature->subjects) || in_array($subject, $feature->subjects))) {
|
123 |
$response[] = self::initView($feature);
|
124 |
}
|
125 |
}
|
@@ -144,7 +144,7 @@ class AAM_Backend_Feature {
|
|
144 |
$pos_a = (empty($feature_a->position) ? 9999 : $feature_a->position);
|
145 |
$pos_b = (empty($feature_b->position) ? 9999 : $feature_b->position);
|
146 |
|
147 |
-
if ($pos_a
|
148 |
$response = 0;
|
149 |
} else {
|
150 |
$response = ($pos_a < $pos_b ? -1 : 1);
|
118 |
$subject = AAM_Backend_Subject::getInstance()->getUID();
|
119 |
foreach (self::$_features as $feature) {
|
120 |
$ftype = (!empty($feature->type) ? $feature->type : 'main'); //TODO - legacy Nov 2018
|
121 |
+
if ($ftype === $type
|
122 |
+
&& (empty($feature->subjects) || in_array($subject, $feature->subjects, true))) {
|
123 |
$response[] = self::initView($feature);
|
124 |
}
|
125 |
}
|
144 |
$pos_a = (empty($feature_a->position) ? 9999 : $feature_a->position);
|
145 |
$pos_b = (empty($feature_b->position) ? 9999 : $feature_b->position);
|
146 |
|
147 |
+
if ($pos_a === $pos_b){
|
148 |
$response = 0;
|
149 |
} else {
|
150 |
$response = ($pos_a < $pos_b ? -1 : 1);
|
Application/Backend/Feature/Extension/Manager.php
CHANGED
@@ -21,11 +21,22 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
21 |
*/
|
22 |
protected static $instance = null;
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
*
|
26 |
*/
|
27 |
public function render() {
|
28 |
-
require_once
|
29 |
}
|
30 |
|
31 |
/**
|
@@ -36,7 +47,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
36 |
public function check() {
|
37 |
AAM::cron();
|
38 |
|
39 |
-
return
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -59,7 +70,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
59 |
$manually = __('You may try to install extension manually.', AAM_KEY);
|
60 |
$response = array(
|
61 |
'status' => 'failure',
|
62 |
-
'error' =>
|
63 |
);
|
64 |
}elseif ($error = $repo->checkDirectory()) {
|
65 |
$response = $this->installFailureResponse($error, $package);
|
@@ -67,7 +78,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
67 |
} elseif (empty($package->content)) { //any unpredictable scenario
|
68 |
$response = array(
|
69 |
'status' => 'failure',
|
70 |
-
'error' => 'Download failure. Please try again or contact us.'
|
71 |
);
|
72 |
} else { //otherwise install the extension
|
73 |
$result = $repo->add(base64_decode($package->content));
|
@@ -103,7 +114,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
103 |
if (!empty($list[$id]['license'])) {
|
104 |
$response = $this->install($list[$id]['license']);
|
105 |
} else {
|
106 |
-
$response =
|
107 |
'status' => 'failure',
|
108 |
'error' => __('Enter license key to update extension.', AAM_KEY)
|
109 |
));
|
@@ -123,7 +134,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
123 |
AAM_Extension_Repository::STATUS_INACTIVE
|
124 |
);
|
125 |
|
126 |
-
return
|
127 |
}
|
128 |
|
129 |
/**
|
@@ -136,7 +147,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
136 |
AAM_Extension_Repository::STATUS_INSTALLED
|
137 |
);
|
138 |
|
139 |
-
return
|
140 |
}
|
141 |
|
142 |
/**
|
@@ -149,7 +160,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
149 |
@mkdir($dirname, fileperms( ABSPATH ) & 0777 | 0755, true);
|
150 |
}
|
151 |
|
152 |
-
return
|
153 |
'status' => (AAM_Extension_Repository::getInstance()->isWriteableDirectory() ? 'success' : 'failed')
|
154 |
));
|
155 |
}
|
@@ -163,7 +174,7 @@ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract
|
|
163 |
$response = array();
|
164 |
|
165 |
foreach(AAM_Extension_Repository::getInstance()->getList() as $item) {
|
166 |
-
if ($item['type']
|
167 |
$response[] = $item;
|
168 |
}
|
169 |
}
|
21 |
*/
|
22 |
protected static $instance = null;
|
23 |
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
parent::__construct();
|
29 |
+
|
30 |
+
if (AAM_Core_Config::get('core.settings.extensionSupport', true) === false) {
|
31 |
+
AAM_Core_API::reject('backend');
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
/**
|
36 |
*
|
37 |
*/
|
38 |
public function render() {
|
39 |
+
require_once dirname(__FILE__) . '/../../phtml/extensions.phtml';
|
40 |
}
|
41 |
|
42 |
/**
|
47 |
public function check() {
|
48 |
AAM::cron();
|
49 |
|
50 |
+
return wp_json_encode(array('status' => 'success'));
|
51 |
}
|
52 |
|
53 |
/**
|
70 |
$manually = __('You may try to install extension manually.', AAM_KEY);
|
71 |
$response = array(
|
72 |
'status' => 'failure',
|
73 |
+
'error' => wp_strip_all_tags($package->get_error_message()) . ' ' . $manually
|
74 |
);
|
75 |
}elseif ($error = $repo->checkDirectory()) {
|
76 |
$response = $this->installFailureResponse($error, $package);
|
78 |
} elseif (empty($package->content)) { //any unpredictable scenario
|
79 |
$response = array(
|
80 |
'status' => 'failure',
|
81 |
+
'error' => __('Download failure. Please try again or contact us.', AAM_KEY)
|
82 |
);
|
83 |
} else { //otherwise install the extension
|
84 |
$result = $repo->add(base64_decode($package->content));
|
114 |
if (!empty($list[$id]['license'])) {
|
115 |
$response = $this->install($list[$id]['license']);
|
116 |
} else {
|
117 |
+
$response = wp_json_encode(array(
|
118 |
'status' => 'failure',
|
119 |
'error' => __('Enter license key to update extension.', AAM_KEY)
|
120 |
));
|
134 |
AAM_Extension_Repository::STATUS_INACTIVE
|
135 |
);
|
136 |
|
137 |
+
return wp_json_encode(array('status' => 'success'));
|
138 |
}
|
139 |
|
140 |
/**
|
147 |
AAM_Extension_Repository::STATUS_INSTALLED
|
148 |
);
|
149 |
|
150 |
+
return wp_json_encode(array('status' => 'success'));
|
151 |
}
|
152 |
|
153 |
/**
|
160 |
@mkdir($dirname, fileperms( ABSPATH ) & 0777 | 0755, true);
|
161 |
}
|
162 |
|
163 |
+
return wp_json_encode(array(
|
164 |
'status' => (AAM_Extension_Repository::getInstance()->isWriteableDirectory() ? 'success' : 'failed')
|
165 |
));
|
166 |
}
|
174 |
$response = array();
|
175 |
|
176 |
foreach(AAM_Extension_Repository::getInstance()->getList() as $item) {
|
177 |
+
if ($item['type'] === $type) {
|
178 |
$response[] = $item;
|
179 |
}
|
180 |
}
|
Application/Backend/Feature/Main/404Redirect.php
CHANGED
@@ -35,7 +35,7 @@ class AAM_Backend_Feature_Main_404Redirect extends AAM_Backend_Feature_Abstract
|
|
35 |
|
36 |
AAM_Core_Config::set($param, $value);
|
37 |
|
38 |
-
return
|
39 |
}
|
40 |
|
41 |
/**
|
35 |
|
36 |
AAM_Core_Config::set($param, $value);
|
37 |
|
38 |
+
return wp_json_encode(array('status' => 'success'));
|
39 |
}
|
40 |
|
41 |
/**
|
Application/Backend/Feature/Main/Capability.php
CHANGED
@@ -65,7 +65,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
65 |
public function getTable() {
|
66 |
$response = array('data' => $this->retrieveAllCaps());
|
67 |
|
68 |
-
return
|
69 |
}
|
70 |
|
71 |
/**
|
@@ -99,7 +99,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
99 |
);
|
100 |
}
|
101 |
|
102 |
-
return
|
103 |
}
|
104 |
|
105 |
/**
|
@@ -116,7 +116,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
116 |
$roles = AAM_Core_API::getRoles();
|
117 |
$subject = AAM_Backend_Subject::getInstance();
|
118 |
|
119 |
-
if ($subject->getUID()
|
120 |
foreach($roles->role_objects as $role) {
|
121 |
$role->remove_cap($capability);
|
122 |
}
|
@@ -128,7 +128,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
128 |
);
|
129 |
}
|
130 |
|
131 |
-
return
|
132 |
}
|
133 |
|
134 |
/**
|
@@ -151,7 +151,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
151 |
|
152 |
//allow to delete or update capability only for roles!
|
153 |
if (AAM_Core_Config::get('core.settings.editCapabilities', false)
|
154 |
-
&& ($subject->getUID()
|
155 |
$actions[] = 'edit';
|
156 |
$actions[] = 'delete';
|
157 |
}
|
@@ -240,7 +240,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
240 |
$response = array('status' => 'failure');
|
241 |
}
|
242 |
|
243 |
-
return
|
244 |
}
|
245 |
|
246 |
/**
|
@@ -253,13 +253,13 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
|
|
253 |
* @access protected
|
254 |
*/
|
255 |
protected function getGroup($capability) {
|
256 |
-
if (in_array($capability, self::$groups['system'])) {
|
257 |
$response = __('System', AAM_KEY);
|
258 |
-
} elseif (in_array($capability, self::$groups['post'])) {
|
259 |
$response = __('Posts & Pages', AAM_KEY);
|
260 |
-
} elseif (in_array($capability, self::$groups['backend'])) {
|
261 |
$response = __('Backend', AAM_KEY);
|
262 |
-
} elseif (in_array($capability, self::$groups['aam'])) {
|
263 |
$response = __('AAM Interface', AAM_KEY);
|
264 |
} else {
|
265 |
$response = __('Miscellaneous', AAM_KEY);
|
65 |
public function getTable() {
|
66 |
$response = array('data' => $this->retrieveAllCaps());
|
67 |
|
68 |
+
return wp_json_encode($response);
|
69 |
}
|
70 |
|
71 |
/**
|
99 |
);
|
100 |
}
|
101 |
|
102 |
+
return wp_json_encode($response);
|
103 |
}
|
104 |
|
105 |
/**
|
116 |
$roles = AAM_Core_API::getRoles();
|
117 |
$subject = AAM_Backend_Subject::getInstance();
|
118 |
|
119 |
+
if ($subject->getUID() === AAM_Core_Subject_Role::UID) {
|
120 |
foreach($roles->role_objects as $role) {
|
121 |
$role->remove_cap($capability);
|
122 |
}
|
128 |
);
|
129 |
}
|
130 |
|
131 |
+
return wp_json_encode($response);
|
132 |
}
|
133 |
|
134 |
/**
|
151 |
|
152 |
//allow to delete or update capability only for roles!
|
153 |
if (AAM_Core_Config::get('core.settings.editCapabilities', false)
|
154 |
+
&& ($subject->getUID() === AAM_Core_Subject_Role::UID)) {
|
155 |
$actions[] = 'edit';
|
156 |
$actions[] = 'delete';
|
157 |
}
|
240 |
$response = array('status' => 'failure');
|
241 |
}
|
242 |
|
243 |
+
return wp_json_encode($response);
|
244 |
}
|
245 |
|
246 |
/**
|
253 |
* @access protected
|
254 |
*/
|
255 |
protected function getGroup($capability) {
|
256 |
+
if (in_array($capability, self::$groups['system'], true)) {
|
257 |
$response = __('System', AAM_KEY);
|
258 |
+
} elseif (in_array($capability, self::$groups['post'], true)) {
|
259 |
$response = __('Posts & Pages', AAM_KEY);
|
260 |
+
} elseif (in_array($capability, self::$groups['backend'], true)) {
|
261 |
$response = __('Backend', AAM_KEY);
|
262 |
+
} elseif (in_array($capability, self::$groups['aam'], true)) {
|
263 |
$response = __('AAM Interface', AAM_KEY);
|
264 |
} else {
|
265 |
$response = __('Miscellaneous', AAM_KEY);
|
Application/Backend/Feature/Main/GetStarted.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
/**
|
11 |
+
* Backend Get Started manager
|
12 |
+
*
|
13 |
+
* @package AAM
|
14 |
+
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
15 |
+
*/
|
16 |
+
class AAM_Backend_Feature_Main_GetStarted extends AAM_Backend_Feature_Abstract {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @inheritdoc
|
20 |
+
*/
|
21 |
+
public static function getTemplate() {
|
22 |
+
return 'main/get-started.phtml';
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Register 404 redirect feature
|
27 |
+
*
|
28 |
+
* @return void
|
29 |
+
*
|
30 |
+
* @access public
|
31 |
+
*/
|
32 |
+
public static function register() {
|
33 |
+
AAM_Backend_Feature::registerFeature((object) array(
|
34 |
+
'uid' => 'get-started',
|
35 |
+
'position' => 1,
|
36 |
+
'title' => __('Get Started', AAM_KEY),
|
37 |
+
'type' => 'main',
|
38 |
+
'subjects' => array(
|
39 |
+
AAM_Core_Subject_Default::UID,
|
40 |
+
AAM_Core_Subject_Role::UID,
|
41 |
+
AAM_Core_Subject_User::UID,
|
42 |
+
AAM_Core_Subject_Visitor::UID
|
43 |
+
),
|
44 |
+
'option' => 'core.settings.getStarted',
|
45 |
+
'view' => __CLASS__
|
46 |
+
));
|
47 |
+
}
|
48 |
+
|
49 |
+
}
|
Application/Backend/Feature/Main/LoginRedirect.php
CHANGED
@@ -22,7 +22,7 @@ class AAM_Backend_Feature_Main_LoginRedirect extends AAM_Backend_Feature_Abstrac
|
|
22 |
public function isDefault() {
|
23 |
$subject = AAM_Backend_Subject::getInstance()->getUID();
|
24 |
|
25 |
-
return ($subject
|
26 |
}
|
27 |
|
28 |
/**
|
22 |
public function isDefault() {
|
23 |
$subject = AAM_Backend_Subject::getInstance()->getUID();
|
24 |
|
25 |
+
return ($subject === AAM_Core_Subject_Default::UID);
|
26 |
}
|
27 |
|
28 |
/**
|
Application/Backend/Feature/Main/LogoutRedirect.php
CHANGED
@@ -22,7 +22,7 @@ class AAM_Backend_Feature_Main_LogoutRedirect extends AAM_Backend_Feature_Abstra
|
|
22 |
public function isDefault() {
|
23 |
$subject = AAM_Backend_Subject::getInstance();
|
24 |
|
25 |
-
return ($subject->getUID()
|
26 |
}
|
27 |
|
28 |
/**
|
22 |
public function isDefault() {
|
23 |
$subject = AAM_Backend_Subject::getInstance();
|
24 |
|
25 |
+
return ($subject->getUID() === 'default');
|
26 |
}
|
27 |
|
28 |
/**
|
Application/Backend/Feature/Main/Menu.php
CHANGED
@@ -32,7 +32,7 @@ class AAM_Backend_Feature_Main_Menu extends AAM_Backend_Feature_Abstract {
|
|
32 |
|
33 |
$object->save();
|
34 |
|
35 |
-
return
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -112,7 +112,7 @@ class AAM_Backend_Feature_Main_Menu extends AAM_Backend_Feature_Abstract {
|
|
112 |
|
113 |
$response = array();
|
114 |
$subject = AAM_Backend_Subject::getInstance();
|
115 |
-
$isDefault = ($subject->getUID()
|
116 |
|
117 |
if (array_key_exists($menu, $submenu) && is_array($submenu[$menu])) {
|
118 |
foreach ($submenu[$menu] as $item) {
|
@@ -142,7 +142,7 @@ class AAM_Backend_Feature_Main_Menu extends AAM_Backend_Feature_Abstract {
|
|
142 |
* @access protected
|
143 |
*/
|
144 |
protected function filterMenuName($name) {
|
145 |
-
$filtered = trim(
|
146 |
|
147 |
return preg_replace('/([\d]+)$/', '', $filtered);
|
148 |
}
|
32 |
|
33 |
$object->save();
|
34 |
|
35 |
+
return wp_json_encode(array('status' => 'success'));
|
36 |
}
|
37 |
|
38 |
/**
|
112 |
|
113 |
$response = array();
|
114 |
$subject = AAM_Backend_Subject::getInstance();
|
115 |
+
$isDefault = ($subject->getUID() === AAM_Core_Subject_Default::UID);
|
116 |
|
117 |
if (array_key_exists($menu, $submenu) && is_array($submenu[$menu])) {
|
118 |
foreach ($submenu[$menu] as $item) {
|
142 |
* @access protected
|
143 |
*/
|
144 |
protected function filterMenuName($name) {
|
145 |
+
$filtered = trim(wp_strip_all_tags($name));
|
146 |
|
147 |
return preg_replace('/([\d]+)$/', '', $filtered);
|
148 |
}
|
Application/Backend/Feature/Main/Metabox.php
CHANGED
@@ -23,65 +23,35 @@ class AAM_Backend_Feature_Main_Metabox extends AAM_Backend_Feature_Abstract {
|
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
-
*
|
27 |
* @global type $wp_post_types
|
28 |
* @return type
|
29 |
*/
|
30 |
-
public function
|
31 |
global $wp_post_types;
|
32 |
|
33 |
AAM_Core_API::deleteOption('aam_metabox_cache');
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
$
|
42 |
-
} else {
|
43 |
-
$url = add_query_arg(
|
44 |
'init', 'metabox', admin_url('post-new.php?post_type=' . $type)
|
45 |
);
|
46 |
}
|
47 |
-
|
48 |
-
//grab metaboxes
|
49 |
-
AAM_Core_API::cURL($this->addHttpPasswd($url));
|
50 |
}
|
51 |
|
52 |
-
return
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
* @return type
|
59 |
-
*/
|
60 |
-
public function initURL() {
|
61 |
-
//grab metaboxes
|
62 |
-
$url = $this->addHttpPasswd(AAM_Core_Request::post('url'));
|
63 |
-
AAM_Core_API::cURL(add_query_arg('init', 'metabox', $url));
|
64 |
-
|
65 |
-
return json_encode(array('status' => 'success'));
|
66 |
}
|
67 |
|
68 |
-
/**
|
69 |
-
*
|
70 |
-
* @param type $url
|
71 |
-
* @return type
|
72 |
-
*/
|
73 |
-
protected function addHttpPasswd($url) {
|
74 |
-
$htpasswd = AAM_Core_Config::get('feature.metabox.htpasswd');
|
75 |
-
|
76 |
-
if (!empty($htpasswd['user']) && !empty($htpasswd['pass'])) {
|
77 |
-
$url = preg_replace(
|
78 |
-
'/^(http[s]?:\/\/)/', "$1{$htpasswd['user']}:{$htpasswd['pass']}@", $url
|
79 |
-
);
|
80 |
-
}
|
81 |
-
|
82 |
-
return $url;
|
83 |
-
}
|
84 |
-
|
85 |
/**
|
86 |
* Initialize metabox list
|
87 |
*
|
@@ -132,7 +102,7 @@ class AAM_Backend_Feature_Main_Metabox extends AAM_Backend_Feature_Abstract {
|
|
132 |
|
133 |
if (!is_null($callback)) { //exclude any junk
|
134 |
$cache['widgets'][$callback] = array(
|
135 |
-
'title' =>
|
136 |
'id' => $callback
|
137 |
);
|
138 |
}
|
@@ -170,7 +140,7 @@ class AAM_Backend_Feature_Main_Metabox extends AAM_Backend_Feature_Abstract {
|
|
170 |
if (trim($data['id'])) { //exclude any junk
|
171 |
$cache[$post_type][$data['id']] = array(
|
172 |
'id' => $data['id'],
|
173 |
-
'title' =>
|
174 |
);
|
175 |
}
|
176 |
}
|
@@ -192,7 +162,7 @@ class AAM_Backend_Feature_Main_Metabox extends AAM_Backend_Feature_Abstract {
|
|
192 |
$subject = AAM_Backend_Subject::getInstance();
|
193 |
|
194 |
//if visitor, return only frontend widgets
|
195 |
-
if ($subject->getUID()
|
196 |
if (!empty($cache['widgets'])) {
|
197 |
$response = array('widgets' => $cache['widgets']);
|
198 |
} else {
|
@@ -204,7 +174,7 @@ class AAM_Backend_Feature_Main_Metabox extends AAM_Backend_Feature_Abstract {
|
|
204 |
|
205 |
//filter non-existing metaboxes
|
206 |
foreach(array_keys($response) as $id) {
|
207 |
-
if (!in_array($id, array('dashboard', 'widgets'))
|
208 |
&& empty($wp_post_types[$id])) {
|
209 |
unset($response[$id]);
|
210 |
}
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
+
*
|
27 |
* @global type $wp_post_types
|
28 |
* @return type
|
29 |
*/
|
30 |
+
public function prepareInitialization() {
|
31 |
global $wp_post_types;
|
32 |
|
33 |
AAM_Core_API::deleteOption('aam_metabox_cache');
|
34 |
+
|
35 |
+
$endpoints = array();
|
36 |
+
|
37 |
+
foreach (array_merge(array('widgets'), array_keys($wp_post_types)) as $type) {
|
38 |
+
if ($type === 'widgets') {
|
39 |
+
$endpoints[] = add_query_arg('init', 'metabox', admin_url('index.php'));
|
40 |
+
} elseif ($wp_post_types[$type]->show_ui) {
|
41 |
+
$endpoints[] = add_query_arg(
|
|
|
|
|
42 |
'init', 'metabox', admin_url('post-new.php?post_type=' . $type)
|
43 |
);
|
44 |
}
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
+
return wp_json_encode(
|
48 |
+
array(
|
49 |
+
'status' => 'success',
|
50 |
+
'endpoints' => $endpoints
|
51 |
+
)
|
52 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* Initialize metabox list
|
57 |
*
|
102 |
|
103 |
if (!is_null($callback)) { //exclude any junk
|
104 |
$cache['widgets'][$callback] = array(
|
105 |
+
'title' => wp_strip_all_tags($data['name']),
|
106 |
'id' => $callback
|
107 |
);
|
108 |
}
|
140 |
if (trim($data['id'])) { //exclude any junk
|
141 |
$cache[$post_type][$data['id']] = array(
|
142 |
'id' => $data['id'],
|
143 |
+
'title' => wp_strip_all_tags($data['title'])
|
144 |
);
|
145 |
}
|
146 |
}
|
162 |
$subject = AAM_Backend_Subject::getInstance();
|
163 |
|
164 |
//if visitor, return only frontend widgets
|
165 |
+
if ($subject->getUID() === AAM_Core_Subject_Visitor::UID) {
|
166 |
if (!empty($cache['widgets'])) {
|
167 |
$response = array('widgets' => $cache['widgets']);
|
168 |
} else {
|
174 |
|
175 |
//filter non-existing metaboxes
|
176 |
foreach(array_keys($response) as $id) {
|
177 |
+
if (!in_array($id, array('dashboard', 'widgets'), true)
|
178 |
&& empty($wp_post_types[$id])) {
|
179 |
unset($response[$id]);
|
180 |
}
|
Application/Backend/Feature/Main/Post.php
CHANGED
@@ -79,18 +79,35 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
79 |
$all = AAM_Core_Config::get('core.settings.manageHiddenPostTypes', false);
|
80 |
|
81 |
foreach (get_post_types(array(), 'objects') as $type) {
|
82 |
-
if (($all || $type->
|
83 |
&& (empty($s) || stripos($type->labels->name, $s) !== false)) {
|
84 |
-
$filtered[] = $type;
|
85 |
}
|
86 |
}
|
87 |
|
|
|
|
|
88 |
return (object) array(
|
89 |
'total' => count($list),
|
90 |
'filtered' => count($filtered),
|
91 |
'records' => array_slice($filtered, $start, $length)
|
92 |
);
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
/**
|
96 |
* Get post type children
|
@@ -156,10 +173,10 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
156 |
array(
|
157 |
'link' => false,
|
158 |
'format' => 'name',
|
159 |
-
'separator' => '
|
160 |
'inclusive' => false
|
161 |
)
|
162 |
-
), '
|
163 |
apply_filters(
|
164 |
'aam-term-override-status',
|
165 |
false,
|
@@ -190,10 +207,10 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
190 |
//first retrieve all hierarchical terms that belong to Post Type
|
191 |
if ($paging['terms']) {
|
192 |
$list = $this->retrieveTermList(
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
);
|
198 |
}
|
199 |
|
@@ -202,7 +219,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
202 |
$list = array_merge(
|
203 |
$list,
|
204 |
$this->retrievePostList(
|
205 |
-
|
206 |
)
|
207 |
);
|
208 |
}
|
@@ -287,7 +304,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
287 |
protected function getPostCount($type, $search) {
|
288 |
global $wpdb;
|
289 |
|
290 |
-
$query = "SELECT COUNT(
|
291 |
$query .= "WHERE (post_type = %s) AND (post_title LIKE %s)";
|
292 |
|
293 |
$args = array($type, "{$search}%");
|
@@ -316,7 +333,8 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
316 |
'search' => $search,
|
317 |
'taxonomy' => $taxonomies,
|
318 |
'offset' => $offset,
|
319 |
-
'number' => $limit
|
|
|
320 |
);
|
321 |
|
322 |
return get_terms($args);
|
@@ -332,13 +350,16 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
332 |
*/
|
333 |
protected function retrievePostList($type, $search, $offset, $limit) {
|
334 |
return get_posts(array(
|
335 |
-
'post_type'
|
336 |
-
'category'
|
337 |
-
's'
|
338 |
-
'
|
339 |
-
'
|
340 |
-
'
|
341 |
-
'
|
|
|
|
|
|
|
342 |
));
|
343 |
}
|
344 |
|
@@ -354,7 +375,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
354 |
protected function wrapTable($response) {
|
355 |
$response['draw'] = AAM_Core_Request::request('draw');
|
356 |
|
357 |
-
return
|
358 |
}
|
359 |
|
360 |
/**
|
@@ -373,16 +394,12 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
373 |
//prepare the response object
|
374 |
if (is_a($object, 'AAM_Core_Object')) {
|
375 |
foreach($object->getOption() as $key => $value) {
|
376 |
-
|
377 |
-
$access[$key] = ($value ? 1 : 0); //TODO - to support legacy
|
378 |
-
} else {
|
379 |
-
$access[$key] = $value;
|
380 |
-
}
|
381 |
}
|
382 |
$metadata = array('overwritten' => $object->isOverwritten());
|
383 |
}
|
384 |
|
385 |
-
return
|
386 |
'access' => $access,
|
387 |
'meta' => $metadata,
|
388 |
'preview' => $this->preparePreviewValues($access)
|
@@ -413,7 +430,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
413 |
protected function getPreviewValue($option, $val) {
|
414 |
switch($option) {
|
415 |
case 'frontend.teaser':
|
416 |
-
$str =
|
417 |
if (function_exists('mb_strlen')) {
|
418 |
$preview = (mb_strlen($str) > 25 ? mb_substr($str, 0, 22) . '...' : $str);
|
419 |
} else {
|
@@ -424,11 +441,11 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
424 |
case 'frontend.location':
|
425 |
if (!empty($val)) {
|
426 |
$chunks = explode('|', $val);
|
427 |
-
if ($chunks[0]
|
428 |
$preview = __('Existing Page', AAM_KEY);
|
429 |
-
} elseif ($chunks[0]
|
430 |
$preview = __('Valid URL', AAM_KEY);
|
431 |
-
} elseif ($chunks[0]
|
432 |
$preview = __('Custom Callback', AAM_KEY);
|
433 |
}
|
434 |
}
|
@@ -465,7 +482,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
465 |
|
466 |
$result = $subject->save($param, $value, $object, $id);
|
467 |
|
468 |
-
return
|
469 |
'status' => ($result ? 'success' : 'failure'),
|
470 |
'value' => $value,
|
471 |
'preview' => $this->getPreviewValue($param, $value)
|
@@ -492,7 +509,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
492 |
$result = false;
|
493 |
}
|
494 |
|
495 |
-
return
|
496 |
}
|
497 |
|
498 |
/**
|
@@ -522,7 +539,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
522 |
|
523 |
$filtered = array();
|
524 |
foreach($list as $option => $data) {
|
525 |
-
$add = empty($data['exclude']) || !in_array($subject, $data['exclude']);
|
526 |
|
527 |
if ($add) {
|
528 |
$add = empty($data['config']) || AAM_Core_Config::get($data['config'], true);
|
@@ -543,9 +560,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
543 |
*/
|
544 |
public static function renderAccessForm() {
|
545 |
ob_start();
|
546 |
-
require_once
|
547 |
-
AAM_BASEDIR . '/Application/Backend/phtml/partial/post-access-form.phtml'
|
548 |
-
);
|
549 |
$content = ob_get_contents();
|
550 |
ob_end_clean();
|
551 |
|
@@ -594,7 +609,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
594 |
AAM_Core_Subject_Visitor::UID,
|
595 |
AAM_Core_Subject_Default::UID
|
596 |
),
|
597 |
-
'option' => 'core.settings.backendAccessControl,core.settings.frontendAccessControl',
|
598 |
'view' => __CLASS__
|
599 |
));
|
600 |
}
|
79 |
$all = AAM_Core_Config::get('core.settings.manageHiddenPostTypes', false);
|
80 |
|
81 |
foreach (get_post_types(array(), 'objects') as $type) {
|
82 |
+
if (($all || $type->show_ui)
|
83 |
&& (empty($s) || stripos($type->labels->name, $s) !== false)) {
|
84 |
+
$filtered[$type->label] = $type;
|
85 |
}
|
86 |
}
|
87 |
|
88 |
+
$this->getOrderDirection() === 'ASC' ? ksort($filtered) : krsort($filtered);
|
89 |
+
|
90 |
return (object) array(
|
91 |
'total' => count($list),
|
92 |
'filtered' => count($filtered),
|
93 |
'records' => array_slice($filtered, $start, $length)
|
94 |
);
|
95 |
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
*
|
99 |
+
* @return type
|
100 |
+
*/
|
101 |
+
protected function getOrderDirection() {
|
102 |
+
$dir = 'asc';
|
103 |
+
$order = AAM_Core_Request::post('order.0');
|
104 |
+
|
105 |
+
if (!empty($order['column']) && ($order['column'] === '3')) {
|
106 |
+
$dir = !empty($order['dir']) ? $order['dir'] : 'asc';
|
107 |
+
}
|
108 |
+
|
109 |
+
return strtoupper($dir);
|
110 |
+
}
|
111 |
|
112 |
/**
|
113 |
* Get post type children
|
173 |
array(
|
174 |
'link' => false,
|
175 |
'format' => 'name',
|
176 |
+
'separator' => '/',
|
177 |
'inclusive' => false
|
178 |
)
|
179 |
+
), '/'),
|
180 |
apply_filters(
|
181 |
'aam-term-override-status',
|
182 |
false,
|
207 |
//first retrieve all hierarchical terms that belong to Post Type
|
208 |
if ($paging['terms']) {
|
209 |
$list = $this->retrieveTermList(
|
210 |
+
$this->getTypeTaxonomies($type),
|
211 |
+
$s,
|
212 |
+
$paging['term_offset'],
|
213 |
+
$paging['terms']
|
214 |
);
|
215 |
}
|
216 |
|
219 |
$list = array_merge(
|
220 |
$list,
|
221 |
$this->retrievePostList(
|
222 |
+
$type, $s, $paging['post_offset'], $paging['posts']
|
223 |
)
|
224 |
);
|
225 |
}
|
304 |
protected function getPostCount($type, $search) {
|
305 |
global $wpdb;
|
306 |
|
307 |
+
$query = "SELECT COUNT(*) AS total FROM {$wpdb->posts} ";
|
308 |
$query .= "WHERE (post_type = %s) AND (post_title LIKE %s)";
|
309 |
|
310 |
$args = array($type, "{$search}%");
|
333 |
'search' => $search,
|
334 |
'taxonomy' => $taxonomies,
|
335 |
'offset' => $offset,
|
336 |
+
'number' => $limit,
|
337 |
+
'order' => $this->getOrderDirection()
|
338 |
);
|
339 |
|
340 |
return get_terms($args);
|
350 |
*/
|
351 |
protected function retrievePostList($type, $search, $offset, $limit) {
|
352 |
return get_posts(array(
|
353 |
+
'post_type' => $type,
|
354 |
+
'category' => 0,
|
355 |
+
's' => $search,
|
356 |
+
'suppress_filters' => true,
|
357 |
+
'offset' => $offset,
|
358 |
+
'numberposts' => $limit,
|
359 |
+
'orderby' => 'title',
|
360 |
+
'order' => $this->getOrderDirection(),
|
361 |
+
'post_status' => 'any',
|
362 |
+
'fields' => 'all'
|
363 |
));
|
364 |
}
|
365 |
|
375 |
protected function wrapTable($response) {
|
376 |
$response['draw'] = AAM_Core_Request::request('draw');
|
377 |
|
378 |
+
return wp_json_encode($response);
|
379 |
}
|
380 |
|
381 |
/**
|
394 |
//prepare the response object
|
395 |
if (is_a($object, 'AAM_Core_Object')) {
|
396 |
foreach($object->getOption() as $key => $value) {
|
397 |
+
$access[$key] = in_array($value, array(1, '1', true, "true"), true);
|
|
|
|
|
|
|
|
|
398 |
}
|
399 |
$metadata = array('overwritten' => $object->isOverwritten());
|
400 |
}
|
401 |
|
402 |
+
return wp_json_encode(array(
|
403 |
'access' => $access,
|
404 |
'meta' => $metadata,
|
405 |
'preview' => $this->preparePreviewValues($access)
|
430 |
protected function getPreviewValue($option, $val) {
|
431 |
switch($option) {
|
432 |
case 'frontend.teaser':
|
433 |
+
$str = wp_strip_all_tags($val);
|
434 |
if (function_exists('mb_strlen')) {
|
435 |
$preview = (mb_strlen($str) > 25 ? mb_substr($str, 0, 22) . '...' : $str);
|
436 |
} else {
|
441 |
case 'frontend.location':
|
442 |
if (!empty($val)) {
|
443 |
$chunks = explode('|', $val);
|
444 |
+
if ($chunks[0] === 'page') {
|
445 |
$preview = __('Existing Page', AAM_KEY);
|
446 |
+
} elseif ($chunks[0] === 'url') {
|
447 |
$preview = __('Valid URL', AAM_KEY);
|
448 |
+
} elseif ($chunks[0] === 'callback') {
|
449 |
$preview = __('Custom Callback', AAM_KEY);
|
450 |
}
|
451 |
}
|
482 |
|
483 |
$result = $subject->save($param, $value, $object, $id);
|
484 |
|
485 |
+
return wp_json_encode(array(
|
486 |
'status' => ($result ? 'success' : 'failure'),
|
487 |
'value' => $value,
|
488 |
'preview' => $this->getPreviewValue($param, $value)
|
509 |
$result = false;
|
510 |
}
|
511 |
|
512 |
+
return wp_json_encode(array('status' => ($result ? 'success' : 'failure')));
|
513 |
}
|
514 |
|
515 |
/**
|
539 |
|
540 |
$filtered = array();
|
541 |
foreach($list as $option => $data) {
|
542 |
+
$add = empty($data['exclude']) || !in_array($subject, $data['exclude'], true);
|
543 |
|
544 |
if ($add) {
|
545 |
$add = empty($data['config']) || AAM_Core_Config::get($data['config'], true);
|
560 |
*/
|
561 |
public static function renderAccessForm() {
|
562 |
ob_start();
|
563 |
+
require_once AAM_BASEDIR . '/Application/Backend/phtml/partial/post-access-form.phtml';
|
|
|
|
|
564 |
$content = ob_get_contents();
|
565 |
ob_end_clean();
|
566 |
|
609 |
AAM_Core_Subject_Visitor::UID,
|
610 |
AAM_Core_Subject_Default::UID
|
611 |
),
|
612 |
+
'option' => 'core.settings.backendAccessControl,core.settings.frontendAccessControl,core.settings.apiAccessControl',
|
613 |
'view' => __CLASS__
|
614 |
));
|
615 |
}
|
Application/Backend/Feature/Main/Redirect.php
CHANGED
@@ -22,7 +22,7 @@ class AAM_Backend_Feature_Main_Redirect extends AAM_Backend_Feature_Abstract {
|
|
22 |
public function isDefault() {
|
23 |
$subject = AAM_Backend_Subject::getInstance();
|
24 |
|
25 |
-
return $subject->getUID()
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -32,7 +32,7 @@ class AAM_Backend_Feature_Main_Redirect extends AAM_Backend_Feature_Abstract {
|
|
32 |
public function isVisitor() {
|
33 |
$subject = AAM_Backend_Subject::getInstance();
|
34 |
|
35 |
-
return $subject->getUID()
|
36 |
}
|
37 |
|
38 |
/**
|
22 |
public function isDefault() {
|
23 |
$subject = AAM_Backend_Subject::getInstance();
|
24 |
|
25 |
+
return $subject->getUID() === AAM_Core_Subject_Default::UID;
|
26 |
}
|
27 |
|
28 |
/**
|
32 |
public function isVisitor() {
|
33 |
$subject = AAM_Backend_Subject::getInstance();
|
34 |
|
35 |
+
return $subject->getUID() === AAM_Core_Subject_Visitor::UID;
|
36 |
}
|
37 |
|
38 |
/**
|
Application/Backend/Feature/Main/Route.php
CHANGED
@@ -22,7 +22,7 @@ class AAM_Backend_Feature_Main_Route extends AAM_Backend_Feature_Abstract {
|
|
22 |
public function getTable() {
|
23 |
$response = array('data' => $this->retrieveAllRoutes());
|
24 |
|
25 |
-
return
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -39,7 +39,7 @@ class AAM_Backend_Feature_Main_Route extends AAM_Backend_Feature_Abstract {
|
|
39 |
|
40 |
$object->save($type, $route, $method, $value);
|
41 |
|
42 |
-
return
|
43 |
}
|
44 |
|
45 |
/**
|
22 |
public function getTable() {
|
23 |
$response = array('data' => $this->retrieveAllRoutes());
|
24 |
|
25 |
+
return wp_json_encode($response);
|
26 |
}
|
27 |
|
28 |
/**
|
39 |
|
40 |
$object->save($type, $route, $method, $value);
|
41 |
|
42 |
+
return wp_json_encode(array('status' => 'success'));
|
43 |
}
|
44 |
|
45 |
/**
|
Application/Backend/Feature/Main/Toolbar.php
CHANGED
@@ -32,7 +32,7 @@ class AAM_Backend_Feature_Main_Toolbar extends AAM_Backend_Feature_Abstract {
|
|
32 |
|
33 |
$object->save();
|
34 |
|
35 |
-
return
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -59,7 +59,7 @@ class AAM_Backend_Feature_Main_Toolbar extends AAM_Backend_Feature_Abstract {
|
|
59 |
$children = array();
|
60 |
|
61 |
foreach($branch->children as $child) {
|
62 |
-
if (empty($child->type) || !in_array($child->type, array('container', 'group'))) {
|
63 |
$children[] = $child;
|
64 |
}
|
65 |
if(!empty($child->children)) {
|
@@ -81,45 +81,12 @@ class AAM_Backend_Feature_Main_Toolbar extends AAM_Backend_Feature_Abstract {
|
|
81 |
preg_replace(
|
82 |
'/[\d]/',
|
83 |
'',
|
84 |
-
|
85 |
)
|
86 |
)
|
87 |
);
|
88 |
}
|
89 |
|
90 |
-
/**
|
91 |
-
*
|
92 |
-
* @return type
|
93 |
-
*/
|
94 |
-
public function refreshList() {
|
95 |
-
// reset cache
|
96 |
-
AAM_Core_API::deleteOption('aam_toolbar_cache');
|
97 |
-
|
98 |
-
//grab toolbar itesm
|
99 |
-
AAM_Core_API::cURL($this->addHttpPasswd(
|
100 |
-
add_query_arg('init', 'toolbar', admin_url('index.php')))
|
101 |
-
);
|
102 |
-
|
103 |
-
return json_encode(array('status' => 'success'));
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
*
|
108 |
-
* @param type $url
|
109 |
-
* @return type
|
110 |
-
*/
|
111 |
-
protected function addHttpPasswd($url) {
|
112 |
-
$htpasswd = AAM_Core_Config::get('feature.toolbar.htpasswd');
|
113 |
-
|
114 |
-
if (!empty($htpasswd['user']) && !empty($htpasswd['pass'])) {
|
115 |
-
$url = preg_replace(
|
116 |
-
'/^(http[s]?:\/\/)/', "$1{$htpasswd['user']}:{$htpasswd['pass']}@", $url
|
117 |
-
);
|
118 |
-
}
|
119 |
-
|
120 |
-
return $url;
|
121 |
-
}
|
122 |
-
|
123 |
/**
|
124 |
* @inheritdoc
|
125 |
*/
|
32 |
|
33 |
$object->save();
|
34 |
|
35 |
+
return wp_json_encode(array('status' => 'success'));
|
36 |
}
|
37 |
|
38 |
/**
|
59 |
$children = array();
|
60 |
|
61 |
foreach($branch->children as $child) {
|
62 |
+
if (empty($child->type) || !in_array($child->type, array('container', 'group'), true)) {
|
63 |
$children[] = $child;
|
64 |
}
|
65 |
if(!empty($child->children)) {
|
81 |
preg_replace(
|
82 |
'/[\d]/',
|
83 |
'',
|
84 |
+
wp_strip_all_tags(!empty($node->title) ? $node->title : $node->id)
|
85 |
)
|
86 |
)
|
87 |
);
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
/**
|
91 |
* @inheritdoc
|
92 |
*/
|
Application/Backend/Feature/Settings/Core.php
CHANGED
@@ -28,6 +28,11 @@ class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract {
|
|
28 |
*/
|
29 |
protected function getList() {
|
30 |
$settings = array(
|
|
|
|
|
|
|
|
|
|
|
31 |
'core.settings.editCapabilities' => array(
|
32 |
'title' => __('Edit/Delete Capabilities', AAM_KEY),
|
33 |
'descr' => AAM_Backend_View_Helper::preparePhrase('Allow to edit or delete any existing capability on the Capabilities tab. [Warning!] For experienced users only. Changing or deleting capability may result in loosing access to some features or even the entire website.', 'b'),
|
@@ -77,6 +82,16 @@ class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract {
|
|
77 |
'title' => __('JWT Authentication', AAM_KEY),
|
78 |
'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('[Note!] PHP 5.4 or higher is required for this feature. Enable the ability to authenticate user with WordPress RESTful API and JWT token. For more information, check %sHow to authenticate WordPress user with JWT token%s article', 'b'), '<a href="https://aamplugin.com/help/how-to-authenticate-wordpress-user-with-jwt-token">', '</a>'),
|
79 |
'value' => AAM_Core_Config::get('core.settings.jwtAuthentication', false)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
)
|
81 |
);
|
82 |
|
28 |
*/
|
29 |
protected function getList() {
|
30 |
$settings = array(
|
31 |
+
'core.settings.getStarted' => array(
|
32 |
+
'title' => __('Get Started Tab', AAM_KEY),
|
33 |
+
'descr' => __('Display the "Get Started" feature on the Main panel. You can disable this feature to remove the extra tab when you get familiar with core access control concepts.', AAM_KEY),
|
34 |
+
'value' => AAM_Core_Config::get('core.settings.getStarted', true)
|
35 |
+
),
|
36 |
'core.settings.editCapabilities' => array(
|
37 |
'title' => __('Edit/Delete Capabilities', AAM_KEY),
|
38 |
'descr' => AAM_Backend_View_Helper::preparePhrase('Allow to edit or delete any existing capability on the Capabilities tab. [Warning!] For experienced users only. Changing or deleting capability may result in loosing access to some features or even the entire website.', 'b'),
|
82 |
'title' => __('JWT Authentication', AAM_KEY),
|
83 |
'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('[Note!] PHP 5.4 or higher is required for this feature. Enable the ability to authenticate user with WordPress RESTful API and JWT token. For more information, check %sHow to authenticate WordPress user with JWT token%s article', 'b'), '<a href="https://aamplugin.com/help/how-to-authenticate-wordpress-user-with-jwt-token">', '</a>'),
|
84 |
'value' => AAM_Core_Config::get('core.settings.jwtAuthentication', false)
|
85 |
+
),
|
86 |
+
'core.settings.extensionSupport' => array(
|
87 |
+
'title' => __('Support AAM Extensions', AAM_KEY),
|
88 |
+
'descr' => __('AAM comes with the limited list of premium and free extensions that significantly enhance AAM behavior. You can disable support for AAM extension and any already installed extension will no longer be loaded during the website execution as well as website administrator will not be able to install new extensions.', AAM_KEY),
|
89 |
+
'value' => AAM_Core_Config::get('core.settings.extensionSupport', true)
|
90 |
+
),
|
91 |
+
'core.settings.cron' => array(
|
92 |
+
'title' => __('AAM Cron Job', AAM_KEY),
|
93 |
+
'descr' => __('AAM cron job executes periodically (typically once a day) to check for available updates for already installed extensions. Cron job is not executed if there are no installed extensions.', AAM_KEY),
|
94 |
+
'value' => AAM_Core_Config::get('core.settings.cron', true)
|
95 |
)
|
96 |
);
|
97 |
|
Application/Backend/Feature/Settings/Manager.php
CHANGED
@@ -28,7 +28,7 @@ class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract
|
|
28 |
|
29 |
AAM_Core_Config::set($param, $value);
|
30 |
|
31 |
-
return
|
32 |
}
|
33 |
|
34 |
/**
|
@@ -43,7 +43,7 @@ class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract
|
|
43 |
|
44 |
AAM_Core_Config::delete($param);
|
45 |
|
46 |
-
return
|
47 |
}
|
48 |
|
49 |
}
|
28 |
|
29 |
AAM_Core_Config::set($param, $value);
|
30 |
|
31 |
+
return wp_json_encode(array('status' => 'success'));
|
32 |
}
|
33 |
|
34 |
/**
|
43 |
|
44 |
AAM_Core_Config::delete($param);
|
45 |
|
46 |
+
return wp_json_encode(array('status' => 'success'));
|
47 |
}
|
48 |
|
49 |
}
|
Application/Backend/Feature/Settings/Tools.php
CHANGED
@@ -31,9 +31,9 @@ class AAM_Backend_Feature_Settings_Tools extends AAM_Backend_Feature_Abstract {
|
|
31 |
'feature.export', array('system' => 'roles,utilities,configpress')
|
32 |
));
|
33 |
|
34 |
-
return
|
35 |
'status' => 'success',
|
36 |
-
'content' => base64_encode(
|
37 |
));
|
38 |
}
|
39 |
|
@@ -44,7 +44,7 @@ class AAM_Backend_Feature_Settings_Tools extends AAM_Backend_Feature_Abstract {
|
|
44 |
public function import() {
|
45 |
$importer = new AAM_Core_Importer(filter_input(INPUT_POST, 'json'));
|
46 |
|
47 |
-
return
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -59,7 +59,7 @@ class AAM_Backend_Feature_Settings_Tools extends AAM_Backend_Feature_Abstract {
|
|
59 |
public function clear() {
|
60 |
AAM_Core_API::clearSettings();
|
61 |
|
62 |
-
return
|
63 |
}
|
64 |
|
65 |
/**
|
@@ -69,7 +69,7 @@ class AAM_Backend_Feature_Settings_Tools extends AAM_Backend_Feature_Abstract {
|
|
69 |
public function clearCache() {
|
70 |
AAM_Core_API::clearCache();
|
71 |
|
72 |
-
return
|
73 |
}
|
74 |
|
75 |
/**
|
@@ -81,12 +81,12 @@ class AAM_Backend_Feature_Settings_Tools extends AAM_Backend_Feature_Abstract {
|
|
81 |
*/
|
82 |
public static function register() {
|
83 |
AAM_Backend_Feature::registerFeature((object) array(
|
84 |
-
'uid'
|
85 |
-
'position'
|
86 |
-
'title'
|
87 |
'capability' => 'aam_manage_settings',
|
88 |
-
'type'
|
89 |
-
'view'
|
90 |
));
|
91 |
}
|
92 |
|
31 |
'feature.export', array('system' => 'roles,utilities,configpress')
|
32 |
));
|
33 |
|
34 |
+
return wp_json_encode(array(
|
35 |
'status' => 'success',
|
36 |
+
'content' => base64_encode(wp_json_encode($exporter->run()))
|
37 |
));
|
38 |
}
|
39 |
|
44 |
public function import() {
|
45 |
$importer = new AAM_Core_Importer(filter_input(INPUT_POST, 'json'));
|
46 |
|
47 |
+
return wp_json_encode($importer->run());
|
48 |
}
|
49 |
|
50 |
/**
|
59 |
public function clear() {
|
60 |
AAM_Core_API::clearSettings();
|
61 |
|
62 |
+
return wp_json_encode(array('status' => 'success'));
|
63 |
}
|
64 |
|
65 |
/**
|
69 |
public function clearCache() {
|
70 |
AAM_Core_API::clearCache();
|
71 |
|
72 |
+
return wp_json_encode(array('status' => 'success'));
|
73 |
}
|
74 |
|
75 |
/**
|
81 |
*/
|
82 |
public static function register() {
|
83 |
AAM_Backend_Feature::registerFeature((object) array(
|
84 |
+
'uid' => 'settings-tools',
|
85 |
+
'position' => 10,
|
86 |
+
'title' => __('Tools', AAM_KEY),
|
87 |
'capability' => 'aam_manage_settings',
|
88 |
+
'type' => 'settings',
|
89 |
+
'view' => __CLASS__
|
90 |
));
|
91 |
}
|
92 |
|
Application/Backend/Feature/Subject/Role.php
CHANGED
@@ -64,7 +64,7 @@ class AAM_Backend_Feature_Subject_Role {
|
|
64 |
);
|
65 |
}
|
66 |
|
67 |
-
return
|
68 |
}
|
69 |
|
70 |
/**
|
@@ -94,7 +94,7 @@ class AAM_Backend_Feature_Subject_Role {
|
|
94 |
* @return string
|
95 |
*/
|
96 |
public function getList(){
|
97 |
-
return
|
98 |
apply_filters('aam-get-role-list-filter', $this->fetchRoleList())
|
99 |
);
|
100 |
}
|
@@ -116,7 +116,7 @@ class AAM_Backend_Feature_Subject_Role {
|
|
116 |
|
117 |
foreach ($roles as $id => $role) {
|
118 |
$match = preg_match('/^' . $search . '/i', $role['name']);
|
119 |
-
if (($exclude
|
120 |
$response[$id] = $role;
|
121 |
}
|
122 |
}
|
@@ -169,7 +169,7 @@ class AAM_Backend_Feature_Subject_Role {
|
|
169 |
}
|
170 |
}
|
171 |
|
172 |
-
return
|
173 |
}
|
174 |
|
175 |
/**
|
@@ -234,7 +234,7 @@ class AAM_Backend_Feature_Subject_Role {
|
|
234 |
$response = array('status' => 'failure');
|
235 |
}
|
236 |
|
237 |
-
return
|
238 |
}
|
239 |
|
240 |
/**
|
@@ -253,7 +253,7 @@ class AAM_Backend_Feature_Subject_Role {
|
|
253 |
}
|
254 |
}
|
255 |
|
256 |
-
return
|
257 |
}
|
258 |
|
259 |
}
|
64 |
);
|
65 |
}
|
66 |
|
67 |
+
return wp_json_encode(apply_filters('aam-get-role-list-filter', $response));
|
68 |
}
|
69 |
|
70 |
/**
|
94 |
* @return string
|
95 |
*/
|
96 |
public function getList(){
|
97 |
+
return wp_json_encode(
|
98 |
apply_filters('aam-get-role-list-filter', $this->fetchRoleList())
|
99 |
);
|
100 |
}
|
116 |
|
117 |
foreach ($roles as $id => $role) {
|
118 |
$match = preg_match('/^' . $search . '/i', $role['name']);
|
119 |
+
if (($exclude !== $id) && (!$search || $match)) {
|
120 |
$response[$id] = $role;
|
121 |
}
|
122 |
}
|
169 |
}
|
170 |
}
|
171 |
|
172 |
+
return wp_json_encode($response);
|
173 |
}
|
174 |
|
175 |
/**
|
234 |
$response = array('status' => 'failure');
|
235 |
}
|
236 |
|
237 |
+
return wp_json_encode($response);
|
238 |
}
|
239 |
|
240 |
/**
|
253 |
}
|
254 |
}
|
255 |
|
256 |
+
return wp_json_encode(array('status' => $status));
|
257 |
}
|
258 |
|
259 |
}
|
Application/Backend/Feature/Subject/User.php
CHANGED
@@ -47,7 +47,7 @@ class AAM_Backend_Feature_Subject_User {
|
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
return
|
51 |
}
|
52 |
|
53 |
/**
|
@@ -79,7 +79,7 @@ class AAM_Backend_Feature_Subject_User {
|
|
79 |
}
|
80 |
}
|
81 |
|
82 |
-
return
|
83 |
}
|
84 |
|
85 |
/**
|
@@ -136,7 +136,7 @@ class AAM_Backend_Feature_Subject_User {
|
|
136 |
}
|
137 |
}
|
138 |
|
139 |
-
return
|
140 |
}
|
141 |
|
142 |
/**
|
47 |
}
|
48 |
}
|
49 |
|
50 |
+
return wp_json_encode($response);
|
51 |
}
|
52 |
|
53 |
/**
|
79 |
}
|
80 |
}
|
81 |
|
82 |
+
return wp_json_encode($response);
|
83 |
}
|
84 |
|
85 |
/**
|
136 |
}
|
137 |
}
|
138 |
|
139 |
+
return wp_json_encode(array('status' => ($result ? 'success' : 'failure')));
|
140 |
}
|
141 |
|
142 |
/**
|
Application/Backend/Filter.php
CHANGED
@@ -102,14 +102,13 @@ class AAM_Backend_Filter {
|
|
102 |
//make sure that nobody is playing with screen options
|
103 |
if (is_a($post, 'WP_Post')) {
|
104 |
$screen = $post->post_type;
|
105 |
-
} elseif ($screen_object = get_current_screen()) {
|
106 |
-
$screen = $screen_object->id;
|
107 |
} else {
|
108 |
-
$
|
|
|
109 |
}
|
110 |
|
111 |
-
if (AAM_Core_Request::get('init')
|
112 |
-
if ($screen
|
113 |
AAM::getUser()->getObject('metabox')->filterBackend($screen);
|
114 |
} else {
|
115 |
AAM::getUser()->getObject('metabox')->filterAppearanceWidgets();
|
@@ -188,7 +187,7 @@ class AAM_Backend_Filter {
|
|
188 |
protected function isAllowed($action, $object) {
|
189 |
$edit = $object->has($action);
|
190 |
$others = $object->has("{$action}_others");
|
191 |
-
$author = ($object->post_author
|
192 |
|
193 |
return ($edit || ($others && !$author)) ? false : true;
|
194 |
}
|
@@ -233,7 +232,7 @@ class AAM_Backend_Filter {
|
|
233 |
public function prePostUpdate($id, $data) {
|
234 |
$post = get_post($id);
|
235 |
|
236 |
-
if ($post->post_author
|
237 |
AAM_Core_API::clearCache();
|
238 |
}
|
239 |
}
|
@@ -254,7 +253,7 @@ class AAM_Backend_Filter {
|
|
254 |
$roleLevel = AAM_Core_API::maxLevel($role['capabilities']);
|
255 |
if ($userLevel < $roleLevel) {
|
256 |
unset($roles[$id]);
|
257 |
-
} elseif ($userLevel
|
258 |
unset($roles[$id]);
|
259 |
}
|
260 |
}
|
@@ -298,7 +297,7 @@ class AAM_Backend_Filter {
|
|
298 |
$roleMax = AAM_Core_API::maxLevel($role->capabilities);
|
299 |
if ($roleMax > $max ) {
|
300 |
$exclude[] = $id;
|
301 |
-
} elseif ($roleMax
|
302 |
$exclude[] = $id;
|
303 |
}
|
304 |
}
|
@@ -324,7 +323,7 @@ class AAM_Backend_Filter {
|
|
324 |
if (isset($views[$id])) {
|
325 |
if ($roleMax > $max) {
|
326 |
unset($views[$id]);
|
327 |
-
} elseif ($roleMax
|
328 |
unset($views[$id]);
|
329 |
}
|
330 |
}
|
102 |
//make sure that nobody is playing with screen options
|
103 |
if (is_a($post, 'WP_Post')) {
|
104 |
$screen = $post->post_type;
|
|
|
|
|
105 |
} else {
|
106 |
+
$screen_object = get_current_screen();
|
107 |
+
$screen = ($screen_object ? $screen_object->id : '');
|
108 |
}
|
109 |
|
110 |
+
if (AAM_Core_Request::get('init') !== 'metabox') {
|
111 |
+
if ($screen !== 'widgets') {
|
112 |
AAM::getUser()->getObject('metabox')->filterBackend($screen);
|
113 |
} else {
|
114 |
AAM::getUser()->getObject('metabox')->filterAppearanceWidgets();
|
187 |
protected function isAllowed($action, $object) {
|
188 |
$edit = $object->has($action);
|
189 |
$others = $object->has("{$action}_others");
|
190 |
+
$author = ($object->post_author === get_current_user_id());
|
191 |
|
192 |
return ($edit || ($others && !$author)) ? false : true;
|
193 |
}
|
232 |
public function prePostUpdate($id, $data) {
|
233 |
$post = get_post($id);
|
234 |
|
235 |
+
if ($post->post_author !== intval($data['post_author'])) {
|
236 |
AAM_Core_API::clearCache();
|
237 |
}
|
238 |
}
|
253 |
$roleLevel = AAM_Core_API::maxLevel($role['capabilities']);
|
254 |
if ($userLevel < $roleLevel) {
|
255 |
unset($roles[$id]);
|
256 |
+
} elseif ($userLevel === $roleLevel && $this->filterSameLevel()) {
|
257 |
unset($roles[$id]);
|
258 |
}
|
259 |
}
|
297 |
$roleMax = AAM_Core_API::maxLevel($role->capabilities);
|
298 |
if ($roleMax > $max ) {
|
299 |
$exclude[] = $id;
|
300 |
+
} elseif ($roleMax === $max && $this->filterSameLevel()) {
|
301 |
$exclude[] = $id;
|
302 |
}
|
303 |
}
|
323 |
if (isset($views[$id])) {
|
324 |
if ($roleMax > $max) {
|
325 |
unset($views[$id]);
|
326 |
+
} elseif ($roleMax === $max && $this->filterSameLevel()) {
|
327 |
unset($views[$id]);
|
328 |
}
|
329 |
}
|
Application/Backend/Manager.php
CHANGED
@@ -108,7 +108,7 @@ class AAM_Backend_Manager {
|
|
108 |
add_action('admin_init', array($this, 'adminInit'));
|
109 |
|
110 |
//admin toolbar
|
111 |
-
if (filter_input(INPUT_GET, 'init')
|
112 |
add_action('wp_after_admin_bar_render', array($this, 'adminBar'));
|
113 |
}
|
114 |
|
@@ -125,7 +125,7 @@ class AAM_Backend_Manager {
|
|
125 |
|
126 |
AAM_Extension_Repository::getInstance()->hasUpdates();
|
127 |
|
128 |
-
if (version_compare(PHP_VERSION, '5.3.0')
|
129 |
AAM_Core_Console::add(
|
130 |
'AAM requires PHP version 5.3.0 or higher to function properly'
|
131 |
);
|
@@ -139,7 +139,7 @@ class AAM_Backend_Manager {
|
|
139 |
* @return type
|
140 |
*/
|
141 |
public function mapMetaCap($caps, $cap) {
|
142 |
-
if (in_array($cap, AAM_Backend_Feature_Main_Capability::$groups['aam'])) {
|
143 |
if (!AAM_Core_API::capabilityExists($cap)) {
|
144 |
$caps = array(AAM_Core_Config::get('page.capability', 'administrator'));
|
145 |
}
|
@@ -178,7 +178,7 @@ class AAM_Backend_Manager {
|
|
178 |
$user = get_user_by('ID', $id);
|
179 |
|
180 |
//role changed?
|
181 |
-
if (implode('', $user->roles)
|
182 |
AAM_Core_API::clearCache(new AAM_Core_Subject_User($id));
|
183 |
|
184 |
//check if role has expiration data set
|
@@ -256,7 +256,7 @@ class AAM_Backend_Manager {
|
|
256 |
public function handleLogin() {
|
257 |
$login = AAM_Core_Login::getInstance();
|
258 |
|
259 |
-
echo
|
260 |
exit;
|
261 |
}
|
262 |
|
@@ -326,7 +326,7 @@ class AAM_Backend_Manager {
|
|
326 |
*
|
327 |
*/
|
328 |
protected function checkUserSwitch() {
|
329 |
-
if (AAM_Core_Request::get('action')
|
330 |
$current = get_current_user_id();
|
331 |
$uid = AAM_Core_API::getOption('aam-user-switch-' . $current);
|
332 |
$redirect = admin_url('admin.php?page=aam&user=' . $current);
|
@@ -360,11 +360,9 @@ class AAM_Backend_Manager {
|
|
360 |
'index.php?action=aam-switch-back', 'aam-switch-' . $uid
|
361 |
);
|
362 |
|
363 |
-
$style = 'padding: 10px; font-weight: 700; letter-spacing:0.5px;';
|
364 |
-
|
365 |
echo '<div class="updated notice">';
|
366 |
-
echo '<p style="
|
367 |
-
echo sprintf('Switch back to <a href="%s">%s</a>.', $url, $name);
|
368 |
echo '</p></div>';
|
369 |
}
|
370 |
}
|
@@ -411,7 +409,7 @@ class AAM_Backend_Manager {
|
|
411 |
|
412 |
// do some cleanup
|
413 |
foreach($cache as $i => $node) {
|
414 |
-
if ($node->id
|
415 |
unset($cache[$i]);
|
416 |
}
|
417 |
}
|
@@ -458,14 +456,13 @@ class AAM_Backend_Manager {
|
|
458 |
public function initMetaboxes() {
|
459 |
global $post;
|
460 |
|
461 |
-
if (AAM_Core_Request::get('init')
|
462 |
//make sure that nobody is playing with screen options
|
463 |
if (is_a($post, 'WP_Post')) {
|
464 |
$screen = $post->post_type;
|
465 |
-
} elseif ($screen_object = get_current_screen()) {
|
466 |
-
$screen = $screen_object->id;
|
467 |
} else {
|
468 |
-
$
|
|
|
469 |
}
|
470 |
|
471 |
$model = new AAM_Backend_Feature_Main_Metabox;
|
@@ -591,8 +588,8 @@ class AAM_Backend_Manager {
|
|
591 |
$subject = AAM_Backend_Subject::getInstance();
|
592 |
|
593 |
$locals = array(
|
594 |
-
'nonce'
|
595 |
-
'ajaxurl'
|
596 |
'url' => array(
|
597 |
'site' => admin_url('index.php'),
|
598 |
'editUser' => admin_url('user-edit.php'),
|
108 |
add_action('admin_init', array($this, 'adminInit'));
|
109 |
|
110 |
//admin toolbar
|
111 |
+
if (filter_input(INPUT_GET, 'init') === 'toolbar') {
|
112 |
add_action('wp_after_admin_bar_render', array($this, 'adminBar'));
|
113 |
}
|
114 |
|
125 |
|
126 |
AAM_Extension_Repository::getInstance()->hasUpdates();
|
127 |
|
128 |
+
if (version_compare(PHP_VERSION, '5.3.0') === -1) {
|
129 |
AAM_Core_Console::add(
|
130 |
'AAM requires PHP version 5.3.0 or higher to function properly'
|
131 |
);
|
139 |
* @return type
|
140 |
*/
|
141 |
public function mapMetaCap($caps, $cap) {
|
142 |
+
if (in_array($cap, AAM_Backend_Feature_Main_Capability::$groups['aam'], true)) {
|
143 |
if (!AAM_Core_API::capabilityExists($cap)) {
|
144 |
$caps = array(AAM_Core_Config::get('page.capability', 'administrator'));
|
145 |
}
|
178 |
$user = get_user_by('ID', $id);
|
179 |
|
180 |
//role changed?
|
181 |
+
if (implode('', $user->roles) !== implode('', $old->roles)) {
|
182 |
AAM_Core_API::clearCache(new AAM_Core_Subject_User($id));
|
183 |
|
184 |
//check if role has expiration data set
|
256 |
public function handleLogin() {
|
257 |
$login = AAM_Core_Login::getInstance();
|
258 |
|
259 |
+
echo wp_json_encode($login->execute());
|
260 |
exit;
|
261 |
}
|
262 |
|
326 |
*
|
327 |
*/
|
328 |
protected function checkUserSwitch() {
|
329 |
+
if (AAM_Core_Request::get('action') === 'aam-switch-back') {
|
330 |
$current = get_current_user_id();
|
331 |
$uid = AAM_Core_API::getOption('aam-user-switch-' . $current);
|
332 |
$redirect = admin_url('admin.php?page=aam&user=' . $current);
|
360 |
'index.php?action=aam-switch-back', 'aam-switch-' . $uid
|
361 |
);
|
362 |
|
|
|
|
|
363 |
echo '<div class="updated notice">';
|
364 |
+
echo '<p style="padding: 10px; font-weight: 700; letter-spacing:0.5px;">';
|
365 |
+
echo sprintf('Switch back to <a href="%s">%s</a>.', $url, esc_js($name));
|
366 |
echo '</p></div>';
|
367 |
}
|
368 |
}
|
409 |
|
410 |
// do some cleanup
|
411 |
foreach($cache as $i => $node) {
|
412 |
+
if ($node->id === 'menu-toggle') {
|
413 |
unset($cache[$i]);
|
414 |
}
|
415 |
}
|
456 |
public function initMetaboxes() {
|
457 |
global $post;
|
458 |
|
459 |
+
if (AAM_Core_Request::get('init') === 'metabox') {
|
460 |
//make sure that nobody is playing with screen options
|
461 |
if (is_a($post, 'WP_Post')) {
|
462 |
$screen = $post->post_type;
|
|
|
|
|
463 |
} else {
|
464 |
+
$screen_object = get_current_screen();
|
465 |
+
$screen = ($screen_object ? $screen_object->id : '');
|
466 |
}
|
467 |
|
468 |
$model = new AAM_Backend_Feature_Main_Metabox;
|
588 |
$subject = AAM_Backend_Subject::getInstance();
|
589 |
|
590 |
$locals = array(
|
591 |
+
'nonce' => wp_create_nonce('aam_ajax'),
|
592 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
593 |
'url' => array(
|
594 |
'site' => admin_url('index.php'),
|
595 |
'editUser' => admin_url('user-edit.php'),
|
Application/Backend/View.php
CHANGED
@@ -33,6 +33,7 @@ class AAM_Backend_View {
|
|
33 |
*/
|
34 |
protected function __construct() {
|
35 |
//register default features
|
|
|
36 |
AAM_Backend_Feature_Main_Menu::register();
|
37 |
AAM_Backend_Feature_Main_Toolbar::register();
|
38 |
AAM_Backend_Feature_Main_Metabox::register();
|
@@ -63,7 +64,7 @@ class AAM_Backend_View {
|
|
63 |
*/
|
64 |
public function renderPage() {
|
65 |
ob_start();
|
66 |
-
require_once
|
67 |
$content = ob_get_contents();
|
68 |
ob_end_clean();
|
69 |
|
@@ -79,7 +80,7 @@ class AAM_Backend_View {
|
|
79 |
*/
|
80 |
public function renderAccessFrame() {
|
81 |
ob_start();
|
82 |
-
require_once
|
83 |
$content = ob_get_contents();
|
84 |
ob_end_clean();
|
85 |
|
@@ -93,7 +94,7 @@ class AAM_Backend_View {
|
|
93 |
*/
|
94 |
public function renderPostMetabox($post) {
|
95 |
ob_start();
|
96 |
-
require_once
|
97 |
$content = ob_get_contents();
|
98 |
ob_end_clean();
|
99 |
|
@@ -107,7 +108,7 @@ class AAM_Backend_View {
|
|
107 |
*/
|
108 |
public function renderTermMetabox($term) {
|
109 |
ob_start();
|
110 |
-
require_once
|
111 |
$content = ob_get_contents();
|
112 |
ob_end_clean();
|
113 |
|
@@ -129,7 +130,7 @@ class AAM_Backend_View {
|
|
129 |
|
130 |
if (method_exists($this, $parts[0])) {
|
131 |
$response = call_user_func(array($this, $parts[0]));
|
132 |
-
} elseif (count($parts)
|
133 |
try {
|
134 |
$classname = 'AAM_Backend_Feature_' . $parts[0];
|
135 |
if (class_exists($classname)) {
|
@@ -162,12 +163,12 @@ class AAM_Backend_View {
|
|
162 |
|
163 |
if (is_null($content)) {
|
164 |
ob_start();
|
165 |
-
if ($type
|
166 |
AAM_Backend_Feature_Extension_Manager::getInstance()->render();
|
167 |
-
} elseif ($type
|
168 |
echo AAM_Backend_Feature_Main_Post::renderAccessForm();
|
169 |
} else {
|
170 |
-
require_once
|
171 |
}
|
172 |
$content = ob_get_contents();
|
173 |
ob_end_clean();
|
@@ -183,7 +184,7 @@ class AAM_Backend_View {
|
|
183 |
*/
|
184 |
public function loadPartial($partial) {
|
185 |
ob_start();
|
186 |
-
require_once
|
187 |
$content = ob_get_contents();
|
188 |
ob_end_clean();
|
189 |
|
@@ -210,7 +211,7 @@ class AAM_Backend_View {
|
|
210 |
$param, $value, $object, $objectId
|
211 |
);
|
212 |
|
213 |
-
return
|
214 |
}
|
215 |
|
216 |
/**
|
@@ -250,7 +251,7 @@ class AAM_Backend_View {
|
|
250 |
}
|
251 |
}
|
252 |
|
253 |
-
return
|
254 |
}
|
255 |
|
256 |
/**
|
33 |
*/
|
34 |
protected function __construct() {
|
35 |
//register default features
|
36 |
+
AAM_Backend_Feature_Main_GetStarted::register();
|
37 |
AAM_Backend_Feature_Main_Menu::register();
|
38 |
AAM_Backend_Feature_Main_Toolbar::register();
|
39 |
AAM_Backend_Feature_Main_Metabox::register();
|
64 |
*/
|
65 |
public function renderPage() {
|
66 |
ob_start();
|
67 |
+
require_once dirname(__FILE__) . '/phtml/index.phtml';
|
68 |
$content = ob_get_contents();
|
69 |
ob_end_clean();
|
70 |
|
80 |
*/
|
81 |
public function renderAccessFrame() {
|
82 |
ob_start();
|
83 |
+
require_once dirname(__FILE__) . '/phtml/metabox/metabox-content.phtml';
|
84 |
$content = ob_get_contents();
|
85 |
ob_end_clean();
|
86 |
|
94 |
*/
|
95 |
public function renderPostMetabox($post) {
|
96 |
ob_start();
|
97 |
+
require_once dirname(__FILE__) . '/phtml/metabox/post-metabox.phtml';
|
98 |
$content = ob_get_contents();
|
99 |
ob_end_clean();
|
100 |
|
108 |
*/
|
109 |
public function renderTermMetabox($term) {
|
110 |
ob_start();
|
111 |
+
require_once dirname(__FILE__) . '/phtml/metabox/term-metabox.phtml';
|
112 |
$content = ob_get_contents();
|
113 |
ob_end_clean();
|
114 |
|
130 |
|
131 |
if (method_exists($this, $parts[0])) {
|
132 |
$response = call_user_func(array($this, $parts[0]));
|
133 |
+
} elseif (count($parts) === 2) { //cover the Model.method pattern
|
134 |
try {
|
135 |
$classname = 'AAM_Backend_Feature_' . $parts[0];
|
136 |
if (class_exists($classname)) {
|
163 |
|
164 |
if (is_null($content)) {
|
165 |
ob_start();
|
166 |
+
if ($type === 'extensions') {
|
167 |
AAM_Backend_Feature_Extension_Manager::getInstance()->render();
|
168 |
+
} elseif ($type === 'postform') {
|
169 |
echo AAM_Backend_Feature_Main_Post::renderAccessForm();
|
170 |
} else {
|
171 |
+
require_once dirname(__FILE__) . '/phtml/main-panel.phtml';
|
172 |
}
|
173 |
$content = ob_get_contents();
|
174 |
ob_end_clean();
|
184 |
*/
|
185 |
public function loadPartial($partial) {
|
186 |
ob_start();
|
187 |
+
require_once dirname(__FILE__) . '/phtml/partial/' . $partial;
|
188 |
$content = ob_get_contents();
|
189 |
ob_end_clean();
|
190 |
|
211 |
$param, $value, $object, $objectId
|
212 |
);
|
213 |
|
214 |
+
return wp_json_encode(array('status' => ($result ? 'success' : 'failure')));
|
215 |
}
|
216 |
|
217 |
/**
|
251 |
}
|
252 |
}
|
253 |
|
254 |
+
return wp_json_encode($response);
|
255 |
}
|
256 |
|
257 |
/**
|
Application/Backend/Widget/Login.php
CHANGED
@@ -30,11 +30,9 @@ class AAM_Backend_Widget_Login extends WP_Widget {
|
|
30 |
public function widget($args, $instance) {
|
31 |
$this->args = array_merge($args, $this->normalize($instance));
|
32 |
|
33 |
-
require(
|
34 |
-
|
35 |
-
|
36 |
-
realpath(dirname(__FILE__) . '/../phtml/widget/login-frontend.phtml')
|
37 |
-
)
|
38 |
);
|
39 |
}
|
40 |
|
@@ -45,7 +43,7 @@ class AAM_Backend_Widget_Login extends WP_Widget {
|
|
45 |
public function form($instance) {
|
46 |
$instance = $this->normalize($instance);
|
47 |
|
48 |
-
require
|
49 |
}
|
50 |
|
51 |
/**
|
30 |
public function widget($args, $instance) {
|
31 |
$this->args = array_merge($args, $this->normalize($instance));
|
32 |
|
33 |
+
require AAM_Core_Config::get(
|
34 |
+
'feature.secureLogin.widget.template',
|
35 |
+
realpath(dirname(__FILE__) . '/../phtml/widget/login-frontend.phtml')
|
|
|
|
|
36 |
);
|
37 |
}
|
38 |
|
43 |
public function form($instance) {
|
44 |
$instance = $this->normalize($instance);
|
45 |
|
46 |
+
require dirname(__FILE__) . '/../phtml/widget/login-backend.phtml';
|
47 |
}
|
48 |
|
49 |
/**
|
Application/Backend/phtml/index.phtml
CHANGED
@@ -12,20 +12,11 @@
|
|
12 |
<div class="postbox">
|
13 |
<h3 class="hndle">
|
14 |
<span><?php echo __('Main Panel', AAM_KEY); ?></span>
|
15 |
-
<span class="aam-help-menu" data-target="#access-manager-inside"><i class="icon-help-circled"></i></span>
|
16 |
</h3>
|
17 |
<div class="inside" id="access-manager-inside">
|
18 |
<div class="aam-postbox-inside" id="aam-content">
|
19 |
<p class="alert alert-info text-larger text-center" id="aam-initial-load"><?php echo AAM_Backend_View_Helper::preparePhrase('[Loading AAM UI]. Please wait. If content will not load within next 30 seconds, clear your browser cache and reload the page. If still nothing, it is most likely some sort of JavaScript or CSS conflict with one your active plugins or theme. Try to deactivate all plugins and switch to any default WordPress theme to find out what causes the issue.', 'strong'); ?></p>
|
20 |
</div>
|
21 |
-
<div class="aam-help-context" >
|
22 |
-
<div class="text-justify aam-large-padding">
|
23 |
-
<p class="text-larger"><?php echo __('Appreciate your interest in Advanced Access Manager (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>
|
24 |
-
<p class="text-larger"><span class="aam-highlight"><?php echo __('Please Note!', AAM_KEY); ?></span> <?php echo AAM_Backend_View_Helper::preparePhrase('Power comes with responsibility. Make sure you have enough knowledge in WordPress Roles & 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>
|
25 |
-
<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>
|
26 |
-
<p class="text-larger"><?php echo sprintf(__('Check our %sHelp%s section to find some useful articles about AAM functionality or %scontact us%s directly.', AAM_KEY), '<a href="https://aamplugin.com/help" target="_blank">', '</a>', '<a href="mailto:support@aamplugin.com">', '</a>'); ?></p>
|
27 |
-
</div>
|
28 |
-
</div>
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
@@ -65,7 +56,7 @@
|
|
65 |
<span>Settings</span>
|
66 |
</a>
|
67 |
<?php } ?>
|
68 |
-
<?php if (current_user_can('aam_manage_extensions')) { ?>
|
69 |
<a href="#" title="Extensions" data-type="extensions" class="aam-area">
|
70 |
<i class="icon-cubes"></i>
|
71 |
<span>Extensions</span>
|
12 |
<div class="postbox">
|
13 |
<h3 class="hndle">
|
14 |
<span><?php echo __('Main Panel', AAM_KEY); ?></span>
|
|
|
15 |
</h3>
|
16 |
<div class="inside" id="access-manager-inside">
|
17 |
<div class="aam-postbox-inside" id="aam-content">
|
18 |
<p class="alert alert-info text-larger text-center" id="aam-initial-load"><?php echo AAM_Backend_View_Helper::preparePhrase('[Loading AAM UI]. Please wait. If content will not load within next 30 seconds, clear your browser cache and reload the page. If still nothing, it is most likely some sort of JavaScript or CSS conflict with one your active plugins or theme. Try to deactivate all plugins and switch to any default WordPress theme to find out what causes the issue.', 'strong'); ?></p>
|
19 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</div>
|
21 |
</div>
|
22 |
</div>
|
56 |
<span>Settings</span>
|
57 |
</a>
|
58 |
<?php } ?>
|
59 |
+
<?php if (AAM_Core_Config::get('core.settings.extensionSupport', true) && current_user_can('aam_manage_extensions')) { ?>
|
60 |
<a href="#" title="Extensions" data-type="extensions" class="aam-area">
|
61 |
<i class="icon-cubes"></i>
|
62 |
<span>Extensions</span>
|
Application/Backend/phtml/main/get-started.phtml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (defined('AAM_KEY')) { ?>
|
2 |
+
<div class="aam-feature" id="get-started-content">
|
3 |
+
<div class="row">
|
4 |
+
<div class="col-xs-12">
|
5 |
+
<div class="panel panel-default">
|
6 |
+
<div class="panel-body">
|
7 |
+
<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, backend and RESTful/XML-PRC APIs.', AAM_KEY); ?></p>
|
8 |
+
<p class="text-larger"><span class="aam-highlight"><?php echo __('Please Note!', AAM_KEY); ?></span> <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Power comes with responsibility. Make sure you have good understanding of %sWordPress Roles & Capabilities%s because AAM is very closely integrated with WordPress core. It is also recommended to have a 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.'), '<a href="https://aamplugin.com/help/wordpress-roles-and-capabilities" target="_blank">', '</a>'); ?></p>
|
9 |
+
<p class="text-larger"><?php echo sprintf(__('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 a conflict with other plugins or themes. In this case please do not hesitate to contact us directly on our website %saamplugin.com%s', AAM_KEY), '<a href="https://aamplugin.com" target="_blank">', '</a>'); ?></p>
|
10 |
+
<p class="text-larger"><?php echo sprintf(__('If you are not sure where to start, please check our %s"Get Started"%s page to learn more about core concepts that will definitely help you to manage access to your WordPress website more effectively.', AAM_KEY), '<a href="https://aamplugin.com/get-started" target="_blank">', '</a>'); ?></p>
|
11 |
+
<p class="text-center"><a href="https://aamplugin.com/get-started" class="btn btn-primary" target="_blank"><?php echo __('Get Started', AAM_KEY); ?></a></p>
|
12 |
+
<p class="text-center"><small><sup>*</sup> <?php echo __('To remove the "Get Started" tab you may go to Settings Area and disable "Get Started Feature" option.', AAM_KEY); ?></small></p>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
<?php
|
19 |
+
}
|
Application/Backend/phtml/main/metabox.phtml
CHANGED
@@ -75,8 +75,7 @@
|
|
75 |
<div class="row">
|
76 |
<div class="col-xs-12 text-center">
|
77 |
<p class="alert alert-info text-larger">
|
78 |
-
<?php echo __('The list is not initialized. Click Refresh button above.');
|
79 |
-
<small><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('If your website requires HTTP authentication, please refer to [%sthis article%s] for additional information.', 'b'), '<a href="https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets" target="_blank">', '</a>'); ?></small>
|
80 |
</p>
|
81 |
</div>
|
82 |
</div>
|
75 |
<div class="row">
|
76 |
<div class="col-xs-12 text-center">
|
77 |
<p class="alert alert-info text-larger">
|
78 |
+
<?php echo __('The list is not initialized. Click Refresh button above.', AAM_KEY); ?>
|
|
|
79 |
</p>
|
80 |
</div>
|
81 |
</div>
|
Application/Backend/phtml/main/post.phtml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<div class="row">
|
5 |
<div class="col-xs-12">
|
6 |
<p class="aam-notification">
|
7 |
-
<?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('You are allowed to manage access to unlimited number of posts, pages or custom post types but only for any role, user or visitor. Consider to purchase %s[AAM Plus Package]%s extension to have the ability to also manage access to categories and custom taxonomies or to define the default access to all posts, pages or custom post types. For more information about this functionality check %sHow to manage access to the WordPress content%s.', 'b'), '<a href="https://aamplugin.com/help/aam-plus-package-extension" target="_blank">', '</a>', '<a href="https://aamplugin.com/help/
|
8 |
</p>
|
9 |
</div>
|
10 |
</div>
|
@@ -12,7 +12,7 @@
|
|
12 |
<div class="row">
|
13 |
<div class="col-xs-12">
|
14 |
<p class="aam-info">
|
15 |
-
<?php echo sprintf(__('Manage access to posts, pages, custom post types, categories or custom hierarchical taxonomies. For more information about this functionality check %
|
16 |
</p>
|
17 |
</div>
|
18 |
</div>
|
4 |
<div class="row">
|
5 |
<div class="col-xs-12">
|
6 |
<p class="aam-notification">
|
7 |
+
<?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('You are allowed to manage access to unlimited number of posts, pages or custom post types but only for any role, user or visitor. Consider to purchase %s[AAM Plus Package]%s extension to have the ability to also manage access to categories and custom taxonomies or to define the default access to all posts, pages or custom post types. For more information about this functionality check %sHow to manage access to the WordPress content%s.', 'b'), '<a href="https://aamplugin.com/help/aam-plus-package-extension" target="_blank">', '</a>', '<a href="https://aamplugin.com/help/manage-access-to-the-wordpress-posts-and-terms" target="_blank">', '</a>'); ?>
|
8 |
</p>
|
9 |
</div>
|
10 |
</div>
|
12 |
<div class="row">
|
13 |
<div class="col-xs-12">
|
14 |
<p class="aam-info">
|
15 |
+
<?php echo sprintf(__('Manage access to posts, pages, custom post types, categories or custom hierarchical taxonomies. For more information about this functionality check %sManage access to the WordPress Posts and Terms%s article.'), '<a href="https://aamplugin.com/help/manage-access-to-the-wordpress-posts-and-terms" target="_blank">', '</a>'); ?>
|
16 |
</p>
|
17 |
</div>
|
18 |
</div>
|
Application/Core/API.php
CHANGED
@@ -31,10 +31,10 @@ final class AAM_Core_API {
|
|
31 |
*/
|
32 |
public static function getOption($option, $default = FALSE, $blog_id = null) {
|
33 |
if (is_multisite()) {
|
34 |
-
if (is_null($blog_id) || get_current_blog_id()
|
35 |
$response = self::getCachedOption($option, $default);
|
36 |
} else {
|
37 |
-
if ($blog_id
|
38 |
$blog = (defined('SITE_ID_CURRENT_SITE') ? SITE_ID_CURRENT_SITE : 1);
|
39 |
} else {
|
40 |
$blog = $blog_id;
|
@@ -100,7 +100,7 @@ final class AAM_Core_API {
|
|
100 |
if (is_multisite()) {
|
101 |
if (is_null($blog_id)) {
|
102 |
$blog = get_current_blog_id();
|
103 |
-
} elseif ($blog_id
|
104 |
$blog = (defined('SITE_ID_CURRENT_SITE') ? SITE_ID_CURRENT_SITE : 1);
|
105 |
} else {
|
106 |
$blog = $blog_id;
|
@@ -145,33 +145,18 @@ final class AAM_Core_API {
|
|
145 |
* Initiate HTTP request
|
146 |
*
|
147 |
* @param string $url Requested URL
|
148 |
-
* @param bool $send_cookies Wheather send cookies or not
|
149 |
*
|
150 |
* @return WP_Error|array
|
151 |
*
|
152 |
* @access public
|
153 |
*/
|
154 |
-
public static function cURL($url, $
|
155 |
$header = array('User-Agent' => AAM_Core_Request::server('HTTP_USER_AGENT'));
|
156 |
|
157 |
-
$cookies = AAM_Core_Request::cookie(null, array());
|
158 |
-
$requestCookies = array();
|
159 |
-
if (is_array($cookies) && $send_cookies) {
|
160 |
-
foreach ($cookies as $key => $value) {
|
161 |
-
//SKIP PHPSESSID - some servers don't like it for security reason
|
162 |
-
if ($key !== session_name() && is_scalar($value)) {
|
163 |
-
$requestCookies[] = new WP_Http_Cookie(array(
|
164 |
-
'name' => $key, 'value' => $value
|
165 |
-
));
|
166 |
-
}
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
return wp_remote_request($url, array(
|
171 |
'headers' => $header,
|
172 |
'method' => 'POST',
|
173 |
'body' => $params,
|
174 |
-
'cookies' => $requestCookies,
|
175 |
'timeout' => $timeout
|
176 |
));
|
177 |
}
|
@@ -325,16 +310,16 @@ final class AAM_Core_API {
|
|
325 |
* @access public
|
326 |
*/
|
327 |
public static function reject($area = 'frontend', $args = array()) {
|
328 |
-
if (AAM_Core_Request::server('REQUEST_METHOD')
|
329 |
$object = AAM::getUser()->getObject('redirect');
|
330 |
$type = $object->get("{$area}.redirect.type");
|
331 |
|
332 |
-
if (!empty($type) && ($type
|
333 |
$redirect = add_query_arg(
|
334 |
array('reason' => 'restricted'),
|
335 |
wp_login_url(AAM_Core_Request::server('REQUEST_URI'))
|
336 |
);
|
337 |
-
} elseif (!empty($type) && ($type
|
338 |
$redirect = $object->get("{$area}.redirect.{$type}");
|
339 |
} else { //ConfigPress setup
|
340 |
$redirect = AAM_Core_Config::get(
|
@@ -344,11 +329,11 @@ final class AAM_Core_API {
|
|
344 |
|
345 |
$doRedirect = true;
|
346 |
|
347 |
-
if ($type
|
348 |
$page = self::getCurrentPost();
|
349 |
-
$doRedirect = (empty($page) || ($page->ID
|
350 |
-
} elseif ($type
|
351 |
-
$doRedirect = strpos($redirect,
|
352 |
}
|
353 |
|
354 |
if ($doRedirect) {
|
@@ -371,11 +356,11 @@ final class AAM_Core_API {
|
|
371 |
* @access public
|
372 |
*/
|
373 |
public static function redirect($rule, $args = null) {
|
374 |
-
$path =
|
375 |
if ($path && !empty($path['host'])) {
|
376 |
-
wp_redirect($rule, 307);
|
377 |
} elseif (preg_match('/^[\d]+$/', $rule)) {
|
378 |
-
wp_safe_redirect(get_page_link($rule), 307);
|
379 |
} elseif (is_callable($rule)) {
|
380 |
call_user_func($rule, $args);
|
381 |
} elseif (!empty($args['callback']) && is_callable($args['callback'])) {
|
@@ -450,9 +435,9 @@ final class AAM_Core_API {
|
|
450 |
} elseif (!empty($wp_query->query['name'])) {
|
451 |
//Important! Cover the scenario of NOT LIST but ALLOW READ
|
452 |
if (!empty($wp_query->posts)) {
|
453 |
-
foreach($wp_query->posts as $
|
454 |
-
if ($
|
455 |
-
$res = $
|
456 |
break;
|
457 |
}
|
458 |
}
|
31 |
*/
|
32 |
public static function getOption($option, $default = FALSE, $blog_id = null) {
|
33 |
if (is_multisite()) {
|
34 |
+
if (is_null($blog_id) || get_current_blog_id() === $blog_id) {
|
35 |
$response = self::getCachedOption($option, $default);
|
36 |
} else {
|
37 |
+
if ($blog_id === 'site') {
|
38 |
$blog = (defined('SITE_ID_CURRENT_SITE') ? SITE_ID_CURRENT_SITE : 1);
|
39 |
} else {
|
40 |
$blog = $blog_id;
|
100 |
if (is_multisite()) {
|
101 |
if (is_null($blog_id)) {
|
102 |
$blog = get_current_blog_id();
|
103 |
+
} elseif ($blog_id === 'site') {
|
104 |
$blog = (defined('SITE_ID_CURRENT_SITE') ? SITE_ID_CURRENT_SITE : 1);
|
105 |
} else {
|
106 |
$blog = $blog_id;
|
145 |
* Initiate HTTP request
|
146 |
*
|
147 |
* @param string $url Requested URL
|
|
|
148 |
*
|
149 |
* @return WP_Error|array
|
150 |
*
|
151 |
* @access public
|
152 |
*/
|
153 |
+
public static function cURL($url, $params = array(), $timeout = 20) {
|
154 |
$header = array('User-Agent' => AAM_Core_Request::server('HTTP_USER_AGENT'));
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
return wp_remote_request($url, array(
|
157 |
'headers' => $header,
|
158 |
'method' => 'POST',
|
159 |
'body' => $params,
|
|
|
160 |
'timeout' => $timeout
|
161 |
));
|
162 |
}
|
310 |
* @access public
|
311 |
*/
|
312 |
public static function reject($area = 'frontend', $args = array()) {
|
313 |
+
if (AAM_Core_Request::server('REQUEST_METHOD') !== 'POST') {
|
314 |
$object = AAM::getUser()->getObject('redirect');
|
315 |
$type = $object->get("{$area}.redirect.type");
|
316 |
|
317 |
+
if (!empty($type) && ($type === 'login')) {
|
318 |
$redirect = add_query_arg(
|
319 |
array('reason' => 'restricted'),
|
320 |
wp_login_url(AAM_Core_Request::server('REQUEST_URI'))
|
321 |
);
|
322 |
+
} elseif (!empty($type) && ($type !== 'default')) {
|
323 |
$redirect = $object->get("{$area}.redirect.{$type}");
|
324 |
} else { //ConfigPress setup
|
325 |
$redirect = AAM_Core_Config::get(
|
329 |
|
330 |
$doRedirect = true;
|
331 |
|
332 |
+
if ($type === 'page') {
|
333 |
$page = self::getCurrentPost();
|
334 |
+
$doRedirect = (empty($page) || ($page->ID !== intval($redirect)));
|
335 |
+
} elseif ($type === 'url') {
|
336 |
+
$doRedirect = strpos($redirect, AAM_Core_Request::server('REQUEST_URI')) === false;
|
337 |
}
|
338 |
|
339 |
if ($doRedirect) {
|
356 |
* @access public
|
357 |
*/
|
358 |
public static function redirect($rule, $args = null) {
|
359 |
+
$path = wp_parse_url($rule);
|
360 |
if ($path && !empty($path['host'])) {
|
361 |
+
wp_redirect($rule, 307); exit;
|
362 |
} elseif (preg_match('/^[\d]+$/', $rule)) {
|
363 |
+
wp_safe_redirect(get_page_link($rule), 307); exit;
|
364 |
} elseif (is_callable($rule)) {
|
365 |
call_user_func($rule, $args);
|
366 |
} elseif (!empty($args['callback']) && is_callable($args['callback'])) {
|
435 |
} elseif (!empty($wp_query->query['name'])) {
|
436 |
//Important! Cover the scenario of NOT LIST but ALLOW READ
|
437 |
if (!empty($wp_query->posts)) {
|
438 |
+
foreach($wp_query->posts as $p) {
|
439 |
+
if ($p->post_name === $wp_query->query['name']) {
|
440 |
+
$res = $p;
|
441 |
break;
|
442 |
}
|
443 |
}
|
Application/Core/Api/Area.php
CHANGED
@@ -58,7 +58,7 @@ final class AAM_Core_Api_Area {
|
|
58 |
* @return type
|
59 |
*/
|
60 |
public static function isBackend() {
|
61 |
-
return self::get()
|
62 |
}
|
63 |
|
64 |
/**
|
@@ -66,7 +66,7 @@ final class AAM_Core_Api_Area {
|
|
66 |
* @return type
|
67 |
*/
|
68 |
public static function isFrontend() {
|
69 |
-
return self::get()
|
70 |
}
|
71 |
|
72 |
/**
|
@@ -74,6 +74,6 @@ final class AAM_Core_Api_Area {
|
|
74 |
* @return type
|
75 |
*/
|
76 |
public static function isAPI() {
|
77 |
-
return self::get()
|
78 |
}
|
79 |
}
|
58 |
* @return type
|
59 |
*/
|
60 |
public static function isBackend() {
|
61 |
+
return self::get() === self::BACKEND;
|
62 |
}
|
63 |
|
64 |
/**
|
66 |
* @return type
|
67 |
*/
|
68 |
public static function isFrontend() {
|
69 |
+
return self::get() === self::FRONTEND;
|
70 |
}
|
71 |
|
72 |
/**
|
74 |
* @return type
|
75 |
*/
|
76 |
public static function isAPI() {
|
77 |
+
return self::get() === self::API;
|
78 |
}
|
79 |
}
|
Application/Core/Compatibility.php
CHANGED
@@ -67,13 +67,12 @@ class AAM_Core_Compatibility {
|
|
67 |
$changes += self::normalizeOption('single-session', 'core.settings.singleSession', $config);
|
68 |
$changes += self::normalizeOption('brute-force-lockout', 'core.settings.bruteForceLockout', $config);
|
69 |
$changes += self::normalizeOption('inherit-parent-post', 'core.settings.inheritParentPost', $config);
|
70 |
-
//$changes += self::normalizeOption('', '', $config);
|
71 |
|
72 |
if ($changes > 0) {
|
73 |
if (is_multisite()) {
|
74 |
-
|
75 |
} else {
|
76 |
-
|
77 |
}
|
78 |
}
|
79 |
}
|
67 |
$changes += self::normalizeOption('single-session', 'core.settings.singleSession', $config);
|
68 |
$changes += self::normalizeOption('brute-force-lockout', 'core.settings.bruteForceLockout', $config);
|
69 |
$changes += self::normalizeOption('inherit-parent-post', 'core.settings.inheritParentPost', $config);
|
|
|
70 |
|
71 |
if ($changes > 0) {
|
72 |
if (is_multisite()) {
|
73 |
+
AAM_Core_API::updateOption('aam-utilities', $config, 'site');
|
74 |
} else {
|
75 |
+
AAM_Core_API::updateOption('aam-utilities', $config);
|
76 |
}
|
77 |
}
|
78 |
}
|
Application/Core/ConfigPress/Evaluator.php
CHANGED
@@ -95,10 +95,10 @@ class AAM_Core_ConfigPress_Evaluator {
|
|
95 |
|
96 |
if (empty($chunk)) {
|
97 |
continue; //skip empty part
|
98 |
-
} elseif ($chunk
|
99 |
$this->index[] = ++$index;
|
100 |
$queue[] = $this->evaluate();
|
101 |
-
} elseif ($chunk
|
102 |
array_pop($this->index);
|
103 |
$this->index[count($this->index) - 1] = ++$index;
|
104 |
break;
|
@@ -193,7 +193,7 @@ class AAM_Core_ConfigPress_Evaluator {
|
|
193 |
foreach ($this->_operators as $operators) {
|
194 |
$i = 0;
|
195 |
while ($i < count($queue)) {
|
196 |
-
if (!is_bool($queue[$i]) && in_array($queue[$i], $operators)) {
|
197 |
$value = $this->processOperation(
|
198 |
$queue[$i], $queue[$i - 1], $queue[$i + 1]
|
199 |
);
|
95 |
|
96 |
if (empty($chunk)) {
|
97 |
continue; //skip empty part
|
98 |
+
} elseif ($chunk === '(') {
|
99 |
$this->index[] = ++$index;
|
100 |
$queue[] = $this->evaluate();
|
101 |
+
} elseif ($chunk === ')') {
|
102 |
array_pop($this->index);
|
103 |
$this->index[count($this->index) - 1] = ++$index;
|
104 |
break;
|
193 |
foreach ($this->_operators as $operators) {
|
194 |
$i = 0;
|
195 |
while ($i < count($queue)) {
|
196 |
+
if (!is_bool($queue[$i]) && in_array($queue[$i], $operators, true)) {
|
197 |
$value = $this->processOperation(
|
198 |
$queue[$i], $queue[$i - 1], $queue[$i + 1]
|
199 |
);
|
Application/Core/Exporter.php
CHANGED
@@ -86,23 +86,23 @@ class AAM_Core_Exporter {
|
|
86 |
global $wpdb;
|
87 |
|
88 |
foreach($features as $feature) {
|
89 |
-
if ($feature
|
90 |
-
$this->add('_user_roles',
|
91 |
AAM_Core_API::getOption(
|
92 |
$wpdb->get_blog_prefix($this->blog) . 'user_roles',
|
93 |
array(),
|
94 |
$this->blog
|
95 |
)
|
96 |
-
));
|
97 |
-
} elseif ($feature
|
98 |
$this->add(
|
99 |
AAM_Core_Config::OPTION,
|
100 |
-
|
101 |
));
|
102 |
-
} elseif ($feature
|
103 |
$this->add(
|
104 |
'aam-configpress',
|
105 |
-
AAM_Core_ConfigPress::getInstance()->read()
|
106 |
);
|
107 |
} else {
|
108 |
do_action('aam-export-action', 'system', $feature, $this);
|
@@ -116,15 +116,15 @@ class AAM_Core_Exporter {
|
|
116 |
*/
|
117 |
protected function exportRoles($features) {
|
118 |
foreach($features as $feature) {
|
119 |
-
if ($feature
|
120 |
$this->pushData('options', '/^aam_menu_role/');
|
121 |
-
} elseif ($feature
|
122 |
$this->pushData('options', '/^aam_metabox_role/');
|
123 |
-
} elseif ($feature
|
124 |
$this->pushData('options', '/^aam_type_post_role/');
|
125 |
$this->pushData('options', '/^aam_term_[\d]+\|.+_role/');
|
126 |
$this->pushData('postmeta', '/^aam-post-access-role/');
|
127 |
-
} elseif ($feature
|
128 |
$this->pushData('options', '/^aam_redirect_role/');
|
129 |
$this->pushData('options', '/^aam_loginredirect_role/');
|
130 |
$this->pushData('options', '/^aam_logoutredirect_role/');
|
@@ -140,19 +140,19 @@ class AAM_Core_Exporter {
|
|
140 |
global $wpdb;
|
141 |
|
142 |
foreach($features as $feature) {
|
143 |
-
if ($feature
|
144 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_menu/');
|
145 |
-
} elseif ($feature
|
146 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_metabox/');
|
147 |
-
} elseif ($feature
|
148 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_type_post/');
|
149 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_term_[\d]+\|/');
|
150 |
$this->pushData('postmeta', '/^aam-post-access-user/');
|
151 |
-
} elseif ($feature
|
152 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_redirect/');
|
153 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_loginredirect/');
|
154 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_logoutredirect/');
|
155 |
-
} elseif ($feature
|
156 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_capability/');
|
157 |
}
|
158 |
}
|
@@ -164,13 +164,13 @@ class AAM_Core_Exporter {
|
|
164 |
*/
|
165 |
protected function exportVisitor($features) {
|
166 |
foreach($features as $feature) {
|
167 |
-
if ($feature
|
168 |
$this->pushData('options', '/^aam_visitor_metabox/');
|
169 |
-
} elseif ($feature
|
170 |
$this->pushData('options', '/^aam_visitor_type_post/');
|
171 |
$this->pushData('options', '/^aam_visitor_term_/');
|
172 |
$this->pushData('postmeta', '/^aam-post-access-visitor/');
|
173 |
-
} elseif ($feature
|
174 |
$this->pushData('options', '/^aam_visitor_redirect/');
|
175 |
}
|
176 |
}
|
@@ -182,15 +182,15 @@ class AAM_Core_Exporter {
|
|
182 |
*/
|
183 |
protected function exportDefault($features) {
|
184 |
foreach($features as $feature) {
|
185 |
-
if ($feature
|
186 |
$this->pushData('options', '/^aam_menu_default/');
|
187 |
} elseif ($feature == 'metabox') {
|
188 |
$this->pushData('options', '/^aam_metabox_default/');
|
189 |
-
} elseif ($feature
|
190 |
$this->pushData('options', '/^aam_type_post_default/');
|
191 |
$this->pushData('options', '/^aam_term_[\d]+\|.+_default/');
|
192 |
$this->pushData('postmeta', '/^aam-post-access-default/');
|
193 |
-
} elseif ($feature
|
194 |
$this->pushData('options', '/^aam_redirect_default/');
|
195 |
$this->pushData('options', '/^aam_loginredirect_default/');
|
196 |
$this->pushData('options', '/^aam_logoutredirect_default/');
|
86 |
global $wpdb;
|
87 |
|
88 |
foreach($features as $feature) {
|
89 |
+
if ($feature === 'roles') {
|
90 |
+
$this->add('_user_roles', base64_encode(json_encode(
|
91 |
AAM_Core_API::getOption(
|
92 |
$wpdb->get_blog_prefix($this->blog) . 'user_roles',
|
93 |
array(),
|
94 |
$this->blog
|
95 |
)
|
96 |
+
)));
|
97 |
+
} elseif ($feature === 'utilities') {
|
98 |
$this->add(
|
99 |
AAM_Core_Config::OPTION,
|
100 |
+
json_encode(AAM_Core_API::getOption(AAM_Core_Config::OPTION)
|
101 |
));
|
102 |
+
} elseif ($feature === 'configpress') {
|
103 |
$this->add(
|
104 |
'aam-configpress',
|
105 |
+
base64_encode(AAM_Core_ConfigPress::getInstance()->read())
|
106 |
);
|
107 |
} else {
|
108 |
do_action('aam-export-action', 'system', $feature, $this);
|
116 |
*/
|
117 |
protected function exportRoles($features) {
|
118 |
foreach($features as $feature) {
|
119 |
+
if ($feature === 'menu') {
|
120 |
$this->pushData('options', '/^aam_menu_role/');
|
121 |
+
} elseif ($feature === 'metabox') {
|
122 |
$this->pushData('options', '/^aam_metabox_role/');
|
123 |
+
} elseif ($feature === 'post') {
|
124 |
$this->pushData('options', '/^aam_type_post_role/');
|
125 |
$this->pushData('options', '/^aam_term_[\d]+\|.+_role/');
|
126 |
$this->pushData('postmeta', '/^aam-post-access-role/');
|
127 |
+
} elseif ($feature === 'redirect') {
|
128 |
$this->pushData('options', '/^aam_redirect_role/');
|
129 |
$this->pushData('options', '/^aam_loginredirect_role/');
|
130 |
$this->pushData('options', '/^aam_logoutredirect_role/');
|
140 |
global $wpdb;
|
141 |
|
142 |
foreach($features as $feature) {
|
143 |
+
if ($feature === 'menu') {
|
144 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_menu/');
|
145 |
+
} elseif ($feature === 'metabox') {
|
146 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_metabox/');
|
147 |
+
} elseif ($feature === 'post') {
|
148 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_type_post/');
|
149 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_term_[\d]+\|/');
|
150 |
$this->pushData('postmeta', '/^aam-post-access-user/');
|
151 |
+
} elseif ($feature === 'redirect') {
|
152 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_redirect/');
|
153 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_loginredirect/');
|
154 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_logoutredirect/');
|
155 |
+
} elseif ($feature === 'capability') {
|
156 |
$this->pushData('usermeta', '/^' . $wpdb->prefix . 'aam_capability/');
|
157 |
}
|
158 |
}
|
164 |
*/
|
165 |
protected function exportVisitor($features) {
|
166 |
foreach($features as $feature) {
|
167 |
+
if ($feature === 'metabox') {
|
168 |
$this->pushData('options', '/^aam_visitor_metabox/');
|
169 |
+
} elseif ($feature === 'post') {
|
170 |
$this->pushData('options', '/^aam_visitor_type_post/');
|
171 |
$this->pushData('options', '/^aam_visitor_term_/');
|
172 |
$this->pushData('postmeta', '/^aam-post-access-visitor/');
|
173 |
+
} elseif ($feature === 'redirect') {
|
174 |
$this->pushData('options', '/^aam_visitor_redirect/');
|
175 |
}
|
176 |
}
|
182 |
*/
|
183 |
protected function exportDefault($features) {
|
184 |
foreach($features as $feature) {
|
185 |
+
if ($feature === 'menu') {
|
186 |
$this->pushData('options', '/^aam_menu_default/');
|
187 |
} elseif ($feature == 'metabox') {
|
188 |
$this->pushData('options', '/^aam_metabox_default/');
|
189 |
+
} elseif ($feature === 'post') {
|
190 |
$this->pushData('options', '/^aam_type_post_default/');
|
191 |
$this->pushData('options', '/^aam_term_[\d]+\|.+_default/');
|
192 |
$this->pushData('postmeta', '/^aam-post-access-default/');
|
193 |
+
} elseif ($feature === 'redirect') {
|
194 |
$this->pushData('options', '/^aam_redirect_default/');
|
195 |
$this->pushData('options', '/^aam_loginredirect_default/');
|
196 |
$this->pushData('options', '/^aam_logoutredirect_default/');
|
Application/Core/Importer.php
CHANGED
@@ -42,19 +42,28 @@ class AAM_Core_Importer {
|
|
42 |
* @return type
|
43 |
*/
|
44 |
public function run() {
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
-
return
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -122,8 +131,19 @@ class AAM_Core_Importer {
|
|
122 |
* @return void
|
123 |
*/
|
124 |
protected function prepareValue($value) {
|
125 |
-
if (
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
|
129 |
return $value;
|
42 |
* @return type
|
43 |
*/
|
44 |
public function run() {
|
45 |
+
$response = array('status' => 'success');
|
46 |
+
|
47 |
+
if (version_compare($this->input->version, AAM_Core_API::version()) === 0) {
|
48 |
+
foreach($this->input->dataset as $table => $data) {
|
49 |
+
if ($table === '_options') {
|
50 |
+
$this->insertOptions($data);
|
51 |
+
} elseif ($table === '_postmeta') {
|
52 |
+
$this->insertPostmeta($data);
|
53 |
+
} elseif ($table === '_usermeta') {
|
54 |
+
$this->insertUsermeta($data);
|
55 |
+
} else {
|
56 |
+
do_action('aam-import-action', $table, $data);
|
57 |
+
}
|
58 |
}
|
59 |
+
} else {
|
60 |
+
$response = array(
|
61 |
+
'status' => 'failure',
|
62 |
+
'reason' => __('Version of exported settings do not match current AAM version', AAM_KEY)
|
63 |
+
);
|
64 |
}
|
65 |
|
66 |
+
return $response;
|
67 |
}
|
68 |
|
69 |
/**
|
131 |
* @return void
|
132 |
*/
|
133 |
protected function prepareValue($value) {
|
134 |
+
if (is_string($value)) {
|
135 |
+
// #1. Check is string base64 encoded
|
136 |
+
$decoded = base64_decode($value);
|
137 |
+
|
138 |
+
if ($decoded !== false) {
|
139 |
+
$value = $decoded;
|
140 |
+
}
|
141 |
+
|
142 |
+
// #2. Check if string is json
|
143 |
+
$json = json_decode($value, true);
|
144 |
+
if (json_last_error() == JSON_ERROR_NONE) {
|
145 |
+
$value = $json;
|
146 |
+
}
|
147 |
}
|
148 |
|
149 |
return $value;
|
Application/Core/JwtAuth.php
CHANGED
@@ -85,7 +85,7 @@ class AAM_Core_JwtAuth {
|
|
85 |
|
86 |
$response = new WP_REST_Response();
|
87 |
|
88 |
-
if ($result['status']
|
89 |
try {
|
90 |
$token = $this->generateJWT($result['user']->ID);
|
91 |
|
@@ -121,9 +121,11 @@ class AAM_Core_JwtAuth {
|
|
121 |
* @throws Exception
|
122 |
*/
|
123 |
public function generateJWT($userId) {
|
124 |
-
$key
|
125 |
-
$expire
|
126 |
-
|
|
|
|
|
127 |
if ($key) {
|
128 |
$claims = apply_filters('aam-jwt-claims-filter', array(
|
129 |
"iat" => time(),
|
@@ -131,7 +133,18 @@ class AAM_Core_JwtAuth {
|
|
131 |
'userId' => $userId,
|
132 |
));
|
133 |
|
134 |
-
$token = Firebase\JWT\JWT::encode($claims, $key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
} else {
|
136 |
Throw new Exception(
|
137 |
__('JWT Authentication is enabled but secret key is not defined', AAM_KEY)
|
@@ -149,14 +162,7 @@ class AAM_Core_JwtAuth {
|
|
149 |
* @param type $result
|
150 |
*/
|
151 |
public function determineCurrentUser($result) {
|
152 |
-
|
153 |
-
$token = null;
|
154 |
-
|
155 |
-
if (isset($_SERVER['HTTP_AUTHENTICATION'])) {
|
156 |
-
$token = preg_replace('/^Bearer /', '', $_SERVER['HTTP_AUTHENTICATION']);
|
157 |
-
}
|
158 |
-
|
159 |
-
$token = apply_filters('aam-jwt-authentication-header-filter', $token);
|
160 |
$key = AAM_Core_Config::get('authentication.jwt.secret', SECURE_AUTH_KEY);
|
161 |
|
162 |
if ($token) {
|
@@ -169,7 +175,6 @@ class AAM_Core_JwtAuth {
|
|
169 |
$result = $claims->userId;
|
170 |
}
|
171 |
} catch (Exception $ex) {
|
172 |
-
echo $ex->getMessage();
|
173 |
// Do nothing
|
174 |
}
|
175 |
}
|
@@ -177,6 +182,36 @@ class AAM_Core_JwtAuth {
|
|
177 |
return $result;
|
178 |
}
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
/**
|
181 |
* Get single instance of itself
|
182 |
*
|
85 |
|
86 |
$response = new WP_REST_Response();
|
87 |
|
88 |
+
if ($result['status'] === 'success') { // generate token
|
89 |
try {
|
90 |
$token = $this->generateJWT($result['user']->ID);
|
91 |
|
121 |
* @throws Exception
|
122 |
*/
|
123 |
public function generateJWT($userId) {
|
124 |
+
$key = AAM_Core_Config::get('authentication.jwt.secret', SECURE_AUTH_KEY);
|
125 |
+
$expire = AAM_Core_Config::get('authentication.jwt.expires', 86400);
|
126 |
+
$container = AAM_Core_Config::get('authentication.jwt.container', 'header');
|
127 |
+
$alg = AAM_Core_Config::get('authentication.jwt.algorithm', 'HS256');
|
128 |
+
|
129 |
if ($key) {
|
130 |
$claims = apply_filters('aam-jwt-claims-filter', array(
|
131 |
"iat" => time(),
|
133 |
'userId' => $userId,
|
134 |
));
|
135 |
|
136 |
+
$token = Firebase\JWT\JWT::encode($claims, $key, $alg);
|
137 |
+
|
138 |
+
if ($container === 'cookie') {
|
139 |
+
setcookie(
|
140 |
+
'aam-jwt',
|
141 |
+
$token,
|
142 |
+
time() + $expire, // 3 hours
|
143 |
+
'/',
|
144 |
+
parse_url(get_bloginfo('url'), PHP_URL_HOST),
|
145 |
+
is_ssl()
|
146 |
+
);
|
147 |
+
}
|
148 |
} else {
|
149 |
Throw new Exception(
|
150 |
__('JWT Authentication is enabled but secret key is not defined', AAM_KEY)
|
162 |
* @param type $result
|
163 |
*/
|
164 |
public function determineCurrentUser($result) {
|
165 |
+
$token = $this->extractJwt();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
$key = AAM_Core_Config::get('authentication.jwt.secret', SECURE_AUTH_KEY);
|
167 |
|
168 |
if ($token) {
|
175 |
$result = $claims->userId;
|
176 |
}
|
177 |
} catch (Exception $ex) {
|
|
|
178 |
// Do nothing
|
179 |
}
|
180 |
}
|
182 |
return $result;
|
183 |
}
|
184 |
|
185 |
+
/**
|
186 |
+
*
|
187 |
+
* @return type
|
188 |
+
*/
|
189 |
+
protected function extractJwt() {
|
190 |
+
$container = AAM_Core_Config::get('authentication.jwt.container', 'header');
|
191 |
+
|
192 |
+
if ($container === 'header') {
|
193 |
+
$jwt = apply_filters(
|
194 |
+
'aam-jwt-authentication-header-filter',
|
195 |
+
AAM_Core_Request::server('HTTP_AUTHENTICATION')
|
196 |
+
);
|
197 |
+
} elseif ($container === 'cookie') {
|
198 |
+
$jwt = apply_filters(
|
199 |
+
'aam-jwt-authentication-cookie-filter',
|
200 |
+
AAM_Core_Request::cookie('aam-jwt')
|
201 |
+
);
|
202 |
+
} else {
|
203 |
+
AAM_Core_Console::add(
|
204 |
+
sprint_f(
|
205 |
+
__('Invalid value %s for property %s', AAM_KEY),
|
206 |
+
$container,
|
207 |
+
'authentication.jwt.container'
|
208 |
+
)
|
209 |
+
);
|
210 |
+
}
|
211 |
+
|
212 |
+
return (!empty($jwt) ? preg_replace('/^Bearer /', '', $jwt) : null);
|
213 |
+
}
|
214 |
+
|
215 |
/**
|
216 |
* Get single instance of itself
|
217 |
*
|
Application/Core/Login.php
CHANGED
@@ -80,6 +80,17 @@ class AAM_Core_Login {
|
|
80 |
// Delete User Switch flag in case admin is inpersonating user
|
81 |
AAM_Core_API::deleteOption('aam-user-switch-' . $user->ID);
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
if ($this->aamLogin === false) {
|
84 |
$redirect = $this->getLoginRedirect($user);
|
85 |
|
@@ -105,6 +116,9 @@ class AAM_Core_Login {
|
|
105 |
$redirect = $object->get("logout.redirect.{$type}");
|
106 |
AAM_Core_API::redirect($redirect);
|
107 |
}
|
|
|
|
|
|
|
108 |
}
|
109 |
|
110 |
/**
|
@@ -119,7 +133,7 @@ class AAM_Core_Login {
|
|
119 |
public function authenticateUser($user) {
|
120 |
if (is_a($user, 'WP_User')) {
|
121 |
// First check if user is blocked
|
122 |
-
if ($user->user_status
|
123 |
$user = new WP_Error();
|
124 |
|
125 |
$message = '[ERROR]: User is locked. Please contact your website ';
|
@@ -154,7 +168,7 @@ class AAM_Core_Login {
|
|
154 |
$reason = AAM_Core_Request::get('reason');
|
155 |
|
156 |
if (empty($message)) {
|
157 |
-
if ($reason
|
158 |
$message = AAM_Core_Config::get(
|
159 |
'security.redirect.message',
|
160 |
'<p class="message">' .
|
80 |
// Delete User Switch flag in case admin is inpersonating user
|
81 |
AAM_Core_API::deleteOption('aam-user-switch-' . $user->ID);
|
82 |
|
83 |
+
// Experimental feature. Track user session
|
84 |
+
if (AAM::api()->getConfig('core.session.tracking', false)) {
|
85 |
+
$ttl = AAM::api()->getConfig(
|
86 |
+
"core.session.user.{$this->ID}.ttl",
|
87 |
+
AAM::api()->getConfig("core.session.user.ttl", null)
|
88 |
+
);
|
89 |
+
if (!empty($ttl)) {
|
90 |
+
add_user_meta($user->ID, 'aam-authenticated-timestamp', time());
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
if ($this->aamLogin === false) {
|
95 |
$redirect = $this->getLoginRedirect($user);
|
96 |
|
116 |
$redirect = $object->get("logout.redirect.{$type}");
|
117 |
AAM_Core_API::redirect($redirect);
|
118 |
}
|
119 |
+
|
120 |
+
// get user login timestamp
|
121 |
+
delete_user_meta(AAM::getUser()->ID, 'aam-authenticated-timestamp');
|
122 |
}
|
123 |
|
124 |
/**
|
133 |
public function authenticateUser($user) {
|
134 |
if (is_a($user, 'WP_User')) {
|
135 |
// First check if user is blocked
|
136 |
+
if ($user->user_status === 1) {
|
137 |
$user = new WP_Error();
|
138 |
|
139 |
$message = '[ERROR]: User is locked. Please contact your website ';
|
168 |
$reason = AAM_Core_Request::get('reason');
|
169 |
|
170 |
if (empty($message)) {
|
171 |
+
if ($reason === 'restricted') {
|
172 |
$message = AAM_Core_Config::get(
|
173 |
'security.redirect.message',
|
174 |
'<p class="message">' .
|
Application/Core/Media.php
CHANGED
@@ -64,8 +64,8 @@ class AAM_Core_Media {
|
|
64 |
*
|
65 |
*/
|
66 |
protected function initialize() {
|
67 |
-
$media = filter_input(INPUT_GET, 'aam-media');
|
68 |
-
$request = ($media
|
69 |
$root = AAM_Core_Request::server('DOCUMENT_ROOT');
|
70 |
|
71 |
$this->request = str_replace('\\', '/', $root . $request);
|
@@ -89,7 +89,7 @@ class AAM_Core_Media {
|
|
89 |
} else {
|
90 |
$read = $media->has('frontend.read');
|
91 |
$others = $media->has('frontend.read_others');
|
92 |
-
$author = ($media->post_author
|
93 |
|
94 |
if ($read || ($others && !$author)) {
|
95 |
$args = array(
|
@@ -97,8 +97,10 @@ class AAM_Core_Media {
|
|
97 |
'action' => "{$area}.read",
|
98 |
'post' => $media->getPost()
|
99 |
);
|
100 |
-
|
101 |
-
|
|
|
|
|
102 |
do_action('aam-access-rejected-action', $area, $args);
|
103 |
$this->printMedia(get_post($default));
|
104 |
} else {
|
64 |
*
|
65 |
*/
|
66 |
protected function initialize() {
|
67 |
+
$media = filter_input(INPUT_GET, 'aam-media', FILTER_VALIDATE_INT);
|
68 |
+
$request = ($media !== 1 ? $media : urldecode(AAM_Core_Request::server('REQUEST_URI')));
|
69 |
$root = AAM_Core_Request::server('DOCUMENT_ROOT');
|
70 |
|
71 |
$this->request = str_replace('\\', '/', $root . $request);
|
89 |
} else {
|
90 |
$read = $media->has('frontend.read');
|
91 |
$others = $media->has('frontend.read_others');
|
92 |
+
$author = ($media->post_author === get_current_user_id());
|
93 |
|
94 |
if ($read || ($others && !$author)) {
|
95 |
$args = array(
|
97 |
'action' => "{$area}.read",
|
98 |
'post' => $media->getPost()
|
99 |
);
|
100 |
+
|
101 |
+
$default = AAM_Core_Config::get('media.default.placeholder');
|
102 |
+
|
103 |
+
if ($default) {
|
104 |
do_action('aam-access-rejected-action', $area, $args);
|
105 |
$this->printMedia(get_post($default));
|
106 |
} else {
|
Application/Core/Object/Cache.php
CHANGED
@@ -37,7 +37,7 @@ class AAM_Core_Object_Cache extends AAM_Core_Object {
|
|
37 |
parent::__construct($subject);
|
38 |
|
39 |
if (!AAM::isAAM()
|
40 |
-
&& (AAM_Core_Config::get('core.cache.status', 'enabled')
|
41 |
// Register shutdown hook
|
42 |
add_action('shutdown', array($this, 'save'));
|
43 |
|
@@ -109,7 +109,9 @@ class AAM_Core_Object_Cache extends AAM_Core_Object {
|
|
109 |
* @access public
|
110 |
*/
|
111 |
public function inheritFromParent(){
|
112 |
-
|
|
|
|
|
113 |
$option = $subject->getObject('cache')->getOption();
|
114 |
} else {
|
115 |
$option = array();
|
37 |
parent::__construct($subject);
|
38 |
|
39 |
if (!AAM::isAAM()
|
40 |
+
&& (AAM_Core_Config::get('core.cache.status', 'enabled') === 'enabled')) {
|
41 |
// Register shutdown hook
|
42 |
add_action('shutdown', array($this, 'save'));
|
43 |
|
109 |
* @access public
|
110 |
*/
|
111 |
public function inheritFromParent(){
|
112 |
+
$subject = $this->getParent();
|
113 |
+
|
114 |
+
if (is_a($subject, 'AAM_Core_Subject')){
|
115 |
$option = $subject->getObject('cache')->getOption();
|
116 |
} else {
|
117 |
$option = array();
|
Application/Core/Object/Menu.php
CHANGED
@@ -157,7 +157,7 @@ class AAM_Core_Object_Menu extends AAM_Core_Object {
|
|
157 |
if (is_array($submenu)) {
|
158 |
foreach($submenu as $parent => $subs) {
|
159 |
foreach($subs as $sub) {
|
160 |
-
if ($sub[2]
|
161 |
$result = $parent;
|
162 |
break;
|
163 |
}
|
157 |
if (is_array($submenu)) {
|
158 |
foreach($submenu as $parent => $subs) {
|
159 |
foreach($subs as $sub) {
|
160 |
+
if ($sub[2] === $search) {
|
161 |
$result = $parent;
|
162 |
break;
|
163 |
}
|
Application/Core/Object/Metabox.php
CHANGED
@@ -89,7 +89,7 @@ class AAM_Core_Object_Metabox extends AAM_Core_Object {
|
|
89 |
|
90 |
if (is_array($wp_meta_boxes)) {
|
91 |
foreach ($wp_meta_boxes as $screen_id => $zones) {
|
92 |
-
if ($screen
|
93 |
$this->filterZones($zones, $screen_id);
|
94 |
}
|
95 |
}
|
89 |
|
90 |
if (is_array($wp_meta_boxes)) {
|
91 |
foreach ($wp_meta_boxes as $screen_id => $zones) {
|
92 |
+
if ($screen === $screen_id) {
|
93 |
$this->filterZones($zones, $screen_id);
|
94 |
}
|
95 |
}
|
Application/Core/Object/Post.php
CHANGED
@@ -45,7 +45,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
45 |
}
|
46 |
|
47 |
// Do not initialize settings for posts that are about to be created
|
48 |
-
if ($this->getPost() && ($this->getPost()->post_status
|
49 |
$this->read();
|
50 |
}
|
51 |
}
|
@@ -121,7 +121,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
121 |
'core.cache.post.levels', array('role', 'visitor', 'user')
|
122 |
);
|
123 |
|
124 |
-
return is_array($config) && in_array($subject::UID, $config);
|
125 |
}
|
126 |
|
127 |
/**
|
@@ -162,7 +162,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
162 |
|
163 |
// Very specific WP case. According to the WP core, you are not allowed to
|
164 |
// set meta for revision, so let's bypass this constrain.
|
165 |
-
if ($this->getPost()->post_type
|
166 |
$result = update_metadata(
|
167 |
'post', $this->getPost()->ID, $this->getOptionName(), $option
|
168 |
);
|
@@ -191,7 +191,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
191 |
|
192 |
// Very specific WP case. According to the WP core, you are not allowed to
|
193 |
// set meta for revision, so let's bypass this constrain.
|
194 |
-
if ($this->getPost()->post_type
|
195 |
$result = delete_metadata(
|
196 |
'post', $this->getPost()->ID, $this->getOptionName()
|
197 |
);
|
@@ -201,7 +201,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
201 |
|
202 |
return $result;
|
203 |
}
|
204 |
-
|
205 |
/**
|
206 |
* Set Post
|
207 |
*
|
@@ -244,7 +244,8 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
244 |
public function has($property) {
|
245 |
$option = $this->getOption();
|
246 |
|
247 |
-
return (array_key_exists($property, $option)
|
|
|
248 |
}
|
249 |
|
250 |
/**
|
@@ -279,7 +280,7 @@ class AAM_Core_Object_Post extends AAM_Core_Object {
|
|
279 |
|
280 |
// Very specific WP case. According to the WP core, you are not allowed to
|
281 |
// set meta for revision, so let's bypass this constrain.
|
282 |
-
if ($this->getPost()->post_type
|
283 |
$result = update_metadata(
|
284 |
'post', $this->getPost()->ID, $this->getOptionName(), $option
|
285 |
);
|
45 |
}
|
46 |
|
47 |
// Do not initialize settings for posts that are about to be created
|
48 |
+
if ($this->getPost() && ($this->getPost()->post_status !== 'auto-draft')) {
|
49 |
$this->read();
|
50 |
}
|
51 |
}
|
121 |
'core.cache.post.levels', array('role', 'visitor', 'user')
|
122 |
);
|
123 |
|
124 |
+
return is_array($config) && in_array($subject::UID, $config, true);
|
125 |
}
|
126 |
|
127 |
/**
|
162 |
|
163 |
// Very specific WP case. According to the WP core, you are not allowed to
|
164 |
// set meta for revision, so let's bypass this constrain.
|
165 |
+
if ($this->getPost()->post_type === 'revision') {
|
166 |
$result = update_metadata(
|
167 |
'post', $this->getPost()->ID, $this->getOptionName(), $option
|
168 |
);
|
191 |
|
192 |
// Very specific WP case. According to the WP core, you are not allowed to
|
193 |
// set meta for revision, so let's bypass this constrain.
|
194 |
+
if ($this->getPost()->post_type === 'revision') {
|
195 |
$result = delete_metadata(
|
196 |
'post', $this->getPost()->ID, $this->getOptionName()
|
197 |
);
|
201 |
|
202 |
return $result;
|
203 |
}
|
204 |
+
|
205 |
/**
|
206 |
* Set Post
|
207 |
*
|
244 |
public function has($property) {
|
245 |
$option = $this->getOption();
|
246 |
|
247 |
+
return (array_key_exists($property, $option)
|
248 |
+
&& in_array($option[$property], array(1, '1', true, "true"), true));
|
249 |
}
|
250 |
|
251 |
/**
|
280 |
|
281 |
// Very specific WP case. According to the WP core, you are not allowed to
|
282 |
// set meta for revision, so let's bypass this constrain.
|
283 |
+
if ($this->getPost()->post_type === 'revision') {
|
284 |
$result = update_metadata(
|
285 |
'post', $this->getPost()->ID, $this->getOptionName(), $option
|
286 |
);
|
Application/Core/Object/Visibility.php
CHANGED
@@ -65,7 +65,7 @@ class AAM_Core_Object_Visibility extends AAM_Core_Object {
|
|
65 |
$option = $this->getOption();
|
66 |
}
|
67 |
|
68 |
-
if (in_array($subject::UID, array('user', 'visitor'))) {
|
69 |
$subject->getObject('cache')->add(
|
70 |
'visibility', 0, empty($option) ? false : $option
|
71 |
);
|
@@ -90,7 +90,7 @@ class AAM_Core_Object_Visibility extends AAM_Core_Object {
|
|
90 |
);
|
91 |
|
92 |
foreach($options as $key => $value) {
|
93 |
-
if (in_array($key, $listOptions)) {
|
94 |
$filtered[$key] = $value;
|
95 |
}
|
96 |
}
|
65 |
$option = $this->getOption();
|
66 |
}
|
67 |
|
68 |
+
if (in_array($subject::UID, array('user', 'visitor'), true)) {
|
69 |
$subject->getObject('cache')->add(
|
70 |
'visibility', 0, empty($option) ? false : $option
|
71 |
);
|
90 |
);
|
91 |
|
92 |
foreach($options as $key => $value) {
|
93 |
+
if (in_array($key, $listOptions, true)) {
|
94 |
$filtered[$key] = $value;
|
95 |
}
|
96 |
}
|
Application/Core/Server.php
CHANGED
@@ -34,7 +34,7 @@ final class AAM_Core_Server {
|
|
34 |
public static function register() {
|
35 |
//prepare check params
|
36 |
$params = array(
|
37 |
-
'domain' =>
|
38 |
'version' => AAM_Core_API::version(),
|
39 |
'uid' => AAM_Core_API::getOption('aam-uid', null, 'site')
|
40 |
);
|
@@ -56,7 +56,7 @@ final class AAM_Core_Server {
|
|
56 |
|
57 |
//prepare check params
|
58 |
$params = array(
|
59 |
-
'domain' =>
|
60 |
'version' => AAM_Core_API::version(),
|
61 |
'uid' => AAM_Core_API::getOption('aam-uid', null, 'site'),
|
62 |
'licenses' => $repository->getCommercialLicenses(false)
|
@@ -85,7 +85,7 @@ final class AAM_Core_Server {
|
|
85 |
* @access public
|
86 |
*/
|
87 |
public static function download($license) {
|
88 |
-
$domain =
|
89 |
|
90 |
$response = self::send(
|
91 |
'/download',
|
@@ -121,7 +121,7 @@ final class AAM_Core_Server {
|
|
121 |
protected static function send($request, $params, $timeout = 10) {
|
122 |
$response = self::parseResponse(
|
123 |
AAM_Core_API::cURL(
|
124 |
-
self::SERVER_URL . $request,
|
125 |
)
|
126 |
);
|
127 |
|
@@ -134,9 +134,9 @@ final class AAM_Core_Server {
|
|
134 |
*/
|
135 |
protected static function parseResponse($response) {
|
136 |
if (!is_wp_error($response)) {
|
137 |
-
if ($response['response']['code']
|
138 |
$response = json_decode($response['body']);
|
139 |
-
if (
|
140 |
AAM_Core_API::updateOption('aam-uid', $response->uid, 'site');
|
141 |
}
|
142 |
} else {
|
34 |
public static function register() {
|
35 |
//prepare check params
|
36 |
$params = array(
|
37 |
+
'domain' => wp_parse_url(site_url(), PHP_URL_HOST),
|
38 |
'version' => AAM_Core_API::version(),
|
39 |
'uid' => AAM_Core_API::getOption('aam-uid', null, 'site')
|
40 |
);
|
56 |
|
57 |
//prepare check params
|
58 |
$params = array(
|
59 |
+
'domain' => wp_parse_url(site_url(), PHP_URL_HOST),
|
60 |
'version' => AAM_Core_API::version(),
|
61 |
'uid' => AAM_Core_API::getOption('aam-uid', null, 'site'),
|
62 |
'licenses' => $repository->getCommercialLicenses(false)
|
85 |
* @access public
|
86 |
*/
|
87 |
public static function download($license) {
|
88 |
+
$domain = wp_parse_url(site_url(), PHP_URL_HOST);
|
89 |
|
90 |
$response = self::send(
|
91 |
'/download',
|
121 |
protected static function send($request, $params, $timeout = 10) {
|
122 |
$response = self::parseResponse(
|
123 |
AAM_Core_API::cURL(
|
124 |
+
self::SERVER_URL . $request, $params, $timeout
|
125 |
)
|
126 |
);
|
127 |
|
134 |
*/
|
135 |
protected static function parseResponse($response) {
|
136 |
if (!is_wp_error($response)) {
|
137 |
+
if (intval($response['response']['code']) === 200) {
|
138 |
$response = json_decode($response['body']);
|
139 |
+
if (isset($response->uid)) {
|
140 |
AAM_Core_API::updateOption('aam-uid', $response->uid, 'site');
|
141 |
}
|
142 |
} else {
|
Application/Core/Subject.php
CHANGED
@@ -212,7 +212,7 @@ abstract class AAM_Core_Subject {
|
|
212 |
|
213 |
$object = apply_filters('aam-object-filter', $object, $type, $id, $this);
|
214 |
|
215 |
-
if (is_a($object, 'AAM_Core_Object')) {
|
216 |
$this->_objects[$type][$id] = $object;
|
217 |
}
|
218 |
} else {
|
@@ -318,7 +318,9 @@ abstract class AAM_Core_Subject {
|
|
318 |
* @access public
|
319 |
*/
|
320 |
public function inheritFromParent($object, $id = '', $param = null){
|
321 |
-
|
|
|
|
|
322 |
$option = $subject->getObject($object, $id, $param)->getOption();
|
323 |
} else {
|
324 |
$option = null;
|
212 |
|
213 |
$object = apply_filters('aam-object-filter', $object, $type, $id, $this);
|
214 |
|
215 |
+
if (is_a($object, 'AAM_Core_Object') && !AAM::isAAM()) {
|
216 |
$this->_objects[$type][$id] = $object;
|
217 |
}
|
218 |
} else {
|
318 |
* @access public
|
319 |
*/
|
320 |
public function inheritFromParent($object, $id = '', $param = null){
|
321 |
+
$subject = $this->getParent();
|
322 |
+
|
323 |
+
if (is_a($subject, 'AAM_Core_Subject')){
|
324 |
$option = $subject->getObject($object, $id, $param)->getOption();
|
325 |
} else {
|
326 |
$option = null;
|
Application/Core/Subject/User.php
CHANGED
@@ -37,26 +37,46 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
|
|
37 |
|
38 |
/**
|
39 |
*
|
40 |
-
* @param type $id
|
41 |
*/
|
42 |
-
public function
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
-
if
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
}
|
54 |
-
|
55 |
-
//check if user's role expired
|
56 |
-
$roleExpire = get_user_option('aam-role-expires');
|
57 |
-
if ($roleExpire && ($roleExpire <= time())) {
|
58 |
-
$this->restoreRoles();
|
59 |
-
}
|
60 |
}
|
61 |
}
|
62 |
|
@@ -162,7 +182,7 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
|
|
162 |
$subject->allcaps = $allcaps;
|
163 |
$subject->caps = $caps;
|
164 |
|
165 |
-
if (wp_get_current_user()->ID
|
166 |
wp_get_current_user()->allcaps = $allcaps;
|
167 |
wp_get_current_user()->caps = $caps;
|
168 |
}
|
@@ -247,7 +267,7 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
|
|
247 |
* @return void
|
248 |
*/
|
249 |
public function resetObject($object) {
|
250 |
-
if ($object
|
251 |
$result = delete_user_option($this->getId(), self::AAM_CAPKEY);
|
252 |
} else {
|
253 |
$result = $this->deleteOption($object);
|
37 |
|
38 |
/**
|
39 |
*
|
|
|
40 |
*/
|
41 |
+
public function validateUserStatus() {
|
42 |
+
//check if user is blocked
|
43 |
+
if ($this->user_status === 1) {
|
44 |
+
wp_logout();
|
45 |
+
}
|
46 |
+
|
47 |
+
//check if user is expired
|
48 |
+
$expired = get_user_option('aam_user_expiration', $this->ID);
|
49 |
+
if (!empty($expired)) {
|
50 |
+
$parts = explode('|', $expired);
|
51 |
+
if ($parts[0] <= date('Y-m-d H:i:s')) {
|
52 |
+
$this->triggerExpiredUserAction($parts);
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
//check if user's role expired
|
57 |
+
$roleExpire = get_user_option('aam-role-expires', $this->ID);
|
58 |
+
if ($roleExpire && ($roleExpire <= time())) {
|
59 |
+
$this->restoreRoles();
|
60 |
+
}
|
61 |
|
62 |
+
//finally check if session tracking is enabled and if so, check if used
|
63 |
+
//has to be logged out
|
64 |
+
if (AAM::api()->getConfig('core.session.tracking', false)) {
|
65 |
+
$ttl = AAM::api()->getConfig(
|
66 |
+
"core.session.user.{$this->ID}.ttl",
|
67 |
+
AAM::api()->getConfig("core.session.user.ttl", null)
|
68 |
+
);
|
69 |
+
|
70 |
+
if (!empty($ttl)) {
|
71 |
+
$timestamp = get_user_meta(
|
72 |
+
$this->ID, 'aam-authenticated-timestamp', true
|
73 |
+
);
|
74 |
+
|
75 |
+
if ($timestamp && ($timestamp + intval($ttl) <= time())) {
|
76 |
+
delete_user_meta($this->ID, 'aam-authenticated-timestamp');
|
77 |
+
wp_logout();
|
78 |
}
|
79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
}
|
82 |
|
182 |
$subject->allcaps = $allcaps;
|
183 |
$subject->caps = $caps;
|
184 |
|
185 |
+
if (wp_get_current_user()->ID === $subject->ID) {
|
186 |
wp_get_current_user()->allcaps = $allcaps;
|
187 |
wp_get_current_user()->caps = $caps;
|
188 |
}
|
267 |
* @return void
|
268 |
*/
|
269 |
public function resetObject($object) {
|
270 |
+
if ($object === 'capability') {
|
271 |
$result = delete_user_option($this->getId(), self::AAM_CAPKEY);
|
272 |
} else {
|
273 |
$result = $this->deleteOption($object);
|
Application/Extension/List.php
CHANGED
@@ -15,20 +15,11 @@ class AAM_Extension_List {
|
|
15 |
*/
|
16 |
public static function get() {
|
17 |
return array(
|
18 |
-
'AAM_COMPLETE_PACKAGE' => array(
|
19 |
-
'title' => 'Complete Package',
|
20 |
-
'id' => 'AAM_COMPLETE_PACKAGE',
|
21 |
-
'type' => 'commercial',
|
22 |
-
'description' => 'Get the complete list of all available premium extensions in one package. Any new premium extensions in the future will be available for no additional cost.',
|
23 |
-
'url' => 'https://aamplugin.com/complete-package',
|
24 |
-
'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null),
|
25 |
-
'latest' => '3.8.5'
|
26 |
-
),
|
27 |
'AAM_PLUS_PACKAGE' => array(
|
28 |
'title' => 'Plus Package',
|
29 |
'id' => 'AAM_PLUS_PACKAGE',
|
30 |
'type' => 'commercial',
|
31 |
-
'description' => '
|
32 |
'url' => 'https://aamplugin.com/extension/plus-package',
|
33 |
'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null),
|
34 |
'latest' => '3.7.8'
|
@@ -37,7 +28,7 @@ class AAM_Extension_List {
|
|
37 |
'title' => 'IP Check',
|
38 |
'id' => 'AAM_IP_CHECK',
|
39 |
'type' => 'commercial',
|
40 |
-
'description' => 'Manage access to your
|
41 |
'url' => 'https://aamplugin.com/extension/ip-check',
|
42 |
'version' => (defined('AAM_IP_CHECK') ? constant('AAM_IP_CHECK') : null),
|
43 |
'latest' => '2.0'
|
@@ -46,7 +37,7 @@ class AAM_Extension_List {
|
|
46 |
'title' => 'Role Hierarchy',
|
47 |
'id' => 'AAM_ROLE_HIERARCHY',
|
48 |
'type' => 'commercial',
|
49 |
-
'description' => '
|
50 |
'url' => 'https://aamplugin.com/extension/role-hierarchy',
|
51 |
'version' => (defined('AAM_ROLE_HIERARCHY') ? constant('AAM_ROLE_HIERARCHY') : null),
|
52 |
'latest' => '1.4'
|
@@ -56,11 +47,20 @@ class AAM_Extension_List {
|
|
56 |
'id' => 'AAM_ECOMMERCE',
|
57 |
'type' => 'commercial',
|
58 |
'new' => true,
|
59 |
-
'description' => 'Start
|
60 |
'url' => 'https://aamplugin.com/extension/ecommerce',
|
61 |
'version' => (defined('AAM_ECOMMERCE') ? constant('AAM_ECOMMERCE') : null),
|
62 |
'latest' => '1.2.1'
|
63 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
'AAM_MULTISITE' => array(
|
65 |
'title' => 'Multisite',
|
66 |
'id' => 'AAM_MULTISITE',
|
15 |
*/
|
16 |
public static function get() {
|
17 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
'AAM_PLUS_PACKAGE' => array(
|
19 |
'title' => 'Plus Package',
|
20 |
'id' => 'AAM_PLUS_PACKAGE',
|
21 |
'type' => 'commercial',
|
22 |
+
'description' => 'Manage access to your WordPress website posts, pages, media, custom post types, categories and hierarchical taxonomies for any role, individual user, visitors or even define default access for everybody; and do this separately for frontend, backend or API levels. As the bonus, define more granular access to how comments can be managed on the backend by other users.',
|
23 |
'url' => 'https://aamplugin.com/extension/plus-package',
|
24 |
'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null),
|
25 |
'latest' => '3.7.8'
|
28 |
'title' => 'IP Check',
|
29 |
'id' => 'AAM_IP_CHECK',
|
30 |
'type' => 'commercial',
|
31 |
+
'description' => 'Manage access to your WordPress website by visitor\'s IP address and referred hosts or completely lockdown the entire website and allow only certain IP ranges.',
|
32 |
'url' => 'https://aamplugin.com/extension/ip-check',
|
33 |
'version' => (defined('AAM_IP_CHECK') ? constant('AAM_IP_CHECK') : null),
|
34 |
'latest' => '2.0'
|
37 |
'title' => 'Role Hierarchy',
|
38 |
'id' => 'AAM_ROLE_HIERARCHY',
|
39 |
'type' => 'commercial',
|
40 |
+
'description' => 'Define and manage complex WordPress role hierarchy where child role inherits all access settings from its parent with ability to override setting for any specific role.',
|
41 |
'url' => 'https://aamplugin.com/extension/role-hierarchy',
|
42 |
'version' => (defined('AAM_ROLE_HIERARCHY') ? constant('AAM_ROLE_HIERARCHY') : null),
|
43 |
'latest' => '1.4'
|
47 |
'id' => 'AAM_ECOMMERCE',
|
48 |
'type' => 'commercial',
|
49 |
'new' => true,
|
50 |
+
'description' => 'Start monetizing access to your premium content. Restrict access to read any WordPress post, page or custom post type until user purchase access to it.',
|
51 |
'url' => 'https://aamplugin.com/extension/ecommerce',
|
52 |
'version' => (defined('AAM_ECOMMERCE') ? constant('AAM_ECOMMERCE') : null),
|
53 |
'latest' => '1.2.1'
|
54 |
),
|
55 |
+
'AAM_COMPLETE_PACKAGE' => array(
|
56 |
+
'title' => 'Complete Package',
|
57 |
+
'id' => 'AAM_COMPLETE_PACKAGE',
|
58 |
+
'type' => 'commercial',
|
59 |
+
'description' => 'Get the complete list of all premium AAM extensions in one package and all future premium extensions already included for now additional cost.',
|
60 |
+
'url' => 'https://aamplugin.com/complete-package',
|
61 |
+
'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null),
|
62 |
+
'latest' => '3.8.5'
|
63 |
+
),
|
64 |
'AAM_MULTISITE' => array(
|
65 |
'title' => 'Multisite',
|
66 |
'id' => 'AAM_MULTISITE',
|
Application/Extension/Repository.php
CHANGED
@@ -88,7 +88,7 @@ class AAM_Extension_Repository {
|
|
88 |
if (file_exists($basedir)) {
|
89 |
//iterate through each active extension and load it
|
90 |
foreach (scandir($basedir) as $extension) {
|
91 |
-
if (!in_array($extension, array('.', '..'))) {
|
92 |
$this->bootstrapExtension($basedir . '/' . $extension);
|
93 |
}
|
94 |
}
|
@@ -122,7 +122,7 @@ class AAM_Extension_Repository {
|
|
122 |
|
123 |
if (file_exists($config)) {
|
124 |
$conf = require $config;
|
125 |
-
$load = empty($cache[$conf['id']]['status']) || ($cache[$conf['id']]['status']
|
126 |
} else { // TODO - Remove May 2019
|
127 |
AAM_Core_Console::add(AAM_Backend_View_Helper::preparePhrase(
|
128 |
sprintf(
|
@@ -176,7 +176,7 @@ class AAM_Extension_Repository {
|
|
176 |
foreach((array) $licenses as $key => $data) {
|
177 |
if (isset($extensions[$key])
|
178 |
&& !empty($data['license'])
|
179 |
-
&& $extensions[$key]['type']
|
180 |
|
181 |
if ($details) {
|
182 |
$response[] = array(
|
@@ -306,7 +306,7 @@ class AAM_Extension_Repository {
|
|
306 |
);
|
307 |
}
|
308 |
}
|
309 |
-
} elseif ($status
|
310 |
if (!defined($id)) {
|
311 |
$status = AAM_Extension_Repository::STATUS_DOWNLOAD;
|
312 |
} elseif ($this->isOutdatedVersion($item, $retrieved, constant($id))) {
|
@@ -327,7 +327,7 @@ class AAM_Extension_Repository {
|
|
327 |
protected function isOutdatedVersion($item, $retrieved, $version) {
|
328 |
$id = $item['id'];
|
329 |
|
330 |
-
if ($item['type']
|
331 |
$valid = !empty($item['license']);
|
332 |
} else {
|
333 |
$valid = true;
|
@@ -338,9 +338,9 @@ class AAM_Extension_Repository {
|
|
338 |
if ($valid) {
|
339 |
// first check the retrieved version from the server
|
340 |
if (isset($retrieved->$id)) {
|
341 |
-
$outdated = version_compare($version, $retrieved->$id->version)
|
342 |
} else {
|
343 |
-
$outdated = version_compare($version, $item['latest'])
|
344 |
}
|
345 |
}
|
346 |
|
@@ -405,7 +405,7 @@ class AAM_Extension_Repository {
|
|
405 |
$updates = 0;
|
406 |
|
407 |
foreach($this->getList() as $item) {
|
408 |
-
$updates += ($item['status']
|
409 |
}
|
410 |
|
411 |
return $updates ? true : false;
|
88 |
if (file_exists($basedir)) {
|
89 |
//iterate through each active extension and load it
|
90 |
foreach (scandir($basedir) as $extension) {
|
91 |
+
if (!in_array($extension, array('.', '..'), true)) {
|
92 |
$this->bootstrapExtension($basedir . '/' . $extension);
|
93 |
}
|
94 |
}
|
122 |
|
123 |
if (file_exists($config)) {
|
124 |
$conf = require $config;
|
125 |
+
$load = empty($cache[$conf['id']]['status']) || ($cache[$conf['id']]['status'] !== self::STATUS_INACTIVE);
|
126 |
} else { // TODO - Remove May 2019
|
127 |
AAM_Core_Console::add(AAM_Backend_View_Helper::preparePhrase(
|
128 |
sprintf(
|
176 |
foreach((array) $licenses as $key => $data) {
|
177 |
if (isset($extensions[$key])
|
178 |
&& !empty($data['license'])
|
179 |
+
&& $extensions[$key]['type'] === 'commercial') {
|
180 |
|
181 |
if ($details) {
|
182 |
$response[] = array(
|
306 |
);
|
307 |
}
|
308 |
}
|
309 |
+
} elseif ($status === AAM_Extension_Repository::STATUS_INSTALLED) {
|
310 |
if (!defined($id)) {
|
311 |
$status = AAM_Extension_Repository::STATUS_DOWNLOAD;
|
312 |
} elseif ($this->isOutdatedVersion($item, $retrieved, constant($id))) {
|
327 |
protected function isOutdatedVersion($item, $retrieved, $version) {
|
328 |
$id = $item['id'];
|
329 |
|
330 |
+
if ($item['type'] === 'commercial') {
|
331 |
$valid = !empty($item['license']);
|
332 |
} else {
|
333 |
$valid = true;
|
338 |
if ($valid) {
|
339 |
// first check the retrieved version from the server
|
340 |
if (isset($retrieved->$id)) {
|
341 |
+
$outdated = version_compare($version, $retrieved->$id->version) === -1;
|
342 |
} else {
|
343 |
+
$outdated = version_compare($version, $item['latest']) === -1;
|
344 |
}
|
345 |
}
|
346 |
|
405 |
$updates = 0;
|
406 |
|
407 |
foreach($this->getList() as $item) {
|
408 |
+
$updates += ($item['status'] === self::STATUS_UPDATE);
|
409 |
}
|
410 |
|
411 |
return $updates ? true : false;
|
Application/Frontend/Authorization.php
CHANGED
@@ -98,7 +98,7 @@ class AAM_Frontend_Authorization {
|
|
98 |
$read = $post->has('frontend.read');
|
99 |
$others = $post->has('frontend.read_others');
|
100 |
|
101 |
-
if ($read || ($others && ($post->post_author
|
102 |
$this->deny('post_read', 'frontend.read', $post->getPost());
|
103 |
}
|
104 |
}
|
@@ -145,13 +145,13 @@ class AAM_Frontend_Authorization {
|
|
145 |
$rule = explode('|', $post->get(AAM_Core_Api_Area::get() . '.location'));
|
146 |
$code = apply_filters('aam-post-redirect-http-code-filter', 307);
|
147 |
|
148 |
-
if (count($rule)
|
149 |
AAM_Core_API::redirect($rule[0]);
|
150 |
-
} elseif ($rule[0]
|
151 |
-
wp_safe_redirect(get_page_link($rule[1]), $code);
|
152 |
-
} elseif ($rule[0]
|
153 |
-
wp_redirect($rule[1], $code);
|
154 |
-
} elseif (($rule[0]
|
155 |
call_user_func($rule[1], $post);
|
156 |
}
|
157 |
}
|
98 |
$read = $post->has('frontend.read');
|
99 |
$others = $post->has('frontend.read_others');
|
100 |
|
101 |
+
if ($read || ($others && ($post->post_author !== get_current_user_id()))) {
|
102 |
$this->deny('post_read', 'frontend.read', $post->getPost());
|
103 |
}
|
104 |
}
|
145 |
$rule = explode('|', $post->get(AAM_Core_Api_Area::get() . '.location'));
|
146 |
$code = apply_filters('aam-post-redirect-http-code-filter', 307);
|
147 |
|
148 |
+
if (count($rule) === 1) { // TODO: legacy. Remove in Jul 2020
|
149 |
AAM_Core_API::redirect($rule[0]);
|
150 |
+
} elseif ($rule[0] === 'page') {
|
151 |
+
wp_safe_redirect(get_page_link($rule[1]), $code); exit;
|
152 |
+
} elseif ($rule[0] === 'url') {
|
153 |
+
wp_redirect($rule[1], $code); exit;
|
154 |
+
} elseif (($rule[0] === 'callback') && is_callable($rule[1])) {
|
155 |
call_user_func($rule[1], $post);
|
156 |
}
|
157 |
}
|
Application/Frontend/Filter.php
CHANGED
@@ -71,7 +71,7 @@ class AAM_Frontend_Filter {
|
|
71 |
'uri' => AAM_Core_Request::server('REQUEST_URI')
|
72 |
));
|
73 |
|
74 |
-
if ($type
|
75 |
AAM_Core_API::redirect(
|
76 |
AAM_Core_Config::get("frontend.404redirect.{$type}")
|
77 |
);
|
@@ -123,12 +123,12 @@ class AAM_Frontend_Filter {
|
|
123 |
public function getNavigationMenu($pages) {
|
124 |
if (is_array($pages)) {
|
125 |
foreach ($pages as $i => $page) {
|
126 |
-
if (in_array($page->type, array('post_type', 'custom'))) {
|
127 |
$object = AAM::getUser()->getObject('post', $page->object_id);
|
128 |
$others = $object->get('frontend.list_others');
|
129 |
$list = $object->get('frontend.list');
|
130 |
|
131 |
-
if (($others && ($object->post_author
|
132 |
unset($pages[$i]);
|
133 |
}
|
134 |
}
|
@@ -154,14 +154,14 @@ class AAM_Frontend_Filter {
|
|
154 |
$area = AAM_Core_Api_Area::get();
|
155 |
|
156 |
foreach ($pages as $i => $post) {
|
157 |
-
if ($current && ($current->ID
|
158 |
|
159 |
// TODO: refactor this to AAM API standalone
|
160 |
$object = AAM::getUser()->getObject('post', $post->ID);
|
161 |
$list = $object->get($area. '.list');
|
162 |
$others = $object->get($area. '.list_others');
|
163 |
|
164 |
-
if ($list || ($others && ($post->post_author
|
165 |
unset($pages[$i]);
|
166 |
}
|
167 |
}
|
71 |
'uri' => AAM_Core_Request::server('REQUEST_URI')
|
72 |
));
|
73 |
|
74 |
+
if ($type !== 'default') {
|
75 |
AAM_Core_API::redirect(
|
76 |
AAM_Core_Config::get("frontend.404redirect.{$type}")
|
77 |
);
|
123 |
public function getNavigationMenu($pages) {
|
124 |
if (is_array($pages)) {
|
125 |
foreach ($pages as $i => $page) {
|
126 |
+
if (in_array($page->type, array('post_type', 'custom'), true)) {
|
127 |
$object = AAM::getUser()->getObject('post', $page->object_id);
|
128 |
$others = $object->get('frontend.list_others');
|
129 |
$list = $object->get('frontend.list');
|
130 |
|
131 |
+
if (($others && ($object->post_author !== get_current_user_id())) || $list) {
|
132 |
unset($pages[$i]);
|
133 |
}
|
134 |
}
|
154 |
$area = AAM_Core_Api_Area::get();
|
155 |
|
156 |
foreach ($pages as $i => $post) {
|
157 |
+
if ($current && ($current->ID === $post->ID)) { continue; }
|
158 |
|
159 |
// TODO: refactor this to AAM API standalone
|
160 |
$object = AAM::getUser()->getObject('post', $post->ID);
|
161 |
$list = $object->get($area. '.list');
|
162 |
$others = $object->get($area. '.list_others');
|
163 |
|
164 |
+
if ($list || ($others && ($post->post_author !== get_current_user_id()))) {
|
165 |
unset($pages[$i]);
|
166 |
}
|
167 |
}
|
Application/Shared/Manager.php
CHANGED
@@ -86,11 +86,69 @@ class AAM_Shared_Manager {
|
|
86 |
);
|
87 |
}
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
|
91 |
return self::$_instance;
|
92 |
}
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
/**
|
95 |
*
|
96 |
* @global type $wp_admin_bar
|
@@ -100,13 +158,11 @@ class AAM_Shared_Manager {
|
|
100 |
|
101 |
$toolbar = AAM::api()->getUser()->getObject('toolbar');
|
102 |
|
103 |
-
//echo '<pre>'; print_r($wp_admin_bar->get_nodes()); die();
|
104 |
-
|
105 |
foreach($wp_admin_bar->get_nodes() as $id => $node) {
|
106 |
if ($toolbar->has($id, true)) {
|
107 |
if (!empty($node->parent)) { // update parent node with # link
|
108 |
$parent = $wp_admin_bar->get_node($node->parent);
|
109 |
-
if ($parent && ($parent->href
|
110 |
$wp_admin_bar->add_node(array(
|
111 |
'id' => $parent->id,
|
112 |
'href' => '#'
|
@@ -202,7 +258,7 @@ class AAM_Shared_Manager {
|
|
202 |
$postType = 'any';
|
203 |
}
|
204 |
|
205 |
-
if ($postType
|
206 |
$postType = array_keys(
|
207 |
get_post_types(
|
208 |
array('public' => true, 'exclude_from_search' => false),
|
@@ -236,7 +292,7 @@ class AAM_Shared_Manager {
|
|
236 |
foreach($visibility as $id => $access) {
|
237 |
$chunks = explode('|', $id);
|
238 |
|
239 |
-
if (in_array($chunks[1], $postTypes)) {
|
240 |
if (!empty($access["{$area}.list"])) {
|
241 |
$not[] = $chunks[0];
|
242 |
}
|
@@ -360,7 +416,7 @@ class AAM_Shared_Manager {
|
|
360 |
|
361 |
$qfields = (isset($query->query['fields']) ? $query->query['fields'] : '');
|
362 |
|
363 |
-
if ($qfields
|
364 |
$author = "{$wpdb->posts}.post_author";
|
365 |
if (strpos($fields, $author) === false) {
|
366 |
$fields .= ", $author";
|
@@ -446,7 +502,7 @@ class AAM_Shared_Manager {
|
|
446 |
*/
|
447 |
protected function authorizePostEdit($id, $allcaps, $metacaps) {
|
448 |
$object = AAM::getUser()->getObject('post', $id);
|
449 |
-
$draft = $object->post_status
|
450 |
$area = AAM_Core_Api_Area::get();
|
451 |
|
452 |
if (!$draft && !$this->isActionAllowed($area . '.edit', $object)) {
|
@@ -519,7 +575,7 @@ class AAM_Shared_Manager {
|
|
519 |
protected function isActionAllowed($action, $object) {
|
520 |
$edit = $object->has($action);
|
521 |
$others = $object->has("{$action}_others");
|
522 |
-
$author = ($object->post_author
|
523 |
|
524 |
return ($edit || ($others && !$author)) ? false : true;
|
525 |
}
|
86 |
);
|
87 |
}
|
88 |
}
|
89 |
+
|
90 |
+
// Security. Make sure that we escaping all translation strings
|
91 |
+
add_filter(
|
92 |
+
'gettext', array(self::$_instance, 'escapeTranslation'), 999, 3
|
93 |
+
);
|
94 |
+
|
95 |
+
// Role Manager. Tracking user role changes and if there is expiration
|
96 |
+
// set, then trigger hooks
|
97 |
+
add_action('add_user_role', array(self::$_instance, 'userRoleAdded'), 10, 2);
|
98 |
+
add_action('remove_user_role', array(self::$_instance, 'userRoleRemoved'), 10, 2);
|
99 |
}
|
100 |
|
101 |
return self::$_instance;
|
102 |
}
|
103 |
|
104 |
+
/**
|
105 |
+
*
|
106 |
+
* @param type $userId
|
107 |
+
* @param type $role
|
108 |
+
*/
|
109 |
+
public function userRoleAdded($userId, $role) {
|
110 |
+
$user = new AAM_Core_Subject_User($userId);
|
111 |
+
AAM_Core_API::clearCache($user);
|
112 |
+
|
113 |
+
$expire = AAM_Core_API::getOption("aam-role-{$role}-expiration", '');
|
114 |
+
|
115 |
+
if ($expire) {
|
116 |
+
update_user_option($userId, "aam-original-roles", $user->roles);
|
117 |
+
update_user_option($userId, "aam-role-expires", strtotime($expire));
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
*
|
123 |
+
* @param type $userId
|
124 |
+
* @param type $role
|
125 |
+
*/
|
126 |
+
public function userRoleRemoved($userId, $role) {
|
127 |
+
$user = new AAM_Core_Subject_User($userId);
|
128 |
+
AAM_Core_API::clearCache($user);
|
129 |
+
|
130 |
+
$expire = AAM_Core_API::getOption("aam-role-{$role}-expiration", '');
|
131 |
+
|
132 |
+
if ($expire) {
|
133 |
+
delete_user_option($userId, "aam-role-expires");
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
*
|
139 |
+
* @param type $translation
|
140 |
+
* @param type $text
|
141 |
+
* @param type $domain
|
142 |
+
* @return type
|
143 |
+
*/
|
144 |
+
public function escapeTranslation($translation, $text, $domain) {
|
145 |
+
if ($domain === AAM_KEY) {
|
146 |
+
$translation = esc_js($translation);
|
147 |
+
}
|
148 |
+
|
149 |
+
return $translation;
|
150 |
+
}
|
151 |
+
|
152 |
/**
|
153 |
*
|
154 |
* @global type $wp_admin_bar
|
158 |
|
159 |
$toolbar = AAM::api()->getUser()->getObject('toolbar');
|
160 |
|
|
|
|
|
161 |
foreach($wp_admin_bar->get_nodes() as $id => $node) {
|
162 |
if ($toolbar->has($id, true)) {
|
163 |
if (!empty($node->parent)) { // update parent node with # link
|
164 |
$parent = $wp_admin_bar->get_node($node->parent);
|
165 |
+
if ($parent && ($parent->href === $node->href)) {
|
166 |
$wp_admin_bar->add_node(array(
|
167 |
'id' => $parent->id,
|
168 |
'href' => '#'
|
258 |
$postType = 'any';
|
259 |
}
|
260 |
|
261 |
+
if ($postType === 'any') {
|
262 |
$postType = array_keys(
|
263 |
get_post_types(
|
264 |
array('public' => true, 'exclude_from_search' => false),
|
292 |
foreach($visibility as $id => $access) {
|
293 |
$chunks = explode('|', $id);
|
294 |
|
295 |
+
if (in_array($chunks[1], $postTypes, true)) {
|
296 |
if (!empty($access["{$area}.list"])) {
|
297 |
$not[] = $chunks[0];
|
298 |
}
|
416 |
|
417 |
$qfields = (isset($query->query['fields']) ? $query->query['fields'] : '');
|
418 |
|
419 |
+
if ($qfields === 'id=>parent') {
|
420 |
$author = "{$wpdb->posts}.post_author";
|
421 |
if (strpos($fields, $author) === false) {
|
422 |
$fields .= ", $author";
|
502 |
*/
|
503 |
protected function authorizePostEdit($id, $allcaps, $metacaps) {
|
504 |
$object = AAM::getUser()->getObject('post', $id);
|
505 |
+
$draft = $object->post_status === 'auto-draft';
|
506 |
$area = AAM_Core_Api_Area::get();
|
507 |
|
508 |
if (!$draft && !$this->isActionAllowed($area . '.edit', $object)) {
|
575 |
protected function isActionAllowed($action, $object) {
|
576 |
$edit = $object->has($action);
|
577 |
$others = $object->has("{$action}_others");
|
578 |
+
$author = ($object->post_author === get_current_user_id());
|
579 |
|
580 |
return ($edit || ($others && !$author)) ? false : true;
|
581 |
}
|
Application/Shortcode/Strategy/Content.php
CHANGED
@@ -57,7 +57,7 @@ class AAM_Shortcode_Strategy_Content implements AAM_Shortcode_Strategy_Interface
|
|
57 |
public function run() {
|
58 |
//prepare user
|
59 |
if (get_current_user_id()) {
|
60 |
-
$user = array(AAM::getUser()->ID, AAM::getUser()->roles[0]);
|
61 |
} else {
|
62 |
$user = array('visitor');
|
63 |
}
|
@@ -73,16 +73,16 @@ class AAM_Shortcode_Strategy_Content implements AAM_Shortcode_Strategy_Interface
|
|
73 |
$content = $this->content;
|
74 |
|
75 |
//#1. Check if content is restricted for current user
|
76 |
-
if (in_array('all', $hide) || $this->check($user, $hide)) {
|
77 |
$content = '';
|
78 |
}
|
79 |
|
80 |
//#2. Check if content is limited for current user
|
81 |
-
if (in_array('all', $limit) || $this->check($user, $limit)) {
|
82 |
$content = do_shortcode($msg);
|
83 |
}
|
84 |
|
85 |
-
//#3. Check if content is
|
86 |
if ($this->check($user, $show)) {
|
87 |
$content = $this->content;
|
88 |
}
|
@@ -102,14 +102,14 @@ class AAM_Shortcode_Strategy_Content implements AAM_Shortcode_Strategy_Interface
|
|
102 |
$auth = get_current_user_id();
|
103 |
|
104 |
foreach($conditions as $condition) {
|
105 |
-
if (($condition
|
106 |
$match = true;
|
107 |
-
} else if (preg_match('/^[\d
|
108 |
$match = $this->checkIP(
|
109 |
$condition, AAM_Core_Request::server('REMOTE_ADDR')
|
110 |
);
|
111 |
} else {
|
112 |
-
$match = in_array($condition, $user);
|
113 |
}
|
114 |
|
115 |
if ($match) {
|
@@ -140,7 +140,7 @@ class AAM_Shortcode_Strategy_Content implements AAM_Shortcode_Strategy_Interface
|
|
140 |
break;
|
141 |
}
|
142 |
} elseif ($group !== '*') {
|
143 |
-
if ($group
|
144 |
$match = false;
|
145 |
break;
|
146 |
}
|
57 |
public function run() {
|
58 |
//prepare user
|
59 |
if (get_current_user_id()) {
|
60 |
+
$user = array((string)AAM::getUser()->ID, AAM::getUser()->roles[0]);
|
61 |
} else {
|
62 |
$user = array('visitor');
|
63 |
}
|
73 |
$content = $this->content;
|
74 |
|
75 |
//#1. Check if content is restricted for current user
|
76 |
+
if (in_array('all', $hide, true) || $this->check($user, $hide)) {
|
77 |
$content = '';
|
78 |
}
|
79 |
|
80 |
//#2. Check if content is limited for current user
|
81 |
+
if (in_array('all', $limit, true) || $this->check($user, $limit)) {
|
82 |
$content = do_shortcode($msg);
|
83 |
}
|
84 |
|
85 |
+
//#3. Check if content is allowed for current user
|
86 |
if ($this->check($user, $show)) {
|
87 |
$content = $this->content;
|
88 |
}
|
102 |
$auth = get_current_user_id();
|
103 |
|
104 |
foreach($conditions as $condition) {
|
105 |
+
if (($condition === 'authenticated') && $auth) {
|
106 |
$match = true;
|
107 |
+
} else if (preg_match('/^[\d*-]+\.[\d*-]+[\d\.*-]*[\d\.*-]*$/', $condition)) {
|
108 |
$match = $this->checkIP(
|
109 |
$condition, AAM_Core_Request::server('REMOTE_ADDR')
|
110 |
);
|
111 |
} else {
|
112 |
+
$match = in_array($condition, $user, true);
|
113 |
}
|
114 |
|
115 |
if ($match) {
|
140 |
break;
|
141 |
}
|
142 |
} elseif ($group !== '*') {
|
143 |
+
if ($group !== $uipSplit[$i]) {
|
144 |
$match = false;
|
145 |
break;
|
146 |
}
|
Application/Shortcode/Strategy/Login.php
CHANGED
@@ -62,7 +62,7 @@ class AAM_Shortcode_Strategy_Login implements AAM_Shortcode_Strategy_Interface {
|
|
62 |
$content = call_user_func($this->args['callback'], $this);
|
63 |
} else {
|
64 |
ob_start();
|
65 |
-
require
|
66 |
'feature.secureLogin.shortcode.template',
|
67 |
realpath(AAM_BASEDIR . '/Application/Frontend/phtml/login.phtml')
|
68 |
);
|
62 |
$content = call_user_func($this->args['callback'], $this);
|
63 |
} else {
|
64 |
ob_start();
|
65 |
+
require AAM::api()->getConfig(
|
66 |
'feature.secureLogin.shortcode.template',
|
67 |
realpath(AAM_BASEDIR . '/Application/Frontend/phtml/login.phtml')
|
68 |
);
|
Lang/advanced-access-manager-en_US.mo
CHANGED
Binary file
|
Lang/advanced-access-manager-en_US.po
CHANGED
@@ -1,30 +1,34 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: Advanced Access
|
4 |
-
"POT-Creation-Date: 2018-
|
5 |
"PO-Revision-Date: \n"
|
6 |
-
"
|
|
|
|
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"X-Generator: Poedit 2.
|
11 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
12 |
"X-Poedit-SourceCharset: UTF-8\n"
|
13 |
"X-Poedit-KeywordsList: __;preparePhrase\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
-
"Last-Translator: \n"
|
16 |
-
"Language: en_US\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
-
#: Application/Api/Manager.php:
|
20 |
msgid "Access denied"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: Application/Backend/Feature/Extension/Manager.php:
|
24 |
msgid "You may try to install extension manually."
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: Application/Backend/Feature/Extension/Manager.php:
|
|
|
|
|
|
|
|
|
28 |
msgid "Enter license key to update extension."
|
29 |
msgstr ""
|
30 |
|
@@ -69,6 +73,11 @@ msgstr ""
|
|
69 |
msgid "Capabilities"
|
70 |
msgstr ""
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
#: Application/Backend/Feature/Main/LoginRedirect.php:73
|
73 |
msgid "Login Redirect"
|
74 |
msgstr ""
|
@@ -81,11 +90,11 @@ msgstr ""
|
|
81 |
msgid "Backend Menu"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: Application/Backend/Feature/Main/Metabox.php:
|
85 |
msgid "Metaboxes & Widgets"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: Application/Backend/Feature/Main/Post.php:
|
89 |
#: Application/Backend/phtml/main/404redirect.phtml:36
|
90 |
#: Application/Backend/phtml/main/login-redirect.phtml:43
|
91 |
#: Application/Backend/phtml/main/logout-redirect.phtml:43
|
@@ -95,15 +104,15 @@ msgstr ""
|
|
95 |
msgid "Existing Page"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: Application/Backend/Feature/Main/Post.php:
|
99 |
msgid "Valid URL"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: Application/Backend/Feature/Main/Post.php:
|
103 |
msgid "Custom Callback"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: Application/Backend/Feature/Main/Post.php:
|
107 |
msgid "Posts & Terms"
|
108 |
msgstr ""
|
109 |
|
@@ -111,10 +120,14 @@ msgstr ""
|
|
111 |
msgid "Access Denied Redirect"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: Application/Backend/Feature/Main/Route.php:
|
115 |
msgid "API Routes"
|
116 |
msgstr ""
|
117 |
|
|
|
|
|
|
|
|
|
118 |
#: Application/Backend/Feature/Settings/ConfigPress.php:53
|
119 |
msgid "ConfigPress"
|
120 |
msgstr ""
|
@@ -132,22 +145,10 @@ msgid ""
|
|
132 |
msgstr ""
|
133 |
|
134 |
#: Application/Backend/Feature/Settings/Content.php:37
|
135 |
-
msgid "Check Post Visibility"
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: Application/Backend/Feature/Settings/Content.php:38
|
139 |
-
msgid ""
|
140 |
-
"For performance reasons, keep this option disabled if do not use LIST or "
|
141 |
-
"LIST TO OTHERS access options on Posts & Terms tab. When it is checked, AAM "
|
142 |
-
"will filter list of posts that are hidden for a user on frontend, backend "
|
143 |
-
"and API calls."
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: Application/Backend/Feature/Settings/Content.php:42
|
147 |
msgid "Manage Hidden Post Types"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: Application/Backend/Feature/Settings/Content.php:
|
151 |
msgid ""
|
152 |
"By default AAM allows you to manage access only to public post types on "
|
153 |
"Posts & Terms tab. By enabling this feature, you also will be able to manage "
|
@@ -155,111 +156,122 @@ msgid ""
|
|
155 |
"custom post types that are not registered as public."
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: Application/Backend/Feature/Settings/Content.php:
|
159 |
msgid "Content Settings"
|
160 |
msgstr ""
|
161 |
|
162 |
#: Application/Backend/Feature/Settings/Core.php:32
|
163 |
-
msgid "
|
164 |
msgstr ""
|
165 |
|
166 |
#: Application/Backend/Feature/Settings/Core.php:33
|
167 |
msgid ""
|
168 |
-
"
|
169 |
-
"
|
170 |
-
"
|
171 |
msgstr ""
|
172 |
|
173 |
#: Application/Backend/Feature/Settings/Core.php:37
|
174 |
-
msgid "
|
175 |
msgstr ""
|
176 |
|
177 |
#: Application/Backend/Feature/Settings/Core.php:38
|
178 |
msgid ""
|
179 |
-
"Allow
|
180 |
-
"
|
|
|
181 |
msgstr ""
|
182 |
|
183 |
#: Application/Backend/Feature/Settings/Core.php:42
|
184 |
-
msgid "
|
185 |
msgstr ""
|
186 |
|
187 |
#: Application/Backend/Feature/Settings/Core.php:43
|
188 |
msgid ""
|
189 |
-
"Allow AAM to manage access to the
|
190 |
-
"
|
191 |
msgstr ""
|
192 |
|
193 |
#: Application/Backend/Feature/Settings/Core.php:47
|
194 |
-
msgid "
|
195 |
msgstr ""
|
196 |
|
197 |
#: Application/Backend/Feature/Settings/Core.php:48
|
198 |
msgid ""
|
199 |
-
"Allow AAM to manage access to the
|
200 |
-
"
|
201 |
-
"disabled if there is no needs to restrict API access."
|
202 |
msgstr ""
|
203 |
|
204 |
#: Application/Backend/Feature/Settings/Core.php:52
|
205 |
-
msgid "
|
206 |
msgstr ""
|
207 |
|
208 |
#: Application/Backend/Feature/Settings/Core.php:53
|
209 |
msgid ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
"Render Access Manager metabox on all post and term edit pages. Access "
|
211 |
"Manager metabox is the quick way to manage access to any post or term "
|
212 |
"without leaving an edit page."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
216 |
msgid "Render Access Link"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
220 |
msgid ""
|
221 |
"Render Access shortcut link under any post, page, custom post type, "
|
222 |
"category, custom taxonomy title or user name."
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
226 |
msgid "Secure Login"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
230 |
msgid ""
|
231 |
"AAM comes with its own user login handler. With this feature you can add "
|
232 |
"AJAX login widget to your frontend page that significantly enhance your "
|
233 |
"website security."
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
237 |
msgid "XML-RPC WordPress API"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
241 |
#, php-format
|
242 |
msgid ""
|
243 |
"Remote procedure call (RPC) interface is used to manage WordPress website "
|
244 |
"content and features. For more information check %sXML-RPC Support%s article."
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
248 |
msgid "RESTful WordPress API"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
252 |
#, php-format
|
253 |
msgid ""
|
254 |
"RESTful interface that is used to manage WordPress website content and "
|
255 |
"features. For more information check %sREST API handbook%s."
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
259 |
msgid "JWT Authentication"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
263 |
#, php-format
|
264 |
msgid ""
|
265 |
"[Note!] PHP 5.4 or higher is required for this feature. Enable the ability "
|
@@ -268,11 +280,79 @@ msgid ""
|
|
268 |
"article"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
msgid "Core Settings"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: Application/Backend/Feature/Settings/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
msgid "Tools"
|
277 |
msgstr ""
|
278 |
|
@@ -284,72 +364,75 @@ msgstr ""
|
|
284 |
msgid "You cannot set expiration to yourself"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: Application/Backend/Manager.php:
|
288 |
msgid "Access Manager"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: Application/Backend/Manager.php:
|
292 |
-
#: Application/Backend/Manager.php:
|
293 |
msgid "Access"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: Application/Backend/Manager.php:
|
297 |
-
#: Application/Core/API.php:
|
298 |
msgid "Access Denied"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: Application/Backend/View/Localization.php:26 media/js/aam.js:
|
302 |
msgid "Search Capability"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: Application/Backend/View/Localization.php:27 media/js/aam.js:
|
306 |
msgid "_TOTAL_ capability(s)"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: Application/Backend/View/Localization.php:28 media/js/aam.js:
|
310 |
-
#: media/js/aam.js:
|
311 |
-
#: media/js/aam.js:
|
312 |
msgid "Saving..."
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: Application/Backend/View/Localization.php:29 media/js/aam.js:
|
316 |
msgid "Failed to add new capability"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: Application/Backend/View/Localization.php:30 media/js/aam.js:
|
320 |
-
#: media/js/aam.js:
|
321 |
-
#: media/js/aam.js:
|
322 |
-
#: media/js/aam.js:
|
323 |
-
#: media/js/aam.js:
|
324 |
-
#: media/js/aam.js:
|
325 |
-
#: media/js/aam.js:
|
326 |
-
#: media/js/aam.js:
|
|
|
327 |
msgid "Application error"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: Application/Backend/View/Localization.php:31 media/js/aam.js:
|
331 |
msgid "Add Capability"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: Application/Backend/View/Localization.php:32 media/js/aam.js:
|
335 |
-
#: Application/Backend/phtml/main/menu.phtml:71
|
|
|
336 |
msgid "Show Menu"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: Application/Backend/View/Localization.php:33 media/js/aam.js:
|
340 |
-
#: Application/Backend/phtml/main/menu.phtml:75
|
|
|
341 |
msgid "Restrict Menu"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: Application/Backend/View/Localization.php:34 media/js/aam.js:
|
345 |
msgid "Failed to retrieve mataboxes"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: Application/Backend/View/Localization.php:35 media/js/aam.js:
|
349 |
msgid "Search"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: Application/Backend/View/Localization.php:36 media/js/aam.js:
|
353 |
msgid "_TOTAL_ object(s)"
|
354 |
msgstr ""
|
355 |
|
@@ -357,96 +440,96 @@ msgstr ""
|
|
357 |
msgid "Failed"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: Application/Backend/View/Localization.php:38 media/js/aam.js:
|
361 |
-
#: media/js/aam.js:
|
362 |
msgid "Loading..."
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: Application/Backend/View/Localization.php:39 media/js/aam.js:
|
366 |
msgid "No Role"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: Application/Backend/View/Localization.php:40 media/js/aam.js:
|
370 |
msgid "Search Role"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: Application/Backend/View/Localization.php:41 media/js/aam.js:
|
374 |
msgid "_TOTAL_ role(s)"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: Application/Backend/View/Localization.php:42
|
378 |
-
#:
|
379 |
#: Application/Backend/phtml/main/capability.phtml:26
|
380 |
#: Application/Backend/phtml/main/capability.phtml:64
|
381 |
msgid "Create"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: Application/Backend/View/Localization.php:43 media/js/aam.js:
|
385 |
-
#: Application/Backend/phtml/index.phtml:
|
386 |
-
#: Application/Backend/phtml/index.phtml:
|
387 |
msgid "Users"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: Application/Backend/View/Localization.php:44 media/js/aam.js:
|
391 |
msgid "Failed to add new role"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: Application/Backend/View/Localization.php:45 media/js/aam.js:
|
395 |
msgid "Add Role"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: Application/Backend/View/Localization.php:46 media/js/aam.js:
|
399 |
msgid "Failed to update role"
|
400 |
msgstr ""
|
401 |
|
402 |
#: Application/Backend/View/Localization.php:47
|
403 |
-
#: Application/Backend/View/PostOptionList.php:
|
404 |
#: Application/Backend/phtml/extensions.phtml:51
|
405 |
#: Application/Backend/phtml/extensions.phtml:78
|
406 |
-
#: Application/Backend/phtml/index.phtml:
|
407 |
#: Application/Backend/phtml/main/capability.phtml:86
|
408 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
|
409 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:58
|
410 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:114
|
411 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:
|
412 |
msgid "Update"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: Application/Backend/View/Localization.php:48 media/js/aam.js:
|
416 |
-
#: media/js/aam.js:
|
417 |
msgid "Deleting..."
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: Application/Backend/View/Localization.php:49 media/js/aam.js:
|
421 |
msgid "Failed to delete role"
|
422 |
msgstr ""
|
423 |
|
424 |
#: Application/Backend/View/Localization.php:50
|
425 |
-
#: Application/Backend/View/Localization.php:62 media/js/aam.js:
|
426 |
-
#: media/js/aam.js:
|
427 |
msgid "Delete Role"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: Application/Backend/View/Localization.php:51 media/js/aam.js:
|
431 |
msgid "Failed to block user"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: Application/Backend/View/Localization.php:52 media/js/aam.js:
|
435 |
msgid "Search User"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: Application/Backend/View/Localization.php:53 media/js/aam.js:
|
439 |
msgid "_TOTAL_ user(s)"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: Application/Backend/View/Localization.php:54 media/js/aam.js:
|
443 |
-
#: Application/Backend/phtml/index.phtml:
|
444 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:46
|
445 |
msgid "Role"
|
446 |
msgstr ""
|
447 |
|
448 |
#: Application/Backend/View/Localization.php:55
|
449 |
-
#: Application/Core/Subject/Visitor.php:79 media/js/aam.js:
|
450 |
msgid "Anonymous"
|
451 |
msgstr ""
|
452 |
|
@@ -458,38 +541,38 @@ msgstr ""
|
|
458 |
msgid "Current role"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: Application/Backend/View/Localization.php:58 media/js/aam.js:
|
462 |
msgid "Manage Access"
|
463 |
msgstr ""
|
464 |
|
465 |
#: Application/Backend/View/Localization.php:59
|
466 |
-
#: Application/Backend/View/PostOptionList.php:
|
467 |
msgid "Edit"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: Application/Backend/View/Localization.php:60 media/js/aam.js:
|
471 |
msgid "Manage Role"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: Application/Backend/View/Localization.php:61 media/js/aam.js:
|
475 |
msgid "Edit Role"
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: Application/Backend/View/Localization.php:63 media/js/aam.js:
|
479 |
msgid "Manage User"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: Application/Backend/View/Localization.php:64 media/js/aam.js:
|
483 |
msgid "Edit User"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: Application/Backend/View/Localization.php:65 media/js/aam.js:
|
487 |
-
#: media/js/aam.js:
|
488 |
msgid "Lock User"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: Application/Backend/View/Localization.php:66 media/js/aam.js:
|
492 |
-
#: media/js/aam.js:
|
493 |
msgid "Unlock User"
|
494 |
msgstr ""
|
495 |
|
@@ -498,63 +581,63 @@ msgid "Failed to grand capability - WordPress policy"
|
|
498 |
msgstr ""
|
499 |
|
500 |
#: Application/Backend/View/PostOptionList.php:26
|
501 |
-
#: Application/Backend/View/PostOptionList.php:
|
502 |
-
#: Application/Backend/View/PostOptionList.php:
|
503 |
msgid "List"
|
504 |
msgstr ""
|
505 |
|
506 |
#: Application/Backend/View/PostOptionList.php:27
|
507 |
-
#: Application/Backend/View/PostOptionList.php:
|
508 |
#, php-format
|
509 |
msgid "Hide %s however still allow access with direct URL."
|
510 |
msgstr ""
|
511 |
|
512 |
#: Application/Backend/View/PostOptionList.php:27
|
513 |
-
#: Application/Backend/View/PostOptionList.php:
|
514 |
#, php-format
|
515 |
msgid " %sSee in action.%s"
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: Application/Backend/View/PostOptionList.php:
|
519 |
-
#: Application/Backend/View/PostOptionList.php:
|
520 |
msgid "Read"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: Application/Backend/View/PostOptionList.php:
|
524 |
#, php-format
|
525 |
msgid ""
|
526 |
"Restrict access to view, read or download %s. Any attempts to open %s will "
|
527 |
"be denied and redirected based on the Access Denied Redirect rule."
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: Application/Backend/View/PostOptionList.php:
|
531 |
-
#: Application/Backend/View/PostOptionList.php:
|
532 |
msgid "Limit"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: Application/Backend/View/PostOptionList.php:
|
536 |
-
#: Application/Backend/View/PostOptionList.php:
|
537 |
msgid "Teaser message"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: Application/Backend/View/PostOptionList.php:
|
541 |
-
#: Application/Backend/View/PostOptionList.php:
|
542 |
#, php-format
|
543 |
msgid "Replace %s content with defined teaser message."
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: Application/Backend/View/PostOptionList.php:
|
547 |
-
#: Application/Backend/View/PostOptionList.php:
|
548 |
msgid "Read Counter"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: Application/Backend/View/PostOptionList.php:
|
552 |
-
#: Application/Backend/View/PostOptionList.php:
|
553 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:32
|
554 |
msgid "Threshold"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: Application/Backend/View/PostOptionList.php:
|
558 |
#, php-format
|
559 |
msgid ""
|
560 |
"Define how many times %s can be read, viewed or download. After number of "
|
@@ -562,67 +645,66 @@ msgid ""
|
|
562 |
"based on the Access Denied Redirect rule."
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: Application/Backend/View/PostOptionList.php:
|
566 |
-
#: Application/Backend/View/PostOptionList.php:
|
567 |
msgid "Comment"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: Application/Backend/View/PostOptionList.php:
|
571 |
#, php-format
|
572 |
msgid "Restrict access to comment on %s if commenting is allowed."
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: Application/Backend/View/PostOptionList.php:
|
576 |
msgid "Redirect"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: Application/Backend/View/PostOptionList.php:
|
580 |
msgid "Redirect Rule"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: Application/Backend/View/PostOptionList.php:
|
584 |
#, php-format
|
585 |
msgid ""
|
586 |
"Redirect user based on the defined redirect rule when user tries to read the "
|
587 |
"%s. The REDIRECT option will be ignored if READ option is checked."
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: Application/Backend/View/PostOptionList.php:
|
591 |
-
#: Application/Backend/View/PostOptionList.php:
|
592 |
msgid "Password Protected"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: Application/Backend/View/PostOptionList.php:
|
596 |
-
#: Application/Backend/View/PostOptionList.php:
|
597 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:53
|
598 |
#: Application/Backend/phtml/widget/login-frontend.phtml:27
|
599 |
#: Application/Frontend/phtml/login.phtml:13
|
600 |
msgid "Password"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: Application/Backend/View/PostOptionList.php:
|
604 |
#, php-format
|
605 |
msgid ""
|
606 |
"Protect access to %s with password. Available with WordPress 4.7.0 or higher."
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: Application/Backend/View/PostOptionList.php:
|
610 |
-
#: Application/Backend/View/PostOptionList.php:
|
611 |
msgid "Access Expiration"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: Application/Backend/View/PostOptionList.php:
|
615 |
-
#: Application/Backend/View/PostOptionList.php:
|
616 |
-
#: Application/Backend/phtml/index.phtml:245
|
617 |
msgid "Expires"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: Application/Backend/View/PostOptionList.php:
|
621 |
#, php-format
|
622 |
msgid "Define when access will expire for %s."
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: Application/Backend/View/PostOptionList.php:
|
626 |
#, php-format
|
627 |
msgid ""
|
628 |
"After expiration, the access to %s will be denied and redirected based on "
|
@@ -630,20 +712,20 @@ msgid ""
|
|
630 |
"or "
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: Application/Backend/View/PostOptionList.php:
|
634 |
#, php-format
|
635 |
msgid " %ssee in action.%s"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: Application/Backend/View/PostOptionList.php:
|
639 |
msgid "Monetized Access"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: Application/Backend/View/PostOptionList.php:
|
643 |
msgid "E-Product"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: Application/Backend/View/PostOptionList.php:
|
647 |
#, php-format
|
648 |
msgid ""
|
649 |
"[Premium feature!] Start selling access to %s. Access will be granted to "
|
@@ -651,78 +733,78 @@ msgid ""
|
|
651 |
"%scheck this article%s."
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: Application/Backend/View/PostOptionList.php:
|
655 |
#, php-format
|
656 |
msgid ""
|
657 |
"Restrict access to edit %s. Any attempts to edit %s will result in "
|
658 |
"redirecting user based on the Access Denied Redirect rule."
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: Application/Backend/View/PostOptionList.php:
|
662 |
-
#: Application/Backend/View/PostOptionList.php:
|
663 |
-
#: Application/Backend/phtml/index.phtml:
|
664 |
#: Application/Backend/phtml/main/capability.phtml:104
|
665 |
msgid "Delete"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: Application/Backend/View/PostOptionList.php:
|
669 |
-
#: Application/Backend/View/PostOptionList.php:
|
670 |
#, php-format
|
671 |
msgid "Restrict access to trash or permanently delete %s."
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: Application/Backend/View/PostOptionList.php:
|
675 |
msgid "Publish"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: Application/Backend/View/PostOptionList.php:
|
679 |
#, php-format
|
680 |
msgid ""
|
681 |
"Restrict access to publish %s. User will be allowed only to submit %s for "
|
682 |
"review."
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: Application/Backend/View/PostOptionList.php:
|
686 |
#, php-format
|
687 |
msgid "Hide %s however still allow access to retrieve %s."
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: Application/Backend/View/PostOptionList.php:
|
691 |
#, php-format
|
692 |
msgid ""
|
693 |
"Restrict access to retrieve %s. Any attempts to retrieve %s will be denied."
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: Application/Backend/View/PostOptionList.php:
|
697 |
#, php-format
|
698 |
msgid ""
|
699 |
"Define how many times %s can be retrieved. After number of time exceeds the "
|
700 |
"defined threshold, the access will be denied to %s."
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: Application/Backend/View/PostOptionList.php:
|
704 |
#, php-format
|
705 |
msgid "Restrict access to comment on %s if commenting feature is enabled."
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: Application/Backend/View/PostOptionList.php:
|
709 |
#, php-format
|
710 |
msgid "Protected %s with password. Available with WordPress 4.7.0 or higher."
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: Application/Backend/View/PostOptionList.php:
|
714 |
#, php-format
|
715 |
msgid "Define when access expires to %s."
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: Application/Backend/View/PostOptionList.php:
|
719 |
#, php-format
|
720 |
msgid ""
|
721 |
"After expiration, the access to %s will be denied. For more information "
|
722 |
"%scheck this article%s or "
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: Application/Backend/View/PostOptionList.php:
|
726 |
#, php-format
|
727 |
msgid "Restrict access to update %s. Any attempts to update %s will be denied."
|
728 |
msgstr ""
|
@@ -731,46 +813,43 @@ msgstr ""
|
|
731 |
msgid "AAM Secure Login Widget"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: Application/Backend/Widget/Login.php:
|
735 |
#: Application/Frontend/phtml/login.phtml:27
|
736 |
msgid "Login"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: Application/Backend/Widget/Login.php:
|
740 |
#: Application/Shortcode/Strategy/Login.php:54
|
741 |
msgid "Howdy, %username%"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: Application/Core/
|
745 |
-
msgid ""
|
746 |
-
"JWT Authentication is enabled but authentication.jwt.secret is not defined"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: Application/Core/JwtAuth.php:
|
750 |
msgid "Valid username."
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: Application/Core/JwtAuth.php:
|
754 |
msgid "Valid password."
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: Application/Core/JwtAuth.php:
|
758 |
msgid "JWT Authentication is enabled but secret key is not defined"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: Application/Core/
|
762 |
-
|
|
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: Application/Core/
|
766 |
-
msgid "
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: Application/
|
770 |
-
msgid ""
|
771 |
-
"[Deprecated!]. The extension is deprecated and replaces with more "
|
772 |
-
"sophisticated E-Commerce extension. If you already purchased it, please "
|
773 |
-
"contact us to upgrade your license for no additional cost."
|
774 |
msgstr ""
|
775 |
|
776 |
#: Application/Extension/Repository.php:129
|
@@ -780,21 +859,21 @@ msgid ""
|
|
780 |
"more.%s"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: Application/Extension/Repository.php:
|
784 |
#, php-format
|
785 |
msgid "Failed to create %s"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: Application/Extension/Repository.php:
|
789 |
#, php-format
|
790 |
msgid "Directory %s is not writable"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: Application/Shared/Manager.php:
|
794 |
msgid "RESTful API is disabled"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: Application/Shared/Manager.php:
|
798 |
msgid "[No teaser message provided]"
|
799 |
msgstr ""
|
800 |
|
@@ -802,141 +881,180 @@ msgstr ""
|
|
802 |
msgid "No valid strategy found for the given context"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: aam.php:
|
806 |
msgid "PHP 5.3.0 or higher is required."
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: aam.php:
|
810 |
msgid "WP 4.0 or higher is required."
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: media/js/aam.js:
|
|
|
|
|
|
|
|
|
814 |
msgid "Clone Role"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: media/js/aam.js:
|
818 |
#: Application/Backend/phtml/partial/role-inheritance.phtml:5
|
819 |
msgid "Select Role"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: media/js/aam.js:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
msgid "User Expiration"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: media/js/aam.js:
|
827 |
msgid "Switch To User"
|
828 |
msgstr ""
|
829 |
|
830 |
-
#: media/js/aam.js:
|
831 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
|
832 |
msgid "Save"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: media/js/aam.js:
|
836 |
msgid "Reseting..."
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: media/js/aam.js:
|
840 |
msgid "Reset"
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: media/js/aam.js:
|
844 |
-
#: media/js/aam.js:
|
|
|
845 |
msgid "Application Error"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: media/js/aam.js:
|
|
|
849 |
msgid "Uncheck to allow"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: media/js/aam.js:
|
|
|
853 |
msgid "Check to restrict"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: media/js/aam.js:
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
#: media/js/aam.js:1202
|
861 |
-
msgid "Failed to initialize URL"
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: media/js/aam.js:
|
865 |
-
|
|
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: media/js/aam.js:
|
869 |
-
msgid "
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: media/js/aam.js:
|
873 |
-
msgid "
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: media/js/aam.js:
|
877 |
msgid "WordPress core does not allow to grant this capability"
|
878 |
msgstr ""
|
879 |
|
880 |
-
#: media/js/aam.js:
|
881 |
msgid "Nothing to show"
|
882 |
msgstr ""
|
883 |
|
884 |
-
#: media/js/aam.js:
|
885 |
msgid "Failed to update capability"
|
886 |
msgstr ""
|
887 |
|
888 |
-
#: media/js/aam.js:
|
889 |
msgid "Update Capability"
|
890 |
msgstr ""
|
891 |
|
892 |
-
#: media/js/aam.js:
|
893 |
msgid "Failed to delete capability"
|
894 |
msgstr ""
|
895 |
|
896 |
-
#: media/js/aam.js:
|
897 |
msgid "Delete Capability"
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: media/js/aam.js:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
901 |
msgid "Drill-Down"
|
902 |
msgstr ""
|
903 |
|
904 |
-
#: media/js/aam.js:
|
905 |
msgid "Resetting..."
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: media/js/aam.js:
|
909 |
msgid "Search Route"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: media/js/aam.js:
|
913 |
msgid "_TOTAL_ route(s)"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: media/js/aam.js:
|
|
|
|
|
|
|
|
|
917 |
msgid "Extension status was updated successfully"
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: media/js/aam.js:
|
921 |
-
|
|
|
|
|
|
|
|
|
922 |
msgid "Wait..."
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: media/js/aam.js:
|
926 |
msgid "All settings has been cleared successfully"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: media/js/aam.js:
|
930 |
#: Application/Backend/phtml/settings/tools.phtml:66
|
931 |
msgid "Clear"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: media/js/aam.js:
|
935 |
msgid "The cache has been cleared successfully"
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: media/js/
|
939 |
-
msgid "
|
940 |
msgstr ""
|
941 |
|
942 |
#: Application/Backend/phtml/extensions.phtml:6
|
@@ -998,7 +1116,7 @@ msgid "extension is inactive"
|
|
998 |
msgstr ""
|
999 |
|
1000 |
#: Application/Backend/phtml/extensions.phtml:55
|
1001 |
-
#: Application/Backend/phtml/index.phtml:
|
1002 |
msgid "Read More"
|
1003 |
msgstr ""
|
1004 |
|
@@ -1010,14 +1128,14 @@ msgstr ""
|
|
1010 |
#: Application/Backend/phtml/extensions.phtml:97
|
1011 |
#: Application/Backend/phtml/extensions.phtml:128
|
1012 |
#: Application/Backend/phtml/extensions.phtml:139
|
1013 |
-
#: Application/Backend/phtml/index.phtml:
|
1014 |
-
#: Application/Backend/phtml/index.phtml:
|
1015 |
-
#: Application/Backend/phtml/index.phtml:
|
1016 |
-
#: Application/Backend/phtml/index.phtml:
|
1017 |
-
#: Application/Backend/phtml/index.phtml:
|
1018 |
-
#: Application/Backend/phtml/index.phtml:
|
1019 |
-
#: Application/Backend/phtml/index.phtml:
|
1020 |
-
#: Application/Backend/phtml/index.phtml:
|
1021 |
#: Application/Backend/phtml/main/capability.phtml:54
|
1022 |
#: Application/Backend/phtml/main/capability.phtml:65
|
1023 |
#: Application/Backend/phtml/main/capability.phtml:75
|
@@ -1025,8 +1143,8 @@ msgstr ""
|
|
1025 |
#: Application/Backend/phtml/main/capability.phtml:97
|
1026 |
#: Application/Backend/phtml/main/capability.phtml:105
|
1027 |
#: Application/Backend/phtml/main/menu.phtml:100
|
1028 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1029 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1030 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
|
1031 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:17
|
1032 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:27
|
@@ -1036,9 +1154,9 @@ msgstr ""
|
|
1036 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:69
|
1037 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:115
|
1038 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:125
|
1039 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:
|
1040 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:
|
1041 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:
|
1042 |
#: Application/Backend/phtml/settings/tools.phtml:59
|
1043 |
msgid "Close"
|
1044 |
msgstr ""
|
@@ -1099,7 +1217,7 @@ msgstr ""
|
|
1099 |
msgid "Main Panel"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
-
#: Application/Backend/phtml/index.phtml:
|
1103 |
msgid ""
|
1104 |
"[Loading AAM UI]. Please wait. If content will not load within next 30 "
|
1105 |
"seconds, clear your browser cache and reload the page. If still nothing, it "
|
@@ -1108,202 +1226,204 @@ msgid ""
|
|
1108 |
"WordPress theme to find out what causes the issue."
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: Application/Backend/phtml/index.phtml:
|
1112 |
-
msgid ""
|
1113 |
-
"Appreciate your interest in Advanced Access Manager (AAM). With strong "
|
1114 |
-
"knowledge and experience in WordPress, AAM becomes a very powerful tool to "
|
1115 |
-
"manage access to your frontend and backend."
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: Application/Backend/phtml/index.phtml:
|
1119 |
-
msgid "
|
1120 |
msgstr ""
|
1121 |
|
1122 |
-
#: Application/Backend/phtml/index.phtml:
|
|
|
1123 |
msgid ""
|
1124 |
-
"
|
1125 |
-
"
|
1126 |
-
"WordPress core. It is also very important [to have backup of your database "
|
1127 |
-
"before you start working with AAM] (there is no need to backup your files, "
|
1128 |
-
"AAM does not modify any physical files on your server and never did)."
|
1129 |
msgstr ""
|
1130 |
|
1131 |
-
#: Application/Backend/phtml/index.phtml:
|
1132 |
-
msgid ""
|
1133 |
-
"AAM was thoroughly tested on the fresh installation of WordPress and in the "
|
1134 |
-
"latest versions of Chrome, Safari, IE and Firefox. If you have any issues, "
|
1135 |
-
"the most typical case is the conflict with other plugins or themes."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: Application/Backend/phtml/index.phtml:
|
1139 |
#, php-format
|
1140 |
msgid ""
|
1141 |
-
"
|
1142 |
-
"
|
|
|
|
|
1143 |
msgstr ""
|
1144 |
|
1145 |
-
#: Application/Backend/phtml/index.phtml:
|
1146 |
-
msgid "
|
|
|
|
|
|
|
|
|
1147 |
msgstr ""
|
1148 |
|
1149 |
-
#: Application/Backend/phtml/index.phtml:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1150 |
msgid ""
|
1151 |
"The [Development Package] allows you to get all premium extensions for "
|
1152 |
"[unlimited number of websites]."
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: Application/Backend/phtml/index.phtml:
|
1156 |
msgid "AAM Multisite"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: Application/Backend/phtml/index.phtml:
|
1160 |
msgid ""
|
1161 |
"Install free [AAM Multisite extension] in order to manage all your sites "
|
1162 |
"from the Network Admin."
|
1163 |
msgstr ""
|
1164 |
|
1165 |
-
#: Application/Backend/phtml/index.phtml:
|
1166 |
msgid "Users/Roles Manager"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
-
#: Application/Backend/phtml/index.phtml:
|
1170 |
-
#: Application/Backend/phtml/index.phtml:
|
1171 |
msgid "Roles"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: Application/Backend/phtml/index.phtml:
|
1175 |
-
#: Application/Backend/phtml/index.phtml:
|
1176 |
msgid "Visitor"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: Application/Backend/phtml/index.phtml:
|
1180 |
-
#: Application/Backend/phtml/index.phtml:
|
1181 |
msgid "Default"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
-
#: Application/Backend/phtml/index.phtml:
|
1185 |
-
#: Application/Backend/phtml/index.phtml:
|
1186 |
msgid "Action"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
-
#: Application/Backend/phtml/index.phtml:
|
1190 |
msgid "Create Role"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
-
#: Application/Backend/phtml/index.phtml:
|
1194 |
-
#: Application/Backend/phtml/index.phtml:
|
1195 |
msgid "Role Name"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
-
#: Application/Backend/phtml/index.phtml:
|
1199 |
-
#: Application/Backend/phtml/index.phtml:
|
1200 |
msgid "Enter Role Name"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: Application/Backend/phtml/index.phtml:
|
1204 |
-
#: Application/Backend/phtml/index.phtml:
|
1205 |
msgid "Role Expiration"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
-
#: Application/Backend/phtml/index.phtml:
|
1209 |
-
#: Application/Backend/phtml/index.phtml:
|
1210 |
msgid "Enter Expiration Rule"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
-
#: Application/Backend/phtml/index.phtml:
|
1214 |
msgid "Update Role"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
-
#: Application/Backend/phtml/index.phtml:
|
1218 |
#, php-format
|
1219 |
msgid "Are you sure that you want to delete the %s role?"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: Application/Backend/phtml/index.phtml:
|
1223 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:62
|
1224 |
msgid "Username"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: Application/Backend/phtml/index.phtml:
|
1228 |
msgid "Manage User Expiration"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
-
#: Application/Backend/phtml/index.phtml:
|
1232 |
-
msgid "Enter Expiration"
|
1233 |
-
msgstr ""
|
1234 |
-
|
1235 |
-
#: Application/Backend/phtml/index.phtml:249
|
1236 |
msgid "Action After Expiration"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: Application/Backend/phtml/index.phtml:
|
1240 |
msgid "Select Action"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: Application/Backend/phtml/index.phtml:
|
1244 |
msgid "Delete Account"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: Application/Backend/phtml/index.phtml:
|
1248 |
msgid "Lock Account"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
-
#: Application/Backend/phtml/index.phtml:
|
1252 |
msgid "Change User Role"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
-
#: Application/Backend/phtml/index.phtml:
|
1256 |
msgid "Change To Role"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: Application/Backend/phtml/index.phtml:
|
1260 |
msgid ""
|
1261 |
"Manage access to your website for visitors (any user that is not "
|
1262 |
"authenticated)"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
-
#: Application/Backend/phtml/index.phtml:
|
1266 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:75
|
1267 |
msgid "Manage Visitors"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: Application/Backend/phtml/index.phtml:
|
1271 |
msgid ""
|
1272 |
"Manage default access to your website resources for all users, roles and "
|
1273 |
"visitor. This includes Administrator role and your user"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: Application/Backend/phtml/index.phtml:
|
1277 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:84
|
1278 |
msgid "Manage Default Access"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
-
#: Application/Backend/phtml/index.phtml:
|
1282 |
msgid ""
|
1283 |
"Manage access for your users, roles and visitors. Be careful with "
|
1284 |
"[Administrator] role as well as your admin user. [Database backup is "
|
1285 |
"strongly recommended]."
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: Application/Backend/phtml/index.phtml:
|
1289 |
msgid ""
|
1290 |
"With Roles tab you can manage access for any defined role, edit role's name, "
|
1291 |
"create new role or even delete existing (but only when there is no users "
|
1292 |
"assigned to it). You are not allowed to delete Administrator role."
|
1293 |
msgstr ""
|
1294 |
|
1295 |
-
#: Application/Backend/phtml/index.phtml:
|
1296 |
msgid ""
|
1297 |
"Manage access for any user. As a bonus feature, you can block user. It means "
|
1298 |
"that user will be not able to login to your website anymore."
|
1299 |
msgstr ""
|
1300 |
|
1301 |
-
#: Application/Backend/phtml/index.phtml:
|
1302 |
msgid ""
|
1303 |
"Visitor can be considered any user that is not authenticated to your website."
|
1304 |
msgstr ""
|
1305 |
|
1306 |
-
#: Application/Backend/phtml/index.phtml:
|
1307 |
msgid ""
|
1308 |
"Manage default access settings to your website resources for all users, "
|
1309 |
"roles and visitors."
|
@@ -1402,6 +1522,7 @@ msgstr ""
|
|
1402 |
#: Application/Backend/phtml/main/metabox.phtml:20
|
1403 |
#: Application/Backend/phtml/main/post.phtml:36
|
1404 |
#: Application/Backend/phtml/main/route.phtml:18
|
|
|
1405 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:101
|
1406 |
msgid "Reset To Default"
|
1407 |
msgstr ""
|
@@ -1441,6 +1562,51 @@ msgstr ""
|
|
1441 |
msgid "Are you sure that you want to delete %s capability for all roles?"
|
1442 |
msgstr ""
|
1443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1444 |
#: Application/Backend/phtml/main/login-redirect.phtml:7
|
1445 |
msgid ""
|
1446 |
"Define the [default] login redirect for all users and roles when "
|
@@ -1487,10 +1653,16 @@ msgstr ""
|
|
1487 |
#: Application/Backend/phtml/main/menu.phtml:13
|
1488 |
#: Application/Backend/phtml/main/metabox.phtml:19
|
1489 |
#: Application/Backend/phtml/main/post.phtml:35
|
|
|
1490 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:100
|
1491 |
msgid "Settings are customized"
|
1492 |
msgstr ""
|
1493 |
|
|
|
|
|
|
|
|
|
|
|
1494 |
#: Application/Backend/phtml/main/menu.phtml:89
|
1495 |
msgid ""
|
1496 |
"Current user does not have enough capabilities to access any available "
|
@@ -1525,6 +1697,7 @@ msgid ""
|
|
1525 |
msgstr ""
|
1526 |
|
1527 |
#: Application/Backend/phtml/main/metabox.phtml:12
|
|
|
1528 |
msgid "Refresh"
|
1529 |
msgstr ""
|
1530 |
|
@@ -1537,25 +1710,22 @@ msgid "Dashboard Widgets"
|
|
1537 |
msgstr ""
|
1538 |
|
1539 |
#: Application/Backend/phtml/main/metabox.phtml:47
|
1540 |
-
msgid "Frontend Widgets"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1544 |
-
msgid "
|
1545 |
msgstr ""
|
1546 |
|
1547 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1548 |
-
|
1549 |
-
msgid ""
|
1550 |
-
"If your website requires HTTP authentication, please refer to [%sthis article"
|
1551 |
-
"%s] for additional information."
|
1552 |
msgstr ""
|
1553 |
|
1554 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1555 |
msgid "Initialize URL"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1559 |
msgid ""
|
1560 |
"Some metaboxes are \"conditional\" and appear on the Edit screen when "
|
1561 |
"certain conditions are met. For example metabox \"Comments\" appears only "
|
@@ -1564,11 +1734,11 @@ msgid ""
|
|
1564 |
"appears."
|
1565 |
msgstr ""
|
1566 |
|
1567 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1568 |
msgid "Backend page URL"
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: Application/Backend/phtml/main/metabox.phtml:
|
1572 |
msgid "Insert valid URL"
|
1573 |
msgstr ""
|
1574 |
|
@@ -1588,7 +1758,7 @@ msgstr ""
|
|
1588 |
msgid ""
|
1589 |
"Manage access to posts, pages, custom post types, categories or custom "
|
1590 |
"hierarchical taxonomies. For more information about this functionality check "
|
1591 |
-
"%
|
1592 |
msgstr ""
|
1593 |
|
1594 |
#: Application/Backend/phtml/main/post.phtml:25
|
@@ -1599,12 +1769,12 @@ msgstr ""
|
|
1599 |
msgid "Title"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
-
#: Application/Backend/phtml/main/post.phtml:
|
1603 |
-
#: Application/Backend/phtml/main/post.phtml:
|
1604 |
-
#: Application/Backend/phtml/main/post.phtml:
|
1605 |
-
#: Application/Backend/phtml/main/post.phtml:
|
1606 |
-
#: Application/Backend/phtml/main/post.phtml:
|
1607 |
-
#: Application/Backend/phtml/main/post.phtml:
|
1608 |
msgid "Go Back"
|
1609 |
msgstr ""
|
1610 |
|
@@ -1687,6 +1857,20 @@ msgstr ""
|
|
1687 |
msgid "Deny"
|
1688 |
msgstr ""
|
1689 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1690 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:74
|
1691 |
#, php-format
|
1692 |
msgid "Manage access to %s for visitors (any user that is not authenticated)"
|
@@ -1757,32 +1941,24 @@ msgid "Enter Password"
|
|
1757 |
msgstr ""
|
1758 |
|
1759 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:70
|
1760 |
-
msgid "
|
1761 |
msgstr ""
|
1762 |
|
1763 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:73
|
1764 |
-
#, php-format
|
1765 |
msgid ""
|
1766 |
-
"
|
|
|
1767 |
msgstr ""
|
1768 |
|
1769 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:126
|
1770 |
msgid "Set Expiration"
|
1771 |
msgstr ""
|
1772 |
|
1773 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:
|
1774 |
-
msgid "Enter expiration critiria"
|
1775 |
-
msgstr ""
|
1776 |
-
|
1777 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:137
|
1778 |
-
msgid "Enter critiria"
|
1779 |
-
msgstr ""
|
1780 |
-
|
1781 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:153
|
1782 |
msgid "E-Commerce Setup"
|
1783 |
msgstr ""
|
1784 |
|
1785 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:
|
1786 |
#, php-format
|
1787 |
msgid ""
|
1788 |
"Monetization is the premium feature that is available with %s[E-Commerce]%s "
|
@@ -1872,41 +2048,11 @@ msgstr ""
|
|
1872 |
msgid "Logged In Title"
|
1873 |
msgstr ""
|
1874 |
|
1875 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:
|
1876 |
-
msgid "Login Timeout"
|
1877 |
-
msgstr ""
|
1878 |
-
|
1879 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:15
|
1880 |
-
msgid ""
|
1881 |
-
"Delay the login process for 1 second to significantly reduce the chance for "
|
1882 |
-
"brute force or dictionary attack."
|
1883 |
-
msgstr ""
|
1884 |
-
|
1885 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:20
|
1886 |
-
msgid "One session per user"
|
1887 |
-
msgstr ""
|
1888 |
-
|
1889 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:21
|
1890 |
-
msgid ""
|
1891 |
-
"Automatically destroy all other sessions for a user if he/she tries to login "
|
1892 |
-
"from different location."
|
1893 |
-
msgstr ""
|
1894 |
-
|
1895 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:26
|
1896 |
-
msgid "Brute Force Lockout"
|
1897 |
-
msgstr ""
|
1898 |
-
|
1899 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:27
|
1900 |
-
msgid ""
|
1901 |
-
"Automatically reject login attempts if number of unsuccessful login attempts "
|
1902 |
-
"is more than 20 over the period of 2 minutes."
|
1903 |
-
msgstr ""
|
1904 |
-
|
1905 |
-
#: Application/Backend/phtml/widget/login-backend.phtml:31
|
1906 |
#, php-format
|
1907 |
msgid ""
|
1908 |
-
"For more advanced setup like login/logout redirects
|
1909 |
-
"please
|
1910 |
msgstr ""
|
1911 |
|
1912 |
#: Application/Backend/phtml/widget/login-frontend.phtml:21
|
@@ -1923,27 +2069,27 @@ msgstr ""
|
|
1923 |
msgid "Log In"
|
1924 |
msgstr ""
|
1925 |
|
1926 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1927 |
-
#: Application/Frontend/phtml/login.phtml:
|
1928 |
msgid "Register"
|
1929 |
msgstr ""
|
1930 |
|
1931 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1932 |
-
#: Application/Frontend/phtml/login.phtml:
|
1933 |
msgid "Lost your password?"
|
1934 |
msgstr ""
|
1935 |
|
1936 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1937 |
-
#: Application/Frontend/phtml/login.phtml:
|
1938 |
msgid "Dashboard"
|
1939 |
msgstr ""
|
1940 |
|
1941 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1942 |
-
#: Application/Frontend/phtml/login.phtml:
|
1943 |
msgid "Edit My Profile"
|
1944 |
msgstr ""
|
1945 |
|
1946 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1947 |
-
#: Application/Frontend/phtml/login.phtml:
|
1948 |
msgid "Log Out"
|
1949 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: Advanced Access Manager\n"
|
4 |
+
"POT-Creation-Date: 2018-09-08 21:17-0400\n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: AAMPlugin <support@aamplugin.com>\n"
|
8 |
+
"Language: en_US\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.1.1\n"
|
13 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;preparePhrase\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
|
|
|
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
+
#: Application/Api/Manager.php:134
|
20 |
msgid "Access denied"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: Application/Backend/Feature/Extension/Manager.php:70
|
24 |
msgid "You may try to install extension manually."
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: Application/Backend/Feature/Extension/Manager.php:81
|
28 |
+
msgid "Download failure. Please try again or contact us."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: Application/Backend/Feature/Extension/Manager.php:119
|
32 |
msgid "Enter license key to update extension."
|
33 |
msgstr ""
|
34 |
|
73 |
msgid "Capabilities"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: Application/Backend/Feature/Main/GetStarted.php:36
|
77 |
+
#: Application/Backend/phtml/main/get-started.phtml:11
|
78 |
+
msgid "Get Started"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
#: Application/Backend/Feature/Main/LoginRedirect.php:73
|
82 |
msgid "Login Redirect"
|
83 |
msgstr ""
|
90 |
msgid "Backend Menu"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: Application/Backend/Feature/Main/Metabox.php:207
|
94 |
msgid "Metaboxes & Widgets"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: Application/Backend/Feature/Main/Post.php:445
|
98 |
#: Application/Backend/phtml/main/404redirect.phtml:36
|
99 |
#: Application/Backend/phtml/main/login-redirect.phtml:43
|
100 |
#: Application/Backend/phtml/main/logout-redirect.phtml:43
|
104 |
msgid "Existing Page"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: Application/Backend/Feature/Main/Post.php:447
|
108 |
msgid "Valid URL"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: Application/Backend/Feature/Main/Post.php:449
|
112 |
msgid "Custom Callback"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: Application/Backend/Feature/Main/Post.php:603
|
116 |
msgid "Posts & Terms"
|
117 |
msgstr ""
|
118 |
|
120 |
msgid "Access Denied Redirect"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: Application/Backend/Feature/Main/Route.php:120
|
124 |
msgid "API Routes"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: Application/Backend/Feature/Main/Toolbar.php:123
|
128 |
+
msgid "Admin Toolbar"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
#: Application/Backend/Feature/Settings/ConfigPress.php:53
|
132 |
msgid "ConfigPress"
|
133 |
msgstr ""
|
145 |
msgstr ""
|
146 |
|
147 |
#: Application/Backend/Feature/Settings/Content.php:37
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
msgid "Manage Hidden Post Types"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: Application/Backend/Feature/Settings/Content.php:38
|
152 |
msgid ""
|
153 |
"By default AAM allows you to manage access only to public post types on "
|
154 |
"Posts & Terms tab. By enabling this feature, you also will be able to manage "
|
156 |
"custom post types that are not registered as public."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: Application/Backend/Feature/Settings/Content.php:57
|
160 |
msgid "Content Settings"
|
161 |
msgstr ""
|
162 |
|
163 |
#: Application/Backend/Feature/Settings/Core.php:32
|
164 |
+
msgid "Get Started Tab"
|
165 |
msgstr ""
|
166 |
|
167 |
#: Application/Backend/Feature/Settings/Core.php:33
|
168 |
msgid ""
|
169 |
+
"Display the \"Get Started\" feature on the Main panel. You can disable this "
|
170 |
+
"feature to remove the extra tab when you get familiar with core access "
|
171 |
+
"control concepts."
|
172 |
msgstr ""
|
173 |
|
174 |
#: Application/Backend/Feature/Settings/Core.php:37
|
175 |
+
msgid "Edit/Delete Capabilities"
|
176 |
msgstr ""
|
177 |
|
178 |
#: Application/Backend/Feature/Settings/Core.php:38
|
179 |
msgid ""
|
180 |
+
"Allow to edit or delete any existing capability on the Capabilities tab. "
|
181 |
+
"[Warning!] For experienced users only. Changing or deleting capability may "
|
182 |
+
"result in loosing access to some features or even the entire website."
|
183 |
msgstr ""
|
184 |
|
185 |
#: Application/Backend/Feature/Settings/Core.php:42
|
186 |
+
msgid "Backend Access Control"
|
187 |
msgstr ""
|
188 |
|
189 |
#: Application/Backend/Feature/Settings/Core.php:43
|
190 |
msgid ""
|
191 |
+
"Allow AAM to manage access to the backend. Keep this option disabled if "
|
192 |
+
"there is no needs to restrict backend features for other users."
|
193 |
msgstr ""
|
194 |
|
195 |
#: Application/Backend/Feature/Settings/Core.php:47
|
196 |
+
msgid "Frontend Access Control"
|
197 |
msgstr ""
|
198 |
|
199 |
#: Application/Backend/Feature/Settings/Core.php:48
|
200 |
msgid ""
|
201 |
+
"Allow AAM to manage access to the frontend. Keep this option disabled if "
|
202 |
+
"there is no needs to restrict frontend resources for users and visitors."
|
|
|
203 |
msgstr ""
|
204 |
|
205 |
#: Application/Backend/Feature/Settings/Core.php:52
|
206 |
+
msgid "API Access Control"
|
207 |
msgstr ""
|
208 |
|
209 |
#: Application/Backend/Feature/Settings/Core.php:53
|
210 |
msgid ""
|
211 |
+
"Allow AAM to manage access to the website resources that are invoked with "
|
212 |
+
"WordPress core APIs. Keep this option disabled if there is no needs to "
|
213 |
+
"restrict API access."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: Application/Backend/Feature/Settings/Core.php:57
|
217 |
+
msgid "Render Access Manager Metabox"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: Application/Backend/Feature/Settings/Core.php:58
|
221 |
+
msgid ""
|
222 |
"Render Access Manager metabox on all post and term edit pages. Access "
|
223 |
"Manager metabox is the quick way to manage access to any post or term "
|
224 |
"without leaving an edit page."
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: Application/Backend/Feature/Settings/Core.php:62
|
228 |
msgid "Render Access Link"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: Application/Backend/Feature/Settings/Core.php:63
|
232 |
msgid ""
|
233 |
"Render Access shortcut link under any post, page, custom post type, "
|
234 |
"category, custom taxonomy title or user name."
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: Application/Backend/Feature/Settings/Core.php:67
|
238 |
msgid "Secure Login"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: Application/Backend/Feature/Settings/Core.php:68
|
242 |
msgid ""
|
243 |
"AAM comes with its own user login handler. With this feature you can add "
|
244 |
"AJAX login widget to your frontend page that significantly enhance your "
|
245 |
"website security."
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: Application/Backend/Feature/Settings/Core.php:72
|
249 |
msgid "XML-RPC WordPress API"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: Application/Backend/Feature/Settings/Core.php:73
|
253 |
#, php-format
|
254 |
msgid ""
|
255 |
"Remote procedure call (RPC) interface is used to manage WordPress website "
|
256 |
"content and features. For more information check %sXML-RPC Support%s article."
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: Application/Backend/Feature/Settings/Core.php:77
|
260 |
msgid "RESTful WordPress API"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: Application/Backend/Feature/Settings/Core.php:78
|
264 |
#, php-format
|
265 |
msgid ""
|
266 |
"RESTful interface that is used to manage WordPress website content and "
|
267 |
"features. For more information check %sREST API handbook%s."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: Application/Backend/Feature/Settings/Core.php:82
|
271 |
msgid "JWT Authentication"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: Application/Backend/Feature/Settings/Core.php:83
|
275 |
#, php-format
|
276 |
msgid ""
|
277 |
"[Note!] PHP 5.4 or higher is required for this feature. Enable the ability "
|
280 |
"article"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: Application/Backend/Feature/Settings/Core.php:87
|
284 |
+
msgid "Support AAM Extensions"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: Application/Backend/Feature/Settings/Core.php:88
|
288 |
+
msgid ""
|
289 |
+
"AAM comes with the limited list of premium and free extensions that "
|
290 |
+
"significantly enhance AAM behavior. You can disable support for AAM "
|
291 |
+
"extension and any already installed extension will no longer be loaded "
|
292 |
+
"during the website execution as well as website administrator will not be "
|
293 |
+
"able to install new extensions."
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: Application/Backend/Feature/Settings/Core.php:92
|
297 |
+
msgid "AAM Cron Job"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: Application/Backend/Feature/Settings/Core.php:93
|
301 |
+
msgid ""
|
302 |
+
"AAM cron job executes periodically (typically once a day) to check for "
|
303 |
+
"available updates for already installed extensions. Cron job is not executed "
|
304 |
+
"if there are no installed extensions."
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: Application/Backend/Feature/Settings/Core.php:112
|
308 |
msgid "Core Settings"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: Application/Backend/Feature/Settings/Security.php:32
|
312 |
+
#: Application/Backend/Feature/Settings/Security.php:37
|
313 |
+
msgid "Login Timeout"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: Application/Backend/Feature/Settings/Security.php:33
|
317 |
+
#: Application/Backend/Feature/Settings/Security.php:38
|
318 |
+
#, php-format
|
319 |
+
msgid ""
|
320 |
+
"Delay the login process for 1 second (the value is configurable) to "
|
321 |
+
"significantly reduce the chance for brute force or dictionary attack. For "
|
322 |
+
"more information about this option please refer to %sHow does AAM Secure "
|
323 |
+
"Login works%s."
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: Application/Backend/Feature/Settings/Security.php:42
|
327 |
+
msgid "One Session Per User"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: Application/Backend/Feature/Settings/Security.php:43
|
331 |
+
#, php-format
|
332 |
+
msgid ""
|
333 |
+
"Automatically destroy all other sessions for a user if he/she tries to login "
|
334 |
+
"from different location. For more information about this option please refer "
|
335 |
+
"to %sHow does AAM Secure Login works%s."
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: Application/Backend/Feature/Settings/Security.php:47
|
339 |
+
msgid "Brute Force Lockout"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: Application/Backend/Feature/Settings/Security.php:48
|
343 |
+
#, php-format
|
344 |
+
msgid ""
|
345 |
+
"Automatically reject login attempts if number of unsuccessful login attempts "
|
346 |
+
"is more than 20 over the period of 2 minutes (both values are configurable). "
|
347 |
+
"For more information about this option please refer to %sHow does AAM Secure "
|
348 |
+
"Login works%s."
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: Application/Backend/Feature/Settings/Security.php:67
|
352 |
+
msgid "Security Settings"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: Application/Backend/Feature/Settings/Tools.php:86
|
356 |
msgid "Tools"
|
357 |
msgstr ""
|
358 |
|
364 |
msgid "You cannot set expiration to yourself"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: Application/Backend/Manager.php:381
|
368 |
msgid "Access Manager"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: Application/Backend/Manager.php:499 Application/Backend/Manager.php:517
|
372 |
+
#: Application/Backend/Manager.php:540
|
373 |
msgid "Access"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: Application/Backend/Manager.php:691 Application/Backend/Manager.php:714
|
377 |
+
#: Application/Core/API.php:326
|
378 |
msgid "Access Denied"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: Application/Backend/View/Localization.php:26 media/js/aam.js:1588
|
382 |
msgid "Search Capability"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: Application/Backend/View/Localization.php:27 media/js/aam.js:1589
|
386 |
msgid "_TOTAL_ capability(s)"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: Application/Backend/View/Localization.php:28 media/js/aam.js:380
|
390 |
+
#: media/js/aam.js:441 media/js/aam.js:919 media/js/aam.js:1691
|
391 |
+
#: media/js/aam.js:1735 media/js/aam.js:2307
|
392 |
msgid "Saving..."
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: Application/Backend/View/Localization.php:29 media/js/aam.js:1699
|
396 |
msgid "Failed to add new capability"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: Application/Backend/View/Localization.php:30 media/js/aam.js:46
|
400 |
+
#: media/js/aam.js:400 media/js/aam.js:453 media/js/aam.js:490
|
401 |
+
#: media/js/aam.js:619 media/js/aam.js:929 media/js/aam.js:962
|
402 |
+
#: media/js/aam.js:1252 media/js/aam.js:1395 media/js/aam.js:1459
|
403 |
+
#: media/js/aam.js:1704 media/js/aam.js:1748 media/js/aam.js:1787
|
404 |
+
#: media/js/aam.js:1870 media/js/aam.js:2015 media/js/aam.js:2634
|
405 |
+
#: media/js/aam.js:2720 media/js/aam.js:2864 media/js/aam.js:2893
|
406 |
+
#: media/js/aam.js:3040 media/js/aam.js:3310 media/js/aam.js:3707
|
407 |
+
#: media/js/aam.js:3737
|
408 |
msgid "Application error"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: Application/Backend/View/Localization.php:31 media/js/aam.js:1707
|
412 |
msgid "Add Capability"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: Application/Backend/View/Localization.php:32 media/js/aam.js:1138
|
416 |
+
#: media/js/aam.js:1287 Application/Backend/phtml/main/menu.phtml:71
|
417 |
+
#: Application/Backend/phtml/main/toolbar.phtml:65
|
418 |
msgid "Show Menu"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: Application/Backend/View/Localization.php:33 media/js/aam.js:1148
|
422 |
+
#: media/js/aam.js:1297 Application/Backend/phtml/main/menu.phtml:75
|
423 |
+
#: Application/Backend/phtml/main/toolbar.phtml:69
|
424 |
msgid "Restrict Menu"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: Application/Backend/View/Localization.php:34 media/js/aam.js:1453
|
428 |
msgid "Failed to retrieve mataboxes"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: Application/Backend/View/Localization.php:35 media/js/aam.js:2059
|
432 |
msgid "Search"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: Application/Backend/View/Localization.php:36 media/js/aam.js:2060
|
436 |
msgid "_TOTAL_ object(s)"
|
437 |
msgstr ""
|
438 |
|
440 |
msgid "Failed"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: Application/Backend/View/Localization.php:38 media/js/aam.js:99
|
444 |
+
#: media/js/aam.js:559
|
445 |
msgid "Loading..."
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: Application/Backend/View/Localization.php:39 media/js/aam.js:104
|
449 |
msgid "No Role"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: Application/Backend/View/Localization.php:40 media/js/aam.js:162
|
453 |
msgid "Search Role"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: Application/Backend/View/Localization.php:41 media/js/aam.js:163
|
457 |
msgid "_TOTAL_ role(s)"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: Application/Backend/View/Localization.php:42
|
461 |
+
#: Application/Backend/phtml/index.phtml:232
|
462 |
#: Application/Backend/phtml/main/capability.phtml:26
|
463 |
#: Application/Backend/phtml/main/capability.phtml:64
|
464 |
msgid "Create"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: Application/Backend/View/Localization.php:43 media/js/aam.js:200
|
468 |
+
#: Application/Backend/phtml/index.phtml:186
|
469 |
+
#: Application/Backend/phtml/index.phtml:368
|
470 |
msgid "Users"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: Application/Backend/View/Localization.php:44 media/js/aam.js:395
|
474 |
msgid "Failed to add new role"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: Application/Backend/View/Localization.php:45 media/js/aam.js:403
|
478 |
msgid "Add Role"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: Application/Backend/View/Localization.php:46 media/js/aam.js:448
|
482 |
msgid "Failed to update role"
|
483 |
msgstr ""
|
484 |
|
485 |
#: Application/Backend/View/Localization.php:47
|
486 |
+
#: Application/Backend/View/PostOptionList.php:157 media/js/aam.js:457
|
487 |
#: Application/Backend/phtml/extensions.phtml:51
|
488 |
#: Application/Backend/phtml/extensions.phtml:78
|
489 |
+
#: Application/Backend/phtml/index.phtml:258
|
490 |
#: Application/Backend/phtml/main/capability.phtml:86
|
491 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
|
492 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:58
|
493 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:114
|
494 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:135
|
495 |
msgid "Update"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: Application/Backend/View/Localization.php:48 media/js/aam.js:480
|
499 |
+
#: media/js/aam.js:1774
|
500 |
msgid "Deleting..."
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: Application/Backend/View/Localization.php:49 media/js/aam.js:486
|
504 |
msgid "Failed to delete role"
|
505 |
msgstr ""
|
506 |
|
507 |
#: Application/Backend/View/Localization.php:50
|
508 |
+
#: Application/Backend/View/Localization.php:62 media/js/aam.js:305
|
509 |
+
#: media/js/aam.js:494 Application/Backend/phtml/index.phtml:270
|
510 |
msgid "Delete Role"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: Application/Backend/View/Localization.php:51 media/js/aam.js:615
|
514 |
msgid "Failed to block user"
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: Application/Backend/View/Localization.php:52 media/js/aam.js:651
|
518 |
msgid "Search User"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: Application/Backend/View/Localization.php:53 media/js/aam.js:652
|
522 |
msgid "_TOTAL_ user(s)"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: Application/Backend/View/Localization.php:54 media/js/aam.js:714
|
526 |
+
#: Application/Backend/phtml/index.phtml:203
|
527 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:46
|
528 |
msgid "Role"
|
529 |
msgstr ""
|
530 |
|
531 |
#: Application/Backend/View/Localization.php:55
|
532 |
+
#: Application/Core/Subject/Visitor.php:79 media/js/aam.js:1007
|
533 |
msgid "Anonymous"
|
534 |
msgstr ""
|
535 |
|
541 |
msgid "Current role"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: Application/Backend/View/Localization.php:58 media/js/aam.js:2191
|
545 |
msgid "Manage Access"
|
546 |
msgstr ""
|
547 |
|
548 |
#: Application/Backend/View/Localization.php:59
|
549 |
+
#: Application/Backend/View/PostOptionList.php:95 media/js/aam.js:2203
|
550 |
msgid "Edit"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: Application/Backend/View/Localization.php:60 media/js/aam.js:246
|
554 |
msgid "Manage Role"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: Application/Backend/View/Localization.php:61 media/js/aam.js:268
|
558 |
msgid "Edit Role"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: Application/Backend/View/Localization.php:63 media/js/aam.js:753
|
562 |
msgid "Manage User"
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: Application/Backend/View/Localization.php:64 media/js/aam.js:802
|
566 |
msgid "Edit User"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: Application/Backend/View/Localization.php:65 media/js/aam.js:610
|
570 |
+
#: media/js/aam.js:611 media/js/aam.js:815
|
571 |
msgid "Lock User"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: Application/Backend/View/Localization.php:66 media/js/aam.js:604
|
575 |
+
#: media/js/aam.js:605 media/js/aam.js:828
|
576 |
msgid "Unlock User"
|
577 |
msgstr ""
|
578 |
|
581 |
msgstr ""
|
582 |
|
583 |
#: Application/Backend/View/PostOptionList.php:26
|
584 |
+
#: Application/Backend/View/PostOptionList.php:90
|
585 |
+
#: Application/Backend/View/PostOptionList.php:112
|
586 |
msgid "List"
|
587 |
msgstr ""
|
588 |
|
589 |
#: Application/Backend/View/PostOptionList.php:27
|
590 |
+
#: Application/Backend/View/PostOptionList.php:92
|
591 |
#, php-format
|
592 |
msgid "Hide %s however still allow access with direct URL."
|
593 |
msgstr ""
|
594 |
|
595 |
#: Application/Backend/View/PostOptionList.php:27
|
596 |
+
#: Application/Backend/View/PostOptionList.php:31
|
597 |
#, php-format
|
598 |
msgid " %sSee in action.%s"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: Application/Backend/View/PostOptionList.php:30
|
602 |
+
#: Application/Backend/View/PostOptionList.php:116
|
603 |
msgid "Read"
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: Application/Backend/View/PostOptionList.php:31
|
607 |
#, php-format
|
608 |
msgid ""
|
609 |
"Restrict access to view, read or download %s. Any attempts to open %s will "
|
610 |
"be denied and redirected based on the Access Denied Redirect rule."
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: Application/Backend/View/PostOptionList.php:34
|
614 |
+
#: Application/Backend/View/PostOptionList.php:120
|
615 |
msgid "Limit"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: Application/Backend/View/PostOptionList.php:35
|
619 |
+
#: Application/Backend/View/PostOptionList.php:121
|
620 |
msgid "Teaser message"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: Application/Backend/View/PostOptionList.php:39
|
624 |
+
#: Application/Backend/View/PostOptionList.php:125
|
625 |
#, php-format
|
626 |
msgid "Replace %s content with defined teaser message."
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: Application/Backend/View/PostOptionList.php:42
|
630 |
+
#: Application/Backend/View/PostOptionList.php:128
|
631 |
msgid "Read Counter"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: Application/Backend/View/PostOptionList.php:43
|
635 |
+
#: Application/Backend/View/PostOptionList.php:129
|
636 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:32
|
637 |
msgid "Threshold"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: Application/Backend/View/PostOptionList.php:48
|
641 |
#, php-format
|
642 |
msgid ""
|
643 |
"Define how many times %s can be read, viewed or download. After number of "
|
645 |
"based on the Access Denied Redirect rule."
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: Application/Backend/View/PostOptionList.php:51
|
649 |
+
#: Application/Backend/View/PostOptionList.php:137
|
650 |
msgid "Comment"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: Application/Backend/View/PostOptionList.php:52
|
654 |
#, php-format
|
655 |
msgid "Restrict access to comment on %s if commenting is allowed."
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: Application/Backend/View/PostOptionList.php:55
|
659 |
msgid "Redirect"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: Application/Backend/View/PostOptionList.php:56
|
663 |
msgid "Redirect Rule"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: Application/Backend/View/PostOptionList.php:60
|
667 |
#, php-format
|
668 |
msgid ""
|
669 |
"Redirect user based on the defined redirect rule when user tries to read the "
|
670 |
"%s. The REDIRECT option will be ignored if READ option is checked."
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: Application/Backend/View/PostOptionList.php:63
|
674 |
+
#: Application/Backend/View/PostOptionList.php:141
|
675 |
msgid "Password Protected"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: Application/Backend/View/PostOptionList.php:64
|
679 |
+
#: Application/Backend/View/PostOptionList.php:142
|
680 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:53
|
681 |
#: Application/Backend/phtml/widget/login-frontend.phtml:27
|
682 |
#: Application/Frontend/phtml/login.phtml:13
|
683 |
msgid "Password"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: Application/Backend/View/PostOptionList.php:68
|
687 |
#, php-format
|
688 |
msgid ""
|
689 |
"Protect access to %s with password. Available with WordPress 4.7.0 or higher."
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: Application/Backend/View/PostOptionList.php:71
|
693 |
+
#: Application/Backend/View/PostOptionList.php:149
|
694 |
msgid "Access Expiration"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: Application/Backend/View/PostOptionList.php:72
|
698 |
+
#: Application/Backend/View/PostOptionList.php:150
|
|
|
699 |
msgid "Expires"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: Application/Backend/View/PostOptionList.php:76
|
703 |
#, php-format
|
704 |
msgid "Define when access will expire for %s."
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: Application/Backend/View/PostOptionList.php:76
|
708 |
#, php-format
|
709 |
msgid ""
|
710 |
"After expiration, the access to %s will be denied and redirected based on "
|
712 |
"or "
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: Application/Backend/View/PostOptionList.php:76
|
716 |
#, php-format
|
717 |
msgid " %ssee in action.%s"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: Application/Backend/View/PostOptionList.php:79
|
721 |
msgid "Monetized Access"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: Application/Backend/View/PostOptionList.php:80
|
725 |
msgid "E-Product"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: Application/Backend/View/PostOptionList.php:85
|
729 |
#, php-format
|
730 |
msgid ""
|
731 |
"[Premium feature!] Start selling access to %s. Access will be granted to "
|
733 |
"%scheck this article%s."
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: Application/Backend/View/PostOptionList.php:97
|
737 |
#, php-format
|
738 |
msgid ""
|
739 |
"Restrict access to edit %s. Any attempts to edit %s will result in "
|
740 |
"redirecting user based on the Access Denied Redirect rule."
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: Application/Backend/View/PostOptionList.php:100
|
744 |
+
#: Application/Backend/View/PostOptionList.php:162
|
745 |
+
#: Application/Backend/phtml/index.phtml:276
|
746 |
#: Application/Backend/phtml/main/capability.phtml:104
|
747 |
msgid "Delete"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: Application/Backend/View/PostOptionList.php:102
|
751 |
+
#: Application/Backend/View/PostOptionList.php:164
|
752 |
#, php-format
|
753 |
msgid "Restrict access to trash or permanently delete %s."
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: Application/Backend/View/PostOptionList.php:105
|
757 |
msgid "Publish"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: Application/Backend/View/PostOptionList.php:107
|
761 |
#, php-format
|
762 |
msgid ""
|
763 |
"Restrict access to publish %s. User will be allowed only to submit %s for "
|
764 |
"review."
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: Application/Backend/View/PostOptionList.php:113
|
768 |
#, php-format
|
769 |
msgid "Hide %s however still allow access to retrieve %s."
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: Application/Backend/View/PostOptionList.php:117
|
773 |
#, php-format
|
774 |
msgid ""
|
775 |
"Restrict access to retrieve %s. Any attempts to retrieve %s will be denied."
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: Application/Backend/View/PostOptionList.php:134
|
779 |
#, php-format
|
780 |
msgid ""
|
781 |
"Define how many times %s can be retrieved. After number of time exceeds the "
|
782 |
"defined threshold, the access will be denied to %s."
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: Application/Backend/View/PostOptionList.php:138
|
786 |
#, php-format
|
787 |
msgid "Restrict access to comment on %s if commenting feature is enabled."
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: Application/Backend/View/PostOptionList.php:146
|
791 |
#, php-format
|
792 |
msgid "Protected %s with password. Available with WordPress 4.7.0 or higher."
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: Application/Backend/View/PostOptionList.php:154
|
796 |
#, php-format
|
797 |
msgid "Define when access expires to %s."
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: Application/Backend/View/PostOptionList.php:154
|
801 |
#, php-format
|
802 |
msgid ""
|
803 |
"After expiration, the access to %s will be denied. For more information "
|
804 |
"%scheck this article%s or "
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: Application/Backend/View/PostOptionList.php:159
|
808 |
#, php-format
|
809 |
msgid "Restrict access to update %s. Any attempts to update %s will be denied."
|
810 |
msgstr ""
|
813 |
msgid "AAM Secure Login Widget"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: Application/Backend/Widget/Login.php:58
|
817 |
#: Application/Frontend/phtml/login.phtml:27
|
818 |
msgid "Login"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: Application/Backend/Widget/Login.php:62
|
822 |
#: Application/Shortcode/Strategy/Login.php:54
|
823 |
msgid "Howdy, %username%"
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: Application/Core/Importer.php:62
|
827 |
+
msgid "Version of exported settings do not match current AAM version"
|
|
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: Application/Core/JwtAuth.php:56
|
831 |
msgid "Valid username."
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: Application/Core/JwtAuth.php:60
|
835 |
msgid "Valid password."
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: Application/Core/JwtAuth.php:150
|
839 |
msgid "JWT Authentication is enabled but secret key is not defined"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: Application/Core/JwtAuth.php:205
|
843 |
+
#, php-format
|
844 |
+
msgid "Invalid value %s for property %s"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: Application/Core/Login.php:175
|
848 |
+
msgid "Access denied. Please login to get access."
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: Application/Core/Subject/Default.php:78 media/js/aam.js:1046
|
852 |
+
msgid "All Users, Roles and Visitor"
|
|
|
|
|
|
|
853 |
msgstr ""
|
854 |
|
855 |
#: Application/Extension/Repository.php:129
|
859 |
"more.%s"
|
860 |
msgstr ""
|
861 |
|
862 |
+
#: Application/Extension/Repository.php:365
|
863 |
#, php-format
|
864 |
msgid "Failed to create %s"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: Application/Extension/Repository.php:369
|
868 |
#, php-format
|
869 |
msgid "Directory %s is not writable"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: Application/Shared/Manager.php:349
|
873 |
msgid "RESTful API is disabled"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: Application/Shared/Manager.php:457
|
877 |
msgid "[No teaser message provided]"
|
878 |
msgstr ""
|
879 |
|
881 |
msgid "No valid strategy found for the given context"
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: aam.php:213
|
885 |
msgid "PHP 5.3.0 or higher is required."
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: aam.php:215
|
889 |
msgid "WP 4.0 or higher is required."
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: media/js/aam.js:179
|
893 |
+
msgid "Create New Role"
|
894 |
+
msgstr ""
|
895 |
+
|
896 |
+
#: media/js/aam.js:284
|
897 |
msgid "Clone Role"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: media/js/aam.js:564 Application/Backend/phtml/index.phtml:325
|
901 |
#: Application/Backend/phtml/partial/role-inheritance.phtml:5
|
902 |
msgid "Select Role"
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: media/js/aam.js:667
|
906 |
+
msgid "Create New User"
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: media/js/aam.js:676
|
910 |
+
msgid "Loading roles..."
|
911 |
+
msgstr ""
|
912 |
+
|
913 |
+
#: media/js/aam.js:693
|
914 |
+
msgid "Filter By Role"
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: media/js/aam.js:787
|
918 |
msgid "User Expiration"
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: media/js/aam.js:841
|
922 |
msgid "Switch To User"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: media/js/aam.js:933 Application/Backend/phtml/index.phtml:331
|
926 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
|
927 |
msgid "Save"
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: media/js/aam.js:952
|
931 |
msgid "Reseting..."
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: media/js/aam.js:966 Application/Backend/phtml/index.phtml:330
|
935 |
msgid "Reset"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: media/js/aam.js:1103 media/js/aam.js:1226 media/js/aam.js:3097
|
939 |
+
#: media/js/aam.js:3145 media/js/aam.js:3179 media/js/aam.js:3212
|
940 |
+
#: media/js/aam.js:3267
|
941 |
msgid "Application Error"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: media/js/aam.js:1172 Application/Backend/phtml/main/menu.phtml:57
|
945 |
+
#: Application/Backend/phtml/main/toolbar.phtml:55
|
946 |
msgid "Uncheck to allow"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: media/js/aam.js:1174 Application/Backend/phtml/main/menu.phtml:57
|
950 |
+
#: Application/Backend/phtml/main/toolbar.phtml:55
|
951 |
msgid "Check to restrict"
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: media/js/aam.js:1347 media/js/aam.js:1503
|
955 |
+
#: Application/Backend/phtml/main/metabox.phtml:65
|
956 |
+
msgid "Uncheck to show"
|
|
|
|
|
|
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: media/js/aam.js:1349 media/js/aam.js:1505
|
960 |
+
#: Application/Backend/phtml/main/metabox.phtml:65
|
961 |
+
msgid "Check to hide"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: media/js/aam.js:1475
|
965 |
+
msgid "Processing"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: media/js/aam.js:1478 Application/Backend/phtml/main/metabox.phtml:101
|
969 |
+
msgid "Initialize"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: media/js/aam.js:1551
|
973 |
msgid "WordPress core does not allow to grant this capability"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: media/js/aam.js:1591 media/js/aam.js:2772
|
977 |
msgid "Nothing to show"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: media/js/aam.js:1743
|
981 |
msgid "Failed to update capability"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: media/js/aam.js:1751 Application/Backend/phtml/main/capability.phtml:76
|
985 |
msgid "Update Capability"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: media/js/aam.js:1782
|
989 |
msgid "Failed to delete capability"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: media/js/aam.js:1790 Application/Backend/phtml/main/capability.phtml:98
|
993 |
msgid "Delete Capability"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: media/js/aam.js:2094
|
997 |
+
msgid "Settings Customized"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#: media/js/aam.js:2128 media/js/aam.js:2131 media/js/aam.js:2144
|
1001 |
+
#: media/js/aam.js:2147
|
1002 |
+
msgid "Parent:"
|
1003 |
+
msgstr ""
|
1004 |
+
|
1005 |
+
#: media/js/aam.js:2134 media/js/aam.js:2150
|
1006 |
+
#: Application/Backend/phtml/main/metabox.phtml:63
|
1007 |
+
msgid "ID:"
|
1008 |
+
msgstr ""
|
1009 |
+
|
1010 |
+
#: media/js/aam.js:2177
|
1011 |
msgid "Drill-Down"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: media/js/aam.js:2250 media/js/aam.js:3731
|
1015 |
msgid "Resetting..."
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: media/js/aam.js:2768
|
1019 |
msgid "Search Route"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: media/js/aam.js:2769
|
1023 |
msgid "_TOTAL_ route(s)"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
+
#: media/js/aam.js:2771
|
1027 |
+
msgid "No API enpoints found. You might have APIs disabled."
|
1028 |
+
msgstr ""
|
1029 |
+
|
1030 |
+
#: media/js/aam.js:2886
|
1031 |
msgid "Extension status was updated successfully"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: media/js/aam.js:3033
|
1035 |
+
msgid "The issue has been resolved"
|
1036 |
+
msgstr ""
|
1037 |
+
|
1038 |
+
#: media/js/aam.js:3132 media/js/aam.js:3166 media/js/aam.js:3200
|
1039 |
+
#: media/js/aam.js:3253
|
1040 |
msgid "Wait..."
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: media/js/aam.js:3138
|
1044 |
msgid "All settings has been cleared successfully"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: media/js/aam.js:3149 media/js/aam.js:3183
|
1048 |
#: Application/Backend/phtml/settings/tools.phtml:66
|
1049 |
msgid "Clear"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: media/js/aam.js:3172
|
1053 |
msgid "The cache has been cleared successfully"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: media/js/vendor.js:564
|
1057 |
+
msgid ": "
|
1058 |
msgstr ""
|
1059 |
|
1060 |
#: Application/Backend/phtml/extensions.phtml:6
|
1116 |
msgstr ""
|
1117 |
|
1118 |
#: Application/Backend/phtml/extensions.phtml:55
|
1119 |
+
#: Application/Backend/phtml/index.phtml:152
|
1120 |
msgid "Read More"
|
1121 |
msgstr ""
|
1122 |
|
1128 |
#: Application/Backend/phtml/extensions.phtml:97
|
1129 |
#: Application/Backend/phtml/extensions.phtml:128
|
1130 |
#: Application/Backend/phtml/extensions.phtml:139
|
1131 |
+
#: Application/Backend/phtml/index.phtml:216
|
1132 |
+
#: Application/Backend/phtml/index.phtml:233
|
1133 |
+
#: Application/Backend/phtml/index.phtml:243
|
1134 |
+
#: Application/Backend/phtml/index.phtml:259
|
1135 |
+
#: Application/Backend/phtml/index.phtml:269
|
1136 |
+
#: Application/Backend/phtml/index.phtml:277
|
1137 |
+
#: Application/Backend/phtml/index.phtml:304
|
1138 |
+
#: Application/Backend/phtml/index.phtml:332
|
1139 |
#: Application/Backend/phtml/main/capability.phtml:54
|
1140 |
#: Application/Backend/phtml/main/capability.phtml:65
|
1141 |
#: Application/Backend/phtml/main/capability.phtml:75
|
1143 |
#: Application/Backend/phtml/main/capability.phtml:97
|
1144 |
#: Application/Backend/phtml/main/capability.phtml:105
|
1145 |
#: Application/Backend/phtml/main/menu.phtml:100
|
1146 |
+
#: Application/Backend/phtml/main/metabox.phtml:88
|
1147 |
+
#: Application/Backend/phtml/main/metabox.phtml:102
|
1148 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
|
1149 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:17
|
1150 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:27
|
1154 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:69
|
1155 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:115
|
1156 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:125
|
1157 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:136
|
1158 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:146
|
1159 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:158
|
1160 |
#: Application/Backend/phtml/settings/tools.phtml:59
|
1161 |
msgid "Close"
|
1162 |
msgstr ""
|
1217 |
msgid "Main Panel"
|
1218 |
msgstr ""
|
1219 |
|
1220 |
+
#: Application/Backend/phtml/index.phtml:18
|
1221 |
msgid ""
|
1222 |
"[Loading AAM UI]. Please wait. If content will not load within next 30 "
|
1223 |
"seconds, clear your browser cache and reload the page. If still nothing, it "
|
1226 |
"WordPress theme to find out what causes the issue."
|
1227 |
msgstr ""
|
1228 |
|
1229 |
+
#: Application/Backend/phtml/index.phtml:30
|
1230 |
+
msgid "Notifications"
|
|
|
|
|
|
|
1231 |
msgstr ""
|
1232 |
|
1233 |
+
#: Application/Backend/phtml/index.phtml:79
|
1234 |
+
msgid "Warning"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: Application/Backend/phtml/index.phtml:84
|
1238 |
+
#, php-format
|
1239 |
msgid ""
|
1240 |
+
"All AAM extension should be located in [%s] directory however it either does "
|
1241 |
+
"not exist or is not writable."
|
|
|
|
|
|
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: Application/Backend/phtml/index.phtml:86
|
1245 |
+
msgid "Click To Fix The Issue"
|
|
|
|
|
|
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: Application/Backend/phtml/index.phtml:97
|
1249 |
#, php-format
|
1250 |
msgid ""
|
1251 |
+
"Failed to create a [%s] directory for AAM extension. To create it manually, "
|
1252 |
+
"login to your website via FTP and create [%s] directory. [Please Note!] It "
|
1253 |
+
"is a relative directory path from your website root (where wp-config.php "
|
1254 |
+
"file is located)."
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: Application/Backend/phtml/index.phtml:102
|
1258 |
+
msgid "Ok"
|
1259 |
+
msgstr ""
|
1260 |
+
|
1261 |
+
#: Application/Backend/phtml/index.phtml:114
|
1262 |
+
msgid "Premium Licenses"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: Application/Backend/phtml/index.phtml:131
|
1266 |
+
msgid "Manage License"
|
1267 |
+
msgstr ""
|
1268 |
+
|
1269 |
+
#: Application/Backend/phtml/index.phtml:133
|
1270 |
+
msgid "Upgrade License"
|
1271 |
+
msgstr ""
|
1272 |
+
|
1273 |
+
#: Application/Backend/phtml/index.phtml:151
|
1274 |
msgid ""
|
1275 |
"The [Development Package] allows you to get all premium extensions for "
|
1276 |
"[unlimited number of websites]."
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: Application/Backend/phtml/index.phtml:162
|
1280 |
msgid "AAM Multisite"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: Application/Backend/phtml/index.phtml:165
|
1284 |
msgid ""
|
1285 |
"Install free [AAM Multisite extension] in order to manage all your sites "
|
1286 |
"from the Network Admin."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: Application/Backend/phtml/index.phtml:176
|
1290 |
msgid "Users/Roles Manager"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: Application/Backend/phtml/index.phtml:183
|
1294 |
+
#: Application/Backend/phtml/index.phtml:363
|
1295 |
msgid "Roles"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
+
#: Application/Backend/phtml/index.phtml:189
|
1299 |
+
#: Application/Backend/phtml/index.phtml:373
|
1300 |
msgid "Visitor"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: Application/Backend/phtml/index.phtml:192
|
1304 |
+
#: Application/Backend/phtml/index.phtml:378
|
1305 |
msgid "Default"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: Application/Backend/phtml/index.phtml:204
|
1309 |
+
#: Application/Backend/phtml/index.phtml:292
|
1310 |
msgid "Action"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: Application/Backend/phtml/index.phtml:217
|
1314 |
msgid "Create Role"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
+
#: Application/Backend/phtml/index.phtml:221
|
1318 |
+
#: Application/Backend/phtml/index.phtml:248
|
1319 |
msgid "Role Name"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: Application/Backend/phtml/index.phtml:222
|
1323 |
+
#: Application/Backend/phtml/index.phtml:249
|
1324 |
msgid "Enter Role Name"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
+
#: Application/Backend/phtml/index.phtml:225
|
1328 |
+
#: Application/Backend/phtml/index.phtml:252
|
1329 |
msgid "Role Expiration"
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: Application/Backend/phtml/index.phtml:226
|
1333 |
+
#: Application/Backend/phtml/index.phtml:253
|
1334 |
msgid "Enter Expiration Rule"
|
1335 |
msgstr ""
|
1336 |
|
1337 |
+
#: Application/Backend/phtml/index.phtml:244
|
1338 |
msgid "Update Role"
|
1339 |
msgstr ""
|
1340 |
|
1341 |
+
#: Application/Backend/phtml/index.phtml:273
|
1342 |
#, php-format
|
1343 |
msgid "Are you sure that you want to delete the %s role?"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
+
#: Application/Backend/phtml/index.phtml:291
|
1347 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:62
|
1348 |
msgid "Username"
|
1349 |
msgstr ""
|
1350 |
|
1351 |
+
#: Application/Backend/phtml/index.phtml:305
|
1352 |
msgid "Manage User Expiration"
|
1353 |
msgstr ""
|
1354 |
|
1355 |
+
#: Application/Backend/phtml/index.phtml:314
|
|
|
|
|
|
|
|
|
1356 |
msgid "Action After Expiration"
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: Application/Backend/phtml/index.phtml:316
|
1360 |
msgid "Select Action"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: Application/Backend/phtml/index.phtml:317
|
1364 |
msgid "Delete Account"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: Application/Backend/phtml/index.phtml:318
|
1368 |
msgid "Lock Account"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
+
#: Application/Backend/phtml/index.phtml:319
|
1372 |
msgid "Change User Role"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
+
#: Application/Backend/phtml/index.phtml:323
|
1376 |
msgid "Change To Role"
|
1377 |
msgstr ""
|
1378 |
|
1379 |
+
#: Application/Backend/phtml/index.phtml:342
|
1380 |
msgid ""
|
1381 |
"Manage access to your website for visitors (any user that is not "
|
1382 |
"authenticated)"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: Application/Backend/phtml/index.phtml:343
|
1386 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:75
|
1387 |
msgid "Manage Visitors"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: Application/Backend/phtml/index.phtml:350
|
1391 |
msgid ""
|
1392 |
"Manage default access to your website resources for all users, roles and "
|
1393 |
"visitor. This includes Administrator role and your user"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
+
#: Application/Backend/phtml/index.phtml:351
|
1397 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:84
|
1398 |
msgid "Manage Default Access"
|
1399 |
msgstr ""
|
1400 |
|
1401 |
+
#: Application/Backend/phtml/index.phtml:359
|
1402 |
msgid ""
|
1403 |
"Manage access for your users, roles and visitors. Be careful with "
|
1404 |
"[Administrator] role as well as your admin user. [Database backup is "
|
1405 |
"strongly recommended]."
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: Application/Backend/phtml/index.phtml:364
|
1409 |
msgid ""
|
1410 |
"With Roles tab you can manage access for any defined role, edit role's name, "
|
1411 |
"create new role or even delete existing (but only when there is no users "
|
1412 |
"assigned to it). You are not allowed to delete Administrator role."
|
1413 |
msgstr ""
|
1414 |
|
1415 |
+
#: Application/Backend/phtml/index.phtml:369
|
1416 |
msgid ""
|
1417 |
"Manage access for any user. As a bonus feature, you can block user. It means "
|
1418 |
"that user will be not able to login to your website anymore."
|
1419 |
msgstr ""
|
1420 |
|
1421 |
+
#: Application/Backend/phtml/index.phtml:374
|
1422 |
msgid ""
|
1423 |
"Visitor can be considered any user that is not authenticated to your website."
|
1424 |
msgstr ""
|
1425 |
|
1426 |
+
#: Application/Backend/phtml/index.phtml:379
|
1427 |
msgid ""
|
1428 |
"Manage default access settings to your website resources for all users, "
|
1429 |
"roles and visitors."
|
1522 |
#: Application/Backend/phtml/main/metabox.phtml:20
|
1523 |
#: Application/Backend/phtml/main/post.phtml:36
|
1524 |
#: Application/Backend/phtml/main/route.phtml:18
|
1525 |
+
#: Application/Backend/phtml/main/toolbar.phtml:19
|
1526 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:101
|
1527 |
msgid "Reset To Default"
|
1528 |
msgstr ""
|
1562 |
msgid "Are you sure that you want to delete %s capability for all roles?"
|
1563 |
msgstr ""
|
1564 |
|
1565 |
+
#: Application/Backend/phtml/main/get-started.phtml:7
|
1566 |
+
msgid ""
|
1567 |
+
"Appreciate your interest in Advanced Access Manager (aka AAM). With strong "
|
1568 |
+
"knowledge and experience in WordPress, AAM becomes a very powerful tool to "
|
1569 |
+
"manage access to your frontend, backend and RESTful/XML-PRC APIs."
|
1570 |
+
msgstr ""
|
1571 |
+
|
1572 |
+
#: Application/Backend/phtml/main/get-started.phtml:8
|
1573 |
+
msgid "Please Note!"
|
1574 |
+
msgstr ""
|
1575 |
+
|
1576 |
+
#: Application/Backend/phtml/main/get-started.phtml:8
|
1577 |
+
#, php-format
|
1578 |
+
msgid ""
|
1579 |
+
"Power comes with responsibility. Make sure you have good understanding of "
|
1580 |
+
"%sWordPress Roles & Capabilities%s because AAM is very closely integrated "
|
1581 |
+
"with WordPress core. It is also recommended to have a backup of your "
|
1582 |
+
"database before you start working with AAM. There is no need to backup your "
|
1583 |
+
"files; AAM does not modify any physical files on your server and never did."
|
1584 |
+
msgstr ""
|
1585 |
+
|
1586 |
+
#: Application/Backend/phtml/main/get-started.phtml:9
|
1587 |
+
#, php-format
|
1588 |
+
msgid ""
|
1589 |
+
"AAM was thoroughly tested on the fresh installation of WordPress and in the "
|
1590 |
+
"latest versions of Chrome, Safari, IE and Firefox. If you have any issues, "
|
1591 |
+
"the most typical case is a conflict with other plugins or themes. In this "
|
1592 |
+
"case please do not hesitate to contact us directly on our website "
|
1593 |
+
"%saamplugin.com%s"
|
1594 |
+
msgstr ""
|
1595 |
+
|
1596 |
+
#: Application/Backend/phtml/main/get-started.phtml:10
|
1597 |
+
#, php-format
|
1598 |
+
msgid ""
|
1599 |
+
"If you are not sure where to start, please check our %s\"Get Started\"%s "
|
1600 |
+
"page to learn more about core concepts that will definitely help you to "
|
1601 |
+
"manage access to your WordPress website more effectively."
|
1602 |
+
msgstr ""
|
1603 |
+
|
1604 |
+
#: Application/Backend/phtml/main/get-started.phtml:12
|
1605 |
+
msgid ""
|
1606 |
+
"To remove the \"Get Started\" tab you may go to Settings Area and disable "
|
1607 |
+
"\"Get Started Feature\" option."
|
1608 |
+
msgstr ""
|
1609 |
+
|
1610 |
#: Application/Backend/phtml/main/login-redirect.phtml:7
|
1611 |
msgid ""
|
1612 |
"Define the [default] login redirect for all users and roles when "
|
1653 |
#: Application/Backend/phtml/main/menu.phtml:13
|
1654 |
#: Application/Backend/phtml/main/metabox.phtml:19
|
1655 |
#: Application/Backend/phtml/main/post.phtml:35
|
1656 |
+
#: Application/Backend/phtml/main/toolbar.phtml:18
|
1657 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:100
|
1658 |
msgid "Settings are customized"
|
1659 |
msgstr ""
|
1660 |
|
1661 |
+
#: Application/Backend/phtml/main/menu.phtml:50
|
1662 |
+
#: Application/Backend/phtml/main/menu.phtml:55
|
1663 |
+
msgid "Cap:"
|
1664 |
+
msgstr ""
|
1665 |
+
|
1666 |
#: Application/Backend/phtml/main/menu.phtml:89
|
1667 |
msgid ""
|
1668 |
"Current user does not have enough capabilities to access any available "
|
1697 |
msgstr ""
|
1698 |
|
1699 |
#: Application/Backend/phtml/main/metabox.phtml:12
|
1700 |
+
#: Application/Backend/phtml/main/toolbar.phtml:12
|
1701 |
msgid "Refresh"
|
1702 |
msgstr ""
|
1703 |
|
1710 |
msgstr ""
|
1711 |
|
1712 |
#: Application/Backend/phtml/main/metabox.phtml:47
|
1713 |
+
msgid "Frontend Widgets [(including Appearance->Widgets)]"
|
1714 |
msgstr ""
|
1715 |
|
1716 |
+
#: Application/Backend/phtml/main/metabox.phtml:63
|
1717 |
+
msgid "Screen:"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
+
#: Application/Backend/phtml/main/metabox.phtml:78
|
1721 |
+
msgid "The list is not initialized. Click Refresh button above."
|
|
|
|
|
|
|
1722 |
msgstr ""
|
1723 |
|
1724 |
+
#: Application/Backend/phtml/main/metabox.phtml:89
|
1725 |
msgid "Initialize URL"
|
1726 |
msgstr ""
|
1727 |
|
1728 |
+
#: Application/Backend/phtml/main/metabox.phtml:93
|
1729 |
msgid ""
|
1730 |
"Some metaboxes are \"conditional\" and appear on the Edit screen when "
|
1731 |
"certain conditions are met. For example metabox \"Comments\" appears only "
|
1734 |
"appears."
|
1735 |
msgstr ""
|
1736 |
|
1737 |
+
#: Application/Backend/phtml/main/metabox.phtml:96
|
1738 |
msgid "Backend page URL"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
+
#: Application/Backend/phtml/main/metabox.phtml:97
|
1742 |
msgid "Insert valid URL"
|
1743 |
msgstr ""
|
1744 |
|
1758 |
msgid ""
|
1759 |
"Manage access to posts, pages, custom post types, categories or custom "
|
1760 |
"hierarchical taxonomies. For more information about this functionality check "
|
1761 |
+
"%sManage access to the WordPress Posts and Terms%s article."
|
1762 |
msgstr ""
|
1763 |
|
1764 |
#: Application/Backend/phtml/main/post.phtml:25
|
1769 |
msgid "Title"
|
1770 |
msgstr ""
|
1771 |
|
1772 |
+
#: Application/Backend/phtml/main/post.phtml:61
|
1773 |
+
#: Application/Backend/phtml/main/post.phtml:64
|
1774 |
+
#: Application/Backend/phtml/main/post.phtml:68
|
1775 |
+
#: Application/Backend/phtml/main/post.phtml:71
|
1776 |
+
#: Application/Backend/phtml/main/post.phtml:79
|
1777 |
+
#: Application/Backend/phtml/main/post.phtml:84
|
1778 |
msgid "Go Back"
|
1779 |
msgstr ""
|
1780 |
|
1857 |
msgid "Deny"
|
1858 |
msgstr ""
|
1859 |
|
1860 |
+
#: Application/Backend/phtml/main/toolbar.phtml:6
|
1861 |
+
msgid ""
|
1862 |
+
"[Note!] Admin Toolbar feature is not intended to restrict direct access to "
|
1863 |
+
"URLs and should be used only to remove unnecessary items from the top admin "
|
1864 |
+
"toolbar. Use [Backend Menu] tab to restrict direct access to backend pages "
|
1865 |
+
"or utilize the great power of roles and capabilities."
|
1866 |
+
msgstr ""
|
1867 |
+
|
1868 |
+
#: Application/Backend/phtml/main/toolbar.phtml:82
|
1869 |
+
msgid ""
|
1870 |
+
"The list of top admin bar items is not initialized. Click \"Refresh\" button "
|
1871 |
+
"above."
|
1872 |
+
msgstr ""
|
1873 |
+
|
1874 |
#: Application/Backend/phtml/metabox/metabox-content.phtml:74
|
1875 |
#, php-format
|
1876 |
msgid "Manage access to %s for visitors (any user that is not authenticated)"
|
1941 |
msgstr ""
|
1942 |
|
1943 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:70
|
1944 |
+
msgid "Set Redirect Rule"
|
1945 |
msgstr ""
|
1946 |
|
1947 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:73
|
|
|
1948 |
msgid ""
|
1949 |
+
"Use REDIRECT option only if you want to redirect user to different location "
|
1950 |
+
"either temporary or permanently."
|
1951 |
msgstr ""
|
1952 |
|
1953 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:126
|
1954 |
msgid "Set Expiration"
|
1955 |
msgstr ""
|
1956 |
|
1957 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:147
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1958 |
msgid "E-Commerce Setup"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:153
|
1962 |
#, php-format
|
1963 |
msgid ""
|
1964 |
"Monetization is the premium feature that is available with %s[E-Commerce]%s "
|
2048 |
msgid "Logged In Title"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
+
#: Application/Backend/phtml/widget/login-backend.phtml:13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2052 |
#, php-format
|
2053 |
msgid ""
|
2054 |
+
"For more advanced setup like login/logout redirects, security enhancement or "
|
2055 |
+
"custom styling, please refer to %sHow does AAM Secure Login works%s article."
|
2056 |
msgstr ""
|
2057 |
|
2058 |
#: Application/Backend/phtml/widget/login-frontend.phtml:21
|
2069 |
msgid "Log In"
|
2070 |
msgstr ""
|
2071 |
|
2072 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:50
|
2073 |
+
#: Application/Frontend/phtml/login.phtml:36
|
2074 |
msgid "Register"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:55
|
2078 |
+
#: Application/Frontend/phtml/login.phtml:41
|
2079 |
msgid "Lost your password?"
|
2080 |
msgstr ""
|
2081 |
|
2082 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:66
|
2083 |
+
#: Application/Frontend/phtml/login.phtml:53
|
2084 |
msgid "Dashboard"
|
2085 |
msgstr ""
|
2086 |
|
2087 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:67
|
2088 |
+
#: Application/Frontend/phtml/login.phtml:54
|
2089 |
msgid "Edit My Profile"
|
2090 |
msgstr ""
|
2091 |
|
2092 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:69
|
2093 |
+
#: Application/Frontend/phtml/login.phtml:56
|
2094 |
msgid "Log Out"
|
2095 |
msgstr ""
|
aam.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: All you need to manage access to your WordPress website
|
6 |
-
Version: 5.4.
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
@@ -142,7 +142,9 @@ class AAM {
|
|
142 |
AAM::getInstance();
|
143 |
|
144 |
//load all installed extension
|
145 |
-
|
|
|
|
|
146 |
|
147 |
//load media control
|
148 |
AAM_Core_Media::bootstrap();
|
@@ -168,14 +170,9 @@ class AAM {
|
|
168 |
self::$_instance = new self;
|
169 |
|
170 |
// Logout user if he/she is blocked
|
171 |
-
|
172 |
-
if ($user->getUID() == 'user' && $user->user_status == 1) {
|
173 |
-
wp_logout();
|
174 |
-
}
|
175 |
|
176 |
-
load_plugin_textdomain(
|
177 |
-
AAM_KEY, false, dirname(plugin_basename(__FILE__)) . '/Lang/'
|
178 |
-
);
|
179 |
}
|
180 |
|
181 |
return self::$_instance;
|
@@ -193,7 +190,7 @@ class AAM {
|
|
193 |
public static function cron() {
|
194 |
$extensions = AAM_Core_API::getOption('aam-extensions', null, 'site');
|
195 |
|
196 |
-
if (!empty($extensions)) {
|
197 |
//grab the server extension list
|
198 |
AAM_Core_API::updateOption(
|
199 |
'aam-check', AAM_Core_Server::check(), 'site'
|
@@ -212,9 +209,9 @@ class AAM {
|
|
212 |
global $wp_version;
|
213 |
|
214 |
//check PHP Version
|
215 |
-
if (version_compare(PHP_VERSION, '5.3.0')
|
216 |
exit(__('PHP 5.3.0 or higher is required.', AAM_KEY));
|
217 |
-
} elseif (version_compare($wp_version, '4.0')
|
218 |
exit(__('WP 4.0 or higher is required.', AAM_KEY));
|
219 |
}
|
220 |
}
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: All you need to manage access to your WordPress website
|
6 |
+
Version: 5.4.3
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
142 |
AAM::getInstance();
|
143 |
|
144 |
//load all installed extension
|
145 |
+
if (AAM_Core_Config::get('core.settings.extensionSupport', true)) {
|
146 |
+
AAM_Extension_Repository::getInstance()->load();
|
147 |
+
}
|
148 |
|
149 |
//load media control
|
150 |
AAM_Core_Media::bootstrap();
|
170 |
self::$_instance = new self;
|
171 |
|
172 |
// Logout user if he/she is blocked
|
173 |
+
self::$_instance->getUser()->validateUserStatus();
|
|
|
|
|
|
|
174 |
|
175 |
+
load_plugin_textdomain(AAM_KEY);
|
|
|
|
|
176 |
}
|
177 |
|
178 |
return self::$_instance;
|
190 |
public static function cron() {
|
191 |
$extensions = AAM_Core_API::getOption('aam-extensions', null, 'site');
|
192 |
|
193 |
+
if (!empty($extensions) && AAM_Core_Config::get('core.settings.cron', true)) {
|
194 |
//grab the server extension list
|
195 |
AAM_Core_API::updateOption(
|
196 |
'aam-check', AAM_Core_Server::check(), 'site'
|
209 |
global $wp_version;
|
210 |
|
211 |
//check PHP Version
|
212 |
+
if (version_compare(PHP_VERSION, '5.3.0') === -1) {
|
213 |
exit(__('PHP 5.3.0 or higher is required.', AAM_KEY));
|
214 |
+
} elseif (version_compare($wp_version, '4.0') === -1) {
|
215 |
exit(__('WP 4.0 or higher is required.', AAM_KEY));
|
216 |
}
|
217 |
}
|
media/css/aam.css
CHANGED
@@ -28,7 +28,6 @@
|
|
28 |
width: 1em;
|
29 |
margin-right: .2em;
|
30 |
text-align: center;
|
31 |
-
/* opacity: .8; */
|
32 |
|
33 |
/* For safety - reset parent styles, that can break glyph codes*/
|
34 |
font-variant: normal;
|
@@ -42,14 +41,10 @@
|
|
42 |
margin-left: .2em;
|
43 |
|
44 |
/* you can be more comfortable with increased icons size */
|
45 |
-
/* font-size: 120%; */
|
46 |
|
47 |
/* Font smoothing. That was taken from TWBS */
|
48 |
-webkit-font-smoothing: antialiased;
|
49 |
-moz-osx-font-smoothing: grayscale;
|
50 |
-
|
51 |
-
/* Uncomment for 3D effect */
|
52 |
-
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
53 |
}
|
54 |
|
55 |
.icon-clock:before { content: '\e800' !important; } /* 'î ' */
|
@@ -568,6 +563,10 @@ input[type=radio]:checked + label:before {
|
|
568 |
cursor: pointer;
|
569 |
}
|
570 |
|
|
|
|
|
|
|
|
|
571 |
.aam-redirect-action {
|
572 |
padding: 10px 20px;
|
573 |
}
|
28 |
width: 1em;
|
29 |
margin-right: .2em;
|
30 |
text-align: center;
|
|
|
31 |
|
32 |
/* For safety - reset parent styles, that can break glyph codes*/
|
33 |
font-variant: normal;
|
41 |
margin-left: .2em;
|
42 |
|
43 |
/* you can be more comfortable with increased icons size */
|
|
|
44 |
|
45 |
/* Font smoothing. That was taken from TWBS */
|
46 |
-webkit-font-smoothing: antialiased;
|
47 |
-moz-osx-font-smoothing: grayscale;
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
.icon-clock:before { content: '\e800' !important; } /* 'î ' */
|
563 |
cursor: pointer;
|
564 |
}
|
565 |
|
566 |
+
.aam-access-overwritten {
|
567 |
+
color: #f0ad4e;
|
568 |
+
}
|
569 |
+
|
570 |
.aam-redirect-action {
|
571 |
padding: 10px 20px;
|
572 |
}
|
media/js/aam-login.js
CHANGED
@@ -63,7 +63,6 @@ if (typeof jQuery !== 'undefined') {
|
|
63 |
}).val(button.attr('data-original-label'));
|
64 |
}
|
65 |
});
|
66 |
-
|
67 |
} else {
|
68 |
$('#' + prefix + 'error').html(
|
69 |
'<strong>ERROR:</strong> Username and password are required.'
|
63 |
}).val(button.attr('data-original-label'));
|
64 |
}
|
65 |
});
|
|
|
66 |
} else {
|
67 |
$('#' + prefix + 'error').html(
|
68 |
'<strong>ERROR:</strong> Username and password are required.'
|
media/js/aam.js
CHANGED
@@ -5,7 +5,6 @@
|
|
5 |
* ======================================================================
|
6 |
*/
|
7 |
|
8 |
-
|
9 |
/**
|
10 |
*
|
11 |
* @param {type} $
|
@@ -21,13 +20,13 @@
|
|
21 |
* @returns {undefined}
|
22 |
*/
|
23 |
function switchToUser(id, btn, rowAction) {
|
24 |
-
$.ajax(
|
25 |
type: 'POST',
|
26 |
dataType: 'json',
|
27 |
data: {
|
28 |
action: 'aam',
|
29 |
sub_action: 'switchToUser',
|
30 |
-
_ajax_nonce:
|
31 |
user: id
|
32 |
},
|
33 |
beforeSend: function () {
|
@@ -40,11 +39,11 @@
|
|
40 |
if (response.status === 'success') {
|
41 |
location.href = response.redirect;
|
42 |
} else {
|
43 |
-
|
44 |
}
|
45 |
},
|
46 |
error: function () {
|
47 |
-
|
48 |
},
|
49 |
complete: function () {
|
50 |
$(btn).attr(
|
@@ -76,33 +75,33 @@
|
|
76 |
* @returns {Boolean}
|
77 |
*/
|
78 |
function isCurrent(id) {
|
79 |
-
var subject =
|
80 |
|
81 |
return (subject.type === 'role' && subject.id === id);
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
*
|
86 |
-
* @
|
87 |
*/
|
88 |
function fetchRoleList(exclude) {
|
89 |
-
$.ajax(
|
90 |
type: 'POST',
|
91 |
dataType: 'json',
|
92 |
data: {
|
93 |
action: 'aam',
|
94 |
sub_action: 'Subject_Role.getList',
|
95 |
-
_ajax_nonce:
|
96 |
exclude: exclude
|
97 |
},
|
98 |
beforeSend: function () {
|
99 |
$('.inherit-role-list').html(
|
100 |
-
'<option value="">' +
|
101 |
);
|
102 |
},
|
103 |
success: function (response) {
|
104 |
$('.inherit-role-list').html(
|
105 |
-
'<option value="">' +
|
106 |
);
|
107 |
for (var i in response) {
|
108 |
$('.inherit-role-list').append(
|
@@ -112,7 +111,7 @@
|
|
112 |
if ($.aamEditRole) {
|
113 |
$('#inherit-role').val($.aamEditRole[0]);
|
114 |
}
|
115 |
-
|
116 |
list : response
|
117 |
});
|
118 |
//TODO - Rerwite JavaScript to support $.aam
|
@@ -146,13 +145,13 @@
|
|
146 |
stateSave: true,
|
147 |
serverSide: false,
|
148 |
ajax: {
|
149 |
-
url:
|
150 |
type: 'POST',
|
151 |
dataType: 'json',
|
152 |
data: {
|
153 |
action: 'aam',
|
154 |
sub_action: 'Subject_Role.getTable',
|
155 |
-
_ajax_nonce:
|
156 |
}
|
157 |
},
|
158 |
columnDefs: [
|
@@ -160,12 +159,12 @@
|
|
160 |
],
|
161 |
language: {
|
162 |
search: '_INPUT_',
|
163 |
-
searchPlaceholder:
|
164 |
-
info:
|
165 |
infoFiltered: ''
|
166 |
},
|
167 |
initComplete: function () {
|
168 |
-
if (!
|
169 |
var create = $('<a/>', {
|
170 |
'href': '#',
|
171 |
'class': 'btn btn-primary'
|
@@ -177,7 +176,7 @@
|
|
177 |
})
|
178 |
.attr({
|
179 |
'data-toggle': "tooltip",
|
180 |
-
'title':
|
181 |
});
|
182 |
|
183 |
$('.dataTables_filter', '#role-list_wrapper').append(create);
|
@@ -196,9 +195,9 @@
|
|
196 |
var expire = (data[5] ? '; <i class="icon-clock"></i>' : '');
|
197 |
$('td:eq(0)', row).append(
|
198 |
$('<i/>', {'class': 'aam-row-subtitle'}).html(
|
199 |
-
|
200 |
'role-subtitle',
|
201 |
-
|
202 |
data
|
203 |
)
|
204 |
)
|
@@ -216,25 +215,25 @@
|
|
216 |
if (!$(this).prop('disabled')) {
|
217 |
$(this).prop('disabled', true);
|
218 |
var title = $('td:eq(0) span', row).html();
|
219 |
-
|
220 |
$('td:eq(0) span', row).replaceWith(
|
221 |
'<strong class="aam-highlight">' + title + '</strong>'
|
222 |
);
|
223 |
$('i.icon-cog', container).attr(
|
224 |
'class', 'aam-row-action icon-cog text-muted'
|
225 |
);
|
226 |
-
if (!
|
227 |
$('i.icon-cog', container).attr(
|
228 |
'class', 'aam-row-action icon-spin4 animate-spin'
|
229 |
);
|
230 |
-
|
231 |
$('i.icon-spin4', container).attr(
|
232 |
'class', 'aam-row-action icon-cog text-muted'
|
233 |
);
|
234 |
} else {
|
235 |
-
|
236 |
$('#metabox-post-access-form').html(content);
|
237 |
-
|
238 |
$('#load-post-object-type').val(),
|
239 |
$('#load-post-object').val(),
|
240 |
$(this)
|
@@ -244,12 +243,12 @@
|
|
244 |
}
|
245 |
}).attr({
|
246 |
'data-toggle': "tooltip",
|
247 |
-
'title':
|
248 |
}).prop('disabled', (isCurrent(data[0]) ? true: false)));
|
249 |
break;
|
250 |
|
251 |
case 'edit':
|
252 |
-
if (!
|
253 |
$(container).append($('<i/>', {
|
254 |
'class': 'aam-row-action icon-pencil text-warning'
|
255 |
}).bind('click', function () {
|
@@ -263,16 +262,16 @@
|
|
263 |
//TODO - Rerwite JavaScript to support $.aam
|
264 |
$.aamEditRole = data;
|
265 |
|
266 |
-
|
267 |
}).attr({
|
268 |
'data-toggle': "tooltip",
|
269 |
-
'title':
|
270 |
}));
|
271 |
}
|
272 |
break;
|
273 |
|
274 |
case 'clone':
|
275 |
-
if (!
|
276 |
$(container).append($('<i/>', {
|
277 |
'class': 'aam-row-action icon-clone text-success'
|
278 |
}).bind('click', function () {
|
@@ -282,13 +281,13 @@
|
|
282 |
$('#add-role-modal').modal('show');
|
283 |
}).attr({
|
284 |
'data-toggle': "tooltip",
|
285 |
-
'title':
|
286 |
}));
|
287 |
}
|
288 |
break;
|
289 |
|
290 |
case 'delete':
|
291 |
-
if (!
|
292 |
$(container).append($('<i/>', {
|
293 |
'class': 'aam-row-action icon-trash-empty text-danger'
|
294 |
}).bind('click', {role: data}, function (event) {
|
@@ -303,14 +302,14 @@
|
|
303 |
$('#delete-role-modal').modal('show');
|
304 |
}).attr({
|
305 |
'data-toggle': "tooltip",
|
306 |
-
'title':
|
307 |
}));
|
308 |
}
|
309 |
break;
|
310 |
|
311 |
default:
|
312 |
-
if (!
|
313 |
-
|
314 |
container: container,
|
315 |
action : action,
|
316 |
data : data
|
@@ -321,7 +320,7 @@
|
|
321 |
});
|
322 |
$('td:eq(1)', row).html(container);
|
323 |
|
324 |
-
|
325 |
row : row,
|
326 |
data: data
|
327 |
});
|
@@ -359,7 +358,7 @@
|
|
359 |
var data = {
|
360 |
action: 'aam',
|
361 |
sub_action: 'Subject_Role.add',
|
362 |
-
_ajax_nonce:
|
363 |
};
|
364 |
|
365 |
$('input,select', '#add-role-modal .modal-body').each(function() {
|
@@ -373,35 +372,35 @@
|
|
373 |
});
|
374 |
|
375 |
if (data.name) {
|
376 |
-
$.ajax(
|
377 |
type: 'POST',
|
378 |
dataType: 'json',
|
379 |
data: data,
|
380 |
beforeSend: function () {
|
381 |
-
$(_this).text(
|
382 |
},
|
383 |
success: function (response) {
|
384 |
if (response.status === 'success') {
|
385 |
$('#role-list').DataTable().ajax.reload();
|
386 |
-
|
387 |
'role',
|
388 |
response.role.id,
|
389 |
response.role.name,
|
390 |
response.role.level
|
391 |
);
|
392 |
-
|
393 |
$('#add-role-modal').modal('hide');
|
394 |
} else {
|
395 |
-
|
396 |
-
'danger',
|
397 |
);
|
398 |
}
|
399 |
},
|
400 |
error: function () {
|
401 |
-
|
402 |
},
|
403 |
complete: function () {
|
404 |
-
$(_this).text(
|
405 |
}
|
406 |
});
|
407 |
} else {
|
@@ -418,7 +417,7 @@
|
|
418 |
var data = {
|
419 |
action: 'aam',
|
420 |
sub_action: 'Subject_Role.edit',
|
421 |
-
_ajax_nonce:
|
422 |
subject: 'role',
|
423 |
subjectId: $(_this).data('role')
|
424 |
};
|
@@ -434,28 +433,28 @@
|
|
434 |
});
|
435 |
|
436 |
if (data.name) {
|
437 |
-
$.ajax(
|
438 |
type: 'POST',
|
439 |
dataType: 'json',
|
440 |
data: data,
|
441 |
beforeSend: function () {
|
442 |
-
$(_this).text(
|
443 |
},
|
444 |
success: function (response) {
|
445 |
if (response.status === 'success') {
|
446 |
$('#role-list').DataTable().ajax.reload();
|
447 |
} else {
|
448 |
-
|
449 |
-
'danger',
|
450 |
);
|
451 |
}
|
452 |
},
|
453 |
error: function () {
|
454 |
-
|
455 |
},
|
456 |
complete: function () {
|
457 |
$('#edit-role-modal').modal('hide');
|
458 |
-
$(_this).text(
|
459 |
}
|
460 |
});
|
461 |
} else {
|
@@ -467,38 +466,38 @@
|
|
467 |
$('#delete-role-btn').bind('click', function () {
|
468 |
var _this = this;
|
469 |
|
470 |
-
$.ajax(
|
471 |
type: 'POST',
|
472 |
dataType: 'json',
|
473 |
data: {
|
474 |
action: 'aam',
|
475 |
sub_action: 'Subject_Role.delete',
|
476 |
-
_ajax_nonce:
|
477 |
subject: 'role',
|
478 |
subjectId: $(_this).data('role')
|
479 |
},
|
480 |
beforeSend: function () {
|
481 |
-
$(_this).text(
|
482 |
},
|
483 |
success: function (response) {
|
484 |
if (response.status === 'success') {
|
485 |
$('#role-list').DataTable().ajax.reload();
|
486 |
} else {
|
487 |
-
|
488 |
}
|
489 |
},
|
490 |
error: function () {
|
491 |
-
|
492 |
},
|
493 |
complete: function () {
|
494 |
$('#delete-role-modal').modal('hide');
|
495 |
-
$(_this).text(
|
496 |
}
|
497 |
});
|
498 |
});
|
499 |
|
500 |
//add setSubject hook
|
501 |
-
|
502 |
//clear highlight
|
503 |
$('tbody tr', '#role-list').each(function () {
|
504 |
if ($('strong', $(this)).length) {
|
@@ -513,9 +512,9 @@
|
|
513 |
});
|
514 |
|
515 |
//in case interface needed to be reloaded
|
516 |
-
|
517 |
-
$('#role-list').DataTable().ajax.url(
|
518 |
-
|
519 |
});
|
520 |
|
521 |
})(jQuery);
|
@@ -536,7 +535,7 @@
|
|
536 |
* @returns {Boolean}
|
537 |
*/
|
538 |
function isCurrent(id) {
|
539 |
-
var subject =
|
540 |
|
541 |
return (subject.type === 'user' && parseInt(subject.id) === id);
|
542 |
}
|
@@ -547,22 +546,22 @@
|
|
547 |
* @returns {undefined}
|
548 |
*/
|
549 |
function loadRoleList(selected) {
|
550 |
-
$.ajax(
|
551 |
type: 'POST',
|
552 |
dataType: 'json',
|
553 |
data: {
|
554 |
action: 'aam',
|
555 |
sub_action: 'Subject_Role.getList',
|
556 |
-
_ajax_nonce:
|
557 |
},
|
558 |
beforeSend: function () {
|
559 |
$('#expiration-change-role').html(
|
560 |
-
'<option value="">' +
|
561 |
);
|
562 |
},
|
563 |
success: function (response) {
|
564 |
$('#expiration-change-role').html(
|
565 |
-
'<option value="">' +
|
566 |
);
|
567 |
for (var i in response) {
|
568 |
$('#expiration-change-role').append(
|
@@ -584,13 +583,13 @@
|
|
584 |
function blockUser(id, btn) {
|
585 |
var state = ($(btn).hasClass('icon-lock') ? 0 : 1);
|
586 |
|
587 |
-
$.ajax(
|
588 |
type: 'POST',
|
589 |
dataType: 'json',
|
590 |
data: {
|
591 |
action: 'aam',
|
592 |
sub_action: 'Subject_User.block',
|
593 |
-
_ajax_nonce:
|
594 |
subject: 'user',
|
595 |
subjectId: id
|
596 |
},
|
@@ -602,22 +601,22 @@
|
|
602 |
if (state === 1) {
|
603 |
$(btn).attr({
|
604 |
'class': 'aam-row-action icon-lock text-danger',
|
605 |
-
'title':
|
606 |
-
'data-original-title':
|
607 |
});
|
608 |
} else {
|
609 |
$(btn).attr({
|
610 |
'class': 'aam-row-action icon-lock-open-alt text-warning',
|
611 |
-
'title':
|
612 |
-
'data-original-title':
|
613 |
});
|
614 |
}
|
615 |
} else {
|
616 |
-
|
617 |
}
|
618 |
},
|
619 |
error: function () {
|
620 |
-
|
621 |
}
|
622 |
});
|
623 |
}
|
@@ -632,13 +631,13 @@
|
|
632 |
serverSide: true,
|
633 |
processing: true,
|
634 |
ajax: {
|
635 |
-
url:
|
636 |
type: 'POST',
|
637 |
dataType: 'json',
|
638 |
data: function(params) {
|
639 |
params.action = 'aam';
|
640 |
params.sub_action = 'Subject_User.getTable';
|
641 |
-
params._ajax_nonce =
|
642 |
params.role = $('#user-list-filter').val();
|
643 |
|
644 |
return params;
|
@@ -649,23 +648,23 @@
|
|
649 |
],
|
650 |
language: {
|
651 |
search: '_INPUT_',
|
652 |
-
searchPlaceholder:
|
653 |
-
info:
|
654 |
infoFiltered: ''
|
655 |
},
|
656 |
initComplete: function () {
|
657 |
-
if (!
|
658 |
var create = $('<a/>', {
|
659 |
'href': '#',
|
660 |
'class': 'btn btn-primary'
|
661 |
})
|
662 |
.html('<i class="icon-plus"></i> ')
|
663 |
.bind('click', function () {
|
664 |
-
window.open(
|
665 |
})
|
666 |
.attr({
|
667 |
'data-toggle': "tooltip",
|
668 |
-
'title':
|
669 |
});
|
670 |
|
671 |
$('.dataTables_filter', '#user-list_wrapper').append(create);
|
@@ -674,24 +673,24 @@
|
|
674 |
'class': 'user-filter',
|
675 |
'id': 'user-list-filter'
|
676 |
})
|
677 |
-
.html('<option value="">' +
|
678 |
.bind('change', function() {
|
679 |
$('#user-list').DataTable().ajax.reload();
|
680 |
});
|
681 |
|
682 |
$('.dataTables_filter', '#user-list_wrapper').append(filter);
|
683 |
|
684 |
-
$.ajax(
|
685 |
type: 'POST',
|
686 |
dataType: 'json',
|
687 |
data: {
|
688 |
action: 'aam',
|
689 |
sub_action: 'Subject_Role.getList',
|
690 |
-
_ajax_nonce:
|
691 |
},
|
692 |
success: function (response) {
|
693 |
$('#user-list-filter').html(
|
694 |
-
'<option value="">' +
|
695 |
);
|
696 |
for (var i in response) {
|
697 |
$('#user-list-filter').append(
|
@@ -712,7 +711,7 @@
|
|
712 |
//add subtitle
|
713 |
$('td:eq(0)', row).append(
|
714 |
$('<i/>', {'class': 'aam-row-subtitle'}).html(
|
715 |
-
|
716 |
)
|
717 |
);
|
718 |
|
@@ -728,20 +727,20 @@
|
|
728 |
}).bind('click', function () {
|
729 |
if (!$(this).prop('disabled')) {
|
730 |
$(this).prop('disabled', true);
|
731 |
-
|
732 |
$('td:eq(0) span', row).replaceWith(
|
733 |
'<strong class="aam-highlight">' + data[2] + '</strong>'
|
734 |
);
|
735 |
$('i.icon-cog', container).attr('class', 'aam-row-action icon-cog text-muted');
|
736 |
|
737 |
-
if (!
|
738 |
$('i.icon-cog', container).attr('class', 'aam-row-action icon-spin4 animate-spin');
|
739 |
-
|
740 |
$('i.icon-spin4', container).attr('class', 'aam-row-action icon-cog text-muted');
|
741 |
} else {
|
742 |
-
|
743 |
$('#metabox-post-access-form').html(content);
|
744 |
-
|
745 |
$('#load-post-object-type').val(),
|
746 |
$('#load-post-object').val(),
|
747 |
$(this)
|
@@ -751,12 +750,12 @@
|
|
751 |
}
|
752 |
}).attr({
|
753 |
'data-toggle': "tooltip",
|
754 |
-
'title':
|
755 |
})).prop('disabled', (isCurrent(data[0]) ? true: false));
|
756 |
break;
|
757 |
|
758 |
case 'ttl':
|
759 |
-
if (!
|
760 |
$(container).append($('<i/>', {
|
761 |
'class': 'aam-row-action icon-clock text-' + (data[5] ? 'danger' : 'warning')
|
762 |
}).bind('click', function () {
|
@@ -785,61 +784,61 @@
|
|
785 |
$('#edit-user-expiration-modal').modal('show');
|
786 |
}).attr({
|
787 |
'data-toggle': "tooltip",
|
788 |
-
'title':
|
789 |
}));
|
790 |
}
|
791 |
break;
|
792 |
|
793 |
case 'edit':
|
794 |
-
if (!
|
795 |
$(container).append($('<i/>', {
|
796 |
'class': 'aam-row-action icon-pencil text-info'
|
797 |
}).bind('click', function () {
|
798 |
window.open(
|
799 |
-
|
800 |
);
|
801 |
}).attr({
|
802 |
'data-toggle': "tooltip",
|
803 |
-
'title':
|
804 |
}));
|
805 |
}
|
806 |
break;
|
807 |
|
808 |
case 'lock':
|
809 |
-
if (!
|
810 |
$(container).append($('<i/>', {
|
811 |
'class': 'aam-row-action icon-lock-open-alt text-warning'
|
812 |
}).bind('click', function () {
|
813 |
blockUser(data[0], $(this));
|
814 |
}).attr({
|
815 |
'data-toggle': "tooltip",
|
816 |
-
'title':
|
817 |
}));
|
818 |
}
|
819 |
break;
|
820 |
|
821 |
case 'unlock':
|
822 |
-
if (!
|
823 |
$(container).append($('<i/>', {
|
824 |
'class': 'aam-row-action icon-lock text-danger'
|
825 |
}).bind('click', function () {
|
826 |
blockUser(data[0], $(this));
|
827 |
}).attr({
|
828 |
'data-toggle': "tooltip",
|
829 |
-
'title':
|
830 |
}));
|
831 |
}
|
832 |
break;
|
833 |
|
834 |
case 'switch':
|
835 |
-
if (!
|
836 |
$(container).append($('<i/>', {
|
837 |
'class': 'aam-row-action icon-exchange text-success'
|
838 |
}).bind('click', function () {
|
839 |
switchToUser(data[0], $(this), true);
|
840 |
}).attr({
|
841 |
'data-toggle': "tooltip",
|
842 |
-
'title':
|
843 |
}));
|
844 |
}
|
845 |
break;
|
@@ -904,34 +903,34 @@
|
|
904 |
$('#edit-user-expiration-btn').bind('click', function () {
|
905 |
var _this = this;
|
906 |
|
907 |
-
$.ajax(
|
908 |
type: 'POST',
|
909 |
dataType: 'json',
|
910 |
data: {
|
911 |
action: 'aam',
|
912 |
sub_action: 'Subject_User.saveExpiration',
|
913 |
-
_ajax_nonce:
|
914 |
user: $(_this).attr('data-user-id'),
|
915 |
expires: $('#user-expires').val(),
|
916 |
after: $('#action-after-expiration').val(),
|
917 |
role: $('#expiration-change-role').val()
|
918 |
},
|
919 |
beforeSend: function () {
|
920 |
-
$(_this).text(
|
921 |
},
|
922 |
success: function (response) {
|
923 |
if (response.status === 'success') {
|
924 |
$('#user-list').DataTable().ajax.reload();
|
925 |
} else {
|
926 |
-
|
927 |
}
|
928 |
},
|
929 |
error: function () {
|
930 |
-
|
931 |
},
|
932 |
complete: function () {
|
933 |
$('#edit-user-expiration-modal').modal('hide');
|
934 |
-
$(_this).text(
|
935 |
}
|
936 |
});
|
937 |
});
|
@@ -940,37 +939,37 @@
|
|
940 |
$('#reset-user-expiration-btn').bind('click', function () {
|
941 |
var _this = this;
|
942 |
|
943 |
-
$.ajax(
|
944 |
type: 'POST',
|
945 |
dataType: 'json',
|
946 |
data: {
|
947 |
action: 'aam',
|
948 |
sub_action: 'Subject_User.saveExpiration',
|
949 |
-
_ajax_nonce:
|
950 |
user: $(_this).attr('data-user-id')
|
951 |
},
|
952 |
beforeSend: function () {
|
953 |
-
$(_this).text(
|
954 |
},
|
955 |
success: function (response) {
|
956 |
if (response.status === 'success') {
|
957 |
$('#user-list').DataTable().ajax.reload();
|
958 |
} else {
|
959 |
-
|
960 |
}
|
961 |
},
|
962 |
error: function () {
|
963 |
-
|
964 |
},
|
965 |
complete: function () {
|
966 |
$('#edit-user-expiration-modal').modal('hide');
|
967 |
-
$(_this).text(
|
968 |
}
|
969 |
});
|
970 |
});
|
971 |
|
972 |
//add setSubject hook
|
973 |
-
|
974 |
//clear highlight
|
975 |
$('tbody tr', '#user-list').each(function () {
|
976 |
if ($('strong', $(this)).length) {
|
@@ -985,8 +984,8 @@
|
|
985 |
});
|
986 |
|
987 |
//in case interface needed to be reloaded
|
988 |
-
|
989 |
-
$('#user-list').DataTable().ajax.url(
|
990 |
});
|
991 |
|
992 |
})(jQuery);
|
@@ -1005,16 +1004,16 @@
|
|
1005 |
$('#manage-visitor').bind('click', function () {
|
1006 |
var _this = this;
|
1007 |
|
1008 |
-
|
1009 |
$('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
|
1010 |
|
1011 |
-
if (!
|
1012 |
-
|
1013 |
$('i.icon-spin4', $(this)).attr('class', 'icon-cog');
|
1014 |
} else {
|
1015 |
-
|
1016 |
$('#metabox-post-access-form').html(content);
|
1017 |
-
|
1018 |
$('#load-post-object-type').val(),
|
1019 |
$('#load-post-object').val(),
|
1020 |
null,
|
@@ -1044,15 +1043,15 @@
|
|
1044 |
$('#manage-default').bind('click', function () {
|
1045 |
var _this = this;
|
1046 |
|
1047 |
-
|
1048 |
$('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
|
1049 |
-
if (!
|
1050 |
-
|
1051 |
$('i.icon-spin4', $(this)).attr('class', 'icon-cog');
|
1052 |
} else {
|
1053 |
-
|
1054 |
$('#metabox-post-access-form').html(content);
|
1055 |
-
|
1056 |
$('#load-post-object-type').val(),
|
1057 |
$('#load-post-object').val(),
|
1058 |
null,
|
@@ -1079,20 +1078,21 @@
|
|
1079 |
|
1080 |
/**
|
1081 |
*
|
1082 |
-
* @param {type}
|
1083 |
-
* @param {type}
|
|
|
1084 |
* @returns {undefined}
|
1085 |
*/
|
1086 |
function save(items, status, successCallback) {
|
1087 |
-
$.ajax(
|
1088 |
type: 'POST',
|
1089 |
dataType: 'json',
|
1090 |
data: {
|
1091 |
action: 'aam',
|
1092 |
sub_action: 'Main_Menu.save',
|
1093 |
-
subject:
|
1094 |
-
subjectId:
|
1095 |
-
_ajax_nonce:
|
1096 |
items: items,
|
1097 |
status: status
|
1098 |
},
|
@@ -1100,7 +1100,7 @@
|
|
1100 |
successCallback(response);
|
1101 |
},
|
1102 |
error: function () {
|
1103 |
-
|
1104 |
}
|
1105 |
});
|
1106 |
}
|
@@ -1135,7 +1135,7 @@
|
|
1135 |
$('<div/>', {'class': 'aam-lock'})
|
1136 |
);
|
1137 |
_this.removeClass('btn-danger').addClass('btn-primary');
|
1138 |
-
_this.html('<i class="icon-eye"></i>' +
|
1139 |
//add menu restricted indicator
|
1140 |
var ind = $('<i/>', {
|
1141 |
'class': 'aam-panel-title-icon icon-eye-off text-danger'
|
@@ -1145,7 +1145,7 @@
|
|
1145 |
$('.aam-lock', target).remove();
|
1146 |
_this.removeClass('btn-primary').addClass('btn-danger');
|
1147 |
_this.html(
|
1148 |
-
'<i class="icon-eye-off"></i>' +
|
1149 |
);
|
1150 |
$('.panel-title .icon-eye-off', target + '-heading').remove();
|
1151 |
}
|
@@ -1160,7 +1160,7 @@
|
|
1160 |
$(this).bind('click', function () {
|
1161 |
var _this = $(this);
|
1162 |
|
1163 |
-
|
1164 |
_this.data('menu-id'),
|
1165 |
_this.attr('checked') ? 1 : 0,
|
1166 |
'menu',
|
@@ -1169,9 +1169,9 @@
|
|
1169 |
if (result.status === 'success') {
|
1170 |
$('#aam-menu-overwrite').show();
|
1171 |
if (_this.attr('checked')) {
|
1172 |
-
_this.next().attr('data-original-title',
|
1173 |
} else {
|
1174 |
-
_this.next().attr('data-original-title',
|
1175 |
}
|
1176 |
}
|
1177 |
}
|
@@ -1181,12 +1181,12 @@
|
|
1181 |
|
1182 |
//reset button
|
1183 |
$('#menu-reset').bind('click', function () {
|
1184 |
-
|
1185 |
});
|
1186 |
}
|
1187 |
}
|
1188 |
|
1189 |
-
|
1190 |
|
1191 |
})(jQuery);
|
1192 |
|
@@ -1201,20 +1201,21 @@
|
|
1201 |
|
1202 |
/**
|
1203 |
*
|
1204 |
-
* @param {type}
|
1205 |
-
* @param {type}
|
|
|
1206 |
* @returns {undefined}
|
1207 |
*/
|
1208 |
function save(items, status, successCallback) {
|
1209 |
-
$.ajax(
|
1210 |
type: 'POST',
|
1211 |
dataType: 'json',
|
1212 |
data: {
|
1213 |
action: 'aam',
|
1214 |
sub_action: 'Main_Toolbar.save',
|
1215 |
-
subject:
|
1216 |
-
subjectId:
|
1217 |
-
_ajax_nonce:
|
1218 |
items: items,
|
1219 |
status: status
|
1220 |
},
|
@@ -1222,7 +1223,7 @@
|
|
1222 |
successCallback(response);
|
1223 |
},
|
1224 |
error: function () {
|
1225 |
-
|
1226 |
}
|
1227 |
});
|
1228 |
}
|
@@ -1232,15 +1233,15 @@
|
|
1232 |
* @returns {undefined}
|
1233 |
*/
|
1234 |
function getContent() {
|
1235 |
-
$.ajax(
|
1236 |
type: 'POST',
|
1237 |
dataType: 'html',
|
1238 |
data: {
|
1239 |
action: 'aam',
|
1240 |
sub_action: 'Main_Toolbar.getContent',
|
1241 |
-
_ajax_nonce:
|
1242 |
-
subject:
|
1243 |
-
subjectId:
|
1244 |
},
|
1245 |
success: function (response) {
|
1246 |
$('#toolbar-content').replaceWith(response);
|
@@ -1248,7 +1249,7 @@
|
|
1248 |
initialize();
|
1249 |
},
|
1250 |
error: function () {
|
1251 |
-
|
1252 |
}
|
1253 |
});
|
1254 |
}
|
@@ -1283,7 +1284,7 @@
|
|
1283 |
$('<div/>', {'class': 'aam-lock'})
|
1284 |
);
|
1285 |
_this.removeClass('btn-danger').addClass('btn-primary');
|
1286 |
-
_this.html('<i class="icon-eye"></i>' +
|
1287 |
//add menu restricted indicator
|
1288 |
var ind = $('<i/>', {
|
1289 |
'class': 'aam-panel-title-icon icon-eye-off text-danger'
|
@@ -1293,7 +1294,7 @@
|
|
1293 |
$('.aam-lock', target).remove();
|
1294 |
_this.removeClass('btn-primary').addClass('btn-danger');
|
1295 |
_this.html(
|
1296 |
-
|
1297 |
);
|
1298 |
$('.panel-title .icon-eye-off', target + '-heading').remove();
|
1299 |
}
|
@@ -1306,36 +1307,18 @@
|
|
1306 |
|
1307 |
//init refresh list button
|
1308 |
$('#refresh-toolbar-list').bind('click', function () {
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
sub_action: 'Main_Toolbar.refreshList',
|
1315 |
-
_ajax_nonce: aamLocal.nonce
|
1316 |
-
},
|
1317 |
beforeSend: function () {
|
1318 |
$('i', '#refresh-toolbar-list').attr(
|
1319 |
'class', 'icon-spin4 animate-spin'
|
1320 |
);
|
1321 |
},
|
1322 |
-
success: function (response) {
|
1323 |
-
if (response.status === 'success') {
|
1324 |
-
getContent();
|
1325 |
-
} else {
|
1326 |
-
aam.notification(
|
1327 |
-
'danger',
|
1328 |
-
aam.__('Failed to retrieve toolbar')
|
1329 |
-
);
|
1330 |
-
}
|
1331 |
-
},
|
1332 |
-
error: function () {
|
1333 |
-
aam.notification(
|
1334 |
-
'danger',
|
1335 |
-
aam.__('Application error')
|
1336 |
-
);
|
1337 |
-
},
|
1338 |
complete: function () {
|
|
|
1339 |
$('i', '#refresh-toolbar-list').attr(
|
1340 |
'class', 'icon-arrows-cw'
|
1341 |
);
|
@@ -1345,13 +1328,13 @@
|
|
1345 |
|
1346 |
//reset button
|
1347 |
$('#toolbar-reset').bind('click', function () {
|
1348 |
-
|
1349 |
});
|
1350 |
|
1351 |
$('input[type="checkbox"]', '#toolbar-list').each(function () {
|
1352 |
$(this).bind('click', function () {
|
1353 |
var _this = $(this);
|
1354 |
-
|
1355 |
$(this).data('toolbar'),
|
1356 |
$(this).attr('checked') ? 1 : 0,
|
1357 |
'toolbar',
|
@@ -1361,9 +1344,9 @@
|
|
1361 |
$('#aam-toolbar-overwrite').show();
|
1362 |
|
1363 |
if (_this.attr('checked')) {
|
1364 |
-
_this.next().attr('data-original-title',
|
1365 |
} else {
|
1366 |
-
_this.next().attr('data-original-title',
|
1367 |
}
|
1368 |
}
|
1369 |
}
|
@@ -1373,7 +1356,7 @@
|
|
1373 |
}
|
1374 |
}
|
1375 |
|
1376 |
-
|
1377 |
|
1378 |
})(jQuery);
|
1379 |
|
@@ -1392,15 +1375,15 @@
|
|
1392 |
* @returns {undefined}
|
1393 |
*/
|
1394 |
function getContent() {
|
1395 |
-
$.ajax(
|
1396 |
type: 'POST',
|
1397 |
dataType: 'html',
|
1398 |
data: {
|
1399 |
action: 'aam',
|
1400 |
sub_action: 'Main_Metabox.getContent',
|
1401 |
-
_ajax_nonce:
|
1402 |
-
subject:
|
1403 |
-
subjectId:
|
1404 |
},
|
1405 |
success: function (response) {
|
1406 |
$('#metabox-content').replaceWith(response);
|
@@ -1408,7 +1391,30 @@
|
|
1408 |
initialize();
|
1409 |
},
|
1410 |
error: function () {
|
1411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1412 |
}
|
1413 |
});
|
1414 |
}
|
@@ -1421,13 +1427,13 @@
|
|
1421 |
if ($('#metabox-content').length) {
|
1422 |
//init refresh list button
|
1423 |
$('#refresh-metabox-list').bind('click', function () {
|
1424 |
-
$.ajax(
|
1425 |
type: 'POST',
|
1426 |
dataType: 'json',
|
1427 |
data: {
|
1428 |
action: 'aam',
|
1429 |
-
sub_action: 'Main_Metabox.
|
1430 |
-
_ajax_nonce:
|
1431 |
},
|
1432 |
beforeSend: function () {
|
1433 |
$('i', '#refresh-metabox-list').attr(
|
@@ -1436,17 +1442,22 @@
|
|
1436 |
},
|
1437 |
success: function (response) {
|
1438 |
if (response.status === 'success') {
|
1439 |
-
|
|
|
|
|
|
|
|
|
1440 |
} else {
|
1441 |
-
|
1442 |
-
'danger',
|
|
|
1443 |
);
|
1444 |
}
|
1445 |
},
|
1446 |
error: function () {
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
$('i', '#refresh-metabox-list').attr(
|
1451 |
'class', 'icon-arrows-cw'
|
1452 |
);
|
@@ -1455,47 +1466,31 @@
|
|
1455 |
});
|
1456 |
|
1457 |
$('#init-url-btn').bind('click', function () {
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
sub_action: 'Main_Metabox.initURL',
|
1464 |
-
_ajax_nonce: aamLocal.nonce,
|
1465 |
-
url: $('#init-url').val()
|
1466 |
-
},
|
1467 |
beforeSend: function () {
|
1468 |
-
$('#init-url-btn').text(
|
1469 |
-
},
|
1470 |
-
success: function (response) {
|
1471 |
-
if (response.status === 'success') {
|
1472 |
-
$('#init-url-modal').modal('hide');
|
1473 |
-
getContent();
|
1474 |
-
} else {
|
1475 |
-
aam.notification(
|
1476 |
-
'danger', aam.__('Failed to initialize URL')
|
1477 |
-
);
|
1478 |
-
}
|
1479 |
-
},
|
1480 |
-
error: function () {
|
1481 |
-
aam.notification('danger', aam.__('Application error'));
|
1482 |
},
|
1483 |
complete: function () {
|
1484 |
-
$('#init-url-btn').text(
|
1485 |
$('#init-url-modal').modal('hide');
|
|
|
1486 |
}
|
1487 |
});
|
1488 |
});
|
1489 |
|
1490 |
//reset button
|
1491 |
$('#metabox-reset').bind('click', function () {
|
1492 |
-
|
1493 |
});
|
1494 |
|
1495 |
$('input[type="checkbox"]', '#metabox-list').each(function () {
|
1496 |
$(this).bind('click', function () {
|
1497 |
var _this = $(this);
|
1498 |
-
|
1499 |
$(this).data('metabox'),
|
1500 |
$(this).attr('checked') ? 1 : 0,
|
1501 |
'metabox',
|
@@ -1505,9 +1500,9 @@
|
|
1505 |
$('#aam-metabox-overwrite').show();
|
1506 |
|
1507 |
if (_this.attr('checked')) {
|
1508 |
-
_this.next().attr('data-original-title',
|
1509 |
} else {
|
1510 |
-
_this.next().attr('data-original-title',
|
1511 |
}
|
1512 |
}
|
1513 |
}
|
@@ -1517,7 +1512,7 @@
|
|
1517 |
}
|
1518 |
}
|
1519 |
|
1520 |
-
|
1521 |
|
1522 |
})(jQuery);
|
1523 |
|
@@ -1543,7 +1538,7 @@
|
|
1543 |
//show indicator
|
1544 |
$(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
|
1545 |
|
1546 |
-
|
1547 |
if (result.status === 'success') {
|
1548 |
if (granted) {
|
1549 |
$(btn).attr('class', 'aam-row-action text-success icon-check');
|
@@ -1552,8 +1547,8 @@
|
|
1552 |
}
|
1553 |
} else {
|
1554 |
if (granted) {
|
1555 |
-
|
1556 |
-
'danger',
|
1557 |
);
|
1558 |
$(btn).attr('class', 'aam-row-action text-muted icon-check-empty');
|
1559 |
} else {
|
@@ -1575,14 +1570,14 @@
|
|
1575 |
pagingType: 'simple',
|
1576 |
serverSide: false,
|
1577 |
ajax: {
|
1578 |
-
url:
|
1579 |
type: 'POST',
|
1580 |
data: {
|
1581 |
action: 'aam',
|
1582 |
sub_action: 'Main_Capability.getTable',
|
1583 |
-
_ajax_nonce:
|
1584 |
-
subject:
|
1585 |
-
subjectId:
|
1586 |
}
|
1587 |
},
|
1588 |
columnDefs: [
|
@@ -1590,10 +1585,10 @@
|
|
1590 |
],
|
1591 |
language: {
|
1592 |
search: '_INPUT_',
|
1593 |
-
searchPlaceholder:
|
1594 |
-
info:
|
1595 |
infoFiltered: '',
|
1596 |
-
infoEmpty:
|
1597 |
lengthMenu: '_MENU_'
|
1598 |
},
|
1599 |
createdRow: function (row, data) {
|
@@ -1634,7 +1629,7 @@
|
|
1634 |
}).bind('click', function () {
|
1635 |
var message = $('.aam-confirm-message', '#delete-capability-modal');
|
1636 |
$(message).html(message.data('message').replace(
|
1637 |
-
'%s', '
|
1638 |
);
|
1639 |
$('#capability-id').val(data[0]);
|
1640 |
$('#delete-capability-btn').attr('data-cap', data[0]);
|
@@ -1643,7 +1638,7 @@
|
|
1643 |
break;
|
1644 |
|
1645 |
default:
|
1646 |
-
|
1647 |
action: action,
|
1648 |
container: container,
|
1649 |
data: data
|
@@ -1681,35 +1676,35 @@
|
|
1681 |
$('#new-capability-name').parent().removeClass('has-error');
|
1682 |
|
1683 |
if (capability) {
|
1684 |
-
$.ajax(
|
1685 |
type: 'POST',
|
1686 |
dataType: 'json',
|
1687 |
data: {
|
1688 |
action: 'aam',
|
1689 |
sub_action: 'Main_Capability.add',
|
1690 |
-
_ajax_nonce:
|
1691 |
capability: capability,
|
1692 |
-
subject:
|
1693 |
-
subjectId:
|
1694 |
},
|
1695 |
beforeSend: function () {
|
1696 |
-
$(_this).text(
|
1697 |
},
|
1698 |
success: function (response) {
|
1699 |
if (response.status === 'success') {
|
1700 |
$('#add-capability-modal').modal('hide');
|
1701 |
$('#capability-list').DataTable().ajax.reload();
|
1702 |
} else {
|
1703 |
-
|
1704 |
-
'danger',
|
1705 |
);
|
1706 |
}
|
1707 |
},
|
1708 |
error: function () {
|
1709 |
-
|
1710 |
},
|
1711 |
complete: function () {
|
1712 |
-
$(_this).text(
|
1713 |
}
|
1714 |
});
|
1715 |
} else {
|
@@ -1726,34 +1721,34 @@
|
|
1726 |
var cap = $.trim($('#capability-id').val());
|
1727 |
|
1728 |
if (cap) {
|
1729 |
-
$.ajax(
|
1730 |
type: 'POST',
|
1731 |
dataType: 'json',
|
1732 |
data: {
|
1733 |
action: 'aam',
|
1734 |
sub_action: 'Main_Capability.update',
|
1735 |
-
_ajax_nonce:
|
1736 |
capability: $(this).attr('data-cap'),
|
1737 |
updated: cap
|
1738 |
},
|
1739 |
beforeSend: function () {
|
1740 |
-
$(btn).text(
|
1741 |
},
|
1742 |
success: function (response) {
|
1743 |
if (response.status === 'success') {
|
1744 |
$('#edit-capability-modal').modal('hide');
|
1745 |
$('#capability-list').DataTable().ajax.reload();
|
1746 |
} else {
|
1747 |
-
|
1748 |
-
'danger',
|
1749 |
);
|
1750 |
}
|
1751 |
},
|
1752 |
error: function () {
|
1753 |
-
|
1754 |
},
|
1755 |
complete: function () {
|
1756 |
-
$(btn).text(
|
1757 |
'disabled', false
|
1758 |
);
|
1759 |
}
|
@@ -1764,35 +1759,35 @@
|
|
1764 |
$('#delete-capability-btn').bind('click', function () {
|
1765 |
var btn = this;
|
1766 |
|
1767 |
-
$.ajax(
|
1768 |
type: 'POST',
|
1769 |
dataType: 'json',
|
1770 |
data: {
|
1771 |
action: 'aam',
|
1772 |
sub_action: 'Main_Capability.delete',
|
1773 |
-
_ajax_nonce:
|
1774 |
-
subject:
|
1775 |
-
subjectId:
|
1776 |
capability: $(this).attr('data-cap')
|
1777 |
},
|
1778 |
beforeSend: function () {
|
1779 |
-
$(btn).text(
|
1780 |
},
|
1781 |
success: function (response) {
|
1782 |
if (response.status === 'success') {
|
1783 |
$('#delete-capability-modal').modal('hide');
|
1784 |
$('#capability-list').DataTable().ajax.reload();
|
1785 |
} else {
|
1786 |
-
|
1787 |
-
'danger',
|
1788 |
);
|
1789 |
}
|
1790 |
},
|
1791 |
error: function () {
|
1792 |
-
|
1793 |
},
|
1794 |
complete: function () {
|
1795 |
-
$(btn).text(
|
1796 |
'disabled', false
|
1797 |
);
|
1798 |
}
|
@@ -1801,12 +1796,12 @@
|
|
1801 |
|
1802 |
//reset button
|
1803 |
$('#capability-reset').bind('click', function () {
|
1804 |
-
|
1805 |
});
|
1806 |
}
|
1807 |
}
|
1808 |
|
1809 |
-
|
1810 |
|
1811 |
})(jQuery);
|
1812 |
|
@@ -1844,23 +1839,23 @@
|
|
1844 |
* @param {*} successCallback
|
1845 |
*/
|
1846 |
function save(param, value, object, object_id, successCallback) {
|
1847 |
-
$.ajax(
|
1848 |
type: 'POST',
|
1849 |
dataType: 'json',
|
1850 |
data: {
|
1851 |
action: 'aam',
|
1852 |
sub_action: 'Main_Post.save',
|
1853 |
-
_ajax_nonce:
|
1854 |
-
subject:
|
1855 |
-
subjectId:
|
1856 |
param: param,
|
1857 |
-
value: value,
|
1858 |
object: object,
|
1859 |
objectId: object_id
|
1860 |
},
|
1861 |
success: function (response) {
|
1862 |
if (response.status === 'failure') {
|
1863 |
-
|
1864 |
} else {
|
1865 |
$('#post-overwritten').removeClass('hidden');
|
1866 |
//add some specific attributes to reset button
|
@@ -1872,7 +1867,7 @@
|
|
1872 |
successCallback(response);
|
1873 |
},
|
1874 |
error: function () {
|
1875 |
-
|
1876 |
}
|
1877 |
});
|
1878 |
}
|
@@ -1889,7 +1884,7 @@
|
|
1889 |
'href': '#',
|
1890 |
'data-level': type,
|
1891 |
'data-id': id
|
1892 |
-
}).
|
1893 |
$('.aam-post-breadcrumb').append(level);
|
1894 |
}
|
1895 |
|
@@ -1901,7 +1896,7 @@
|
|
1901 |
* @param {type} callback
|
1902 |
* @returns {undefined}
|
1903 |
*/
|
1904 |
-
|
1905 |
//reset the form first
|
1906 |
var container = $('.aam-access-form[data-type="' + object + '"]');
|
1907 |
$('#post-overwritten').addClass('hidden');
|
@@ -1927,7 +1922,7 @@
|
|
1927 |
_this.attr('class', 'aam-row-action icon-spin4 animate-spin');
|
1928 |
save(
|
1929 |
_this.data('property'),
|
1930 |
-
(checked ?
|
1931 |
object,
|
1932 |
id,
|
1933 |
function(response) {
|
@@ -1947,17 +1942,17 @@
|
|
1947 |
});
|
1948 |
});
|
1949 |
|
1950 |
-
$.ajax(
|
1951 |
type: 'POST',
|
1952 |
dataType: 'json',
|
1953 |
data: {
|
1954 |
action: 'aam',
|
1955 |
sub_action: 'Main_Post.getAccess',
|
1956 |
-
_ajax_nonce:
|
1957 |
type: object,
|
1958 |
id: id,
|
1959 |
-
subject:
|
1960 |
-
subjectId:
|
1961 |
},
|
1962 |
beforeSend: function () {
|
1963 |
$(btn).attr('data-class', $(btn).attr('class'));
|
@@ -1971,12 +1966,12 @@
|
|
1971 |
var checkbox = $('[data-property="' + property + '"]', container);
|
1972 |
|
1973 |
if (checkbox.length) {
|
1974 |
-
var cname = (
|
1975 |
checkbox.attr({
|
1976 |
'class': 'aam-row-action ' + cname
|
1977 |
});
|
1978 |
} else {
|
1979 |
-
$('.option-preview[data-ref="' + property + '"]').
|
1980 |
response.preview[property]
|
1981 |
);
|
1982 |
}
|
@@ -2012,12 +2007,12 @@
|
|
2012 |
}
|
2013 |
$('[data-dynamic-post-label]').each(function() {
|
2014 |
$(this).html(
|
2015 |
-
$(this).attr('data-dynamic-post-label').replace(/%s/g, '
|
2016 |
);
|
2017 |
});
|
2018 |
},
|
2019 |
error: function () {
|
2020 |
-
|
2021 |
},
|
2022 |
complete: function () {
|
2023 |
$(btn).attr('class', $(btn).attr('data-class')).removeAttr('data-class');
|
@@ -2039,29 +2034,30 @@
|
|
2039 |
//initialize the role list table
|
2040 |
$('#post-list').DataTable({
|
2041 |
autoWidth: false,
|
2042 |
-
ordering:
|
2043 |
pagingType: 'simple',
|
2044 |
processing: true,
|
2045 |
serverSide: true,
|
2046 |
ajax: {
|
2047 |
-
url:
|
2048 |
type: 'POST',
|
2049 |
data: function (data) {
|
2050 |
data.action = 'aam';
|
2051 |
data.sub_action = 'Main_Post.getTable';
|
2052 |
-
data._ajax_nonce =
|
2053 |
-
data.subject =
|
2054 |
-
data.subjectId =
|
2055 |
data.type = filter.type;
|
2056 |
}
|
2057 |
},
|
2058 |
columnDefs: [
|
2059 |
-
{visible: false, targets: [0, 1, 5, 6]}
|
|
|
2060 |
],
|
2061 |
language: {
|
2062 |
search: '_INPUT_',
|
2063 |
-
searchPlaceholder:
|
2064 |
-
info:
|
2065 |
infoFiltered: '',
|
2066 |
lengthMenu: '_MENU_'
|
2067 |
},
|
@@ -2075,28 +2071,34 @@
|
|
2075 |
});
|
2076 |
},
|
2077 |
rowCallback: function (row, data) {
|
2078 |
-
if (data[6]) {
|
2079 |
-
var extraClass = ' text-danger';
|
2080 |
-
var tooltip = ' data-toggle="tooltip" title="' + aam.__('Settings Customized') + '"';
|
2081 |
-
} else {
|
2082 |
-
extraClass = tooltip = '';
|
2083 |
-
}
|
2084 |
-
|
2085 |
//object type icon
|
|
|
|
|
2086 |
switch (data[2]) {
|
2087 |
case 'type':
|
2088 |
-
|
2089 |
break;
|
2090 |
|
2091 |
case 'term':
|
2092 |
-
|
2093 |
break;
|
2094 |
|
2095 |
default:
|
2096 |
-
$('td:eq(0)', row).html('<i class="icon-doc-text-inv' + extraClass + '"' + tooltip + '></i>');
|
2097 |
break;
|
2098 |
}
|
2099 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2100 |
//update the title to a link
|
2101 |
if (data[2] === 'type') {
|
2102 |
var link = $('<a/>', {
|
@@ -2117,31 +2119,38 @@
|
|
2117 |
|
2118 |
}).html(data[3]);
|
2119 |
$('td:eq(1)', row).html(link);
|
2120 |
-
} else if (data[2]
|
2121 |
-
|
|
|
|
|
2122 |
|
2123 |
if (data[5]) {
|
2124 |
-
|
|
|
2125 |
} else {
|
2126 |
-
|
2127 |
}
|
2128 |
|
2129 |
-
|
|
|
2130 |
|
2131 |
-
$('td:eq(1)', row).
|
2132 |
-
//$('td:eq(1)', row).html(data[3]);
|
2133 |
} else {
|
2134 |
-
|
|
|
|
|
2135 |
|
2136 |
if (data[5]) {
|
2137 |
-
|
|
|
2138 |
} else {
|
2139 |
-
|
2140 |
}
|
2141 |
|
2142 |
-
|
|
|
2143 |
|
2144 |
-
$('td:eq(1)', row).
|
2145 |
}
|
2146 |
|
2147 |
//update the actions
|
@@ -2165,7 +2174,7 @@
|
|
2165 |
}
|
2166 |
}).attr({
|
2167 |
'data-toggle': "tooltip",
|
2168 |
-
'title':
|
2169 |
}));
|
2170 |
$('.tooltip').remove();
|
2171 |
break;
|
@@ -2174,12 +2183,12 @@
|
|
2174 |
$(container).append($('<i/>', {
|
2175 |
'class': 'aam-row-action text-info icon-cog'
|
2176 |
}).bind('click', function () {
|
2177 |
-
|
2178 |
addBreadcrumbLevel('edit', data[2], data[3]);
|
2179 |
});
|
2180 |
}).attr({
|
2181 |
'data-toggle': "tooltip",
|
2182 |
-
'title':
|
2183 |
}));
|
2184 |
$('.tooltip').remove();
|
2185 |
break;
|
@@ -2191,12 +2200,12 @@
|
|
2191 |
window.open(data[1], '_blank');
|
2192 |
}).attr({
|
2193 |
'data-toggle': "tooltip",
|
2194 |
-
'title':
|
2195 |
}));
|
2196 |
break;
|
2197 |
|
2198 |
default:
|
2199 |
-
|
2200 |
container: container,
|
2201 |
action : action,
|
2202 |
data : data
|
@@ -2223,27 +2232,27 @@
|
|
2223 |
var type = $(this).attr('data-type');
|
2224 |
var id = $(this).attr('data-id');
|
2225 |
|
2226 |
-
$.ajax(
|
2227 |
type: 'POST',
|
2228 |
dataType: 'json',
|
2229 |
data: {
|
2230 |
action: 'aam',
|
2231 |
sub_action: 'Main_Post.reset',
|
2232 |
-
_ajax_nonce:
|
2233 |
type: type,
|
2234 |
id: id,
|
2235 |
-
subject:
|
2236 |
-
subjectId:
|
2237 |
},
|
2238 |
beforeSend: function() {
|
2239 |
var label = $('#post-reset').text();
|
2240 |
$('#post-reset').attr('data-original-label', label);
|
2241 |
-
$('#post-reset').text(
|
2242 |
},
|
2243 |
success: function (response) {
|
2244 |
if (response.status === 'success') {
|
2245 |
$('#post-overwritten').addClass('hidden');
|
2246 |
-
|
2247 |
}
|
2248 |
},
|
2249 |
complete: function() {
|
@@ -2266,7 +2275,7 @@
|
|
2266 |
|
2267 |
//load referenced post
|
2268 |
if ($('#load-post-object').val()) {
|
2269 |
-
|
2270 |
$('#load-post-object-type').val(),
|
2271 |
$('#load-post-object').val()
|
2272 |
);
|
@@ -2295,7 +2304,7 @@
|
|
2295 |
var label = _this.text();
|
2296 |
var value = $(_this.data('field')).val();
|
2297 |
|
2298 |
-
_this.text(
|
2299 |
|
2300 |
save(
|
2301 |
_this.attr('data-ref'),
|
@@ -2305,7 +2314,7 @@
|
|
2305 |
function(response) {
|
2306 |
if (response.status === 'success') {
|
2307 |
objectAccess.access[_this.attr('data-ref')] = value;
|
2308 |
-
$(_this.attr('data-preview')).
|
2309 |
var tr = $(_this.attr('data-preview')).parent().parent().parent();
|
2310 |
if ($('.aam-row-action', tr).hasClass('icon-check-empty')) {
|
2311 |
$('.aam-row-action', tr).trigger('click');
|
@@ -2382,7 +2391,7 @@
|
|
2382 |
}
|
2383 |
}
|
2384 |
|
2385 |
-
|
2386 |
|
2387 |
})(jQuery);
|
2388 |
|
@@ -2412,7 +2421,7 @@
|
|
2412 |
$($(this).data('action')).show();
|
2413 |
|
2414 |
//save redirect type
|
2415 |
-
|
2416 |
$(this).attr('name'),
|
2417 |
$(this).val(),
|
2418 |
'redirect',
|
@@ -2429,7 +2438,7 @@
|
|
2429 |
$('input[type="text"],select,textarea', container).each(function () {
|
2430 |
$(this).bind('change', function () {
|
2431 |
//save redirect type
|
2432 |
-
|
2433 |
$(this).attr('name'),
|
2434 |
$(this).val(),
|
2435 |
'redirect',
|
@@ -2444,12 +2453,12 @@
|
|
2444 |
});
|
2445 |
|
2446 |
$('#redirect-reset').bind('click', function () {
|
2447 |
-
|
2448 |
});
|
2449 |
}
|
2450 |
}
|
2451 |
|
2452 |
-
|
2453 |
|
2454 |
})(jQuery);
|
2455 |
|
@@ -2479,7 +2488,7 @@
|
|
2479 |
$($(this).data('action')).show();
|
2480 |
|
2481 |
//save redirect type
|
2482 |
-
|
2483 |
$(this).attr('name'),
|
2484 |
$(this).val(),
|
2485 |
'loginRedirect',
|
@@ -2502,7 +2511,7 @@
|
|
2502 |
}
|
2503 |
|
2504 |
//save redirect type
|
2505 |
-
|
2506 |
$(this).attr('name'),
|
2507 |
val,
|
2508 |
'loginRedirect',
|
@@ -2517,12 +2526,12 @@
|
|
2517 |
});
|
2518 |
|
2519 |
$('#login-redirect-reset').bind('click', function () {
|
2520 |
-
|
2521 |
});
|
2522 |
}
|
2523 |
}
|
2524 |
|
2525 |
-
|
2526 |
|
2527 |
})(jQuery);
|
2528 |
|
@@ -2552,7 +2561,7 @@
|
|
2552 |
$($(this).data('action')).show();
|
2553 |
|
2554 |
//save redirect type
|
2555 |
-
|
2556 |
$(this).attr('name'),
|
2557 |
$(this).val(),
|
2558 |
'logoutRedirect',
|
@@ -2569,7 +2578,7 @@
|
|
2569 |
$('input[type="text"],select,textarea', container).each(function () {
|
2570 |
$(this).bind('change', function () {
|
2571 |
//save redirect type
|
2572 |
-
|
2573 |
$(this).attr('name'),
|
2574 |
$(this).val(),
|
2575 |
'logoutRedirect',
|
@@ -2584,12 +2593,12 @@
|
|
2584 |
});
|
2585 |
|
2586 |
$('#logout-redirect-reset').bind('click', function () {
|
2587 |
-
|
2588 |
});
|
2589 |
}
|
2590 |
}
|
2591 |
|
2592 |
-
|
2593 |
|
2594 |
})(jQuery);
|
2595 |
|
@@ -2609,20 +2618,20 @@
|
|
2609 |
* @returns {undefined}
|
2610 |
*/
|
2611 |
function save(param, value) {
|
2612 |
-
$.ajax(
|
2613 |
type: 'POST',
|
2614 |
dataType: 'json',
|
2615 |
data: {
|
2616 |
action: 'aam',
|
2617 |
sub_action: 'Main_404Redirect.save',
|
2618 |
-
_ajax_nonce:
|
2619 |
-
subject:
|
2620 |
-
subjectId:
|
2621 |
param: param,
|
2622 |
value: value
|
2623 |
},
|
2624 |
error: function () {
|
2625 |
-
|
2626 |
}
|
2627 |
});
|
2628 |
}
|
@@ -2657,7 +2666,7 @@
|
|
2657 |
}
|
2658 |
}
|
2659 |
|
2660 |
-
|
2661 |
|
2662 |
})(jQuery);
|
2663 |
|
@@ -2683,15 +2692,15 @@
|
|
2683 |
//show indicator
|
2684 |
$(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
|
2685 |
|
2686 |
-
$.ajax(
|
2687 |
type: 'POST',
|
2688 |
dataType: 'json',
|
2689 |
data: {
|
2690 |
action: 'aam',
|
2691 |
sub_action: 'Main_Route.save',
|
2692 |
-
_ajax_nonce:
|
2693 |
-
subject:
|
2694 |
-
subjectId:
|
2695 |
type: type,
|
2696 |
route: route,
|
2697 |
method: method,
|
@@ -2699,7 +2708,7 @@
|
|
2699 |
},
|
2700 |
success: function (response) {
|
2701 |
if (response.status === 'failure') {
|
2702 |
-
|
2703 |
updateBtn(btn, value ? 0 : 1);
|
2704 |
} else {
|
2705 |
$('#aam-route-overwrite').removeClass('hidden');
|
@@ -2708,7 +2717,7 @@
|
|
2708 |
},
|
2709 |
error: function () {
|
2710 |
updateBtn(btn, value ? 0 : 1);
|
2711 |
-
|
2712 |
}
|
2713 |
});
|
2714 |
}
|
@@ -2740,14 +2749,14 @@
|
|
2740 |
pagingType: 'simple',
|
2741 |
serverSide: false,
|
2742 |
ajax: {
|
2743 |
-
url:
|
2744 |
type: 'POST',
|
2745 |
data: {
|
2746 |
action: 'aam',
|
2747 |
sub_action: 'Main_Route.getTable',
|
2748 |
-
_ajax_nonce:
|
2749 |
-
subject:
|
2750 |
-
subjectId:
|
2751 |
}
|
2752 |
},
|
2753 |
columnDefs: [
|
@@ -2756,11 +2765,11 @@
|
|
2756 |
],
|
2757 |
language: {
|
2758 |
search: '_INPUT_',
|
2759 |
-
searchPlaceholder:
|
2760 |
-
info:
|
2761 |
infoFiltered: '',
|
2762 |
-
emptyTable:
|
2763 |
-
infoEmpty:
|
2764 |
lengthMenu: '_MENU_'
|
2765 |
},
|
2766 |
createdRow: function (row, data) {
|
@@ -2770,7 +2779,7 @@
|
|
2770 |
}).text(data[1]);
|
2771 |
|
2772 |
$('td:eq(0)', row).html(
|
2773 |
-
'<small
|
2774 |
);
|
2775 |
|
2776 |
$('td:eq(1)', row).html(method);
|
@@ -2806,12 +2815,12 @@
|
|
2806 |
|
2807 |
//reset button
|
2808 |
$('#route-reset').bind('click', function () {
|
2809 |
-
|
2810 |
});
|
2811 |
}
|
2812 |
}
|
2813 |
|
2814 |
-
|
2815 |
|
2816 |
})(jQuery);
|
2817 |
|
@@ -2833,26 +2842,26 @@
|
|
2833 |
* @returns {undefined}
|
2834 |
*/
|
2835 |
function downloadExtension(data, cb) {
|
2836 |
-
$.ajax(
|
2837 |
type: 'POST',
|
2838 |
dataType: 'json',
|
2839 |
data: data,
|
2840 |
success: function (response) {
|
2841 |
if (response.status === 'success') {
|
2842 |
setTimeout(function () {
|
2843 |
-
|
2844 |
}, 500);
|
2845 |
} else {
|
2846 |
-
|
2847 |
if (typeof response.content !== 'undefined') {
|
2848 |
dump = response;
|
2849 |
-
$('#installation-error').
|
2850 |
$('#extension-notification-modal').modal('show');
|
2851 |
}
|
2852 |
}
|
2853 |
},
|
2854 |
error: function () {
|
2855 |
-
|
2856 |
},
|
2857 |
complete: function() {
|
2858 |
cb();
|
@@ -2866,25 +2875,25 @@
|
|
2866 |
* @returns {undefined}
|
2867 |
*/
|
2868 |
function updateStatus(data) {
|
2869 |
-
$.ajax(
|
2870 |
type: 'POST',
|
2871 |
dataType: 'json',
|
2872 |
data: data,
|
2873 |
success: function (response) {
|
2874 |
if (response.status === 'success') {
|
2875 |
-
|
2876 |
'success',
|
2877 |
-
|
2878 |
);
|
2879 |
} else {
|
2880 |
-
|
2881 |
}
|
2882 |
},
|
2883 |
error: function () {
|
2884 |
-
|
2885 |
},
|
2886 |
complete: function () {
|
2887 |
-
|
2888 |
}
|
2889 |
});
|
2890 |
}
|
@@ -2898,19 +2907,19 @@
|
|
2898 |
$('[data-toggle="toggle"]', '.extensions-metabox').bootstrapToggle();
|
2899 |
//check for updates
|
2900 |
$('#aam-update-check').bind('click', function() {
|
2901 |
-
$.ajax(
|
2902 |
type: 'POST',
|
2903 |
dataType: 'json',
|
2904 |
data: {
|
2905 |
action: 'aam',
|
2906 |
sub_action: 'Extension_Manager.check',
|
2907 |
-
_ajax_nonce:
|
2908 |
},
|
2909 |
beforeSend: function () {
|
2910 |
$('#aam-update-check i').attr('class', 'icon-spin4 animate-spin');
|
2911 |
},
|
2912 |
complete: function () {
|
2913 |
-
|
2914 |
}
|
2915 |
});
|
2916 |
});
|
@@ -2932,7 +2941,7 @@
|
|
2932 |
downloadExtension({
|
2933 |
action: 'aam',
|
2934 |
sub_action: 'Extension_Manager.install',
|
2935 |
-
_ajax_nonce:
|
2936 |
license: $('#extension-key').val()
|
2937 |
}, function() {
|
2938 |
$('i', _this).attr('class', 'icon-download-cloud');
|
@@ -2948,7 +2957,7 @@
|
|
2948 |
downloadExtension({
|
2949 |
action: 'aam',
|
2950 |
sub_action: 'Extension_Manager.update',
|
2951 |
-
_ajax_nonce:
|
2952 |
extension: _this.data('product')
|
2953 |
}, function() {
|
2954 |
$('i', _this).attr('class', 'icon-arrows-cw');
|
@@ -2965,7 +2974,7 @@
|
|
2965 |
updateStatus({
|
2966 |
action: 'aam',
|
2967 |
sub_action: 'Extension_Manager.deactivate',
|
2968 |
-
_ajax_nonce:
|
2969 |
extension: _this.data('product')
|
2970 |
});
|
2971 |
});
|
@@ -2980,7 +2989,7 @@
|
|
2980 |
updateStatus({
|
2981 |
action: 'aam',
|
2982 |
sub_action: 'Extension_Manager.activate',
|
2983 |
-
_ajax_nonce:
|
2984 |
extension: _this.data('product')
|
2985 |
});
|
2986 |
});
|
@@ -2995,7 +3004,7 @@
|
|
2995 |
downloadExtension({
|
2996 |
action: 'aam',
|
2997 |
sub_action: 'Extension_Manager.install',
|
2998 |
-
_ajax_nonce:
|
2999 |
license: _this.data('license')
|
3000 |
}, function() {
|
3001 |
$('i', _this).attr('class', 'icon-download-cloud');
|
@@ -3008,27 +3017,27 @@
|
|
3008 |
|
3009 |
$('i', this).attr('class', 'icon-spin4 animate-spin');
|
3010 |
|
3011 |
-
$.ajax(
|
3012 |
type: 'POST',
|
3013 |
dataType: 'json',
|
3014 |
data: {
|
3015 |
action: 'aam',
|
3016 |
sub_action: 'Extension_Manager.fixDirectoryIssue',
|
3017 |
-
_ajax_nonce:
|
3018 |
},
|
3019 |
success: function(response) {
|
3020 |
if (response.status === 'success') {
|
3021 |
$('#extension-dir-warning').remove();
|
3022 |
-
|
3023 |
'success',
|
3024 |
-
|
3025 |
);
|
3026 |
} else {
|
3027 |
$('#extension-dir-issue-modal').modal('show');
|
3028 |
}
|
3029 |
},
|
3030 |
error: function() {
|
3031 |
-
|
3032 |
},
|
3033 |
complete: function () {
|
3034 |
$('i', '#fix-extension-dir-issue').attr('class', 'icon-wrench');
|
@@ -3052,7 +3061,7 @@
|
|
3052 |
}
|
3053 |
}
|
3054 |
|
3055 |
-
|
3056 |
|
3057 |
})(jQuery);
|
3058 |
|
@@ -3074,18 +3083,18 @@
|
|
3074 |
* @returns {undefined}
|
3075 |
*/
|
3076 |
function save(param, value) {
|
3077 |
-
$.ajax(
|
3078 |
type: 'POST',
|
3079 |
dataType: 'json',
|
3080 |
data: {
|
3081 |
action: 'aam',
|
3082 |
sub_action: 'Settings_Manager.save',
|
3083 |
-
_ajax_nonce:
|
3084 |
param: param,
|
3085 |
value: value
|
3086 |
},
|
3087 |
error: function () {
|
3088 |
-
|
3089 |
}
|
3090 |
});
|
3091 |
}
|
@@ -3110,85 +3119,85 @@
|
|
3110 |
});
|
3111 |
|
3112 |
$('#clear-settings').bind('click', function () {
|
3113 |
-
$.ajax(
|
3114 |
type: 'POST',
|
3115 |
dataType: 'json',
|
3116 |
data: {
|
3117 |
action: 'aam',
|
3118 |
sub_action: 'Settings_Tools.clear',
|
3119 |
-
_ajax_nonce:
|
3120 |
},
|
3121 |
beforeSend: function() {
|
3122 |
$('#clear-settings').prop('disabled', true);
|
3123 |
-
$('#clear-settings').text(
|
3124 |
},
|
3125 |
success: function(response) {
|
3126 |
if (response.status === 'success') {
|
3127 |
-
|
3128 |
'success',
|
3129 |
-
|
3130 |
);
|
3131 |
} else {
|
3132 |
-
|
3133 |
}
|
3134 |
},
|
3135 |
error: function () {
|
3136 |
-
|
3137 |
},
|
3138 |
complete: function() {
|
3139 |
$('#clear-settings').prop('disabled', false);
|
3140 |
-
$('#clear-settings').text(
|
3141 |
$('#clear-settings-modal').modal('hide');
|
3142 |
}
|
3143 |
});
|
3144 |
});
|
3145 |
|
3146 |
$('#clear-cache').bind('click', function () {
|
3147 |
-
$.ajax(
|
3148 |
type: 'POST',
|
3149 |
dataType: 'json',
|
3150 |
data: {
|
3151 |
action: 'aam',
|
3152 |
sub_action: 'Settings_Tools.clearCache',
|
3153 |
-
_ajax_nonce:
|
3154 |
},
|
3155 |
beforeSend: function() {
|
3156 |
$('#clear-cache').prop('disabled', true);
|
3157 |
-
$('#clear-cache').text(
|
3158 |
},
|
3159 |
success: function(response) {
|
3160 |
if (response.status === 'success') {
|
3161 |
-
|
3162 |
'success',
|
3163 |
-
|
3164 |
);
|
3165 |
} else {
|
3166 |
-
|
3167 |
}
|
3168 |
},
|
3169 |
error: function () {
|
3170 |
-
|
3171 |
},
|
3172 |
complete: function() {
|
3173 |
$('#clear-cache').prop('disabled', false);
|
3174 |
-
$('#clear-cache').text(
|
3175 |
}
|
3176 |
});
|
3177 |
});
|
3178 |
|
3179 |
$('#export-aam').bind('click', function () {
|
3180 |
-
$.ajax(
|
3181 |
type: 'POST',
|
3182 |
dataType: 'json',
|
3183 |
data: {
|
3184 |
action: 'aam',
|
3185 |
sub_action: 'Settings_Tools.export',
|
3186 |
-
_ajax_nonce:
|
3187 |
},
|
3188 |
beforeSend: function () {
|
3189 |
$('#export-aam').prop('disabled', true);
|
3190 |
$('#export-aam').attr('data-lable', $('#export-aam').text());
|
3191 |
-
$('#export-aam').text(
|
3192 |
},
|
3193 |
success: function(response) {
|
3194 |
if (response.status === 'success') {
|
@@ -3200,7 +3209,7 @@
|
|
3200 |
}
|
3201 |
},
|
3202 |
error: function () {
|
3203 |
-
|
3204 |
},
|
3205 |
complete: function () {
|
3206 |
$('#export-aam').prop('disabled', false);
|
@@ -3213,7 +3222,7 @@
|
|
3213 |
if (typeof FileReader !== 'undefined') {
|
3214 |
$('#aam-import-file').trigger('click');
|
3215 |
} else {
|
3216 |
-
|
3217 |
}
|
3218 |
});
|
3219 |
|
@@ -3228,42 +3237,45 @@
|
|
3228 |
try {
|
3229 |
//validate the content
|
3230 |
var loaded = JSON.parse(json);
|
3231 |
-
if (loaded.plugin && loaded.plugin
|
3232 |
-
$.ajax(
|
3233 |
type: 'POST',
|
3234 |
dataType: 'json',
|
3235 |
data: {
|
3236 |
action: 'aam',
|
3237 |
sub_action: 'Settings_Tools.import',
|
3238 |
-
_ajax_nonce:
|
3239 |
json: json
|
3240 |
},
|
3241 |
beforeSend: function () {
|
3242 |
$('#import-aam').prop('disabled', true);
|
3243 |
$('#import-aam').attr('data-lable', $('#import-aam').text());
|
3244 |
-
$('#import-aam').text(
|
3245 |
},
|
3246 |
success: function(response) {
|
3247 |
if (response.status === 'success') {
|
3248 |
-
|
3249 |
-
|
|
|
|
|
|
|
3250 |
} else {
|
3251 |
-
|
3252 |
}
|
3253 |
},
|
3254 |
error: function () {
|
3255 |
-
|
3256 |
},
|
3257 |
complete: function () {
|
3258 |
$('#import-aam').prop('disabled', false);
|
3259 |
-
$('#import-aam').
|
3260 |
}
|
3261 |
});
|
3262 |
} else {
|
3263 |
throw 'Invalid format';
|
3264 |
}
|
3265 |
} catch (e) {
|
3266 |
-
|
3267 |
}
|
3268 |
};
|
3269 |
reader.readAsText(file);
|
@@ -3272,10 +3284,10 @@
|
|
3272 |
}
|
3273 |
}
|
3274 |
|
3275 |
-
|
3276 |
|
3277 |
//ConfigPress hook
|
3278 |
-
|
3279 |
if (feature === 'configpress'
|
3280 |
&& !$('#configpress-editor').next().hasClass('CodeMirror')) {
|
3281 |
var editor = CodeMirror.fromTextArea(
|
@@ -3283,19 +3295,19 @@
|
|
3283 |
);
|
3284 |
|
3285 |
editor.on("blur", function(){
|
3286 |
-
$.ajax(
|
3287 |
type: 'POST',
|
3288 |
dataType: 'json',
|
3289 |
data: {
|
3290 |
action: 'aam',
|
3291 |
sub_action: 'Settings_ConfigPress.save',
|
3292 |
-
_ajax_nonce:
|
3293 |
config: editor.getValue()
|
3294 |
},
|
3295 |
error: function () {
|
3296 |
-
|
3297 |
'danger',
|
3298 |
-
|
3299 |
);
|
3300 |
}
|
3301 |
});
|
@@ -3305,7 +3317,7 @@
|
|
3305 |
|
3306 |
})(jQuery);
|
3307 |
|
3308 |
-
|
3309 |
}
|
3310 |
|
3311 |
/**
|
@@ -3355,6 +3367,8 @@
|
|
3355 |
|
3356 |
/**
|
3357 |
*
|
|
|
|
|
3358 |
* @returns {undefined}
|
3359 |
*/
|
3360 |
AAM.prototype.fetchContent = function (view, success) {
|
@@ -3364,12 +3378,12 @@
|
|
3364 |
var object = window.location.search.match(/&oid\=([^&]*)/);
|
3365 |
var type = window.location.search.match(/&otype\=([^&]*)/);
|
3366 |
|
3367 |
-
$.ajax(
|
3368 |
type: 'POST',
|
3369 |
dataType: 'html',
|
3370 |
data: {
|
3371 |
action: 'aamc',
|
3372 |
-
_ajax_nonce:
|
3373 |
uiType: view,
|
3374 |
subject: this.getSubject().type,
|
3375 |
subjectId: this.getSubject().id,
|
@@ -3378,10 +3392,12 @@
|
|
3378 |
},
|
3379 |
beforeSend: function () {
|
3380 |
if ($('#aam-initial-load').length === 0) {
|
3381 |
-
|
3382 |
-
|
|
|
|
|
|
|
3383 |
);
|
3384 |
-
$('#aam-content').html(loader);
|
3385 |
}
|
3386 |
},
|
3387 |
success: function (response) {
|
@@ -3419,9 +3435,10 @@
|
|
3419 |
});
|
3420 |
};
|
3421 |
|
3422 |
-
|
3423 |
/**
|
3424 |
*
|
|
|
|
|
3425 |
* @returns {undefined}
|
3426 |
*/
|
3427 |
AAM.prototype.fetchPartial = function (view, success) {
|
@@ -3431,12 +3448,12 @@
|
|
3431 |
var object = window.location.search.match(/&oid\=([^&]*)/);
|
3432 |
var type = window.location.search.match(/&otype\=([^&]*)/);
|
3433 |
|
3434 |
-
$.ajax(
|
3435 |
type: 'POST',
|
3436 |
dataType: 'html',
|
3437 |
data: {
|
3438 |
action: 'aamc',
|
3439 |
-
_ajax_nonce:
|
3440 |
uiType: view,
|
3441 |
subject: this.getSubject().type,
|
3442 |
subjectId: this.getSubject().id,
|
@@ -3501,6 +3518,7 @@
|
|
3501 |
* Apply UI filters
|
3502 |
*
|
3503 |
* @param {String} name
|
|
|
3504 |
* @param {Object} params
|
3505 |
*
|
3506 |
* @returns {void}
|
@@ -3523,10 +3541,10 @@
|
|
3523 |
AAM.prototype.initialize = function () {
|
3524 |
//read default subject and set it for AAM object
|
3525 |
this.setSubject(
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
);
|
3531 |
|
3532 |
//load the UI javascript support
|
@@ -3561,15 +3579,15 @@
|
|
3561 |
$(this).tooltip('show');
|
3562 |
});
|
3563 |
|
3564 |
-
$('body').delegate('.aam-switch-user', 'click', function (
|
3565 |
-
switchToUser(
|
3566 |
});
|
3567 |
|
3568 |
$('.aam-area').each(function() {
|
3569 |
$(this).bind('click', function() {
|
3570 |
$('.aam-area').removeClass('text-danger');
|
3571 |
$(this).addClass('text-danger');
|
3572 |
-
|
3573 |
});
|
3574 |
});
|
3575 |
|
@@ -3585,7 +3603,7 @@
|
|
3585 |
* @returns {unresolved}
|
3586 |
*/
|
3587 |
AAM.prototype.__ = function (label) {
|
3588 |
-
return (
|
3589 |
};
|
3590 |
|
3591 |
/**
|
@@ -3605,17 +3623,22 @@
|
|
3605 |
};
|
3606 |
|
3607 |
//update the header
|
3608 |
-
|
3609 |
-
|
|
|
|
|
|
|
|
|
|
|
3610 |
|
3611 |
if (type === 'user') {
|
3612 |
-
|
|
|
|
|
3613 |
}
|
3614 |
|
3615 |
-
$('.aam-current-subject').html(title);
|
3616 |
-
|
3617 |
//highlight screen if the same level
|
3618 |
-
if (parseInt(level) >=
|
3619 |
$('.aam-current-subject').addClass('danger');
|
3620 |
$('#wpcontent').css('background-color', '#FAEBEA');
|
3621 |
} else {
|
@@ -3661,13 +3684,13 @@
|
|
3661 |
* @returns {undefined}
|
3662 |
*/
|
3663 |
AAM.prototype.save = function(param, value, object, object_id, successCallback) {
|
3664 |
-
$.ajax(
|
3665 |
type: 'POST',
|
3666 |
dataType: 'json',
|
3667 |
data: {
|
3668 |
action: 'aam',
|
3669 |
sub_action: 'save',
|
3670 |
-
_ajax_nonce:
|
3671 |
subject: this.getSubject().type,
|
3672 |
subjectId: this.getSubject().id,
|
3673 |
param: param,
|
@@ -3681,7 +3704,7 @@
|
|
3681 |
}
|
3682 |
},
|
3683 |
error: function () {
|
3684 |
-
|
3685 |
}
|
3686 |
});
|
3687 |
};
|
@@ -3692,12 +3715,12 @@
|
|
3692 |
* @returns {undefined}
|
3693 |
*/
|
3694 |
AAM.prototype.reset = function(object, btn) {
|
3695 |
-
$.ajax(
|
3696 |
type: 'POST',
|
3697 |
data: {
|
3698 |
action: 'aam',
|
3699 |
sub_action: 'reset',
|
3700 |
-
_ajax_nonce:
|
3701 |
subject: this.getSubject().type,
|
3702 |
subjectId: this.getSubject().id,
|
3703 |
object: object
|
@@ -3705,13 +3728,13 @@
|
|
3705 |
beforeSend: function() {
|
3706 |
var label = btn.text();
|
3707 |
btn.attr('data-original-label', label);
|
3708 |
-
btn.text(
|
3709 |
},
|
3710 |
success: function () {
|
3711 |
-
|
3712 |
},
|
3713 |
error: function () {
|
3714 |
-
|
3715 |
},
|
3716 |
complete: function() {
|
3717 |
btn.text(btn.attr('data-original-label'));
|
@@ -3719,37 +3742,36 @@
|
|
3719 |
});
|
3720 |
};
|
3721 |
|
3722 |
-
/**
|
3723 |
-
*
|
3724 |
-
* @param {type} el
|
3725 |
-
* @returns {undefined}
|
3726 |
-
*/
|
3727 |
-
AAM.prototype.readMore = function(el) {
|
3728 |
-
$(el).append($('<a/>').attr({
|
3729 |
-
'href' : '#',
|
3730 |
-
'class' : 'aam-readmore'
|
3731 |
-
}).text('Read More').bind('click', function(event){
|
3732 |
-
event.preventDefault();
|
3733 |
-
$(this).hide();
|
3734 |
-
$(el).append('<span>' + $(el).data('readmore') + '</span>');
|
3735 |
-
}));
|
3736 |
-
};
|
3737 |
-
|
3738 |
/**
|
3739 |
*
|
3740 |
* @returns {Boolean}
|
3741 |
*/
|
3742 |
AAM.prototype.isUI = function() {
|
3743 |
-
return (typeof
|
3744 |
};
|
3745 |
|
3746 |
/**
|
3747 |
* Initialize UI
|
3748 |
*/
|
3749 |
$(document).ready(function () {
|
3750 |
-
aam = new AAM();
|
3751 |
-
|
3752 |
-
aam.initialize();
|
3753 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3754 |
|
3755 |
})(jQuery);
|
5 |
* ======================================================================
|
6 |
*/
|
7 |
|
|
|
8 |
/**
|
9 |
*
|
10 |
* @param {type} $
|
20 |
* @returns {undefined}
|
21 |
*/
|
22 |
function switchToUser(id, btn, rowAction) {
|
23 |
+
$.ajax(getLocal().ajaxurl, {
|
24 |
type: 'POST',
|
25 |
dataType: 'json',
|
26 |
data: {
|
27 |
action: 'aam',
|
28 |
sub_action: 'switchToUser',
|
29 |
+
_ajax_nonce: getLocal().nonce,
|
30 |
user: id
|
31 |
},
|
32 |
beforeSend: function () {
|
39 |
if (response.status === 'success') {
|
40 |
location.href = response.redirect;
|
41 |
} else {
|
42 |
+
getAAM().notification('danger', response.reason);
|
43 |
}
|
44 |
},
|
45 |
error: function () {
|
46 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
47 |
},
|
48 |
complete: function () {
|
49 |
$(btn).attr(
|
75 |
* @returns {Boolean}
|
76 |
*/
|
77 |
function isCurrent(id) {
|
78 |
+
var subject = getAAM().getSubject();
|
79 |
|
80 |
return (subject.type === 'role' && subject.id === id);
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
*
|
85 |
+
* @param {type} exclude
|
86 |
*/
|
87 |
function fetchRoleList(exclude) {
|
88 |
+
$.ajax(getLocal().ajaxurl, {
|
89 |
type: 'POST',
|
90 |
dataType: 'json',
|
91 |
data: {
|
92 |
action: 'aam',
|
93 |
sub_action: 'Subject_Role.getList',
|
94 |
+
_ajax_nonce: getLocal().nonce,
|
95 |
exclude: exclude
|
96 |
},
|
97 |
beforeSend: function () {
|
98 |
$('.inherit-role-list').html(
|
99 |
+
'<option value="">' + getAAM().__('Loading...') + '</option>'
|
100 |
);
|
101 |
},
|
102 |
success: function (response) {
|
103 |
$('.inherit-role-list').html(
|
104 |
+
'<option value="">' + getAAM().__('No Role') + '</option>'
|
105 |
);
|
106 |
for (var i in response) {
|
107 |
$('.inherit-role-list').append(
|
111 |
if ($.aamEditRole) {
|
112 |
$('#inherit-role').val($.aamEditRole[0]);
|
113 |
}
|
114 |
+
getAAM().triggerHook('post-get-role-list', {
|
115 |
list : response
|
116 |
});
|
117 |
//TODO - Rerwite JavaScript to support $.aam
|
145 |
stateSave: true,
|
146 |
serverSide: false,
|
147 |
ajax: {
|
148 |
+
url: getLocal().ajaxurl,
|
149 |
type: 'POST',
|
150 |
dataType: 'json',
|
151 |
data: {
|
152 |
action: 'aam',
|
153 |
sub_action: 'Subject_Role.getTable',
|
154 |
+
_ajax_nonce: getLocal().nonce
|
155 |
}
|
156 |
},
|
157 |
columnDefs: [
|
159 |
],
|
160 |
language: {
|
161 |
search: '_INPUT_',
|
162 |
+
searchPlaceholder: getAAM().__('Search Role'),
|
163 |
+
info: getAAM().__('_TOTAL_ role(s)'),
|
164 |
infoFiltered: ''
|
165 |
},
|
166 |
initComplete: function () {
|
167 |
+
if (!getAAM().isUI() && getLocal().caps.create_roles) {
|
168 |
var create = $('<a/>', {
|
169 |
'href': '#',
|
170 |
'class': 'btn btn-primary'
|
176 |
})
|
177 |
.attr({
|
178 |
'data-toggle': "tooltip",
|
179 |
+
'title': getAAM().__('Create New Role')
|
180 |
});
|
181 |
|
182 |
$('.dataTables_filter', '#role-list_wrapper').append(create);
|
195 |
var expire = (data[5] ? '; <i class="icon-clock"></i>' : '');
|
196 |
$('td:eq(0)', row).append(
|
197 |
$('<i/>', {'class': 'aam-row-subtitle'}).html(
|
198 |
+
getAAM().applyFilters(
|
199 |
'role-subtitle',
|
200 |
+
getAAM().__('Users') + ': <b>' + parseInt(data[1]) + '</b>; ID: <b>' + data[0] + '</b>' + expire,
|
201 |
data
|
202 |
)
|
203 |
)
|
215 |
if (!$(this).prop('disabled')) {
|
216 |
$(this).prop('disabled', true);
|
217 |
var title = $('td:eq(0) span', row).html();
|
218 |
+
getAAM().setSubject('role', data[0], title, data[4]);
|
219 |
$('td:eq(0) span', row).replaceWith(
|
220 |
'<strong class="aam-highlight">' + title + '</strong>'
|
221 |
);
|
222 |
$('i.icon-cog', container).attr(
|
223 |
'class', 'aam-row-action icon-cog text-muted'
|
224 |
);
|
225 |
+
if (!getAAM().isUI()) {
|
226 |
$('i.icon-cog', container).attr(
|
227 |
'class', 'aam-row-action icon-spin4 animate-spin'
|
228 |
);
|
229 |
+
getAAM().fetchContent('main');
|
230 |
$('i.icon-spin4', container).attr(
|
231 |
'class', 'aam-row-action icon-cog text-muted'
|
232 |
);
|
233 |
} else {
|
234 |
+
getAAM().fetchPartial('postform', function(content) {
|
235 |
$('#metabox-post-access-form').html(content);
|
236 |
+
getAAM().loadAccessForm(
|
237 |
$('#load-post-object-type').val(),
|
238 |
$('#load-post-object').val(),
|
239 |
$(this)
|
243 |
}
|
244 |
}).attr({
|
245 |
'data-toggle': "tooltip",
|
246 |
+
'title': getAAM().__('Manage Role')
|
247 |
}).prop('disabled', (isCurrent(data[0]) ? true: false)));
|
248 |
break;
|
249 |
|
250 |
case 'edit':
|
251 |
+
if (!getAAM().isUI()) {
|
252 |
$(container).append($('<i/>', {
|
253 |
'class': 'aam-row-action icon-pencil text-warning'
|
254 |
}).bind('click', function () {
|
262 |
//TODO - Rerwite JavaScript to support $.aam
|
263 |
$.aamEditRole = data;
|
264 |
|
265 |
+
getAAM().triggerHook('edit-role-modal', data);
|
266 |
}).attr({
|
267 |
'data-toggle': "tooltip",
|
268 |
+
'title': getAAM().__('Edit Role')
|
269 |
}));
|
270 |
}
|
271 |
break;
|
272 |
|
273 |
case 'clone':
|
274 |
+
if (!getAAM().isUI()) {
|
275 |
$(container).append($('<i/>', {
|
276 |
'class': 'aam-row-action icon-clone text-success'
|
277 |
}).bind('click', function () {
|
281 |
$('#add-role-modal').modal('show');
|
282 |
}).attr({
|
283 |
'data-toggle': "tooltip",
|
284 |
+
'title': getAAM().__('Clone Role')
|
285 |
}));
|
286 |
}
|
287 |
break;
|
288 |
|
289 |
case 'delete':
|
290 |
+
if (!getAAM().isUI()) {
|
291 |
$(container).append($('<i/>', {
|
292 |
'class': 'aam-row-action icon-trash-empty text-danger'
|
293 |
}).bind('click', {role: data}, function (event) {
|
302 |
$('#delete-role-modal').modal('show');
|
303 |
}).attr({
|
304 |
'data-toggle': "tooltip",
|
305 |
+
'title': getAAM().__('Delete Role')
|
306 |
}));
|
307 |
}
|
308 |
break;
|
309 |
|
310 |
default:
|
311 |
+
if (!getAAM().isUI()) {
|
312 |
+
getAAM().triggerHook('role-action', {
|
313 |
container: container,
|
314 |
action : action,
|
315 |
data : data
|
320 |
});
|
321 |
$('td:eq(1)', row).html(container);
|
322 |
|
323 |
+
getAAM().triggerHook('decorate-role-row', {
|
324 |
row : row,
|
325 |
data: data
|
326 |
});
|
358 |
var data = {
|
359 |
action: 'aam',
|
360 |
sub_action: 'Subject_Role.add',
|
361 |
+
_ajax_nonce: getLocal().nonce
|
362 |
};
|
363 |
|
364 |
$('input,select', '#add-role-modal .modal-body').each(function() {
|
372 |
});
|
373 |
|
374 |
if (data.name) {
|
375 |
+
$.ajax(getLocal().ajaxurl, {
|
376 |
type: 'POST',
|
377 |
dataType: 'json',
|
378 |
data: data,
|
379 |
beforeSend: function () {
|
380 |
+
$(_this).text(getAAM().__('Saving...')).attr('disabled', true);
|
381 |
},
|
382 |
success: function (response) {
|
383 |
if (response.status === 'success') {
|
384 |
$('#role-list').DataTable().ajax.reload();
|
385 |
+
getAAM().setSubject(
|
386 |
'role',
|
387 |
response.role.id,
|
388 |
response.role.name,
|
389 |
response.role.level
|
390 |
);
|
391 |
+
getAAM().fetchContent('main');
|
392 |
$('#add-role-modal').modal('hide');
|
393 |
} else {
|
394 |
+
getAAM().notification(
|
395 |
+
'danger', getAAM().__('Failed to add new role')
|
396 |
);
|
397 |
}
|
398 |
},
|
399 |
error: function () {
|
400 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
401 |
},
|
402 |
complete: function () {
|
403 |
+
$(_this).text(getAAM().__('Add Role')).attr('disabled', false);
|
404 |
}
|
405 |
});
|
406 |
} else {
|
417 |
var data = {
|
418 |
action: 'aam',
|
419 |
sub_action: 'Subject_Role.edit',
|
420 |
+
_ajax_nonce: getLocal().nonce,
|
421 |
subject: 'role',
|
422 |
subjectId: $(_this).data('role')
|
423 |
};
|
433 |
});
|
434 |
|
435 |
if (data.name) {
|
436 |
+
$.ajax(getLocal().ajaxurl, {
|
437 |
type: 'POST',
|
438 |
dataType: 'json',
|
439 |
data: data,
|
440 |
beforeSend: function () {
|
441 |
+
$(_this).text(getAAM().__('Saving...')).attr('disabled', true);
|
442 |
},
|
443 |
success: function (response) {
|
444 |
if (response.status === 'success') {
|
445 |
$('#role-list').DataTable().ajax.reload();
|
446 |
} else {
|
447 |
+
getAAM().notification(
|
448 |
+
'danger', getAAM().__('Failed to update role')
|
449 |
);
|
450 |
}
|
451 |
},
|
452 |
error: function () {
|
453 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
454 |
},
|
455 |
complete: function () {
|
456 |
$('#edit-role-modal').modal('hide');
|
457 |
+
$(_this).text(getAAM().__('Update')).attr('disabled', false);
|
458 |
}
|
459 |
});
|
460 |
} else {
|
466 |
$('#delete-role-btn').bind('click', function () {
|
467 |
var _this = this;
|
468 |
|
469 |
+
$.ajax(getLocal().ajaxurl, {
|
470 |
type: 'POST',
|
471 |
dataType: 'json',
|
472 |
data: {
|
473 |
action: 'aam',
|
474 |
sub_action: 'Subject_Role.delete',
|
475 |
+
_ajax_nonce: getLocal().nonce,
|
476 |
subject: 'role',
|
477 |
subjectId: $(_this).data('role')
|
478 |
},
|
479 |
beforeSend: function () {
|
480 |
+
$(_this).text(getAAM().__('Deleting...')).attr('disabled', true);
|
481 |
},
|
482 |
success: function (response) {
|
483 |
if (response.status === 'success') {
|
484 |
$('#role-list').DataTable().ajax.reload();
|
485 |
} else {
|
486 |
+
getAAM().notification('danger', getAAM().__('Failed to delete role'));
|
487 |
}
|
488 |
},
|
489 |
error: function () {
|
490 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
491 |
},
|
492 |
complete: function () {
|
493 |
$('#delete-role-modal').modal('hide');
|
494 |
+
$(_this).text(getAAM().__('Delete Role')).attr('disabled', false);
|
495 |
}
|
496 |
});
|
497 |
});
|
498 |
|
499 |
//add setSubject hook
|
500 |
+
getAAM().addHook('setSubject', function () {
|
501 |
//clear highlight
|
502 |
$('tbody tr', '#role-list').each(function () {
|
503 |
if ($('strong', $(this)).length) {
|
512 |
});
|
513 |
|
514 |
//in case interface needed to be reloaded
|
515 |
+
getAAM().addHook('refresh', function () {
|
516 |
+
$('#role-list').DataTable().ajax.url(getLocal().ajaxurl).load();
|
517 |
+
getAAM().fetchContent('main');
|
518 |
});
|
519 |
|
520 |
})(jQuery);
|
535 |
* @returns {Boolean}
|
536 |
*/
|
537 |
function isCurrent(id) {
|
538 |
+
var subject = getAAM().getSubject();
|
539 |
|
540 |
return (subject.type === 'user' && parseInt(subject.id) === id);
|
541 |
}
|
546 |
* @returns {undefined}
|
547 |
*/
|
548 |
function loadRoleList(selected) {
|
549 |
+
$.ajax(getLocal().ajaxurl, {
|
550 |
type: 'POST',
|
551 |
dataType: 'json',
|
552 |
data: {
|
553 |
action: 'aam',
|
554 |
sub_action: 'Subject_Role.getList',
|
555 |
+
_ajax_nonce: getLocal().nonce
|
556 |
},
|
557 |
beforeSend: function () {
|
558 |
$('#expiration-change-role').html(
|
559 |
+
'<option value="">' + getAAM().__('Loading...') + '</option>'
|
560 |
);
|
561 |
},
|
562 |
success: function (response) {
|
563 |
$('#expiration-change-role').html(
|
564 |
+
'<option value="">' + getAAM().__('Select Role') + '</option>'
|
565 |
);
|
566 |
for (var i in response) {
|
567 |
$('#expiration-change-role').append(
|
583 |
function blockUser(id, btn) {
|
584 |
var state = ($(btn).hasClass('icon-lock') ? 0 : 1);
|
585 |
|
586 |
+
$.ajax(getLocal().ajaxurl, {
|
587 |
type: 'POST',
|
588 |
dataType: 'json',
|
589 |
data: {
|
590 |
action: 'aam',
|
591 |
sub_action: 'Subject_User.block',
|
592 |
+
_ajax_nonce: getLocal().nonce,
|
593 |
subject: 'user',
|
594 |
subjectId: id
|
595 |
},
|
601 |
if (state === 1) {
|
602 |
$(btn).attr({
|
603 |
'class': 'aam-row-action icon-lock text-danger',
|
604 |
+
'title': getAAM().__('Unlock User'),
|
605 |
+
'data-original-title': getAAM().__('Unlock User')
|
606 |
});
|
607 |
} else {
|
608 |
$(btn).attr({
|
609 |
'class': 'aam-row-action icon-lock-open-alt text-warning',
|
610 |
+
'title': getAAM().__('Lock User'),
|
611 |
+
'data-original-title': getAAM().__('Lock User')
|
612 |
});
|
613 |
}
|
614 |
} else {
|
615 |
+
getAAM().notification('danger', getAAM().__('Failed to block user'));
|
616 |
}
|
617 |
},
|
618 |
error: function () {
|
619 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
620 |
}
|
621 |
});
|
622 |
}
|
631 |
serverSide: true,
|
632 |
processing: true,
|
633 |
ajax: {
|
634 |
+
url: getLocal().ajaxurl,
|
635 |
type: 'POST',
|
636 |
dataType: 'json',
|
637 |
data: function(params) {
|
638 |
params.action = 'aam';
|
639 |
params.sub_action = 'Subject_User.getTable';
|
640 |
+
params._ajax_nonce = getLocal().nonce;
|
641 |
params.role = $('#user-list-filter').val();
|
642 |
|
643 |
return params;
|
648 |
],
|
649 |
language: {
|
650 |
search: '_INPUT_',
|
651 |
+
searchPlaceholder: getAAM().__('Search User'),
|
652 |
+
info: getAAM().__('_TOTAL_ user(s)'),
|
653 |
infoFiltered: ''
|
654 |
},
|
655 |
initComplete: function () {
|
656 |
+
if (!getAAM().isUI() && getLocal().caps.create_users) {
|
657 |
var create = $('<a/>', {
|
658 |
'href': '#',
|
659 |
'class': 'btn btn-primary'
|
660 |
})
|
661 |
.html('<i class="icon-plus"></i> ')
|
662 |
.bind('click', function () {
|
663 |
+
window.open(getLocal().url.addUser, '_blank');
|
664 |
})
|
665 |
.attr({
|
666 |
'data-toggle': "tooltip",
|
667 |
+
'title': getAAM().__('Create New User')
|
668 |
});
|
669 |
|
670 |
$('.dataTables_filter', '#user-list_wrapper').append(create);
|
673 |
'class': 'user-filter',
|
674 |
'id': 'user-list-filter'
|
675 |
})
|
676 |
+
.html('<option value="">' + getAAM().__('Loading roles...') + '</option>')
|
677 |
.bind('change', function() {
|
678 |
$('#user-list').DataTable().ajax.reload();
|
679 |
});
|
680 |
|
681 |
$('.dataTables_filter', '#user-list_wrapper').append(filter);
|
682 |
|
683 |
+
$.ajax(getLocal().ajaxurl, {
|
684 |
type: 'POST',
|
685 |
dataType: 'json',
|
686 |
data: {
|
687 |
action: 'aam',
|
688 |
sub_action: 'Subject_Role.getList',
|
689 |
+
_ajax_nonce: getLocal().nonce
|
690 |
},
|
691 |
success: function (response) {
|
692 |
$('#user-list-filter').html(
|
693 |
+
'<option value="">' + getAAM().__('Filter By Role') + '</option>'
|
694 |
);
|
695 |
for (var i in response) {
|
696 |
$('#user-list-filter').append(
|
711 |
//add subtitle
|
712 |
$('td:eq(0)', row).append(
|
713 |
$('<i/>', {'class': 'aam-row-subtitle'}).html(
|
714 |
+
getAAM().__('Role') + ': ' + data[1] + '; ID: <b>' + data[0] + '</b>'
|
715 |
)
|
716 |
);
|
717 |
|
727 |
}).bind('click', function () {
|
728 |
if (!$(this).prop('disabled')) {
|
729 |
$(this).prop('disabled', true);
|
730 |
+
getAAM().setSubject('user', data[0], data[2], data[4]);
|
731 |
$('td:eq(0) span', row).replaceWith(
|
732 |
'<strong class="aam-highlight">' + data[2] + '</strong>'
|
733 |
);
|
734 |
$('i.icon-cog', container).attr('class', 'aam-row-action icon-cog text-muted');
|
735 |
|
736 |
+
if (!getAAM().isUI()) {
|
737 |
$('i.icon-cog', container).attr('class', 'aam-row-action icon-spin4 animate-spin');
|
738 |
+
getAAM().fetchContent('main');
|
739 |
$('i.icon-spin4', container).attr('class', 'aam-row-action icon-cog text-muted');
|
740 |
} else {
|
741 |
+
getAAM().fetchPartial('postform', function(content) {
|
742 |
$('#metabox-post-access-form').html(content);
|
743 |
+
getAAM().loadAccessForm(
|
744 |
$('#load-post-object-type').val(),
|
745 |
$('#load-post-object').val(),
|
746 |
$(this)
|
750 |
}
|
751 |
}).attr({
|
752 |
'data-toggle': "tooltip",
|
753 |
+
'title': getAAM().__('Manage User')
|
754 |
})).prop('disabled', (isCurrent(data[0]) ? true: false));
|
755 |
break;
|
756 |
|
757 |
case 'ttl':
|
758 |
+
if (!getAAM().isUI()) {
|
759 |
$(container).append($('<i/>', {
|
760 |
'class': 'aam-row-action icon-clock text-' + (data[5] ? 'danger' : 'warning')
|
761 |
}).bind('click', function () {
|
784 |
$('#edit-user-expiration-modal').modal('show');
|
785 |
}).attr({
|
786 |
'data-toggle': "tooltip",
|
787 |
+
'title': getAAM().__('User Expiration')
|
788 |
}));
|
789 |
}
|
790 |
break;
|
791 |
|
792 |
case 'edit':
|
793 |
+
if (!getAAM().isUI()) {
|
794 |
$(container).append($('<i/>', {
|
795 |
'class': 'aam-row-action icon-pencil text-info'
|
796 |
}).bind('click', function () {
|
797 |
window.open(
|
798 |
+
getLocal().url.editUser + '?user_id=' + data[0], '_blank'
|
799 |
);
|
800 |
}).attr({
|
801 |
'data-toggle': "tooltip",
|
802 |
+
'title': getAAM().__('Edit User')
|
803 |
}));
|
804 |
}
|
805 |
break;
|
806 |
|
807 |
case 'lock':
|
808 |
+
if (!getAAM().isUI()) {
|
809 |
$(container).append($('<i/>', {
|
810 |
'class': 'aam-row-action icon-lock-open-alt text-warning'
|
811 |
}).bind('click', function () {
|
812 |
blockUser(data[0], $(this));
|
813 |
}).attr({
|
814 |
'data-toggle': "tooltip",
|
815 |
+
'title': getAAM().__('Lock User')
|
816 |
}));
|
817 |
}
|
818 |
break;
|
819 |
|
820 |
case 'unlock':
|
821 |
+
if (!getAAM().isUI()) {
|
822 |
$(container).append($('<i/>', {
|
823 |
'class': 'aam-row-action icon-lock text-danger'
|
824 |
}).bind('click', function () {
|
825 |
blockUser(data[0], $(this));
|
826 |
}).attr({
|
827 |
'data-toggle': "tooltip",
|
828 |
+
'title': getAAM().__('Unlock User')
|
829 |
}));
|
830 |
}
|
831 |
break;
|
832 |
|
833 |
case 'switch':
|
834 |
+
if (!getAAM().isUI()) {
|
835 |
$(container).append($('<i/>', {
|
836 |
'class': 'aam-row-action icon-exchange text-success'
|
837 |
}).bind('click', function () {
|
838 |
switchToUser(data[0], $(this), true);
|
839 |
}).attr({
|
840 |
'data-toggle': "tooltip",
|
841 |
+
'title': getAAM().__('Switch To User')
|
842 |
}));
|
843 |
}
|
844 |
break;
|
903 |
$('#edit-user-expiration-btn').bind('click', function () {
|
904 |
var _this = this;
|
905 |
|
906 |
+
$.ajax(getLocal().ajaxurl, {
|
907 |
type: 'POST',
|
908 |
dataType: 'json',
|
909 |
data: {
|
910 |
action: 'aam',
|
911 |
sub_action: 'Subject_User.saveExpiration',
|
912 |
+
_ajax_nonce: getLocal().nonce,
|
913 |
user: $(_this).attr('data-user-id'),
|
914 |
expires: $('#user-expires').val(),
|
915 |
after: $('#action-after-expiration').val(),
|
916 |
role: $('#expiration-change-role').val()
|
917 |
},
|
918 |
beforeSend: function () {
|
919 |
+
$(_this).text(getAAM().__('Saving...')).attr('disabled', true);
|
920 |
},
|
921 |
success: function (response) {
|
922 |
if (response.status === 'success') {
|
923 |
$('#user-list').DataTable().ajax.reload();
|
924 |
} else {
|
925 |
+
getAAM().notification('danger', response.reason);
|
926 |
}
|
927 |
},
|
928 |
error: function () {
|
929 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
930 |
},
|
931 |
complete: function () {
|
932 |
$('#edit-user-expiration-modal').modal('hide');
|
933 |
+
$(_this).text(getAAM().__('Save')).attr('disabled', false);
|
934 |
}
|
935 |
});
|
936 |
});
|
939 |
$('#reset-user-expiration-btn').bind('click', function () {
|
940 |
var _this = this;
|
941 |
|
942 |
+
$.ajax(getLocal().ajaxurl, {
|
943 |
type: 'POST',
|
944 |
dataType: 'json',
|
945 |
data: {
|
946 |
action: 'aam',
|
947 |
sub_action: 'Subject_User.saveExpiration',
|
948 |
+
_ajax_nonce: getLocal().nonce,
|
949 |
user: $(_this).attr('data-user-id')
|
950 |
},
|
951 |
beforeSend: function () {
|
952 |
+
$(_this).text(getAAM().__('Reseting...')).attr('disabled', true);
|
953 |
},
|
954 |
success: function (response) {
|
955 |
if (response.status === 'success') {
|
956 |
$('#user-list').DataTable().ajax.reload();
|
957 |
} else {
|
958 |
+
getAAM().notification('danger', response.reason);
|
959 |
}
|
960 |
},
|
961 |
error: function () {
|
962 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
963 |
},
|
964 |
complete: function () {
|
965 |
$('#edit-user-expiration-modal').modal('hide');
|
966 |
+
$(_this).text(getAAM().__('Reset')).attr('disabled', false);
|
967 |
}
|
968 |
});
|
969 |
});
|
970 |
|
971 |
//add setSubject hook
|
972 |
+
getAAM().addHook('setSubject', function () {
|
973 |
//clear highlight
|
974 |
$('tbody tr', '#user-list').each(function () {
|
975 |
if ($('strong', $(this)).length) {
|
984 |
});
|
985 |
|
986 |
//in case interface needed to be reloaded
|
987 |
+
getAAM().addHook('refresh', function () {
|
988 |
+
$('#user-list').DataTable().ajax.url(getLocal().ajaxurl).load();
|
989 |
});
|
990 |
|
991 |
})(jQuery);
|
1004 |
$('#manage-visitor').bind('click', function () {
|
1005 |
var _this = this;
|
1006 |
|
1007 |
+
getAAM().setSubject('visitor', null, getAAM().__('Anonymous'), 0);
|
1008 |
$('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
|
1009 |
|
1010 |
+
if (!getAAM().isUI()) {
|
1011 |
+
getAAM().fetchContent('main');
|
1012 |
$('i.icon-spin4', $(this)).attr('class', 'icon-cog');
|
1013 |
} else {
|
1014 |
+
getAAM().fetchPartial('postform', function(content) {
|
1015 |
$('#metabox-post-access-form').html(content);
|
1016 |
+
getAAM().loadAccessForm(
|
1017 |
$('#load-post-object-type').val(),
|
1018 |
$('#load-post-object').val(),
|
1019 |
null,
|
1043 |
$('#manage-default').bind('click', function () {
|
1044 |
var _this = this;
|
1045 |
|
1046 |
+
getAAM().setSubject('default', null, getAAM().__('All Users, Roles and Visitor'), 0);
|
1047 |
$('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
|
1048 |
+
if (!getAAM().isUI()) {
|
1049 |
+
getAAM().fetchContent('main');
|
1050 |
$('i.icon-spin4', $(this)).attr('class', 'icon-cog');
|
1051 |
} else {
|
1052 |
+
getAAM().fetchPartial('postform', function(content) {
|
1053 |
$('#metabox-post-access-form').html(content);
|
1054 |
+
getAAM().loadAccessForm(
|
1055 |
$('#load-post-object-type').val(),
|
1056 |
$('#load-post-object').val(),
|
1057 |
null,
|
1078 |
|
1079 |
/**
|
1080 |
*
|
1081 |
+
* @param {type} items
|
1082 |
+
* @param {type} status
|
1083 |
+
* @param {type} successCallback
|
1084 |
* @returns {undefined}
|
1085 |
*/
|
1086 |
function save(items, status, successCallback) {
|
1087 |
+
$.ajax(getLocal().ajaxurl, {
|
1088 |
type: 'POST',
|
1089 |
dataType: 'json',
|
1090 |
data: {
|
1091 |
action: 'aam',
|
1092 |
sub_action: 'Main_Menu.save',
|
1093 |
+
subject: getAAM().getSubject().type,
|
1094 |
+
subjectId: getAAM().getSubject().id,
|
1095 |
+
_ajax_nonce: getLocal().nonce,
|
1096 |
items: items,
|
1097 |
status: status
|
1098 |
},
|
1100 |
successCallback(response);
|
1101 |
},
|
1102 |
error: function () {
|
1103 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
1104 |
}
|
1105 |
});
|
1106 |
}
|
1135 |
$('<div/>', {'class': 'aam-lock'})
|
1136 |
);
|
1137 |
_this.removeClass('btn-danger').addClass('btn-primary');
|
1138 |
+
_this.html('<i class="icon-eye"></i>' + getAAM().__('Show Menu'));
|
1139 |
//add menu restricted indicator
|
1140 |
var ind = $('<i/>', {
|
1141 |
'class': 'aam-panel-title-icon icon-eye-off text-danger'
|
1145 |
$('.aam-lock', target).remove();
|
1146 |
_this.removeClass('btn-primary').addClass('btn-danger');
|
1147 |
_this.html(
|
1148 |
+
'<i class="icon-eye-off"></i>' + getAAM().__('Restrict Menu')
|
1149 |
);
|
1150 |
$('.panel-title .icon-eye-off', target + '-heading').remove();
|
1151 |
}
|
1160 |
$(this).bind('click', function () {
|
1161 |
var _this = $(this);
|
1162 |
|
1163 |
+
getAAM().save(
|
1164 |
_this.data('menu-id'),
|
1165 |
_this.attr('checked') ? 1 : 0,
|
1166 |
'menu',
|
1169 |
if (result.status === 'success') {
|
1170 |
$('#aam-menu-overwrite').show();
|
1171 |
if (_this.attr('checked')) {
|
1172 |
+
_this.next().attr('data-original-title', getAAM().__('Uncheck to allow'));
|
1173 |
} else {
|
1174 |
+
_this.next().attr('data-original-title', getAAM().__('Check to restrict'));
|
1175 |
}
|
1176 |
}
|
1177 |
}
|
1181 |
|
1182 |
//reset button
|
1183 |
$('#menu-reset').bind('click', function () {
|
1184 |
+
getAAM().reset('menu', $(this));
|
1185 |
});
|
1186 |
}
|
1187 |
}
|
1188 |
|
1189 |
+
getAAM().addHook('init', initialize);
|
1190 |
|
1191 |
})(jQuery);
|
1192 |
|
1201 |
|
1202 |
/**
|
1203 |
*
|
1204 |
+
* @param {type} items
|
1205 |
+
* @param {type} status
|
1206 |
+
* @param {type} successCallback
|
1207 |
* @returns {undefined}
|
1208 |
*/
|
1209 |
function save(items, status, successCallback) {
|
1210 |
+
$.ajax(getLocal().ajaxurl, {
|
1211 |
type: 'POST',
|
1212 |
dataType: 'json',
|
1213 |
data: {
|
1214 |
action: 'aam',
|
1215 |
sub_action: 'Main_Toolbar.save',
|
1216 |
+
subject: getAAM().getSubject().type,
|
1217 |
+
subjectId: getAAM().getSubject().id,
|
1218 |
+
_ajax_nonce: getLocal().nonce,
|
1219 |
items: items,
|
1220 |
status: status
|
1221 |
},
|
1223 |
successCallback(response);
|
1224 |
},
|
1225 |
error: function () {
|
1226 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
1227 |
}
|
1228 |
});
|
1229 |
}
|
1233 |
* @returns {undefined}
|
1234 |
*/
|
1235 |
function getContent() {
|
1236 |
+
$.ajax(getLocal().ajaxurl, {
|
1237 |
type: 'POST',
|
1238 |
dataType: 'html',
|
1239 |
data: {
|
1240 |
action: 'aam',
|
1241 |
sub_action: 'Main_Toolbar.getContent',
|
1242 |
+
_ajax_nonce: getLocal().nonce,
|
1243 |
+
subject: getAAM().getSubject().type,
|
1244 |
+
subjectId: getAAM().getSubject().id
|
1245 |
},
|
1246 |
success: function (response) {
|
1247 |
$('#toolbar-content').replaceWith(response);
|
1249 |
initialize();
|
1250 |
},
|
1251 |
error: function () {
|
1252 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
1253 |
}
|
1254 |
});
|
1255 |
}
|
1284 |
$('<div/>', {'class': 'aam-lock'})
|
1285 |
);
|
1286 |
_this.removeClass('btn-danger').addClass('btn-primary');
|
1287 |
+
_this.html('<i class="icon-eye"></i>' + getAAM().__('Show Menu'));
|
1288 |
//add menu restricted indicator
|
1289 |
var ind = $('<i/>', {
|
1290 |
'class': 'aam-panel-title-icon icon-eye-off text-danger'
|
1294 |
$('.aam-lock', target).remove();
|
1295 |
_this.removeClass('btn-primary').addClass('btn-danger');
|
1296 |
_this.html(
|
1297 |
+
'<i class="icon-eye-off"></i>' + getAAM().__('Restrict Menu')
|
1298 |
);
|
1299 |
$('.panel-title .icon-eye-off', target + '-heading').remove();
|
1300 |
}
|
1307 |
|
1308 |
//init refresh list button
|
1309 |
$('#refresh-toolbar-list').bind('click', function () {
|
1310 |
+
var url = getLocal().url.site;
|
1311 |
+
url += (url.indexOf('?') === -1 ? '?' : '&') + 'init=toolbar';
|
1312 |
+
|
1313 |
+
$.ajax(url, {
|
1314 |
+
type: 'GET',
|
|
|
|
|
|
|
1315 |
beforeSend: function () {
|
1316 |
$('i', '#refresh-toolbar-list').attr(
|
1317 |
'class', 'icon-spin4 animate-spin'
|
1318 |
);
|
1319 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1320 |
complete: function () {
|
1321 |
+
getContent();
|
1322 |
$('i', '#refresh-toolbar-list').attr(
|
1323 |
'class', 'icon-arrows-cw'
|
1324 |
);
|
1328 |
|
1329 |
//reset button
|
1330 |
$('#toolbar-reset').bind('click', function () {
|
1331 |
+
getAAM().reset('toolbar', $(this));
|
1332 |
});
|
1333 |
|
1334 |
$('input[type="checkbox"]', '#toolbar-list').each(function () {
|
1335 |
$(this).bind('click', function () {
|
1336 |
var _this = $(this);
|
1337 |
+
getAAM().save(
|
1338 |
$(this).data('toolbar'),
|
1339 |
$(this).attr('checked') ? 1 : 0,
|
1340 |
'toolbar',
|
1344 |
$('#aam-toolbar-overwrite').show();
|
1345 |
|
1346 |
if (_this.attr('checked')) {
|
1347 |
+
_this.next().attr('data-original-title', getAAM().__('Uncheck to show'));
|
1348 |
} else {
|
1349 |
+
_this.next().attr('data-original-title', getAAM().__('Check to hide'));
|
1350 |
}
|
1351 |
}
|
1352 |
}
|
1356 |
}
|
1357 |
}
|
1358 |
|
1359 |
+
getAAM().addHook('init', initialize);
|
1360 |
|
1361 |
})(jQuery);
|
1362 |
|
1375 |
* @returns {undefined}
|
1376 |
*/
|
1377 |
function getContent() {
|
1378 |
+
$.ajax(getLocal().ajaxurl, {
|
1379 |
type: 'POST',
|
1380 |
dataType: 'html',
|
1381 |
data: {
|
1382 |
action: 'aam',
|
1383 |
sub_action: 'Main_Metabox.getContent',
|
1384 |
+
_ajax_nonce: getLocal().nonce,
|
1385 |
+
subject: getAAM().getSubject().type,
|
1386 |
+
subjectId: getAAM().getSubject().id
|
1387 |
},
|
1388 |
success: function (response) {
|
1389 |
$('#metabox-content').replaceWith(response);
|
1391 |
initialize();
|
1392 |
},
|
1393 |
error: function () {
|
1394 |
+
getAAM().notification(
|
1395 |
+
'danger', getAAM().__('Application error')
|
1396 |
+
);
|
1397 |
+
}
|
1398 |
+
});
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
/**
|
1402 |
+
*
|
1403 |
+
* @param {type} endpoints
|
1404 |
+
* @param {type} index
|
1405 |
+
* @param {type} btn
|
1406 |
+
* @returns {undefined}
|
1407 |
+
*/
|
1408 |
+
function fetchData(endpoints, index, btn) {
|
1409 |
+
$.ajax(endpoints[index], {
|
1410 |
+
type: 'GET',
|
1411 |
+
complete: function () {
|
1412 |
+
if (index < endpoints.length) {
|
1413 |
+
fetchData(endpoints, index + 1, btn);
|
1414 |
+
} else {
|
1415 |
+
btn.attr('class', 'icon-arrows-cw');
|
1416 |
+
getContent();
|
1417 |
+
}
|
1418 |
}
|
1419 |
});
|
1420 |
}
|
1427 |
if ($('#metabox-content').length) {
|
1428 |
//init refresh list button
|
1429 |
$('#refresh-metabox-list').bind('click', function () {
|
1430 |
+
$.ajax(getLocal().ajaxurl, {
|
1431 |
type: 'POST',
|
1432 |
dataType: 'json',
|
1433 |
data: {
|
1434 |
action: 'aam',
|
1435 |
+
sub_action: 'Main_Metabox.prepareInitialization',
|
1436 |
+
_ajax_nonce: getLocal().nonce
|
1437 |
},
|
1438 |
beforeSend: function () {
|
1439 |
$('i', '#refresh-metabox-list').attr(
|
1442 |
},
|
1443 |
success: function (response) {
|
1444 |
if (response.status === 'success') {
|
1445 |
+
fetchData(
|
1446 |
+
response.endpoints,
|
1447 |
+
0,
|
1448 |
+
$('i', '#refresh-metabox-list')
|
1449 |
+
);
|
1450 |
} else {
|
1451 |
+
getAAM().notification(
|
1452 |
+
'danger',
|
1453 |
+
getAAM().__('Failed to retrieve mataboxes')
|
1454 |
);
|
1455 |
}
|
1456 |
},
|
1457 |
error: function () {
|
1458 |
+
getAAM().notification(
|
1459 |
+
'danger', getAAM().__('Application error')
|
1460 |
+
);
|
1461 |
$('i', '#refresh-metabox-list').attr(
|
1462 |
'class', 'icon-arrows-cw'
|
1463 |
);
|
1466 |
});
|
1467 |
|
1468 |
$('#init-url-btn').bind('click', function () {
|
1469 |
+
var url = $('#init-url').val();
|
1470 |
+
url += (url.indexOf('?') === -1 ? '?' : '&') + 'init=metabox';
|
1471 |
+
|
1472 |
+
$.ajax(url, {
|
1473 |
+
type: 'GET',
|
|
|
|
|
|
|
|
|
1474 |
beforeSend: function () {
|
1475 |
+
$('#init-url-btn').text(getAAM().__('Processing'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1476 |
},
|
1477 |
complete: function () {
|
1478 |
+
$('#init-url-btn').text(getAAM().__('Initialize'));
|
1479 |
$('#init-url-modal').modal('hide');
|
1480 |
+
getContent();
|
1481 |
}
|
1482 |
});
|
1483 |
});
|
1484 |
|
1485 |
//reset button
|
1486 |
$('#metabox-reset').bind('click', function () {
|
1487 |
+
getAAM().reset('metabox', $(this));
|
1488 |
});
|
1489 |
|
1490 |
$('input[type="checkbox"]', '#metabox-list').each(function () {
|
1491 |
$(this).bind('click', function () {
|
1492 |
var _this = $(this);
|
1493 |
+
getAAM().save(
|
1494 |
$(this).data('metabox'),
|
1495 |
$(this).attr('checked') ? 1 : 0,
|
1496 |
'metabox',
|
1500 |
$('#aam-metabox-overwrite').show();
|
1501 |
|
1502 |
if (_this.attr('checked')) {
|
1503 |
+
_this.next().attr('data-original-title', getAAM().__('Uncheck to show'));
|
1504 |
} else {
|
1505 |
+
_this.next().attr('data-original-title', getAAM().__('Check to hide'));
|
1506 |
}
|
1507 |
}
|
1508 |
}
|
1512 |
}
|
1513 |
}
|
1514 |
|
1515 |
+
getAAM().addHook('init', initialize);
|
1516 |
|
1517 |
})(jQuery);
|
1518 |
|
1538 |
//show indicator
|
1539 |
$(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
|
1540 |
|
1541 |
+
getAAM().save(capability, granted, 'capability', null, function(result) {
|
1542 |
if (result.status === 'success') {
|
1543 |
if (granted) {
|
1544 |
$(btn).attr('class', 'aam-row-action text-success icon-check');
|
1547 |
}
|
1548 |
} else {
|
1549 |
if (granted) {
|
1550 |
+
getAAM().notification(
|
1551 |
+
'danger', getAAM().__('WordPress core does not allow to grant this capability')
|
1552 |
);
|
1553 |
$(btn).attr('class', 'aam-row-action text-muted icon-check-empty');
|
1554 |
} else {
|
1570 |
pagingType: 'simple',
|
1571 |
serverSide: false,
|
1572 |
ajax: {
|
1573 |
+
url: getLocal().ajaxurl,
|
1574 |
type: 'POST',
|
1575 |
data: {
|
1576 |
action: 'aam',
|
1577 |
sub_action: 'Main_Capability.getTable',
|
1578 |
+
_ajax_nonce: getLocal().nonce,
|
1579 |
+
subject: getAAM().getSubject().type,
|
1580 |
+
subjectId: getAAM().getSubject().id
|
1581 |
}
|
1582 |
},
|
1583 |
columnDefs: [
|
1585 |
],
|
1586 |
language: {
|
1587 |
search: '_INPUT_',
|
1588 |
+
searchPlaceholder: getAAM().__('Search Capability'),
|
1589 |
+
info: getAAM().__('_TOTAL_ capability(s)'),
|
1590 |
infoFiltered: '',
|
1591 |
+
infoEmpty: getAAM().__('Nothing to show'),
|
1592 |
lengthMenu: '_MENU_'
|
1593 |
},
|
1594 |
createdRow: function (row, data) {
|
1629 |
}).bind('click', function () {
|
1630 |
var message = $('.aam-confirm-message', '#delete-capability-modal');
|
1631 |
$(message).html(message.data('message').replace(
|
1632 |
+
'%s', '"' + data[0] + '"')
|
1633 |
);
|
1634 |
$('#capability-id').val(data[0]);
|
1635 |
$('#delete-capability-btn').attr('data-cap', data[0]);
|
1638 |
break;
|
1639 |
|
1640 |
default:
|
1641 |
+
getAAM().triggerHook('decorate-capability-row', {
|
1642 |
action: action,
|
1643 |
container: container,
|
1644 |
data: data
|
1676 |
$('#new-capability-name').parent().removeClass('has-error');
|
1677 |
|
1678 |
if (capability) {
|
1679 |
+
$.ajax(getLocal().ajaxurl, {
|
1680 |
type: 'POST',
|
1681 |
dataType: 'json',
|
1682 |
data: {
|
1683 |
action: 'aam',
|
1684 |
sub_action: 'Main_Capability.add',
|
1685 |
+
_ajax_nonce: getLocal().nonce,
|
1686 |
capability: capability,
|
1687 |
+
subject: getAAM().getSubject().type,
|
1688 |
+
subjectId: getAAM().getSubject().id
|
1689 |
},
|
1690 |
beforeSend: function () {
|
1691 |
+
$(_this).text(getAAM().__('Saving...')).attr('disabled', true);
|
1692 |
},
|
1693 |
success: function (response) {
|
1694 |
if (response.status === 'success') {
|
1695 |
$('#add-capability-modal').modal('hide');
|
1696 |
$('#capability-list').DataTable().ajax.reload();
|
1697 |
} else {
|
1698 |
+
getAAM().notification(
|
1699 |
+
'danger', getAAM().__('Failed to add new capability')
|
1700 |
);
|
1701 |
}
|
1702 |
},
|
1703 |
error: function () {
|
1704 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
1705 |
},
|
1706 |
complete: function () {
|
1707 |
+
$(_this).text(getAAM().__('Add Capability')).attr('disabled', false);
|
1708 |
}
|
1709 |
});
|
1710 |
} else {
|
1721 |
var cap = $.trim($('#capability-id').val());
|
1722 |
|
1723 |
if (cap) {
|
1724 |
+
$.ajax(getLocal().ajaxurl, {
|
1725 |
type: 'POST',
|
1726 |
dataType: 'json',
|
1727 |
data: {
|
1728 |
action: 'aam',
|
1729 |
sub_action: 'Main_Capability.update',
|
1730 |
+
_ajax_nonce: getLocal().nonce,
|
1731 |
capability: $(this).attr('data-cap'),
|
1732 |
updated: cap
|
1733 |
},
|
1734 |
beforeSend: function () {
|
1735 |
+
$(btn).text(getAAM().__('Saving...')).attr('disabled', true);
|
1736 |
},
|
1737 |
success: function (response) {
|
1738 |
if (response.status === 'success') {
|
1739 |
$('#edit-capability-modal').modal('hide');
|
1740 |
$('#capability-list').DataTable().ajax.reload();
|
1741 |
} else {
|
1742 |
+
getAAM().notification(
|
1743 |
+
'danger', getAAM().__('Failed to update capability')
|
1744 |
);
|
1745 |
}
|
1746 |
},
|
1747 |
error: function () {
|
1748 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
1749 |
},
|
1750 |
complete: function () {
|
1751 |
+
$(btn).text(getAAM().__('Update Capability')).attr(
|
1752 |
'disabled', false
|
1753 |
);
|
1754 |
}
|
1759 |
$('#delete-capability-btn').bind('click', function () {
|
1760 |
var btn = this;
|
1761 |
|
1762 |
+
$.ajax(getLocal().ajaxurl, {
|
1763 |
type: 'POST',
|
1764 |
dataType: 'json',
|
1765 |
data: {
|
1766 |
action: 'aam',
|
1767 |
sub_action: 'Main_Capability.delete',
|
1768 |
+
_ajax_nonce: getLocal().nonce,
|
1769 |
+
subject: getAAM().getSubject().type,
|
1770 |
+
subjectId: getAAM().getSubject().id,
|
1771 |
capability: $(this).attr('data-cap')
|
1772 |
},
|
1773 |
beforeSend: function () {
|
1774 |
+
$(btn).text(getAAM().__('Deleting...')).attr('disabled', true);
|
1775 |
},
|
1776 |
success: function (response) {
|
1777 |
if (response.status === 'success') {
|
1778 |
$('#delete-capability-modal').modal('hide');
|
1779 |
$('#capability-list').DataTable().ajax.reload();
|
1780 |
} else {
|
1781 |
+
getAAM().notification(
|
1782 |
+
'danger', getAAM().__('Failed to delete capability')
|
1783 |
);
|
1784 |
}
|
1785 |
},
|
1786 |
error: function () {
|
1787 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
1788 |
},
|
1789 |
complete: function () {
|
1790 |
+
$(btn).text(getAAM().__('Delete Capability')).attr(
|
1791 |
'disabled', false
|
1792 |
);
|
1793 |
}
|
1796 |
|
1797 |
//reset button
|
1798 |
$('#capability-reset').bind('click', function () {
|
1799 |
+
getAAM().reset('capability', $(this));
|
1800 |
});
|
1801 |
}
|
1802 |
}
|
1803 |
|
1804 |
+
getAAM().addHook('init', initialize);
|
1805 |
|
1806 |
})(jQuery);
|
1807 |
|
1839 |
* @param {*} successCallback
|
1840 |
*/
|
1841 |
function save(param, value, object, object_id, successCallback) {
|
1842 |
+
$.ajax(getLocal().ajaxurl, {
|
1843 |
type: 'POST',
|
1844 |
dataType: 'json',
|
1845 |
data: {
|
1846 |
action: 'aam',
|
1847 |
sub_action: 'Main_Post.save',
|
1848 |
+
_ajax_nonce: getLocal().nonce,
|
1849 |
+
subject: getAAM().getSubject().type,
|
1850 |
+
subjectId: getAAM().getSubject().id,
|
1851 |
param: param,
|
1852 |
+
value: (value ? 1 : 0),
|
1853 |
object: object,
|
1854 |
objectId: object_id
|
1855 |
},
|
1856 |
success: function (response) {
|
1857 |
if (response.status === 'failure') {
|
1858 |
+
getAAM().notification('danger', response.error);
|
1859 |
} else {
|
1860 |
$('#post-overwritten').removeClass('hidden');
|
1861 |
//add some specific attributes to reset button
|
1867 |
successCallback(response);
|
1868 |
},
|
1869 |
error: function () {
|
1870 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
1871 |
}
|
1872 |
});
|
1873 |
}
|
1884 |
'href': '#',
|
1885 |
'data-level': type,
|
1886 |
'data-id': id
|
1887 |
+
}).append($('<i/>', { 'class': 'icon-angle-double-right' })).append(title);
|
1888 |
$('.aam-post-breadcrumb').append(level);
|
1889 |
}
|
1890 |
|
1896 |
* @param {type} callback
|
1897 |
* @returns {undefined}
|
1898 |
*/
|
1899 |
+
getAAM().loadAccessForm = function(object, id, btn, callback) {
|
1900 |
//reset the form first
|
1901 |
var container = $('.aam-access-form[data-type="' + object + '"]');
|
1902 |
$('#post-overwritten').addClass('hidden');
|
1922 |
_this.attr('class', 'aam-row-action icon-spin4 animate-spin');
|
1923 |
save(
|
1924 |
_this.data('property'),
|
1925 |
+
(checked ? true : false),
|
1926 |
object,
|
1927 |
id,
|
1928 |
function(response) {
|
1942 |
});
|
1943 |
});
|
1944 |
|
1945 |
+
$.ajax(getLocal().ajaxurl, {
|
1946 |
type: 'POST',
|
1947 |
dataType: 'json',
|
1948 |
data: {
|
1949 |
action: 'aam',
|
1950 |
sub_action: 'Main_Post.getAccess',
|
1951 |
+
_ajax_nonce: getLocal().nonce,
|
1952 |
type: object,
|
1953 |
id: id,
|
1954 |
+
subject: getAAM().getSubject().type,
|
1955 |
+
subjectId: getAAM().getSubject().id
|
1956 |
},
|
1957 |
beforeSend: function () {
|
1958 |
$(btn).attr('data-class', $(btn).attr('class'));
|
1966 |
var checkbox = $('[data-property="' + property + '"]', container);
|
1967 |
|
1968 |
if (checkbox.length) {
|
1969 |
+
var cname = (response.access[property] ? 'text-danger icon-check' : 'text-muted icon-check-empty');
|
1970 |
checkbox.attr({
|
1971 |
'class': 'aam-row-action ' + cname
|
1972 |
});
|
1973 |
} else {
|
1974 |
+
$('.option-preview[data-ref="' + property + '"]').text(
|
1975 |
response.preview[property]
|
1976 |
);
|
1977 |
}
|
2007 |
}
|
2008 |
$('[data-dynamic-post-label]').each(function() {
|
2009 |
$(this).html(
|
2010 |
+
$(this).attr('data-dynamic-post-label').replace(/%s/g, '"' + marker + '"')
|
2011 |
);
|
2012 |
});
|
2013 |
},
|
2014 |
error: function () {
|
2015 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
2016 |
},
|
2017 |
complete: function () {
|
2018 |
$(btn).attr('class', $(btn).attr('data-class')).removeAttr('data-class');
|
2034 |
//initialize the role list table
|
2035 |
$('#post-list').DataTable({
|
2036 |
autoWidth: false,
|
2037 |
+
ordering: true,
|
2038 |
pagingType: 'simple',
|
2039 |
processing: true,
|
2040 |
serverSide: true,
|
2041 |
ajax: {
|
2042 |
+
url: getLocal().ajaxurl,
|
2043 |
type: 'POST',
|
2044 |
data: function (data) {
|
2045 |
data.action = 'aam';
|
2046 |
data.sub_action = 'Main_Post.getTable';
|
2047 |
+
data._ajax_nonce = getLocal().nonce;
|
2048 |
+
data.subject = getAAM().getSubject().type;
|
2049 |
+
data.subjectId = getAAM().getSubject().id;
|
2050 |
data.type = filter.type;
|
2051 |
}
|
2052 |
},
|
2053 |
columnDefs: [
|
2054 |
+
{visible: false, targets: [0, 1, 5, 6]},
|
2055 |
+
{orderable: false, targets: [0, 1, 2, 4, 5, 6]}
|
2056 |
],
|
2057 |
language: {
|
2058 |
search: '_INPUT_',
|
2059 |
+
searchPlaceholder: getAAM().__('Search'),
|
2060 |
+
info: getAAM().__('_TOTAL_ object(s)'),
|
2061 |
infoFiltered: '',
|
2062 |
lengthMenu: '_MENU_'
|
2063 |
},
|
2071 |
});
|
2072 |
},
|
2073 |
rowCallback: function (row, data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2074 |
//object type icon
|
2075 |
+
var icon = 'icon-doc-text-inv';
|
2076 |
+
|
2077 |
switch (data[2]) {
|
2078 |
case 'type':
|
2079 |
+
icon = 'icon-box';
|
2080 |
break;
|
2081 |
|
2082 |
case 'term':
|
2083 |
+
icon = 'icon-folder';
|
2084 |
break;
|
2085 |
|
2086 |
default:
|
|
|
2087 |
break;
|
2088 |
}
|
2089 |
|
2090 |
+
if (data[6]) {
|
2091 |
+
$('td:eq(0)', row).html($('<i/>', {
|
2092 |
+
'class': icon + ' aam-access-overwritten',
|
2093 |
+
'data-toggle': "tooltip",
|
2094 |
+
'title': getAAM().__('Settings Customized')
|
2095 |
+
}));
|
2096 |
+
} else {
|
2097 |
+
$('td:eq(0)', row).html($('<i/>', {
|
2098 |
+
'class': icon
|
2099 |
+
}));
|
2100 |
+
}
|
2101 |
+
|
2102 |
//update the title to a link
|
2103 |
if (data[2] === 'type') {
|
2104 |
var link = $('<a/>', {
|
2119 |
|
2120 |
}).html(data[3]);
|
2121 |
$('td:eq(1)', row).html(link);
|
2122 |
+
} else if (data[2] === 'term') {
|
2123 |
+
$('td:eq(1)', row).html($('<span/>').text(data[3]));
|
2124 |
+
|
2125 |
+
var sub = $('<i class="aam-row-subtitle"></i>');
|
2126 |
|
2127 |
if (data[5]) {
|
2128 |
+
sub.append($('<span/>').text(getAAM().__('Parent:') + ' '));
|
2129 |
+
sub.append($('<strong/>').text(data[5] + '; '));
|
2130 |
} else {
|
2131 |
+
sub.append($('<span/>').text(getAAM().__('Parent:') + ' none; '));
|
2132 |
}
|
2133 |
|
2134 |
+
sub.append($('<span/>').text(getAAM().__('ID:') + ' '));
|
2135 |
+
sub.append($('<strong/>').text(data[0].split('|')[0]));
|
2136 |
|
2137 |
+
$('td:eq(1)', row).append(sub);
|
|
|
2138 |
} else {
|
2139 |
+
$('td:eq(1)', row).html($('<span/>').text(data[3]));
|
2140 |
+
|
2141 |
+
var sub = $('<i class="aam-row-subtitle"></i>');
|
2142 |
|
2143 |
if (data[5]) {
|
2144 |
+
sub.append($('<span/>').text(getAAM().__('Parent:') + ' '));
|
2145 |
+
sub.append($('<strong/>').text(data[5] + '; '));
|
2146 |
} else {
|
2147 |
+
sub.append($('<span/>').text(getAAM().__('Parent:') + ' none; '));
|
2148 |
}
|
2149 |
|
2150 |
+
sub.append($('<span/>').text(getAAM().__('ID:') + ' '));
|
2151 |
+
sub.append($('<strong/>').text(data[0]));
|
2152 |
|
2153 |
+
$('td:eq(1)', row).append(sub);
|
2154 |
}
|
2155 |
|
2156 |
//update the actions
|
2174 |
}
|
2175 |
}).attr({
|
2176 |
'data-toggle': "tooltip",
|
2177 |
+
'title': getAAM().__('Drill-Down')
|
2178 |
}));
|
2179 |
$('.tooltip').remove();
|
2180 |
break;
|
2183 |
$(container).append($('<i/>', {
|
2184 |
'class': 'aam-row-action text-info icon-cog'
|
2185 |
}).bind('click', function () {
|
2186 |
+
getAAM().loadAccessForm(data[2], data[0], $(this), function () {
|
2187 |
addBreadcrumbLevel('edit', data[2], data[3]);
|
2188 |
});
|
2189 |
}).attr({
|
2190 |
'data-toggle': "tooltip",
|
2191 |
+
'title': getAAM().__('Manage Access')
|
2192 |
}));
|
2193 |
$('.tooltip').remove();
|
2194 |
break;
|
2200 |
window.open(data[1], '_blank');
|
2201 |
}).attr({
|
2202 |
'data-toggle': "tooltip",
|
2203 |
+
'title': getAAM().__('Edit')
|
2204 |
}));
|
2205 |
break;
|
2206 |
|
2207 |
default:
|
2208 |
+
getAAM().triggerHook('post-action', {
|
2209 |
container: container,
|
2210 |
action : action,
|
2211 |
data : data
|
2232 |
var type = $(this).attr('data-type');
|
2233 |
var id = $(this).attr('data-id');
|
2234 |
|
2235 |
+
$.ajax(getLocal().ajaxurl, {
|
2236 |
type: 'POST',
|
2237 |
dataType: 'json',
|
2238 |
data: {
|
2239 |
action: 'aam',
|
2240 |
sub_action: 'Main_Post.reset',
|
2241 |
+
_ajax_nonce: getLocal().nonce,
|
2242 |
type: type,
|
2243 |
id: id,
|
2244 |
+
subject: getAAM().getSubject().type,
|
2245 |
+
subjectId: getAAM().getSubject().id
|
2246 |
},
|
2247 |
beforeSend: function() {
|
2248 |
var label = $('#post-reset').text();
|
2249 |
$('#post-reset').attr('data-original-label', label);
|
2250 |
+
$('#post-reset').text(getAAM().__('Resetting...'));
|
2251 |
},
|
2252 |
success: function (response) {
|
2253 |
if (response.status === 'success') {
|
2254 |
$('#post-overwritten').addClass('hidden');
|
2255 |
+
getAAM().loadAccessForm(type, id);
|
2256 |
}
|
2257 |
},
|
2258 |
complete: function() {
|
2275 |
|
2276 |
//load referenced post
|
2277 |
if ($('#load-post-object').val()) {
|
2278 |
+
getAAM().loadAccessForm(
|
2279 |
$('#load-post-object-type').val(),
|
2280 |
$('#load-post-object').val()
|
2281 |
);
|
2304 |
var label = _this.text();
|
2305 |
var value = $(_this.data('field')).val();
|
2306 |
|
2307 |
+
_this.text(getAAM().__('Saving...'));
|
2308 |
|
2309 |
save(
|
2310 |
_this.attr('data-ref'),
|
2314 |
function(response) {
|
2315 |
if (response.status === 'success') {
|
2316 |
objectAccess.access[_this.attr('data-ref')] = value;
|
2317 |
+
$(_this.attr('data-preview')).text(response.preview);
|
2318 |
var tr = $(_this.attr('data-preview')).parent().parent().parent();
|
2319 |
if ($('.aam-row-action', tr).hasClass('icon-check-empty')) {
|
2320 |
$('.aam-row-action', tr).trigger('click');
|
2391 |
}
|
2392 |
}
|
2393 |
|
2394 |
+
getAAM().addHook('init', initialize);
|
2395 |
|
2396 |
})(jQuery);
|
2397 |
|
2421 |
$($(this).data('action')).show();
|
2422 |
|
2423 |
//save redirect type
|
2424 |
+
getAAM().save(
|
2425 |
$(this).attr('name'),
|
2426 |
$(this).val(),
|
2427 |
'redirect',
|
2438 |
$('input[type="text"],select,textarea', container).each(function () {
|
2439 |
$(this).bind('change', function () {
|
2440 |
//save redirect type
|
2441 |
+
getAAM().save(
|
2442 |
$(this).attr('name'),
|
2443 |
$(this).val(),
|
2444 |
'redirect',
|
2453 |
});
|
2454 |
|
2455 |
$('#redirect-reset').bind('click', function () {
|
2456 |
+
getAAM().reset('redirect', $(this));
|
2457 |
});
|
2458 |
}
|
2459 |
}
|
2460 |
|
2461 |
+
getAAM().addHook('init', initialize);
|
2462 |
|
2463 |
})(jQuery);
|
2464 |
|
2488 |
$($(this).data('action')).show();
|
2489 |
|
2490 |
//save redirect type
|
2491 |
+
getAAM().save(
|
2492 |
$(this).attr('name'),
|
2493 |
$(this).val(),
|
2494 |
'loginRedirect',
|
2511 |
}
|
2512 |
|
2513 |
//save redirect type
|
2514 |
+
getAAM().save(
|
2515 |
$(this).attr('name'),
|
2516 |
val,
|
2517 |
'loginRedirect',
|
2526 |
});
|
2527 |
|
2528 |
$('#login-redirect-reset').bind('click', function () {
|
2529 |
+
getAAM().reset('loginRedirect', $(this));
|
2530 |
});
|
2531 |
}
|
2532 |
}
|
2533 |
|
2534 |
+
getAAM().addHook('init', initialize);
|
2535 |
|
2536 |
})(jQuery);
|
2537 |
|
2561 |
$($(this).data('action')).show();
|
2562 |
|
2563 |
//save redirect type
|
2564 |
+
getAAM().save(
|
2565 |
$(this).attr('name'),
|
2566 |
$(this).val(),
|
2567 |
'logoutRedirect',
|
2578 |
$('input[type="text"],select,textarea', container).each(function () {
|
2579 |
$(this).bind('change', function () {
|
2580 |
//save redirect type
|
2581 |
+
getAAM().save(
|
2582 |
$(this).attr('name'),
|
2583 |
$(this).val(),
|
2584 |
'logoutRedirect',
|
2593 |
});
|
2594 |
|
2595 |
$('#logout-redirect-reset').bind('click', function () {
|
2596 |
+
getAAM().reset('logoutRedirect', $(this));
|
2597 |
});
|
2598 |
}
|
2599 |
}
|
2600 |
|
2601 |
+
getAAM().addHook('init', initialize);
|
2602 |
|
2603 |
})(jQuery);
|
2604 |
|
2618 |
* @returns {undefined}
|
2619 |
*/
|
2620 |
function save(param, value) {
|
2621 |
+
$.ajax(getLocal().ajaxurl, {
|
2622 |
type: 'POST',
|
2623 |
dataType: 'json',
|
2624 |
data: {
|
2625 |
action: 'aam',
|
2626 |
sub_action: 'Main_404Redirect.save',
|
2627 |
+
_ajax_nonce: getLocal().nonce,
|
2628 |
+
subject: getAAM().getSubject().type,
|
2629 |
+
subjectId: getAAM().getSubject().id,
|
2630 |
param: param,
|
2631 |
value: value
|
2632 |
},
|
2633 |
error: function () {
|
2634 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
2635 |
}
|
2636 |
});
|
2637 |
}
|
2666 |
}
|
2667 |
}
|
2668 |
|
2669 |
+
getAAM().addHook('init', initialize);
|
2670 |
|
2671 |
})(jQuery);
|
2672 |
|
2692 |
//show indicator
|
2693 |
$(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
|
2694 |
|
2695 |
+
$.ajax(getLocal().ajaxurl, {
|
2696 |
type: 'POST',
|
2697 |
dataType: 'json',
|
2698 |
data: {
|
2699 |
action: 'aam',
|
2700 |
sub_action: 'Main_Route.save',
|
2701 |
+
_ajax_nonce: getLocal().nonce,
|
2702 |
+
subject: getAAM().getSubject().type,
|
2703 |
+
subjectId: getAAM().getSubject().id,
|
2704 |
type: type,
|
2705 |
route: route,
|
2706 |
method: method,
|
2708 |
},
|
2709 |
success: function (response) {
|
2710 |
if (response.status === 'failure') {
|
2711 |
+
getAAM().notification('danger', response.error);
|
2712 |
updateBtn(btn, value ? 0 : 1);
|
2713 |
} else {
|
2714 |
$('#aam-route-overwrite').removeClass('hidden');
|
2717 |
},
|
2718 |
error: function () {
|
2719 |
updateBtn(btn, value ? 0 : 1);
|
2720 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
2721 |
}
|
2722 |
});
|
2723 |
}
|
2749 |
pagingType: 'simple',
|
2750 |
serverSide: false,
|
2751 |
ajax: {
|
2752 |
+
url: getLocal().ajaxurl,
|
2753 |
type: 'POST',
|
2754 |
data: {
|
2755 |
action: 'aam',
|
2756 |
sub_action: 'Main_Route.getTable',
|
2757 |
+
_ajax_nonce: getLocal().nonce,
|
2758 |
+
subject: getAAM().getSubject().type,
|
2759 |
+
subjectId: getAAM().getSubject().id
|
2760 |
}
|
2761 |
},
|
2762 |
columnDefs: [
|
2765 |
],
|
2766 |
language: {
|
2767 |
search: '_INPUT_',
|
2768 |
+
searchPlaceholder: getAAM().__('Search Route'),
|
2769 |
+
info: getAAM().__('_TOTAL_ route(s)'),
|
2770 |
infoFiltered: '',
|
2771 |
+
emptyTable: getAAM().__('No API enpoints found. You might have APIs disabled.'),
|
2772 |
+
infoEmpty: getAAM().__('Nothing to show'),
|
2773 |
lengthMenu: '_MENU_'
|
2774 |
},
|
2775 |
createdRow: function (row, data) {
|
2779 |
}).text(data[1]);
|
2780 |
|
2781 |
$('td:eq(0)', row).html(
|
2782 |
+
$('<small/>').text(data[0] === 'restful' ? 'JSON' : 'XML')
|
2783 |
);
|
2784 |
|
2785 |
$('td:eq(1)', row).html(method);
|
2815 |
|
2816 |
//reset button
|
2817 |
$('#route-reset').bind('click', function () {
|
2818 |
+
getAAM().reset('route', $(this));
|
2819 |
});
|
2820 |
}
|
2821 |
}
|
2822 |
|
2823 |
+
getAAM().addHook('init', initialize);
|
2824 |
|
2825 |
})(jQuery);
|
2826 |
|
2842 |
* @returns {undefined}
|
2843 |
*/
|
2844 |
function downloadExtension(data, cb) {
|
2845 |
+
$.ajax(getLocal().ajaxurl, {
|
2846 |
type: 'POST',
|
2847 |
dataType: 'json',
|
2848 |
data: data,
|
2849 |
success: function (response) {
|
2850 |
if (response.status === 'success') {
|
2851 |
setTimeout(function () {
|
2852 |
+
getAAM().fetchContent('extensions');
|
2853 |
}, 500);
|
2854 |
} else {
|
2855 |
+
getAAM().notification('danger', getAAM().__(response.error));
|
2856 |
if (typeof response.content !== 'undefined') {
|
2857 |
dump = response;
|
2858 |
+
$('#installation-error').text(response.error);
|
2859 |
$('#extension-notification-modal').modal('show');
|
2860 |
}
|
2861 |
}
|
2862 |
},
|
2863 |
error: function () {
|
2864 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
2865 |
},
|
2866 |
complete: function() {
|
2867 |
cb();
|
2875 |
* @returns {undefined}
|
2876 |
*/
|
2877 |
function updateStatus(data) {
|
2878 |
+
$.ajax(getLocal().ajaxurl, {
|
2879 |
type: 'POST',
|
2880 |
dataType: 'json',
|
2881 |
data: data,
|
2882 |
success: function (response) {
|
2883 |
if (response.status === 'success') {
|
2884 |
+
getAAM().notification(
|
2885 |
'success',
|
2886 |
+
getAAM().__('Extension status was updated successfully')
|
2887 |
);
|
2888 |
} else {
|
2889 |
+
getAAM().notification('danger', getAAM().__(response.error));
|
2890 |
}
|
2891 |
},
|
2892 |
error: function () {
|
2893 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
2894 |
},
|
2895 |
complete: function () {
|
2896 |
+
getAAM().fetchContent('extensions');
|
2897 |
}
|
2898 |
});
|
2899 |
}
|
2907 |
$('[data-toggle="toggle"]', '.extensions-metabox').bootstrapToggle();
|
2908 |
//check for updates
|
2909 |
$('#aam-update-check').bind('click', function() {
|
2910 |
+
$.ajax(getLocal().ajaxurl, {
|
2911 |
type: 'POST',
|
2912 |
dataType: 'json',
|
2913 |
data: {
|
2914 |
action: 'aam',
|
2915 |
sub_action: 'Extension_Manager.check',
|
2916 |
+
_ajax_nonce: getLocal().nonce
|
2917 |
},
|
2918 |
beforeSend: function () {
|
2919 |
$('#aam-update-check i').attr('class', 'icon-spin4 animate-spin');
|
2920 |
},
|
2921 |
complete: function () {
|
2922 |
+
getAAM().fetchContent('extensions');
|
2923 |
}
|
2924 |
});
|
2925 |
});
|
2941 |
downloadExtension({
|
2942 |
action: 'aam',
|
2943 |
sub_action: 'Extension_Manager.install',
|
2944 |
+
_ajax_nonce: getLocal().nonce,
|
2945 |
license: $('#extension-key').val()
|
2946 |
}, function() {
|
2947 |
$('i', _this).attr('class', 'icon-download-cloud');
|
2957 |
downloadExtension({
|
2958 |
action: 'aam',
|
2959 |
sub_action: 'Extension_Manager.update',
|
2960 |
+
_ajax_nonce: getLocal().nonce,
|
2961 |
extension: _this.data('product')
|
2962 |
}, function() {
|
2963 |
$('i', _this).attr('class', 'icon-arrows-cw');
|
2974 |
updateStatus({
|
2975 |
action: 'aam',
|
2976 |
sub_action: 'Extension_Manager.deactivate',
|
2977 |
+
_ajax_nonce: getLocal().nonce,
|
2978 |
extension: _this.data('product')
|
2979 |
});
|
2980 |
});
|
2989 |
updateStatus({
|
2990 |
action: 'aam',
|
2991 |
sub_action: 'Extension_Manager.activate',
|
2992 |
+
_ajax_nonce: getLocal().nonce,
|
2993 |
extension: _this.data('product')
|
2994 |
});
|
2995 |
});
|
3004 |
downloadExtension({
|
3005 |
action: 'aam',
|
3006 |
sub_action: 'Extension_Manager.install',
|
3007 |
+
_ajax_nonce: getLocal().nonce,
|
3008 |
license: _this.data('license')
|
3009 |
}, function() {
|
3010 |
$('i', _this).attr('class', 'icon-download-cloud');
|
3017 |
|
3018 |
$('i', this).attr('class', 'icon-spin4 animate-spin');
|
3019 |
|
3020 |
+
$.ajax(getLocal().ajaxurl, {
|
3021 |
type: 'POST',
|
3022 |
dataType: 'json',
|
3023 |
data: {
|
3024 |
action: 'aam',
|
3025 |
sub_action: 'Extension_Manager.fixDirectoryIssue',
|
3026 |
+
_ajax_nonce: getLocal().nonce
|
3027 |
},
|
3028 |
success: function(response) {
|
3029 |
if (response.status === 'success') {
|
3030 |
$('#extension-dir-warning').remove();
|
3031 |
+
getAAM().notification(
|
3032 |
'success',
|
3033 |
+
getAAM().__('The issue has been resolved')
|
3034 |
);
|
3035 |
} else {
|
3036 |
$('#extension-dir-issue-modal').modal('show');
|
3037 |
}
|
3038 |
},
|
3039 |
error: function() {
|
3040 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
3041 |
},
|
3042 |
complete: function () {
|
3043 |
$('i', '#fix-extension-dir-issue').attr('class', 'icon-wrench');
|
3061 |
}
|
3062 |
}
|
3063 |
|
3064 |
+
getAAM().addHook('init', initialize);
|
3065 |
|
3066 |
})(jQuery);
|
3067 |
|
3083 |
* @returns {undefined}
|
3084 |
*/
|
3085 |
function save(param, value) {
|
3086 |
+
$.ajax(getLocal().ajaxurl, {
|
3087 |
type: 'POST',
|
3088 |
dataType: 'json',
|
3089 |
data: {
|
3090 |
action: 'aam',
|
3091 |
sub_action: 'Settings_Manager.save',
|
3092 |
+
_ajax_nonce: getLocal().nonce,
|
3093 |
param: param,
|
3094 |
value: value
|
3095 |
},
|
3096 |
error: function () {
|
3097 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
3098 |
}
|
3099 |
});
|
3100 |
}
|
3119 |
});
|
3120 |
|
3121 |
$('#clear-settings').bind('click', function () {
|
3122 |
+
$.ajax(getLocal().ajaxurl, {
|
3123 |
type: 'POST',
|
3124 |
dataType: 'json',
|
3125 |
data: {
|
3126 |
action: 'aam',
|
3127 |
sub_action: 'Settings_Tools.clear',
|
3128 |
+
_ajax_nonce: getLocal().nonce
|
3129 |
},
|
3130 |
beforeSend: function() {
|
3131 |
$('#clear-settings').prop('disabled', true);
|
3132 |
+
$('#clear-settings').text(getAAM().__('Wait...'));
|
3133 |
},
|
3134 |
success: function(response) {
|
3135 |
if (response.status === 'success') {
|
3136 |
+
getAAM().notification(
|
3137 |
'success',
|
3138 |
+
getAAM().__('All settings has been cleared successfully')
|
3139 |
);
|
3140 |
} else {
|
3141 |
+
getAAM().notification('danger', response.reason);
|
3142 |
}
|
3143 |
},
|
3144 |
error: function () {
|
3145 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
3146 |
},
|
3147 |
complete: function() {
|
3148 |
$('#clear-settings').prop('disabled', false);
|
3149 |
+
$('#clear-settings').text(getAAM().__('Clear'));
|
3150 |
$('#clear-settings-modal').modal('hide');
|
3151 |
}
|
3152 |
});
|
3153 |
});
|
3154 |
|
3155 |
$('#clear-cache').bind('click', function () {
|
3156 |
+
$.ajax(getLocal().ajaxurl, {
|
3157 |
type: 'POST',
|
3158 |
dataType: 'json',
|
3159 |
data: {
|
3160 |
action: 'aam',
|
3161 |
sub_action: 'Settings_Tools.clearCache',
|
3162 |
+
_ajax_nonce: getLocal().nonce
|
3163 |
},
|
3164 |
beforeSend: function() {
|
3165 |
$('#clear-cache').prop('disabled', true);
|
3166 |
+
$('#clear-cache').text(getAAM().__('Wait...'));
|
3167 |
},
|
3168 |
success: function(response) {
|
3169 |
if (response.status === 'success') {
|
3170 |
+
getAAM().notification(
|
3171 |
'success',
|
3172 |
+
getAAM().__('The cache has been cleared successfully')
|
3173 |
);
|
3174 |
} else {
|
3175 |
+
getAAM().notification('danger', response.reason);
|
3176 |
}
|
3177 |
},
|
3178 |
error: function () {
|
3179 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
3180 |
},
|
3181 |
complete: function() {
|
3182 |
$('#clear-cache').prop('disabled', false);
|
3183 |
+
$('#clear-cache').text(getAAM().__('Clear'));
|
3184 |
}
|
3185 |
});
|
3186 |
});
|
3187 |
|
3188 |
$('#export-aam').bind('click', function () {
|
3189 |
+
$.ajax(getLocal().ajaxurl, {
|
3190 |
type: 'POST',
|
3191 |
dataType: 'json',
|
3192 |
data: {
|
3193 |
action: 'aam',
|
3194 |
sub_action: 'Settings_Tools.export',
|
3195 |
+
_ajax_nonce: getLocal().nonce
|
3196 |
},
|
3197 |
beforeSend: function () {
|
3198 |
$('#export-aam').prop('disabled', true);
|
3199 |
$('#export-aam').attr('data-lable', $('#export-aam').text());
|
3200 |
+
$('#export-aam').text(getAAM().__('Wait...'));
|
3201 |
},
|
3202 |
success: function(response) {
|
3203 |
if (response.status === 'success') {
|
3209 |
}
|
3210 |
},
|
3211 |
error: function () {
|
3212 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
3213 |
},
|
3214 |
complete: function () {
|
3215 |
$('#export-aam').prop('disabled', false);
|
3222 |
if (typeof FileReader !== 'undefined') {
|
3223 |
$('#aam-import-file').trigger('click');
|
3224 |
} else {
|
3225 |
+
getAAM().notification('danger', 'Your browser does not support FileReader functionality');
|
3226 |
}
|
3227 |
});
|
3228 |
|
3237 |
try {
|
3238 |
//validate the content
|
3239 |
var loaded = JSON.parse(json);
|
3240 |
+
if (loaded.plugin && loaded.plugin === 'advanced-access-manager') {
|
3241 |
+
$.ajax(getLocal().ajaxurl, {
|
3242 |
type: 'POST',
|
3243 |
dataType: 'json',
|
3244 |
data: {
|
3245 |
action: 'aam',
|
3246 |
sub_action: 'Settings_Tools.import',
|
3247 |
+
_ajax_nonce: getLocal().nonce,
|
3248 |
json: json
|
3249 |
},
|
3250 |
beforeSend: function () {
|
3251 |
$('#import-aam').prop('disabled', true);
|
3252 |
$('#import-aam').attr('data-lable', $('#import-aam').text());
|
3253 |
+
$('#import-aam').text(getAAM().__('Wait...'));
|
3254 |
},
|
3255 |
success: function(response) {
|
3256 |
if (response.status === 'success') {
|
3257 |
+
getAAM().notification(
|
3258 |
+
'success',
|
3259 |
+
'All settings were imported successfully'
|
3260 |
+
);
|
3261 |
+
location.reload();
|
3262 |
} else {
|
3263 |
+
getAAM().notification('danger', response.reason);
|
3264 |
}
|
3265 |
},
|
3266 |
error: function () {
|
3267 |
+
getAAM().notification('danger', getAAM().__('Application Error'));
|
3268 |
},
|
3269 |
complete: function () {
|
3270 |
$('#import-aam').prop('disabled', false);
|
3271 |
+
$('#import-aam').text($('#import-aam').attr('data-lable'));
|
3272 |
}
|
3273 |
});
|
3274 |
} else {
|
3275 |
throw 'Invalid format';
|
3276 |
}
|
3277 |
} catch (e) {
|
3278 |
+
getAAM().notification('danger', 'Invalid file format');
|
3279 |
}
|
3280 |
};
|
3281 |
reader.readAsText(file);
|
3284 |
}
|
3285 |
}
|
3286 |
|
3287 |
+
getAAM().addHook('init', initialize);
|
3288 |
|
3289 |
//ConfigPress hook
|
3290 |
+
getAAM().addHook('menu-feature-click', function(feature) {
|
3291 |
if (feature === 'configpress'
|
3292 |
&& !$('#configpress-editor').next().hasClass('CodeMirror')) {
|
3293 |
var editor = CodeMirror.fromTextArea(
|
3295 |
);
|
3296 |
|
3297 |
editor.on("blur", function(){
|
3298 |
+
$.ajax(getLocal().ajaxurl, {
|
3299 |
type: 'POST',
|
3300 |
dataType: 'json',
|
3301 |
data: {
|
3302 |
action: 'aam',
|
3303 |
sub_action: 'Settings_ConfigPress.save',
|
3304 |
+
_ajax_nonce: getLocal().nonce,
|
3305 |
config: editor.getValue()
|
3306 |
},
|
3307 |
error: function () {
|
3308 |
+
getAAM().notification(
|
3309 |
'danger',
|
3310 |
+
getAAM().__('Application error')
|
3311 |
);
|
3312 |
}
|
3313 |
});
|
3317 |
|
3318 |
})(jQuery);
|
3319 |
|
3320 |
+
getAAM().fetchContent('main'); //fetch default AAM content
|
3321 |
}
|
3322 |
|
3323 |
/**
|
3367 |
|
3368 |
/**
|
3369 |
*
|
3370 |
+
* @param {type} view
|
3371 |
+
* @param {type} success
|
3372 |
* @returns {undefined}
|
3373 |
*/
|
3374 |
AAM.prototype.fetchContent = function (view, success) {
|
3378 |
var object = window.location.search.match(/&oid\=([^&]*)/);
|
3379 |
var type = window.location.search.match(/&otype\=([^&]*)/);
|
3380 |
|
3381 |
+
$.ajax(getLocal().url.site, {
|
3382 |
type: 'POST',
|
3383 |
dataType: 'html',
|
3384 |
data: {
|
3385 |
action: 'aamc',
|
3386 |
+
_ajax_nonce: getLocal().nonce,
|
3387 |
uiType: view,
|
3388 |
subject: this.getSubject().type,
|
3389 |
subjectId: this.getSubject().id,
|
3392 |
},
|
3393 |
beforeSend: function () {
|
3394 |
if ($('#aam-initial-load').length === 0) {
|
3395 |
+
$('#aam-content').html(
|
3396 |
+
$('<div/>', {'class': 'aam-loading'}).append($('<i/>', {
|
3397 |
+
'class': 'icon-spin4 animate-spin'
|
3398 |
+
})
|
3399 |
+
)
|
3400 |
);
|
|
|
3401 |
}
|
3402 |
},
|
3403 |
success: function (response) {
|
3435 |
});
|
3436 |
};
|
3437 |
|
|
|
3438 |
/**
|
3439 |
*
|
3440 |
+
* @param {type} view
|
3441 |
+
* @param {type} success
|
3442 |
* @returns {undefined}
|
3443 |
*/
|
3444 |
AAM.prototype.fetchPartial = function (view, success) {
|
3448 |
var object = window.location.search.match(/&oid\=([^&]*)/);
|
3449 |
var type = window.location.search.match(/&otype\=([^&]*)/);
|
3450 |
|
3451 |
+
$.ajax(getLocal().url.site, {
|
3452 |
type: 'POST',
|
3453 |
dataType: 'html',
|
3454 |
data: {
|
3455 |
action: 'aamc',
|
3456 |
+
_ajax_nonce: getLocal().nonce,
|
3457 |
uiType: view,
|
3458 |
subject: this.getSubject().type,
|
3459 |
subjectId: this.getSubject().id,
|
3518 |
* Apply UI filters
|
3519 |
*
|
3520 |
* @param {String} name
|
3521 |
+
* @param {String} result
|
3522 |
* @param {Object} params
|
3523 |
*
|
3524 |
* @returns {void}
|
3541 |
AAM.prototype.initialize = function () {
|
3542 |
//read default subject and set it for AAM object
|
3543 |
this.setSubject(
|
3544 |
+
getLocal().subject.type,
|
3545 |
+
getLocal().subject.id,
|
3546 |
+
getLocal().subject.name,
|
3547 |
+
getLocal().subject.level
|
3548 |
);
|
3549 |
|
3550 |
//load the UI javascript support
|
3579 |
$(this).tooltip('show');
|
3580 |
});
|
3581 |
|
3582 |
+
$('body').delegate('.aam-switch-user', 'click', function () {
|
3583 |
+
switchToUser(getAAM().getSubject().id, $(this), false);
|
3584 |
});
|
3585 |
|
3586 |
$('.aam-area').each(function() {
|
3587 |
$(this).bind('click', function() {
|
3588 |
$('.aam-area').removeClass('text-danger');
|
3589 |
$(this).addClass('text-danger');
|
3590 |
+
getAAM().fetchContent($(this).data('type'));
|
3591 |
});
|
3592 |
});
|
3593 |
|
3603 |
* @returns {unresolved}
|
3604 |
*/
|
3605 |
AAM.prototype.__ = function (label) {
|
3606 |
+
return (getLocal().translation[label] ? getLocal().translation[label] : label);
|
3607 |
};
|
3608 |
|
3609 |
/**
|
3623 |
};
|
3624 |
|
3625 |
//update the header
|
3626 |
+
// First set the type of the subject
|
3627 |
+
$('.aam-current-subject').text(
|
3628 |
+
type.charAt(0).toUpperCase() + type.slice(1) + ': '
|
3629 |
+
);
|
3630 |
+
|
3631 |
+
// Second set the name of the subject
|
3632 |
+
$('.aam-current-subject').append($('<strong/>').text(name));
|
3633 |
|
3634 |
if (type === 'user') {
|
3635 |
+
$('.aam-current-subject').append(
|
3636 |
+
'<i data-toggle="tooltip" title="Switch To User" data-placement="right" class="icon-exchange aam-switch-user"></i>'
|
3637 |
+
);
|
3638 |
}
|
3639 |
|
|
|
|
|
3640 |
//highlight screen if the same level
|
3641 |
+
if (parseInt(level) >= getLocal().level || type === 'default') {
|
3642 |
$('.aam-current-subject').addClass('danger');
|
3643 |
$('#wpcontent').css('background-color', '#FAEBEA');
|
3644 |
} else {
|
3684 |
* @returns {undefined}
|
3685 |
*/
|
3686 |
AAM.prototype.save = function(param, value, object, object_id, successCallback) {
|
3687 |
+
$.ajax(getLocal().ajaxurl, {
|
3688 |
type: 'POST',
|
3689 |
dataType: 'json',
|
3690 |
data: {
|
3691 |
action: 'aam',
|
3692 |
sub_action: 'save',
|
3693 |
+
_ajax_nonce: getLocal().nonce,
|
3694 |
subject: this.getSubject().type,
|
3695 |
subjectId: this.getSubject().id,
|
3696 |
param: param,
|
3704 |
}
|
3705 |
},
|
3706 |
error: function () {
|
3707 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
3708 |
}
|
3709 |
});
|
3710 |
};
|
3715 |
* @returns {undefined}
|
3716 |
*/
|
3717 |
AAM.prototype.reset = function(object, btn) {
|
3718 |
+
$.ajax(getLocal().ajaxurl, {
|
3719 |
type: 'POST',
|
3720 |
data: {
|
3721 |
action: 'aam',
|
3722 |
sub_action: 'reset',
|
3723 |
+
_ajax_nonce: getLocal().nonce,
|
3724 |
subject: this.getSubject().type,
|
3725 |
subjectId: this.getSubject().id,
|
3726 |
object: object
|
3728 |
beforeSend: function() {
|
3729 |
var label = btn.text();
|
3730 |
btn.attr('data-original-label', label);
|
3731 |
+
btn.text(getAAM().__('Resetting...'));
|
3732 |
},
|
3733 |
success: function () {
|
3734 |
+
getAAM().fetchContent('main');
|
3735 |
},
|
3736 |
error: function () {
|
3737 |
+
getAAM().notification('danger', getAAM().__('Application error'));
|
3738 |
},
|
3739 |
complete: function() {
|
3740 |
btn.text(btn.attr('data-original-label'));
|
3742 |
});
|
3743 |
};
|
3744 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3745 |
/**
|
3746 |
*
|
3747 |
* @returns {Boolean}
|
3748 |
*/
|
3749 |
AAM.prototype.isUI = function() {
|
3750 |
+
return (typeof getLocal().ui !== 'undefined');
|
3751 |
};
|
3752 |
|
3753 |
/**
|
3754 |
* Initialize UI
|
3755 |
*/
|
3756 |
$(document).ready(function () {
|
3757 |
+
$.aam = aam = new AAM();
|
3758 |
+
getAAM().initialize();
|
|
|
3759 |
});
|
3760 |
+
|
3761 |
+
/**
|
3762 |
+
*
|
3763 |
+
* @returns {aamLocal}
|
3764 |
+
*/
|
3765 |
+
function getLocal() {
|
3766 |
+
return aamLocal;
|
3767 |
+
}
|
3768 |
+
|
3769 |
+
/**
|
3770 |
+
*
|
3771 |
+
* @returns {aamL#14.AAM|AAM}
|
3772 |
+
*/
|
3773 |
+
function getAAM() {
|
3774 |
+
return aam;
|
3775 |
+
}
|
3776 |
|
3777 |
})(jQuery);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access control, membership, backend menu, user role, restricted content
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9.7
|
6 |
-
Stable tag: 5.4.
|
7 |
|
8 |
All you need to manage access to you WordPress websites on frontend, backend and API levels for any role, user or visitors.
|
9 |
|
@@ -76,6 +76,24 @@ https://www.youtube.com/watch?v=mj5Xa_Wc16Y
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
= 5.4.2 =
|
80 |
* Fixed the bug that was causing an error with legacy "teaser" data
|
81 |
* Fixed the bug with aam_manage_admin_toolbar capability been named incorrectly
|
3 |
Tags: access control, membership, backend menu, user role, restricted content
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9.7
|
6 |
+
Stable tag: 5.4.3
|
7 |
|
8 |
All you need to manage access to you WordPress websites on frontend, backend and API levels for any role, user or visitors.
|
9 |
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 5.4.3 =
|
80 |
+
* Fixed the bug with Posts & Terms feature that hides it when Manage Frontend & Backend Access are disabled however API is enabled
|
81 |
+
* Fixed the bug that cached objects while managing them on AAM page. That was causing inconsistency sometimes
|
82 |
+
* Fixed the bug with content shortcode that was defining incorrectly if wrapped content should be hidden or not for specific user
|
83 |
+
* Fixed the bug with AAM not being able to apply translations for other languages
|
84 |
+
* Added new option "Support AAM Extensions" that allows to enables/disables Extensions feature
|
85 |
+
* Added new option "Get Started Feature" that toggle the Get Started tab
|
86 |
+
* Added new option "AAM Cron Job" that enables/disables the internal AAM cron job
|
87 |
+
* Added Get Started tab with some basic introduction to AAM plugin
|
88 |
+
* Added ability to set "hard" user login time
|
89 |
+
* Added ability to sort posts and terms list by title
|
90 |
+
* Enhanced JWT authentication with ability to set also cookie that contains JWT token or define signing algorithm
|
91 |
+
* Refactored Metaboxes & Widget feature so initialization process is handled with client side
|
92 |
+
* Refactored Admin Toolbar feature so initialization process is handled with client side
|
93 |
+
* Improved the Post & Terms feature by enabling to manage more post types out-of-box
|
94 |
+
* Improved the Import/Export feature that eliminates issues with incompatible AAM versions
|
95 |
+
* Refactored internal implementation to make it compatible with strict and secure environments like WordPress VIP
|
96 |
+
|
97 |
= 5.4.2 =
|
98 |
* Fixed the bug that was causing an error with legacy "teaser" data
|
99 |
* Fixed the bug with aam_manage_admin_toolbar capability been named incorrectly
|