Advanced Access Manager - Version 5.0

Version Description

  • Added ACCESS COUNTER option to Posts & Pages
  • Added premium MONETIZE option to Posts & Pages
  • Added ability to turn off "Secure Login" feature
  • Added ability to toggle extension status (active/inactive)
  • Added ability for AAM to filter out Admin Top Bar based on restricted admin menus
  • Deprecated AAM Role Filter extension and merged it to the AAM core
  • Deprecated AAM Payment extension and merged it with AAM E-Commerce extension
  • Deprecated ConfigPress options that manage access to AAM UI. All is based on capabilities from now.
  • Split UI to three areas: Access, Settings and Extensions
  • Fixed over 25+ reported bugs and discovered during internal refactoring
  • Removed deprecated "Security" feature. Replaced with Secure Login Widget
  • Removed deprecated "Teaser" feature. Replaced with Teaser Message per post base
Download this release

Release Info

Developer vasyl_m
Plugin Icon 128x128 Advanced Access Manager
Version 5.0
Comparing to
See all releases

Code changes from version 4.9.5.2 to 5.0

Files changed (87) hide show
  1. Application/Backend/Authorization.php +296 -0
  2. Application/Backend/Feature.php +26 -7
  3. Application/Backend/Feature/Abstract.php +4 -20
  4. Application/Backend/Feature/Contact.php +0 -63
  5. Application/Backend/Feature/{Extension.php → Extension/Manager.php} +39 -52
  6. Application/Backend/Feature/{404Redirect.php → Main/404Redirect.php} +8 -19
  7. Application/Backend/Feature/{Capability.php → Main/Capability.php} +24 -33
  8. Application/Backend/Feature/{LoginRedirect.php → Main/LoginRedirect.php} +12 -24
  9. Application/Backend/Feature/{LogoutRedirect.php → Main/LogoutRedirect.php} +12 -24
  10. Application/Backend/Feature/{Menu.php → Main/Menu.php} +25 -41
  11. Application/Backend/Feature/{Metabox.php → Main/Metabox.php} +34 -30
  12. Application/Backend/Feature/{Post.php → Main/Post.php} +111 -35
  13. Application/Backend/Feature/{Redirect.php → Main/Redirect.php} +16 -26
  14. Application/Backend/Feature/Security.php +0 -62
  15. Application/Backend/Feature/Settings/Content.php +69 -0
  16. Application/Backend/Feature/Settings/Core.php +84 -0
  17. Application/Backend/Feature/Settings/Manager.php +34 -0
  18. Application/Backend/Feature/Settings/Tools.php +109 -0
  19. Application/Backend/Feature/{Role.php → Subject/Role.php} +11 -11
  20. Application/Backend/Feature/{User.php → Subject/User.php} +12 -8
  21. Application/Backend/Feature/Teaser.php +0 -98
  22. Application/Backend/Feature/Utility.php +0 -178
  23. Application/Backend/Filter.php +240 -320
  24. Application/Backend/Manager.php +124 -108
  25. Application/Backend/Subject.php +172 -0
  26. Application/Backend/View.php +32 -93
  27. Application/Backend/View/CodePinch.php +0 -151
  28. Application/Backend/View/Helper.php +0 -13
  29. Application/Backend/View/Localization.php +62 -44
  30. Application/Backend/View/PostOptionList.php +99 -78
  31. Application/Backend/View/SecurityOptionList.php +0 -26
  32. Application/Backend/View/UtilityOptionList.php +0 -59
  33. Application/Backend/phtml/contact.phtml +0 -18
  34. Application/Backend/phtml/{extension.phtml → extensions.phtml} +26 -29
  35. Application/Backend/phtml/frame.phtml +23 -28
  36. Application/Backend/phtml/index.phtml +46 -27
  37. Application/Backend/phtml/main-panel.phtml +7 -6
  38. Application/Backend/phtml/{404redirect.phtml → main/404redirect.phtml} +16 -10
  39. Application/Backend/phtml/{object → main}/capability.phtml +4 -4
  40. Application/Backend/phtml/{object → main}/login-redirect.phtml +12 -12
  41. Application/Backend/phtml/{object → main}/logout-redirect.phtml +11 -11
  42. Application/Backend/phtml/{object → main}/menu.phtml +15 -8
  43. Application/Backend/phtml/{object → main}/metabox.phtml +16 -5
  44. Application/Backend/phtml/{object → main}/post.phtml +15 -12
  45. Application/Backend/phtml/{object → main}/redirect.phtml +2 -2
  46. Application/Backend/phtml/object/teaser.phtml +0 -41
  47. Application/Backend/phtml/partial/post-advanced-settings.phtml +60 -15
  48. Application/Backend/phtml/partial/teaser.phtml +0 -5
  49. Application/Backend/phtml/security.phtml +0 -7
  50. Application/Backend/phtml/settings/content.phtml +21 -0
  51. Application/Backend/phtml/settings/core.phtml +21 -0
  52. Application/Backend/phtml/settings/tools.phtml +74 -0
  53. Application/Backend/phtml/utility.phtml +0 -148
  54. Application/Core/API.php +55 -19
  55. Application/Core/Cache.php +6 -5
  56. Application/Core/Compatibility.php +1 -0
  57. Application/Core/Console.php +32 -17
  58. Application/Core/Object/LoginRedirect.php +1 -1
  59. Application/Core/Object/LogoutRedirect.php +1 -1
  60. Application/Core/Object/Menu.php +2 -2
  61. Application/Core/Object/Redirect.php +1 -1
  62. Application/Core/Object/Teaser.php +0 -124
  63. Application/Core/Server.php +5 -14
  64. Application/Core/Subject.php +16 -0
  65. Application/Core/Subject/Default.php +8 -0
  66. Application/Core/Subject/Role.php +16 -0
  67. Application/Core/Subject/User.php +40 -1
  68. Application/Core/Subject/Visitor.php +8 -0
  69. Application/Extension/List.php +84 -76
  70. Application/Extension/Repository.php +103 -40
  71. Application/Frontend/Authorization.php +193 -0
  72. Application/Frontend/Filter.php +348 -0
  73. Application/Frontend/Manager.php +36 -432
  74. Lang/advanced-access-manager-en_US.mo +0 -0
  75. Lang/advanced-access-manager-en_US.po +620 -626
  76. Lang/advanced-access-manager.pot +620 -626
  77. aam.php +11 -29
  78. autoloader.php +12 -4
  79. media/css/aam.css +40 -47
  80. media/font/fontello.eot +0 -0
  81. media/font/fontello.svg +8 -0
  82. media/font/fontello.ttf +0 -0
  83. media/font/fontello.woff +0 -0
  84. media/font/fontello.woff2 +0 -0
  85. media/js/aam.js +308 -320
  86. media/js/vendor.js +5 -1
  87. readme.txt +40 -69
Application/Backend/Authorization.php ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 authorization
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Authorization {
17
+
18
+ /**
19
+ * Instance of itself
20
+ *
21
+ * @var AAM_Backend_Authorization
22
+ *
23
+ * @access private
24
+ */
25
+ private static $_instance = null;
26
+
27
+ /**
28
+ * Constructor
29
+ *
30
+ * @return void
31
+ *
32
+ * @access protected
33
+ */
34
+ protected function __construct() {
35
+ //control admin area
36
+ add_action('admin_init', array($this, 'checkScreenAccess'));
37
+
38
+ //additional filter for user capabilities
39
+ add_filter('user_has_cap', array($this, 'isUserCapable'), 999, 3);
40
+
41
+ //post access
42
+ add_action('admin_action_edit', array($this, 'checkEditAccess'));
43
+ }
44
+
45
+ /**
46
+ * Check screen access
47
+ *
48
+ * @return void
49
+ *
50
+ * @access public
51
+ * @global string $plugin_page
52
+ */
53
+ public function checkScreenAccess() {
54
+ global $plugin_page;
55
+
56
+ //compile menu
57
+ $menu = $plugin_page;
58
+
59
+ if (empty($menu)){
60
+ $menu = basename(AAM_Core_Request::server('SCRIPT_NAME'));
61
+ $taxonomy = AAM_Core_Request::get('taxonomy');
62
+ $postType = AAM_Core_Request::get('post_type');
63
+ $page = AAM_Core_Request::get('page');
64
+
65
+ if (!empty($taxonomy)) {
66
+ $menu .= '?taxonomy=' . $taxonomy;
67
+ } elseif (!empty($postType)) {
68
+ $menu .= '?post_type=' . $postType;
69
+ } elseif (!empty($page)) {
70
+ $menu .= '?page=' . $page;
71
+ }
72
+ }
73
+
74
+ if (AAM::getUser()->getObject('menu')->has($menu, true)) {
75
+ AAM_Core_API::reject(
76
+ 'backend', array('hook' => 'access_backend_menu', 'id' => $menu)
77
+ );
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Check user capability
83
+ *
84
+ * This is a hack function that add additional layout on top of WordPress
85
+ * core functionality. Based on the capability passed in the $args array as
86
+ * "0" element, it performs additional check on user's capability to manage
87
+ * post.
88
+ *
89
+ * @param array $allCaps
90
+ * @param array $metaCaps
91
+ * @param array $args
92
+ *
93
+ * @return array
94
+ *
95
+ * @access public
96
+ */
97
+ public function isUserCapable($allCaps, $metaCaps, $args) {
98
+ global $post;
99
+
100
+ //check if current user is allowed to edit or delete user
101
+ if (in_array($args[0], array('edit_user', 'delete_user'))) {
102
+ $allCaps = $this->isAllowedToManagerUser($args[0], $allCaps, $metaCaps);
103
+ } elseif (isset($args[2]) && is_scalar($args[2])) { //make sure it is post ID
104
+ $allCaps = $this->isAllowedToManagerPost(
105
+ $args[0], $args[2], $allCaps, $metaCaps
106
+ );
107
+ } elseif (is_a($post, 'WP_Post')) {
108
+ if (in_array($args[0], array('publish_posts', 'publish_pages'))) {
109
+ $object = AAM::getUser()->getObject('post', $post->ID);
110
+
111
+ if (!$this->isAllowed('backend.publish', $object)) {
112
+ $allCaps = $this->restrictCapabilities($allCaps, $metaCaps);
113
+ }
114
+ }
115
+ }
116
+
117
+ return $allCaps;
118
+ }
119
+
120
+ /**
121
+ * Control Edit Post
122
+ *
123
+ * Make sure that current user does not have access to edit Post
124
+ *
125
+ * @return void
126
+ *
127
+ * @access public
128
+ */
129
+ public function checkEditAccess() {
130
+ $post = $this->getCurrentPost();
131
+
132
+ if (is_a($post, 'WP_Post')) {
133
+ $object = AAM::getUser()->getObject('post', $post->ID, $post);
134
+
135
+ if (!$this->isAllowed('backend.edit', $object)) {
136
+ AAM_Core_API::reject(
137
+ 'backend',
138
+ array(
139
+ 'hook' => 'post_edit',
140
+ 'action' => 'backend.edit',
141
+ 'post' => $post
142
+ )
143
+ );
144
+ }
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Get Post ID
150
+ *
151
+ * Replication of the same mechanism that is in wp-admin/post.php
152
+ *
153
+ * @return WP_Post|null
154
+ *
155
+ * @access public
156
+ */
157
+ protected function getCurrentPost() {
158
+ $post = null;
159
+
160
+ if (get_post()) {
161
+ $post = get_post();
162
+ } elseif ($post_id = AAM_Core_Request::get('post')) {
163
+ $post = get_post($post_id);
164
+ } elseif ($post_id = AAM_Core_Request::get('post_ID')) {
165
+ $post = get_post($post_id);
166
+ }
167
+
168
+ return $post;
169
+ }
170
+
171
+ /**
172
+ * Check if current user is allowed to manager specified user
173
+ *
174
+ * @param int $id
175
+ * @param array $allcaps
176
+ * @param array $metacaps
177
+ *
178
+ * @return array
179
+ *
180
+ * @access protected
181
+ */
182
+ protected function isAllowedToManagerUser($id, $allcaps, $metacaps) {
183
+ $user = new WP_User($id);
184
+
185
+ //current user max level
186
+ $cuserLevel = AAM_Core_API::maxLevel(AAM::getUser()->allcaps);
187
+ //userLevel
188
+ $userLevel = AAM_Core_API::maxLevel($user->allcaps);
189
+
190
+ if ($cuserLevel < $userLevel) {
191
+ $allcaps = $this->restrictCapabilities($allcaps, $metacaps);
192
+ }
193
+
194
+ return $allcaps;
195
+ }
196
+
197
+ /**
198
+ * Check if current user is allowed to manage post
199
+ *
200
+ * @param string $cap
201
+ * @param int $id
202
+ * @param array $allcaps
203
+ * @param array $metacaps
204
+ *
205
+ * @return array
206
+ *
207
+ * @access protected
208
+ */
209
+ protected function isAllowedToManagerPost($cap, $id, $allcaps, $metacaps) {
210
+ if ($cap == 'edit_post') {
211
+ $object = AAM::getUser()->getObject('post', $id);
212
+ $draft = $object->post_status == 'auto-draft';
213
+
214
+ if (!$draft && !$this->isAllowed('backend.edit', $object)) {
215
+ $allcaps = $this->restrictCapabilities($allcaps, $metacaps);
216
+ }
217
+ } elseif ($cap == 'delete_post') {
218
+ $object = AAM::getUser()->getObject('post', $id);
219
+ if (!$this->isAllowed('backend.delete', $object)) {
220
+ $allcaps = $this->restrictCapabilities($allcaps, $metacaps);
221
+ }
222
+ }
223
+
224
+ return $allcaps;
225
+ }
226
+
227
+ /**
228
+ * Check if action is allowed
229
+ *
230
+ * This method will take in consideration also *_others action
231
+ *
232
+ * @param string $action
233
+ * @param AAM_Core_Object_Post $object
234
+ *
235
+ * @return boolean
236
+ *
237
+ * @access protected
238
+ */
239
+ protected function isAllowed($action, $object) {
240
+ $edit = $object->has($action);
241
+ $others = $object->has("{$action}_others");
242
+ $author = ($object->post_author == get_current_user_id());
243
+
244
+ return ($edit || ($others && !$author)) ? false : true;
245
+ }
246
+
247
+ /**
248
+ * Restrict user capabilities
249
+ *
250
+ * Iterate through the list of meta capabilities and disable them in the
251
+ * list of all user capabilities. Keep in mind that this disable caps only
252
+ * for one time call.
253
+ *
254
+ * @param array $allCaps
255
+ * @param array $metaCaps
256
+ *
257
+ * @return array
258
+ *
259
+ * @access protected
260
+ */
261
+ protected function restrictCapabilities($allCaps, $metaCaps) {
262
+ foreach($metaCaps as $cap) {
263
+ $allCaps[$cap] = false;
264
+ }
265
+
266
+ return $allCaps;
267
+ }
268
+
269
+ /**
270
+ * Alias for the bootstrap
271
+ *
272
+ * @return AAM_Backend_Authorization
273
+ *
274
+ * @access public
275
+ * @static
276
+ */
277
+ public static function getInstance() {
278
+ return self::bootstrap();
279
+ }
280
+
281
+ /**
282
+ * Bootstrap authorization layer
283
+ *
284
+ * @return AAM_Backend_Authorization
285
+ *
286
+ * @access public
287
+ */
288
+ public static function bootstrap() {
289
+ if (is_null(self::$_instance)) {
290
+ self::$_instance = new self;
291
+ }
292
+
293
+ return self::$_instance;
294
+ }
295
+
296
+ }
Application/Backend/Feature.php CHANGED
@@ -7,6 +7,14 @@
7
  * ======================================================================
8
  */
9
 
 
 
 
 
 
 
 
 
10
  class AAM_Backend_Feature {
11
 
12
  /**
@@ -33,7 +41,7 @@ class AAM_Backend_Feature {
33
  $response = false;
34
 
35
  if (empty($feature->capability)){
36
- $cap = AAM_Backend_View::getAAMCapability();
37
  } else {
38
  $cap = $feature->capability;
39
  }
@@ -53,9 +61,16 @@ class AAM_Backend_Feature {
53
  }
54
 
55
  /**
 
 
 
 
 
 
56
  *
57
- * @param type $options
58
- * @return type
 
59
  */
60
  protected static function isVisible($options) {
61
  $count = 0;
@@ -89,18 +104,22 @@ class AAM_Backend_Feature {
89
  * Retrieve list of features
90
  *
91
  * Retrieve sorted list of featured based on current subject
 
 
92
  *
93
  * @return array
94
  *
95
  * @access public
96
  * @static
97
  */
98
- public static function retriveList() {
99
  $response = array();
100
 
101
- $subject = AAM_Backend_View::getSubject();
102
  foreach (self::$_features as $feature) {
103
- if (in_array(get_class($subject), $feature->subjects)) {
 
 
104
  $response[] = self::initView($feature);
105
  }
106
  }
@@ -110,7 +129,7 @@ class AAM_Backend_Feature {
110
  }
111
 
112
  /**
113
- * Order list of features or subjectes
114
  *
115
  * Reorganize the list based on "position" attribute
116
  *
7
  * ======================================================================
8
  */
9
 
10
+ /**
11
+ * AAM Backend Feature
12
+ *
13
+ * This class is used to hold the list of all registered UI features with few neat
14
+ * methods to manipulate it.
15
+ *
16
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
17
+ */
18
  class AAM_Backend_Feature {
19
 
20
  /**
41
  $response = false;
42
 
43
  if (empty($feature->capability)){
44
+ $cap = 'aam_manager';
45
  } else {
46
  $cap = $feature->capability;
47
  }
61
  }
62
 
63
  /**
64
+ * Check if feature is visible
65
+ *
66
+ * There is a way to show/hide feature based on the option. For example some
67
+ * features should be visible only when Backend Access options is enabled.
68
+ *
69
+ * @param string $options
70
  *
71
+ * @return boolean
72
+ *
73
+ * @access protected
74
  */
75
  protected static function isVisible($options) {
76
  $count = 0;
104
  * Retrieve list of features
105
  *
106
  * Retrieve sorted list of featured based on current subject
107
+ *
108
+ * @param string $type
109
  *
110
  * @return array
111
  *
112
  * @access public
113
  * @static
114
  */
115
+ public static function retriveList($type) {
116
  $response = array();
117
 
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))) {
123
  $response[] = self::initView($feature);
124
  }
125
  }
129
  }
130
 
131
  /**
132
+ * Order list of features
133
  *
134
  * Reorganize the list based on "position" attribute
135
  *
Application/Backend/Feature/Abstract.php CHANGED
@@ -24,12 +24,10 @@ abstract class AAM_Backend_Feature_Abstract {
24
  * @throws Exception
25
  */
26
  public function __construct() {
27
- if (is_admin()) {
28
- $capability = AAM_Backend_View::getAAMCapability();
29
-
30
- if (!AAM::getUser()->hasCapability($capability)) {
31
- wp_die(__('Access Denied', AAM_KEY));
32
- }
33
  }
34
  }
35
 
@@ -49,20 +47,6 @@ abstract class AAM_Backend_Feature_Abstract {
49
  return $content;
50
  }
51
 
52
- /**
53
- * Get access option
54
- *
55
- * This function exists only to support implementation for PHP 5.2 cause later
56
- * static binding has been introduced only in PHP 5.3.0
57
- *
58
- * @return string
59
- *
60
- * @access public
61
- */
62
- public static function getAccessOption() {
63
- return '';
64
- }
65
-
66
  /**
67
  * Get template filename
68
  *
24
  * @throws Exception
25
  */
26
  public function __construct() {
27
+ if (!AAM::getUser()->hasCapability('aam_manager')) {
28
+ AAM_Core_API::reject(
29
+ 'backend', array('hook' => 'aam_manager')
30
+ );
 
 
31
  }
32
  }
33
 
47
  return $content;
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Get template filename
52
  *
Application/Backend/Feature/Contact.php DELETED
@@ -1,63 +0,0 @@
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 contact/hire manager
12
- *
13
- * @package AAM
14
- * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
- */
16
- class AAM_Backend_Feature_Contact extends AAM_Backend_Feature_Abstract {
17
-
18
- /**
19
- * @inheritdoc
20
- */
21
- public static function getAccessOption() {
22
- return 'feature.contact.capability';
23
- }
24
-
25
- /**
26
- * @inheritdoc
27
- */
28
- public static function getTemplate() {
29
- return 'contact.phtml';
30
- }
31
-
32
- /**
33
- * Register Contact/Hire feature
34
- *
35
- * @return void
36
- *
37
- * @access public
38
- */
39
- public static function register() {
40
- if (AAM_Core_API::capabilityExists('aam_view_contact')) {
41
- $cap = 'aam_view_contact';
42
- } else {
43
- $cap = AAM_Core_Config::get(
44
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
45
- );
46
- }
47
-
48
- AAM_Backend_Feature::registerFeature((object) array(
49
- 'uid' => 'contact',
50
- 'position' => 9999,
51
- 'title' => __('Contact Us', AAM_KEY),
52
- 'capability' => $cap,
53
- 'subjects' => array(
54
- 'AAM_Core_Subject_Role',
55
- 'AAM_Core_Subject_User',
56
- 'AAM_Core_Subject_Visitor',
57
- 'AAM_Core_Subject_Default'
58
- ),
59
- 'view' => __CLASS__
60
- ));
61
- }
62
-
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/Feature/{Extension.php → Extension/Manager.php} RENAMED
@@ -13,22 +13,21 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
- * @inheritdoc
 
20
  */
21
- public static function getAccessOption() {
22
- return 'feature.extension.capability';
23
- }
24
 
25
  /**
26
- * @inheritdoc
27
  */
28
- public static function getTemplate() {
29
- return 'extension.phtml';
30
  }
31
-
32
  /**
33
  * Undocumented function
34
  *
@@ -112,6 +111,32 @@ class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
112
  return $response;
113
  }
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  /**
116
  *
117
  * @param type $type
@@ -166,53 +191,15 @@ class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
166
  }
167
 
168
  /**
169
- * Register Extension feature
170
- *
171
- * @return void
172
  *
173
- * @access public
174
  */
175
- public static function register() {
176
- if (is_main_site()) {
177
- if (AAM_Core_API::capabilityExists('aam_manage_extensions')) {
178
- $cap = 'aam_manage_extensions';
179
- } else {
180
- $cap = AAM_Core_Config::get(
181
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
182
- );
183
- }
184
- $updated = self::hasUpdates();
185
-
186
- AAM_Backend_Feature::registerFeature((object) array(
187
- 'uid' => 'extension',
188
- 'position' => 999,
189
- 'title' => __('Extensions', AAM_KEY),
190
- 'capability' => $cap,
191
- 'class' => 'highlight',
192
- 'notification' => ($updated ? $updated : 'NEW'),
193
- 'subjects' => array(
194
- 'AAM_Core_Subject_Role',
195
- 'AAM_Core_Subject_User',
196
- 'AAM_Core_Subject_Visitor',
197
- 'AAM_Core_Subject_Default',
198
- ),
199
- 'view' => __CLASS__
200
- ));
201
- }
202
- }
203
-
204
- /**
205
- *
206
- * @return type
207
- */
208
- protected static function hasUpdates() {
209
- $updates = 0;
210
-
211
- foreach(AAM_Extension_Repository::getInstance()->getList() as $item) {
212
- $updates += ($item['status'] == AAM_Extension_Repository::STATUS_UPDATE);
213
  }
214
 
215
- return $updates;
216
  }
217
 
218
  }
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Extension_Manager extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
+ *
20
+ * @var type
21
  */
22
+ protected static $instance = null;
 
 
23
 
24
  /**
25
+ *
26
  */
27
+ public function render() {
28
+ require_once(dirname(__FILE__) . '/../../phtml/extensions.phtml');
29
  }
30
+
31
  /**
32
  * Undocumented function
33
  *
111
  return $response;
112
  }
113
 
114
+ /**
115
+ *
116
+ * @return type
117
+ */
118
+ public function deactivate() {
119
+ AAM_Extension_Repository::getInstance()->updateStatus(
120
+ AAM_Core_Request::post('extension'),
121
+ AAM_Extension_Repository::STATUS_INACTIVE
122
+ );
123
+
124
+ return json_encode(array('status' => 'success'));
125
+ }
126
+
127
+ /**
128
+ *
129
+ * @return type
130
+ */
131
+ public function activate() {
132
+ AAM_Extension_Repository::getInstance()->updateStatus(
133
+ AAM_Core_Request::post('extension'),
134
+ AAM_Extension_Repository::STATUS_INSTALLED
135
+ );
136
+
137
+ return json_encode(array('status' => 'success'));
138
+ }
139
+
140
  /**
141
  *
142
  * @param type $type
191
  }
192
 
193
  /**
 
 
 
194
  *
195
+ * @return AAM_Backend_Feature_Extension_Manager
196
  */
197
+ public static function getInstance() {
198
+ if (is_null(self::$instance)) {
199
+ self::$instance = new self;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
 
202
+ return self::$instance;
203
  }
204
 
205
  }
Application/Backend/Feature/{404Redirect.php → Main/404Redirect.php} RENAMED
@@ -13,20 +13,13 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_404Redirect extends AAM_Backend_Feature_Abstract {
17
-
18
- /**
19
- * @inheritdoc
20
- */
21
- public static function getAccessOption() {
22
- return 'feature.404redirect.capability';
23
- }
24
 
25
  /**
26
  * @inheritdoc
27
  */
28
  public static function getTemplate() {
29
- return '404redirect.phtml';
30
  }
31
 
32
  /**
@@ -54,21 +47,17 @@ class AAM_Backend_Feature_404Redirect extends AAM_Backend_Feature_Abstract {
54
  */
55
  public static function register() {
56
  if (is_main_site()) {
57
- if (AAM_Core_API::capabilityExists('aam_manage_404_redirect')) {
58
- $cap = 'aam_manage_404_redirect';
59
- } else {
60
- $cap = AAM_Core_Config::get(
61
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
62
- );
63
- }
64
-
65
  AAM_Backend_Feature::registerFeature((object) array(
66
  'uid' => '404redirect',
67
  'position' => 50,
68
  'title' => __('404 Redirect', AAM_KEY),
69
- 'capability' => $cap,
 
70
  'subjects' => array(
71
- 'AAM_Core_Subject_Default'
 
 
 
72
  ),
73
  'view' => __CLASS__
74
  ));
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_404Redirect extends AAM_Backend_Feature_Abstract {
 
 
 
 
 
 
 
17
 
18
  /**
19
  * @inheritdoc
20
  */
21
  public static function getTemplate() {
22
+ return 'main/404redirect.phtml';
23
  }
24
 
25
  /**
47
  */
48
  public static function register() {
49
  if (is_main_site()) {
 
 
 
 
 
 
 
 
50
  AAM_Backend_Feature::registerFeature((object) array(
51
  'uid' => '404redirect',
52
  'position' => 50,
53
  'title' => __('404 Redirect', AAM_KEY),
54
+ 'capability' => 'aam_manage_404_redirect',
55
+ 'type' => 'main',
56
  'subjects' => array(
57
+ AAM_Core_Subject_Default::UID,
58
+ AAM_Core_Subject_Role::UID,
59
+ AAM_Core_Subject_User::UID,
60
+ AAM_Core_Subject_Visitor::UID
61
  ),
62
  'view' => __CLASS__
63
  ));
Application/Backend/Feature/{Capability.php → Main/Capability.php} RENAMED
@@ -13,7 +13,7 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  * Capability groups
@@ -21,8 +21,9 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
21
  * @var array
22
  *
23
  * @access private
 
24
  */
25
- private $_groups = array(
26
  'system' => array(
27
  'level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5',
28
  'level_6', 'level_7', 'level_8', 'level_9', 'level_10'
@@ -50,10 +51,11 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
50
  'aam_manage_admin_menu', 'aam_manage_metaboxes', 'aam_manage_capabilities',
51
  'aam_manage_posts', 'aam_manage_access_denied_redirect', 'aam_create_roles',
52
  'aam_manage_login_redirect', 'aam_manage_logout_redirect', 'aam_manager',
53
- 'aam_manage_content_teaser', 'aam_manage_security', 'aam_manage_utilities',
54
- 'aam_manage_extensions', 'aam_view_contact', 'aam_manage_404_redirect',
55
  'aam_manage_default', 'aam_manage_visitors', 'aam_list_roles',
56
- 'aam_edit_roles', 'aam_delete_roles', 'aam_toggle_users', 'aam_switch_users'
 
57
  )
58
  );
59
 
@@ -112,9 +114,9 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
112
  public function delete() {
113
  $capability = AAM_Core_Request::post('capability');
114
  $roles = AAM_Core_API::getRoles();
115
- $subject = AAM_Backend_View::getSubject();
116
 
117
- if (is_a($subject, 'AAM_Core_Subject_Role')) {
118
  foreach($roles->role_objects as $role) {
119
  $role->remove_cap($capability);
120
  }
@@ -129,18 +131,11 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
129
  return json_encode($response);
130
  }
131
 
132
- /**
133
- * @inheritdoc
134
- */
135
- public static function getAccessOption() {
136
- return 'feature.capability.capability';
137
- }
138
-
139
  /**
140
  * @inheritdoc
141
  */
142
  public static function getTemplate() {
143
- return 'object/capability.phtml';
144
  }
145
 
146
  /**
@@ -149,14 +144,14 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
149
  * @return type
150
  */
151
  protected function prepareActionList($cap) {
152
- $subject = AAM_Backend_View::getSubject();
153
  $actions = array();
154
 
155
  $actions[] = ($subject->hasCapability($cap) ? 'checked' : 'unchecked');
156
 
157
  //allow to delete or update capability only for roles!
158
  if (AAM_Core_Config::get('manage-capability', false)
159
- && is_a($subject, 'AAM_Core_Subject_Role')) {
160
  $actions[] = 'edit';
161
  $actions[] = 'delete';
162
  }
@@ -241,7 +236,7 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
241
  if ($capability) {
242
  //add the capability to administrator's role as default behavior
243
  AAM_Core_API::getRoles()->add_cap('administrator', $capability);
244
- AAM_Backend_View::getSubject()->addCapability($capability);
245
  $response = array('status' => 'success');
246
  } else {
247
  $response = array('status' => 'failure');
@@ -260,13 +255,13 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
260
  * @access protected
261
  */
262
  protected function getGroup($capability) {
263
- if (in_array($capability, $this->_groups['system'])) {
264
  $response = __('System', AAM_KEY);
265
- } elseif (in_array($capability, $this->_groups['post'])) {
266
  $response = __('Posts & Pages', AAM_KEY);
267
- } elseif (in_array($capability, $this->_groups['backend'])) {
268
  $response = __('Backend', AAM_KEY);
269
- } elseif (in_array($capability, $this->_groups['aam'])) {
270
  $response = __('AAM Interface', AAM_KEY);
271
  } else {
272
  $response = __('Miscellaneous', AAM_KEY);
@@ -285,7 +280,7 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
285
  * @access protected
286
  */
287
  protected function isOverwritten() {
288
- $object = AAM_Backend_View::getSubject()->getObject('capability');
289
 
290
  return $object->isOverwritten();
291
  }
@@ -298,20 +293,16 @@ class AAM_Backend_Feature_Capability extends AAM_Backend_Feature_Abstract {
298
  * @access public
299
  */
300
  public static function register() {
301
- if (AAM_Core_API::capabilityExists('aam_manage_capabilities')) {
302
- $cap = 'aam_manage_capabilities';
303
- } else {
304
- $cap = AAM_Core_Config::get(
305
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
306
- );
307
- }
308
-
309
  AAM_Backend_Feature::registerFeature((object) array(
310
  'uid' => 'capability',
311
  'position' => 15,
312
  'title' => __('Capabilities', AAM_KEY),
313
- 'capability' => $cap,
314
- 'subjects' => array('AAM_Core_Subject_Role', 'AAM_Core_Subject_User'),
 
 
 
 
315
  'view' => __CLASS__
316
  ));
317
  }
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  * Capability groups
21
  * @var array
22
  *
23
  * @access private
24
+ * @todo Move this to the Object_Capability
25
  */
26
+ public static $groups = array(
27
  'system' => array(
28
  'level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5',
29
  'level_6', 'level_7', 'level_8', 'level_9', 'level_10'
51
  'aam_manage_admin_menu', 'aam_manage_metaboxes', 'aam_manage_capabilities',
52
  'aam_manage_posts', 'aam_manage_access_denied_redirect', 'aam_create_roles',
53
  'aam_manage_login_redirect', 'aam_manage_logout_redirect', 'aam_manager',
54
+ 'aam_manage_settings', 'aam_manage_extensions', 'aam_show_notifications',
55
+ 'aam_manage_404_redirect', 'aam_manage_ip_check',
56
  'aam_manage_default', 'aam_manage_visitors', 'aam_list_roles',
57
+ 'aam_edit_roles', 'aam_delete_roles', 'aam_toggle_users', 'aam_switch_users',
58
+ 'aam_manage_configpress'
59
  )
60
  );
61
 
114
  public function delete() {
115
  $capability = AAM_Core_Request::post('capability');
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
  }
131
  return json_encode($response);
132
  }
133
 
 
 
 
 
 
 
 
134
  /**
135
  * @inheritdoc
136
  */
137
  public static function getTemplate() {
138
+ return 'main/capability.phtml';
139
  }
140
 
141
  /**
144
  * @return type
145
  */
146
  protected function prepareActionList($cap) {
147
+ $subject = AAM_Backend_Subject::getInstance();
148
  $actions = array();
149
 
150
  $actions[] = ($subject->hasCapability($cap) ? 'checked' : 'unchecked');
151
 
152
  //allow to delete or update capability only for roles!
153
  if (AAM_Core_Config::get('manage-capability', false)
154
+ && ($subject->getUID() == AAM_Core_Subject_Role::UID)) {
155
  $actions[] = 'edit';
156
  $actions[] = 'delete';
157
  }
236
  if ($capability) {
237
  //add the capability to administrator's role as default behavior
238
  AAM_Core_API::getRoles()->add_cap('administrator', $capability);
239
+ AAM_Backend_Subject::getInstance()->addCapability($capability);
240
  $response = array('status' => 'success');
241
  } else {
242
  $response = array('status' => 'failure');
255
  * @access protected
256
  */
257
  protected function getGroup($capability) {
258
+ if (in_array($capability, self::$groups['system'])) {
259
  $response = __('System', AAM_KEY);
260
+ } elseif (in_array($capability, self::$groups['post'])) {
261
  $response = __('Posts & Pages', AAM_KEY);
262
+ } elseif (in_array($capability, self::$groups['backend'])) {
263
  $response = __('Backend', AAM_KEY);
264
+ } elseif (in_array($capability, self::$groups['aam'])) {
265
  $response = __('AAM Interface', AAM_KEY);
266
  } else {
267
  $response = __('Miscellaneous', AAM_KEY);
280
  * @access protected
281
  */
282
  protected function isOverwritten() {
283
+ $object = AAM_Backend_Subject::getInstance()->getObject('capability');
284
 
285
  return $object->isOverwritten();
286
  }
293
  * @access public
294
  */
295
  public static function register() {
 
 
 
 
 
 
 
 
296
  AAM_Backend_Feature::registerFeature((object) array(
297
  'uid' => 'capability',
298
  'position' => 15,
299
  'title' => __('Capabilities', AAM_KEY),
300
+ 'capability' => 'aam_manage_capabilities',
301
+ 'type' => 'main',
302
+ 'subjects' => array(
303
+ AAM_Core_Subject_Role::UID,
304
+ AAM_Core_Subject_User::UID
305
+ ),
306
  'view' => __CLASS__
307
  ));
308
  }
Application/Backend/Feature/{LoginRedirect.php → Main/LoginRedirect.php} RENAMED
@@ -13,14 +13,16 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_LoginRedirect extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  *
20
  * @return type
21
  */
22
  public function isDefault() {
23
- return (AAM_Backend_View::getSubject()->getUID() == 'default');
 
 
24
  }
25
 
26
  /**
@@ -33,7 +35,7 @@ class AAM_Backend_Feature_LoginRedirect extends AAM_Backend_Feature_Abstract {
33
  * @access protected
34
  */
35
  protected function isOverwritten() {
36
- $object = AAM_Backend_View::getSubject()->getObject('loginRedirect');
37
 
38
  return $object->isOverwritten();
39
  }
@@ -44,24 +46,17 @@ class AAM_Backend_Feature_LoginRedirect extends AAM_Backend_Feature_Abstract {
44
  * @return type
45
  */
46
  public function getOption($option, $default = null) {
47
- $object = AAM_Backend_View::getSubject()->getObject('loginRedirect');
48
  $value = $object->get($option);
49
 
50
  return (!is_null($value) ? $value : $default);
51
  }
52
 
53
- /**
54
- * @inheritdoc
55
- */
56
- public static function getAccessOption() {
57
- return 'feature.login-redirect.capability';
58
- }
59
-
60
  /**
61
  * @inheritdoc
62
  */
63
  public static function getTemplate() {
64
- return 'object/login-redirect.phtml';
65
  }
66
 
67
  /**
@@ -72,23 +67,16 @@ class AAM_Backend_Feature_LoginRedirect extends AAM_Backend_Feature_Abstract {
72
  * @access public
73
  */
74
  public static function register() {
75
- if (AAM_Core_API::capabilityExists('aam_manage_login_redirect')) {
76
- $cap = 'aam_manage_login_redirect';
77
- } else {
78
- $cap = AAM_Core_Config::get(
79
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
80
- );
81
- }
82
-
83
  AAM_Backend_Feature::registerFeature((object) array(
84
  'uid' => 'login_redirect',
85
  'position' => 40,
86
  'title' => __('Login Redirect', AAM_KEY),
87
- 'capability' => $cap,
 
88
  'subjects' => array(
89
- 'AAM_Core_Subject_Role',
90
- 'AAM_Core_Subject_User',
91
- 'AAM_Core_Subject_Default'
92
  ),
93
  'view' => __CLASS__
94
  ));
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_LoginRedirect extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  *
20
  * @return type
21
  */
22
  public function isDefault() {
23
+ $subject = AAM_Backend_Subject::getInstance()->getUID();
24
+
25
+ return ($subject == AAM_Core_Subject_Default::UID);
26
  }
27
 
28
  /**
35
  * @access protected
36
  */
37
  protected function isOverwritten() {
38
+ $object = AAM_Backend_Subject::getInstance()->getObject('loginRedirect');
39
 
40
  return $object->isOverwritten();
41
  }
46
  * @return type
47
  */
48
  public function getOption($option, $default = null) {
49
+ $object = AAM_Backend_Subject::getInstance()->getObject('loginRedirect');
50
  $value = $object->get($option);
51
 
52
  return (!is_null($value) ? $value : $default);
53
  }
54
 
 
 
 
 
 
 
 
55
  /**
56
  * @inheritdoc
57
  */
58
  public static function getTemplate() {
59
+ return 'main/login-redirect.phtml';
60
  }
61
 
62
  /**
67
  * @access public
68
  */
69
  public static function register() {
 
 
 
 
 
 
 
 
70
  AAM_Backend_Feature::registerFeature((object) array(
71
  'uid' => 'login_redirect',
72
  'position' => 40,
73
  'title' => __('Login Redirect', AAM_KEY),
74
+ 'capability' => 'aam_manage_login_redirect',
75
+ 'type' => 'main',
76
  'subjects' => array(
77
+ AAM_Core_Subject_Role::UID,
78
+ AAM_Core_Subject_User::UID,
79
+ AAM_Core_Subject_Default::UID
80
  ),
81
  'view' => __CLASS__
82
  ));
Application/Backend/Feature/{LogoutRedirect.php → Main/LogoutRedirect.php} RENAMED
@@ -13,14 +13,16 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_LogoutRedirect extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  *
20
  * @return type
21
  */
22
  public function isDefault() {
23
- return (AAM_Backend_View::getSubject()->getUID() == 'default');
 
 
24
  }
25
 
26
  /**
@@ -33,7 +35,7 @@ class AAM_Backend_Feature_LogoutRedirect extends AAM_Backend_Feature_Abstract {
33
  * @access protected
34
  */
35
  protected function isOverwritten() {
36
- $object = AAM_Backend_View::getSubject()->getObject('logoutRedirect');
37
 
38
  return $object->isOverwritten();
39
  }
@@ -44,24 +46,17 @@ class AAM_Backend_Feature_LogoutRedirect extends AAM_Backend_Feature_Abstract {
44
  * @return type
45
  */
46
  public function getOption($option, $default = null) {
47
- $object = AAM_Backend_View::getSubject()->getObject('logoutRedirect');
48
  $value = $object->get($option);
49
 
50
  return (!is_null($value) ? $value : $default);
51
  }
52
 
53
- /**
54
- * @inheritdoc
55
- */
56
- public static function getAccessOption() {
57
- return 'feature.logout-redirect.capability';
58
- }
59
-
60
  /**
61
  * @inheritdoc
62
  */
63
  public static function getTemplate() {
64
- return 'object/logout-redirect.phtml';
65
  }
66
 
67
  /**
@@ -72,23 +67,16 @@ class AAM_Backend_Feature_LogoutRedirect extends AAM_Backend_Feature_Abstract {
72
  * @access public
73
  */
74
  public static function register() {
75
- if (AAM_Core_API::capabilityExists('aam_manage_logout_redirect')) {
76
- $cap = 'aam_manage_logout_redirect';
77
- } else {
78
- $cap = AAM_Core_Config::get(
79
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
80
- );
81
- }
82
-
83
  AAM_Backend_Feature::registerFeature((object) array(
84
  'uid' => 'logout_redirect',
85
  'position' => 41,
86
  'title' => __('Logout Redirect', AAM_KEY),
87
- 'capability' => $cap,
 
88
  'subjects' => array(
89
- 'AAM_Core_Subject_Role',
90
- 'AAM_Core_Subject_User',
91
- 'AAM_Core_Subject_Default'
92
  ),
93
  'view' => __CLASS__
94
  ));
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_LogoutRedirect extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  *
20
  * @return type
21
  */
22
  public function isDefault() {
23
+ $subject = AAM_Backend_Subject::getInstance();
24
+
25
+ return ($subject->getUID() == 'default');
26
  }
27
 
28
  /**
35
  * @access protected
36
  */
37
  protected function isOverwritten() {
38
+ $object = AAM_Backend_Subject::getInstance()->getObject('logoutRedirect');
39
 
40
  return $object->isOverwritten();
41
  }
46
  * @return type
47
  */
48
  public function getOption($option, $default = null) {
49
+ $object = AAM_Backend_Subject::getInstance()->getObject('logoutRedirect');
50
  $value = $object->get($option);
51
 
52
  return (!is_null($value) ? $value : $default);
53
  }
54
 
 
 
 
 
 
 
 
55
  /**
56
  * @inheritdoc
57
  */
58
  public static function getTemplate() {
59
+ return 'main/logout-redirect.phtml';
60
  }
61
 
62
  /**
67
  * @access public
68
  */
69
  public static function register() {
 
 
 
 
 
 
 
 
70
  AAM_Backend_Feature::registerFeature((object) array(
71
  'uid' => 'logout_redirect',
72
  'position' => 41,
73
  'title' => __('Logout Redirect', AAM_KEY),
74
+ 'capability' => 'aam_manage_logout_redirect',
75
+ 'type' => 'main',
76
  'subjects' => array(
77
+ AAM_Core_Subject_Role::UID,
78
+ AAM_Core_Subject_User::UID,
79
+ AAM_Core_Subject_Default::UID
80
  ),
81
  'view' => __CLASS__
82
  ));
Application/Backend/Feature/{Menu.php → Main/Menu.php} RENAMED
@@ -13,7 +13,7 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  * Undocumented function
@@ -24,7 +24,7 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
24
  $items = AAM_Core_Request::post('items', array());
25
  $status = AAM_Core_Request::post('status');
26
 
27
- $object = AAM_Backend_View::getSubject()->getObject('menu');
28
 
29
  foreach($items as $item) {
30
  $object->save($item, $status);
@@ -57,7 +57,7 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
57
 
58
  $submenu = $this->getSubmenu($item[2]);
59
 
60
- $allowed = AAM_Backend_View::getSubject()->hasCapability($item[1]);
61
 
62
  if ($allowed || count($submenu) > 0) {
63
  $response[] = array(
@@ -88,18 +88,11 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
88
  return $menu;
89
  }
90
 
91
- /**
92
- * @inheritdoc
93
- */
94
- public static function getAccessOption() {
95
- return 'feature.admin_menu.capability';
96
- }
97
-
98
  /**
99
  * @inheritdoc
100
  */
101
  public static function getTemplate() {
102
- return 'object/menu.phtml';
103
  }
104
 
105
  /**
@@ -116,8 +109,8 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
116
  global $submenu;
117
 
118
  $response = array();
119
- $subject = AAM_Backend_View::getSubject();
120
- $isDefault = is_a($subject, 'AAM_Core_Subject_Default');
121
 
122
  if (isset($submenu[$menu])) {
123
  foreach ($submenu[$menu] as $item) {
@@ -153,26 +146,24 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
153
  }
154
 
155
  /**
156
- * Check if the entire menu branch is restricted
157
- *
158
- * @param array $menu
159
  *
 
 
160
  * @return boolean
161
- *
162
- * @access protected
163
  */
164
- protected function hasRestrictedAll($menu) {
165
- $object = AAM_Backend_View::getSubject()->getObject('menu');
166
- $response = $object->has($menu['id']);
167
-
168
- foreach ($menu['submenu'] as $submenu) {
169
- if ($object->has($submenu['id']) === false) {
170
- $response = false;
171
- break;
 
172
  }
173
  }
174
-
175
- return $response;
176
  }
177
 
178
  /**
@@ -185,7 +176,7 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
185
  * @access protected
186
  */
187
  protected function isOverwritten() {
188
- $object = AAM_Backend_View::getSubject()->getObject('menu');
189
 
190
  return $object->isOverwritten();
191
  }
@@ -198,23 +189,16 @@ class AAM_Backend_Feature_Menu extends AAM_Backend_Feature_Abstract {
198
  * @access public
199
  */
200
  public static function register() {
201
- if (AAM_Core_API::capabilityExists('aam_manage_admin_menu')) {
202
- $cap = 'aam_manage_admin_menu';
203
- } else {
204
- $cap = AAM_Core_Config::get(
205
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
206
- );
207
- }
208
-
209
  AAM_Backend_Feature::registerFeature((object) array(
210
  'uid' => 'admin_menu',
211
  'position' => 5,
212
  'title' => __('Backend Menu', AAM_KEY),
213
- 'capability' => $cap,
 
214
  'subjects' => array(
215
- 'AAM_Core_Subject_Role',
216
- 'AAM_Core_Subject_User',
217
- 'AAM_Core_Subject_Default'
218
  ),
219
  'option' => 'backend-access-control',
220
  'view' => __CLASS__
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_Menu extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  * Undocumented function
24
  $items = AAM_Core_Request::post('items', array());
25
  $status = AAM_Core_Request::post('status');
26
 
27
+ $object = AAM_Backend_Subject::getInstance()->getObject('menu');
28
 
29
  foreach($items as $item) {
30
  $object->save($item, $status);
57
 
58
  $submenu = $this->getSubmenu($item[2]);
59
 
60
+ $allowed = AAM_Backend_Subject::getInstance()->hasCapability($item[1]);
61
 
62
  if ($allowed || count($submenu) > 0) {
63
  $response[] = array(
88
  return $menu;
89
  }
90
 
 
 
 
 
 
 
 
91
  /**
92
  * @inheritdoc
93
  */
94
  public static function getTemplate() {
95
+ return 'main/menu.phtml';
96
  }
97
 
98
  /**
109
  global $submenu;
110
 
111
  $response = array();
112
+ $subject = AAM_Backend_Subject::getInstance();
113
+ $isDefault = ($subject->getUID() == AAM_Core_Subject_Default::UID);
114
 
115
  if (isset($submenu[$menu])) {
116
  foreach ($submenu[$menu] as $item) {
146
  }
147
 
148
  /**
 
 
 
149
  *
150
+ * @param type $object
151
+ * @param type $subs
152
  * @return boolean
 
 
153
  */
154
+ protected function hasSubmenuChecked($object, $subs) {
155
+ $has = false;
156
+
157
+ if (!empty($subs)) {
158
+ foreach($subs as $submenu) {
159
+ if ($object->has($submenu['id'])) {
160
+ $has = true;
161
+ break;
162
+ }
163
  }
164
  }
165
+
166
+ return $has;
167
  }
168
 
169
  /**
176
  * @access protected
177
  */
178
  protected function isOverwritten() {
179
+ $object = AAM_Backend_Subject::getInstance()->getObject('menu');
180
 
181
  return $object->isOverwritten();
182
  }
189
  * @access public
190
  */
191
  public static function register() {
 
 
 
 
 
 
 
 
192
  AAM_Backend_Feature::registerFeature((object) array(
193
  'uid' => 'admin_menu',
194
  'position' => 5,
195
  'title' => __('Backend Menu', AAM_KEY),
196
+ 'capability' => 'aam_manage_admin_menu',
197
+ 'type' => 'main',
198
  'subjects' => array(
199
+ AAM_Core_Subject_Role::UID,
200
+ AAM_Core_Subject_User::UID,
201
+ AAM_Core_Subject_Default::UID
202
  ),
203
  'option' => 'backend-access-control',
204
  'view' => __CLASS__
Application/Backend/Feature/{Metabox.php → Main/Metabox.php} RENAMED
@@ -13,20 +13,13 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Metabox extends AAM_Backend_Feature_Abstract {
17
 
18
- /**
19
- * @inheritdoc
20
- */
21
- public static function getAccessOption() {
22
- return 'feature.metabox.capability';
23
- }
24
-
25
  /**
26
  * @inheritdoc
27
  */
28
  public static function getTemplate() {
29
- return 'object/metabox.phtml';
30
  }
31
 
32
  /**
@@ -53,9 +46,9 @@ class AAM_Backend_Feature_Metabox extends AAM_Backend_Feature_Abstract {
53
  admin_url('post-new.php?post_type=' . $type)
54
  );
55
  }
56
-
57
  //grab metaboxes
58
- AAM_Core_API::cURL($url);
59
  }
60
 
61
  return json_encode(array('status' => 'success'));
@@ -68,12 +61,30 @@ class AAM_Backend_Feature_Metabox extends AAM_Backend_Feature_Abstract {
68
  */
69
  public function initURL() {
70
  //grab metaboxes
71
- AAM_Core_API::cURL(
72
- add_query_arg('init', 'metabox', AAM_Core_Request::post('url'))
73
- );
74
 
75
  return json_encode(array('status' => 'success'));
76
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  /**
79
  * Initialize metabox list
@@ -177,10 +188,10 @@ class AAM_Backend_Feature_Metabox extends AAM_Backend_Feature_Abstract {
177
  global $wp_post_types;
178
 
179
  $cache = AAM_Core_API::getOption('aam_metabox_cache', array());
180
- $subject = AAM_Backend_View::getSubject();
181
 
182
  //if visitor, return only frontend widgets
183
- if ($subject instanceof AAM_Core_Subject_Visitor) {
184
  if (!empty($cache['widgets'])) {
185
  $response = array('widgets' => $cache['widgets']);
186
  } else {
@@ -206,7 +217,7 @@ class AAM_Backend_Feature_Metabox extends AAM_Backend_Feature_Abstract {
206
  * @return type
207
  */
208
  protected function isOverwritten() {
209
- $object = AAM_Backend_View::getSubject()->getObject('metabox');
210
 
211
  return $object->isOverwritten();
212
  }
@@ -219,24 +230,17 @@ class AAM_Backend_Feature_Metabox extends AAM_Backend_Feature_Abstract {
219
  * @access public
220
  */
221
  public static function register() {
222
- if (AAM_Core_API::capabilityExists('aam_manage_metaboxes')) {
223
- $cap = 'aam_manage_metaboxes';
224
- } else {
225
- $cap = AAM_Core_Config::get(
226
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
227
- );
228
- }
229
-
230
  AAM_Backend_Feature::registerFeature((object) array(
231
  'uid' => 'metabox',
232
  'position' => 10,
233
  'title' => __('Metaboxes & Widgets', AAM_KEY),
234
- 'capability' => $cap,
 
235
  'subjects' => array(
236
- 'AAM_Core_Subject_Role',
237
- 'AAM_Core_Subject_User',
238
- 'AAM_Core_Subject_Visitor',
239
- 'AAM_Core_Subject_Default'
240
  ),
241
  'option' => 'backend-access-control',
242
  'view' => __CLASS__
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_Metabox extends AAM_Backend_Feature_Abstract {
17
 
 
 
 
 
 
 
 
18
  /**
19
  * @inheritdoc
20
  */
21
  public static function getTemplate() {
22
+ return 'main/metabox.phtml';
23
  }
24
 
25
  /**
46
  admin_url('post-new.php?post_type=' . $type)
47
  );
48
  }
49
+
50
  //grab metaboxes
51
+ AAM_Core_API::cURL($this->addHttpPasswd($url));
52
  }
53
 
54
  return json_encode(array('status' => 'success'));
61
  */
62
  public function initURL() {
63
  //grab metaboxes
64
+ $url = $this->addHttpPasswd(AAM_Core_Request::post('url'));
65
+ AAM_Core_API::cURL(add_query_arg('init', 'metabox', $url));
 
66
 
67
  return json_encode(array('status' => 'success'));
68
  }
69
+
70
+ /**
71
+ *
72
+ * @param type $url
73
+ * @return type
74
+ */
75
+ protected function addHttpPasswd($url) {
76
+ $htpasswd = AAM_Core_Config::get('htpasswd');
77
+
78
+ if (!empty($htpasswd['user']) && !empty($htpasswd['pass'])) {
79
+ $url = preg_replace(
80
+ '/^(http[s]?:\/\/)/',
81
+ "$1{$htpasswd['user']}:{$htpasswd['pass']}@",
82
+ $url
83
+ );
84
+ }
85
+
86
+ return $url;
87
+ }
88
 
89
  /**
90
  * Initialize metabox list
188
  global $wp_post_types;
189
 
190
  $cache = AAM_Core_API::getOption('aam_metabox_cache', array());
191
+ $subject = AAM_Backend_Subject::getInstance();
192
 
193
  //if visitor, return only frontend widgets
194
+ if ($subject->getUID() == AAM_Core_Subject_Visitor::UID) {
195
  if (!empty($cache['widgets'])) {
196
  $response = array('widgets' => $cache['widgets']);
197
  } else {
217
  * @return type
218
  */
219
  protected function isOverwritten() {
220
+ $object = AAM_Backend_Subject::getInstance()->getObject('metabox');
221
 
222
  return $object->isOverwritten();
223
  }
230
  * @access public
231
  */
232
  public static function register() {
 
 
 
 
 
 
 
 
233
  AAM_Backend_Feature::registerFeature((object) array(
234
  'uid' => 'metabox',
235
  'position' => 10,
236
  'title' => __('Metaboxes & Widgets', AAM_KEY),
237
+ 'capability' => 'aam_manage_metaboxes',
238
+ 'type' => 'main',
239
  'subjects' => array(
240
+ AAM_Core_Subject_Role::UID,
241
+ AAM_Core_Subject_User::UID,
242
+ AAM_Core_Subject_Visitor::UID,
243
+ AAM_Core_Subject_Default::UID
244
  ),
245
  'option' => 'backend-access-control',
246
  'view' => __CLASS__
Application/Backend/Feature/{Post.php → Main/Post.php} RENAMED
@@ -13,7 +13,7 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  * Get list for the table
@@ -111,12 +111,17 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
111
 
112
  foreach($list->records as $record) {
113
  if (isset($record->ID)) { //this is post
 
114
  $response['data'][] = array(
115
  $record->ID,
116
- get_edit_post_link($record->ID, 'link'),
117
  'post',
118
- (!empty($record->post_title) ? $record->post_title : 'Reference To: ' . $record->post_name),
119
- apply_filters('aam-post-row-actions-filter', 'manage,edit', $record),
 
 
 
 
120
  //get_post_permalink($record)
121
  );
122
  } else { //term
@@ -317,6 +322,30 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
317
 
318
  return json_encode($response);
319
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
 
321
  /**
322
  * Get Post or Term access
@@ -329,7 +358,7 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
329
  $type = trim(AAM_Core_Request::post('type'));
330
  $id = AAM_Core_Request::post('id');
331
  $access = $metadata = array();
332
- $object = AAM_Backend_View::getSubject()->getObject($type, $id);
333
 
334
  //prepare the response object
335
  if (is_a($object, 'AAM_Core_Object')) {
@@ -343,7 +372,49 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
343
  $metadata = array('overwritten' => $object->isOverwritten());
344
  }
345
 
346
- return json_encode(array('access' => $access, 'meta' => $metadata));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  }
348
 
349
  /**
@@ -354,7 +425,7 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
354
  * @access public
355
  */
356
  public function save() {
357
- $subject = AAM_Backend_View::getSubject();
358
 
359
  $object = trim(AAM_Core_Request::post('object'));
360
  $id = AAM_Core_Request::post('objectId', null);
@@ -372,8 +443,9 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
372
  $result = $subject->save($param, $value, $object, $id);
373
 
374
  return json_encode(array(
375
- 'status' => ($result ? 'success' : 'failure'),
376
- 'value' => $value
 
377
  ));
378
  }
379
 
@@ -388,7 +460,7 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
388
  $type = trim(AAM_Core_Request::post('type'));
389
  $id = AAM_Core_Request::post('id', 0);
390
 
391
- $object = AAM_Backend_View::getSubject()->getObject($type, $id);
392
  if ($object instanceof AAM_Core_Object) {
393
  $result = $object->reset();
394
  //clear cache
@@ -400,18 +472,11 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
400
  return json_encode(array('status' => ($result ? 'success' : 'failure')));
401
  }
402
 
403
- /**
404
- * @inheritdoc
405
- */
406
- public static function getAccessOption() {
407
- return 'feature.post.capability';
408
- }
409
-
410
  /**
411
  * @inheritdoc
412
  */
413
  public static function getTemplate() {
414
- return 'object/post.phtml';
415
  }
416
 
417
  /**
@@ -421,13 +486,31 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
421
  * @return type
422
  */
423
  public static function getAccessOptionList($area) {
424
- static $list = null;
 
 
 
 
425
 
426
- if (is_null($list)) {
427
- $list = require_once dirname(__FILE__) . '/../View/PostOptionList.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  }
429
 
430
- return apply_filters('aam-post-access-options-filter', $list[$area], $area);
431
  }
432
 
433
  /**
@@ -460,24 +543,17 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
460
  * @access public
461
  */
462
  public static function register() {
463
- if (AAM_Core_API::capabilityExists('aam_manage_posts')) {
464
- $cap = 'aam_manage_posts';
465
- } else {
466
- $cap = AAM_Core_Config::get(
467
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
468
- );
469
- }
470
-
471
  AAM_Backend_Feature::registerFeature((object) array(
472
  'uid' => 'post',
473
  'position' => 20,
474
  'title' => __('Posts & Pages', AAM_KEY),
475
- 'capability' => $cap,
 
476
  'subjects' => array(
477
- 'AAM_Core_Subject_Role',
478
- 'AAM_Core_Subject_User',
479
- 'AAM_Core_Subject_Visitor',
480
- 'AAM_Core_Subject_Default'
481
  ),
482
  'option' => 'backend-access-control,frontend-access-control',
483
  'view' => __CLASS__
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  * Get list for the table
111
 
112
  foreach($list->records as $record) {
113
  if (isset($record->ID)) { //this is post
114
+ $link = get_edit_post_link($record->ID, 'link');
115
  $response['data'][] = array(
116
  $record->ID,
117
+ $link,
118
  'post',
119
+ get_the_title($record),
120
+ apply_filters(
121
+ 'aam-post-row-actions-filter',
122
+ 'manage' . ($link ? ',edit' : ''),
123
+ $record
124
+ ),
125
  //get_post_permalink($record)
126
  );
127
  } else { //term
322
 
323
  return json_encode($response);
324
  }
325
+
326
+ /**
327
+ *
328
+ * @return type
329
+ */
330
+ public function autocomplete() {
331
+ $res = array();
332
+ $list = get_posts(array(
333
+ 'post_type' => AAM_Core_Request::post('type'),
334
+ 'category' => 0,
335
+ 's' => AAM_Core_Request::post('s'),
336
+ 'numberposts' => 10,
337
+ 'post_status' => 'any',
338
+ 'fields' => 'all'
339
+ ));
340
+
341
+ if (count($list)) {
342
+ foreach($list as $post) {
343
+ $res[] = "{$post->ID}|{$post->post_title}";
344
+ }
345
+ }
346
+
347
+ return json_encode($res);
348
+ }
349
 
350
  /**
351
  * Get Post or Term access
358
  $type = trim(AAM_Core_Request::post('type'));
359
  $id = AAM_Core_Request::post('id');
360
  $access = $metadata = array();
361
+ $object = AAM_Backend_Subject::getInstance()->getObject($type, $id);
362
 
363
  //prepare the response object
364
  if (is_a($object, 'AAM_Core_Object')) {
372
  $metadata = array('overwritten' => $object->isOverwritten());
373
  }
374
 
375
+ return json_encode(array(
376
+ 'access' => $access,
377
+ 'meta' => $metadata,
378
+ 'preview' => $this->preparePreviewValues($access)
379
+ ));
380
+ }
381
+
382
+ /**
383
+ *
384
+ * @param type $options
385
+ * @return type
386
+ */
387
+ protected function preparePreviewValues($options) {
388
+ $previews = array();
389
+
390
+ foreach($options as $option => $value) {
391
+ $previews[$option] = $this->getPreviewValue($option, $value);
392
+ }
393
+
394
+ return $previews;
395
+ }
396
+
397
+ /**
398
+ *
399
+ * @param type $option
400
+ * @param type $val
401
+ * @return type
402
+ */
403
+ protected function getPreviewValue($option, $val) {
404
+ switch($option) {
405
+ case 'frontend.teaser':
406
+ $str = strip_tags($val);
407
+ $preview = (strlen($str) > 25 ? substr($str, 0, 22) . '...' : $str);
408
+ break;
409
+
410
+ default:
411
+ $preview = apply_filters(
412
+ 'aam-post-option-preview-filter', $val, $option
413
+ );
414
+ break;
415
+ }
416
+
417
+ return $preview;
418
  }
419
 
420
  /**
425
  * @access public
426
  */
427
  public function save() {
428
+ $subject = AAM_Backend_Subject::getInstance();
429
 
430
  $object = trim(AAM_Core_Request::post('object'));
431
  $id = AAM_Core_Request::post('objectId', null);
443
  $result = $subject->save($param, $value, $object, $id);
444
 
445
  return json_encode(array(
446
+ 'status' => ($result ? 'success' : 'failure'),
447
+ 'value' => $value,
448
+ 'preview' => $this->getPreviewValue($param, $value)
449
  ));
450
  }
451
 
460
  $type = trim(AAM_Core_Request::post('type'));
461
  $id = AAM_Core_Request::post('id', 0);
462
 
463
+ $object = AAM_Backend_Subject::getInstance()->getObject($type, $id);
464
  if ($object instanceof AAM_Core_Object) {
465
  $result = $object->reset();
466
  //clear cache
472
  return json_encode(array('status' => ($result ? 'success' : 'failure')));
473
  }
474
 
 
 
 
 
 
 
 
475
  /**
476
  * @inheritdoc
477
  */
478
  public static function getTemplate() {
479
+ return 'main/post.phtml';
480
  }
481
 
482
  /**
486
  * @return type
487
  */
488
  public static function getAccessOptionList($area) {
489
+ static $cache = null;
490
+
491
+ if (is_null($cache)) {
492
+ $cache = AAM_Backend_View_PostOptionList::get();
493
+ }
494
 
495
+ $subject = AAM_Backend_Subject::getInstance()->getUID();
496
+ $list = apply_filters(
497
+ 'aam-post-access-options-filter', $cache[$area], $area
498
+ );
499
+
500
+ $filtered = array();
501
+ foreach($list as $option => $data) {
502
+ $add = empty($data['exclude']) || !in_array($subject, $data['exclude']);
503
+
504
+ if ($add) {
505
+ $add = empty($data['config']) || AAM_Core_Config::get($data['config'], true);
506
+ }
507
+
508
+ if ($add) {
509
+ $filtered[$option] = $data;
510
+ }
511
  }
512
 
513
+ return $filtered;
514
  }
515
 
516
  /**
543
  * @access public
544
  */
545
  public static function register() {
 
 
 
 
 
 
 
 
546
  AAM_Backend_Feature::registerFeature((object) array(
547
  'uid' => 'post',
548
  'position' => 20,
549
  'title' => __('Posts & Pages', AAM_KEY),
550
+ 'capability' => 'aam_manage_posts',
551
+ 'type' => 'main',
552
  'subjects' => array(
553
+ AAM_Core_Subject_Role::UID,
554
+ AAM_Core_Subject_User::UID,
555
+ AAM_Core_Subject_Visitor::UID,
556
+ AAM_Core_Subject_Default::UID
557
  ),
558
  'option' => 'backend-access-control,frontend-access-control',
559
  'view' => __CLASS__
Application/Backend/Feature/{Redirect.php → Main/Redirect.php} RENAMED
@@ -13,14 +13,16 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Redirect extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  *
20
  * @return type
21
  */
22
  public function isDefault() {
23
- return AAM_Backend_View::getSubject()->getUID() == 'default';
 
 
24
  }
25
 
26
  /**
@@ -28,7 +30,9 @@ class AAM_Backend_Feature_Redirect extends AAM_Backend_Feature_Abstract {
28
  * @return type
29
  */
30
  public function isVisitor() {
31
- return AAM_Backend_View::getSubject()->getUID() == 'visitor';
 
 
32
  }
33
 
34
  /**
@@ -41,7 +45,7 @@ class AAM_Backend_Feature_Redirect extends AAM_Backend_Feature_Abstract {
41
  * @access protected
42
  */
43
  protected function isOverwritten() {
44
- $object = AAM_Backend_View::getSubject()->getObject('redirect');
45
 
46
  return $object->isOverwritten();
47
  }
@@ -52,24 +56,17 @@ class AAM_Backend_Feature_Redirect extends AAM_Backend_Feature_Abstract {
52
  * @return type
53
  */
54
  public function getOption($option, $default = null) {
55
- $object = AAM_Backend_View::getSubject()->getObject('redirect');
56
  $value = $object->get($option);
57
 
58
  return (!is_null($value) ? $value : $default);
59
  }
60
 
61
- /**
62
- * @inheritdoc
63
- */
64
- public static function getAccessOption() {
65
- return 'feature.redirect.capability';
66
- }
67
-
68
  /**
69
  * @inheritdoc
70
  */
71
  public static function getTemplate() {
72
- return 'object/redirect.phtml';
73
  }
74
 
75
  /**
@@ -80,24 +77,17 @@ class AAM_Backend_Feature_Redirect extends AAM_Backend_Feature_Abstract {
80
  * @access public
81
  */
82
  public static function register() {
83
- if (AAM_Core_API::capabilityExists('aam_manage_access_denied_redirect')) {
84
- $cap = 'aam_manage_access_denied_redirect';
85
- } else {
86
- $cap = AAM_Core_Config::get(
87
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
88
- );
89
- }
90
-
91
  AAM_Backend_Feature::registerFeature((object) array(
92
  'uid' => 'redirect',
93
  'position' => 30,
94
  'title' => __('Access Denied Redirect', AAM_KEY),
95
- 'capability' => $cap,
 
96
  'subjects' => array(
97
- 'AAM_Core_Subject_Role',
98
- 'AAM_Core_Subject_User',
99
- 'AAM_Core_Subject_Visitor',
100
- 'AAM_Core_Subject_Default'
101
  ),
102
  'option' => 'backend-access-control,frontend-access-control',
103
  'view' => __CLASS__
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Main_Redirect extends AAM_Backend_Feature_Abstract {
17
 
18
  /**
19
  *
20
  * @return type
21
  */
22
  public function isDefault() {
23
+ $subject = AAM_Backend_Subject::getInstance();
24
+
25
+ return $subject->getUID() == AAM_Core_Subject_Default::UID;
26
  }
27
 
28
  /**
30
  * @return type
31
  */
32
  public function isVisitor() {
33
+ $subject = AAM_Backend_Subject::getInstance();
34
+
35
+ return $subject->getUID() == AAM_Core_Subject_Visitor::UID;
36
  }
37
 
38
  /**
45
  * @access protected
46
  */
47
  protected function isOverwritten() {
48
+ $object = AAM_Backend_Subject::getInstance()->getObject('redirect');
49
 
50
  return $object->isOverwritten();
51
  }
56
  * @return type
57
  */
58
  public function getOption($option, $default = null) {
59
+ $object = AAM_Backend_Subject::getInstance()->getObject('redirect');
60
  $value = $object->get($option);
61
 
62
  return (!is_null($value) ? $value : $default);
63
  }
64
 
 
 
 
 
 
 
 
65
  /**
66
  * @inheritdoc
67
  */
68
  public static function getTemplate() {
69
+ return 'main/redirect.phtml';
70
  }
71
 
72
  /**
77
  * @access public
78
  */
79
  public static function register() {
 
 
 
 
 
 
 
 
80
  AAM_Backend_Feature::registerFeature((object) array(
81
  'uid' => 'redirect',
82
  'position' => 30,
83
  'title' => __('Access Denied Redirect', AAM_KEY),
84
+ 'capability' => 'aam_manage_access_denied_redirect',
85
+ 'type' => 'main',
86
  'subjects' => array(
87
+ AAM_Core_Subject_Role::UID,
88
+ AAM_Core_Subject_User::UID,
89
+ AAM_Core_Subject_Visitor::UID,
90
+ AAM_Core_Subject_Default::UID
91
  ),
92
  'option' => 'backend-access-control,frontend-access-control',
93
  'view' => __CLASS__
Application/Backend/Feature/Security.php DELETED
@@ -1,62 +0,0 @@
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 security manager
12
- *
13
- * @package AAM
14
- * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
- */
16
- class AAM_Backend_Feature_Security extends AAM_Backend_Feature_Abstract {
17
-
18
- /**
19
- * @inheritdoc
20
- */
21
- public static function getAccessOption() {
22
- return 'feature.security.capability';
23
- }
24
-
25
- /**
26
- * @inheritdoc
27
- */
28
- public static function getTemplate() {
29
- return 'security.phtml';
30
- }
31
-
32
- /**
33
- * Register Contact/Hire feature
34
- *
35
- * @return void
36
- *
37
- * @access public
38
- */
39
- public static function register() {
40
- if (is_main_site()) {
41
- if (AAM_Core_API::capabilityExists('aam_manage_security')) {
42
- $cap = 'aam_manage_security';
43
- } else {
44
- $cap = AAM_Core_Config::get(
45
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
46
- );
47
- }
48
-
49
- AAM_Backend_Feature::registerFeature((object) array(
50
- 'uid' => 'security',
51
- 'position' => 90,
52
- 'title' => __('Security', AAM_KEY),
53
- 'capability' => $cap,
54
- 'subjects' => array(
55
- 'AAM_Core_Subject_Role'
56
- ),
57
- 'view' => __CLASS__
58
- ));
59
- }
60
- }
61
-
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/Feature/Settings/Content.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 content settings
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Feature_Settings_Content extends AAM_Backend_Feature_Abstract {
17
+
18
+ /**
19
+ * @inheritdoc
20
+ */
21
+ public static function getTemplate() {
22
+ return 'settings/content.phtml';
23
+ }
24
+
25
+ /**
26
+ *
27
+ * @return type
28
+ */
29
+ protected function getList() {
30
+ $settings = array(
31
+ 'media-access-control' => array(
32
+ 'title' => __('Media Files Access Control', AAM_KEY),
33
+ 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Allow AAM to manage a physically access to all media files located in the defined by the system [uploads] folder. [Note!] This feature requires additional steps as described in %sthis article%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-media-access" target="_blank">', '</a>'),
34
+ 'value' => AAM_Core_Config::get('media-access-control', false)
35
+ ),
36
+ 'check-post-visibility' => array(
37
+ 'title' => __('Check Post Visibility', AAM_KEY),
38
+ 'descr' => __('For performance reasons, keep this option uncheck if do not use LIST or LIST TO OTHERS access options on Posts & Pages tab. When it is checked, AAM will filter list of posts that are hidden for a user on both frontend and backend.', AAM_KEY),
39
+ 'value' => AAM_Core_Config::get('check-post-visibility', true)
40
+ ),
41
+ 'manage-hidden-post-types' => array(
42
+ 'title' => __('Manage Hidden Post Types', AAM_KEY),
43
+ 'descr' => __('By default AAM allows you to manage access only to public post types on Posts & Pages tab. By enabling this feature, you also will be able to manage access to hidden post types like revisions, navigation menus or any other custom post types that are not registered as public.', AAM_KEY),
44
+ 'value' => AAM_Core_Config::get('manage-hidden-post-types', false)
45
+ )
46
+ );
47
+
48
+ return apply_filters('aam-settings-filter', $settings, 'post');
49
+ }
50
+
51
+ /**
52
+ * Register Contact/Hire feature
53
+ *
54
+ * @return void
55
+ *
56
+ * @access public
57
+ */
58
+ public static function register() {
59
+ AAM_Backend_Feature::registerFeature((object) array(
60
+ 'uid' => 'settings-content',
61
+ 'position' => 5,
62
+ 'title' => __('Content Settings', AAM_KEY),
63
+ 'capability' => 'aam_manage_settings',
64
+ 'type' => 'settings',
65
+ 'view' => __CLASS__
66
+ ));
67
+ }
68
+
69
+ }
Application/Backend/Feature/Settings/Core.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 core settings
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract {
17
+
18
+ /**
19
+ * @inheritdoc
20
+ */
21
+ public static function getTemplate() {
22
+ return 'settings/core.phtml';
23
+ }
24
+
25
+ /**
26
+ *
27
+ * @return type
28
+ */
29
+ protected function getList() {
30
+ $settings = array(
31
+ 'manage-capability' => 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 the entire website.', 'b'),
34
+ 'value' => AAM_Core_Config::get('manage-capability', false)
35
+ ),
36
+ 'backend-access-control' => array(
37
+ 'title' => __('Backend Access Control', AAM_KEY),
38
+ 'descr' => __('Allow AAM to manage access to the backend. Keep this option disabled if there is no needs to restrict backend features for other users. This option may reduce your website backend performance.', AAM_KEY),
39
+ 'value' => AAM_Core_Config::get('backend-access-control', true)
40
+ ),
41
+ 'frontend-access-control' => array(
42
+ 'title' => __('Frontend Access Control', AAM_KEY),
43
+ 'descr' => __('Allow AAM to manage access to frontend resources. If there is no need to manage access to the website frontend then keep this option unchecked as it may increase your webiste performance.', AAM_KEY),
44
+ 'value' => AAM_Core_Config::get('frontend-access-control', true)
45
+ ),
46
+ 'render-access-metabox' => array(
47
+ 'title' => __('Render Access Manager Metabox', AAM_KEY),
48
+ 'descr' => __('Render Access Manager metabox on all post and category edit pages. Access Manager metabox is the quick way to manage access to any post or category without leaving an edit page.', AAM_KEY),
49
+ 'value' => AAM_Core_Config::get('render-access-metabox', true),
50
+ ),
51
+ 'show-access-link' => array(
52
+ 'title' => __('Render Access Link', AAM_KEY),
53
+ 'descr' => __('Render Access shortcut link under any post, page, custom post type, category, custom taxonomy title or user name.', AAM_KEY),
54
+ 'value' => AAM_Core_Config::get('show-access-link', true),
55
+ ),
56
+ 'secure-login' => array(
57
+ 'title' => __('Secure Login', AAM_KEY),
58
+ 'descr' => __('AAM comes with its own user login handler. With this feature you can add AJAX login widget to your frontend page that significantly enhance your website security.', AAM_KEY),
59
+ 'value' => AAM_Core_Config::get('secure-login', true)
60
+ )
61
+ );
62
+
63
+ return apply_filters('aam-settings-filter', $settings, 'core');
64
+ }
65
+
66
+ /**
67
+ * Register Contact/Hire feature
68
+ *
69
+ * @return void
70
+ *
71
+ * @access public
72
+ */
73
+ public static function register() {
74
+ AAM_Backend_Feature::registerFeature((object) array(
75
+ 'uid' => 'settings-core',
76
+ 'position' => 1,
77
+ 'title' => __('Core Settings', AAM_KEY),
78
+ 'capability' => 'aam_manage_settings',
79
+ 'type' => 'settings',
80
+ 'view' => __CLASS__
81
+ ));
82
+ }
83
+
84
+ }
Application/Backend/Feature/Settings/Manager.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Utility manager
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract {
17
+
18
+ /**
19
+ * Save AAM utility options
20
+ *
21
+ * @return string
22
+ *
23
+ * @access public
24
+ */
25
+ public function save() {
26
+ $param = AAM_Core_Request::post('param');
27
+ $value = stripslashes(AAM_Core_Request::post('value'));
28
+
29
+ AAM_Core_Config::set($param, $value);
30
+
31
+ return json_encode(array('status' => 'success'));
32
+ }
33
+
34
+ }
Application/Backend/Feature/Settings/Tools.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 tools settings
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Feature_Settings_Tools extends AAM_Backend_Feature_Abstract {
17
+
18
+ /**
19
+ * @inheritdoc
20
+ */
21
+ public static function getTemplate() {
22
+ return 'settings/tools.phtml';
23
+ }
24
+
25
+ /**
26
+ *
27
+ * @return type
28
+ */
29
+ public function export() {
30
+ $exporter = new AAM_Core_Exporter(AAM_Core_Config::get(
31
+ 'export', array('system' => 'roles,utilities,configpress')
32
+ ));
33
+
34
+ return json_encode(array(
35
+ 'status' => 'success',
36
+ 'content' => base64_encode(json_encode($exporter->run()))
37
+ ));
38
+ }
39
+
40
+ /**
41
+ *
42
+ * @return type
43
+ */
44
+ public function import() {
45
+ $importer = new AAM_Core_Importer(filter_input(INPUT_POST, 'json'));
46
+
47
+ return json_encode(array('status' => $importer->run()));
48
+ }
49
+
50
+ /**
51
+ * Clear all AAM settings
52
+ *
53
+ * @global wpdb $wpdb
54
+ *
55
+ * @return string
56
+ *
57
+ * @access public
58
+ */
59
+ public function clear() {
60
+ global $wpdb;
61
+
62
+ //clear wp_options
63
+ $oquery = "DELETE FROM {$wpdb->options} WHERE (`option_name` LIKE %s) AND ";
64
+ $oquery .= "(`option_name` NOT IN ('aam-extensions', 'aam-uid'))";
65
+ $wpdb->query($wpdb->prepare($oquery, 'aam%'));
66
+
67
+ //clear wp_postmeta
68
+ $pquery = "DELETE FROM {$wpdb->postmeta} WHERE `meta_key` LIKE %s";
69
+ $wpdb->query($wpdb->prepare($pquery, 'aam-post-access-%'));
70
+
71
+ //clear wp_usermeta
72
+ $uquery = "DELETE FROM {$wpdb->usermeta} WHERE `meta_key` LIKE %s";
73
+ $wpdb->query($wpdb->prepare($uquery, 'aam%'));
74
+
75
+ $mquery = "DELETE FROM {$wpdb->usermeta} WHERE `meta_key` LIKE %s";
76
+ $wpdb->query($wpdb->prepare($mquery, $wpdb->prefix . 'aam%'));
77
+
78
+ return json_encode(array('status' => 'success'));
79
+ }
80
+
81
+ /**
82
+ *
83
+ * @return type
84
+ */
85
+ public function clearCache() {
86
+ AAM_Core_Cache::clear();
87
+
88
+ return json_encode(array('status' => 'success'));
89
+ }
90
+
91
+ /**
92
+ * Register Contact/Hire feature
93
+ *
94
+ * @return void
95
+ *
96
+ * @access public
97
+ */
98
+ public static function register() {
99
+ AAM_Backend_Feature::registerFeature((object) array(
100
+ 'uid' => 'settings-tools',
101
+ 'position' => 10,
102
+ 'title' => __('Tools', AAM_KEY),
103
+ 'capability' => 'aam_manage_settings',
104
+ 'type' => 'settings',
105
+ 'view' => __CLASS__
106
+ ));
107
+ }
108
+
109
+ }
Application/Backend/Feature/{Role.php → Subject/Role.php} RENAMED
@@ -13,7 +13,7 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_Role {
17
 
18
  /**
19
  * Get role list
@@ -25,7 +25,7 @@ class AAM_Backend_Feature_Role {
25
  * @access public
26
  */
27
  public function getTable() {
28
- if (AAM_Backend_View::userCan('aam_list_roles')) {
29
  //retrieve list of users
30
  $count = count_users();
31
  $stats = $count['avail_roles'];
@@ -75,13 +75,13 @@ class AAM_Backend_Feature_Role {
75
  protected function prepareRowActions($count) {
76
  $actions = array('manage');
77
 
78
- if (AAM_Backend_View::userCan('aam_edit_roles')) {
79
  $actions[] = 'edit';
80
  }
81
- if (AAM_Backend_View::userCan('aam_create_roles')) {
82
  $actions[] = 'clone';
83
  }
84
- if (AAM_Backend_View::userCan('aam_delete_roles') && !$count) {
85
  $actions[] = 'delete';
86
  }
87
 
@@ -134,7 +134,7 @@ class AAM_Backend_Feature_Role {
134
  public function add() {
135
  $response = array('status' => 'failure');
136
 
137
- if (AAM_Backend_View::userCan('aam_create_roles')) {
138
  $name = sanitize_text_field(filter_input(INPUT_POST, 'name'));
139
  $expire = filter_input(INPUT_POST, 'expire');
140
  $roles = AAM_Core_API::getRoles();
@@ -213,8 +213,8 @@ class AAM_Backend_Feature_Role {
213
  * @access public
214
  */
215
  public function edit() {
216
- if (AAM_Backend_View::userCan('aam_edit_roles')) {
217
- $role = AAM_Backend_View::getSubject();
218
  $role->update(trim(filter_input(INPUT_POST, 'name')));
219
 
220
  $expire = filter_input(INPUT_POST, 'expire');
@@ -227,7 +227,7 @@ class AAM_Backend_Feature_Role {
227
  AAM_Core_API::deleteOption('aam-role-' . $role->getId() .'-expiration');
228
  }
229
 
230
- do_action('aam-post-update-role-action', $role);
231
 
232
  $response = array('status' => 'success');
233
  } else {
@@ -247,8 +247,8 @@ class AAM_Backend_Feature_Role {
247
  public function delete() {
248
  $status = 'failure';
249
 
250
- if (AAM_Backend_View::userCan('aam_delete_roles')) {
251
- if (AAM_Backend_View::getSubject()->delete()) {
252
  $status = 'success';
253
  }
254
  }
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Subject_Role {
17
 
18
  /**
19
  * Get role list
25
  * @access public
26
  */
27
  public function getTable() {
28
+ if (current_user_can('aam_list_roles')) {
29
  //retrieve list of users
30
  $count = count_users();
31
  $stats = $count['avail_roles'];
75
  protected function prepareRowActions($count) {
76
  $actions = array('manage');
77
 
78
+ if (current_user_can('aam_edit_roles')) {
79
  $actions[] = 'edit';
80
  }
81
+ if (current_user_can('aam_create_roles')) {
82
  $actions[] = 'clone';
83
  }
84
+ if (current_user_can('aam_delete_roles') && !$count) {
85
  $actions[] = 'delete';
86
  }
87
 
134
  public function add() {
135
  $response = array('status' => 'failure');
136
 
137
+ if (current_user_can('aam_create_roles')) {
138
  $name = sanitize_text_field(filter_input(INPUT_POST, 'name'));
139
  $expire = filter_input(INPUT_POST, 'expire');
140
  $roles = AAM_Core_API::getRoles();
213
  * @access public
214
  */
215
  public function edit() {
216
+ if (current_user_can('aam_edit_roles')) {
217
+ $role = AAM_Backend_Subject::getInstance();
218
  $role->update(trim(filter_input(INPUT_POST, 'name')));
219
 
220
  $expire = filter_input(INPUT_POST, 'expire');
227
  AAM_Core_API::deleteOption('aam-role-' . $role->getId() .'-expiration');
228
  }
229
 
230
+ do_action('aam-post-update-role-action', $role->get());
231
 
232
  $response = array('status' => 'success');
233
  } else {
247
  public function delete() {
248
  $status = 'failure';
249
 
250
+ if (current_user_can('aam_delete_roles')) {
251
+ if (AAM_Backend_Subject::getInstance()->delete()) {
252
  $status = 'success';
253
  }
254
  }
Application/Backend/Feature/{User.php → Subject/User.php} RENAMED
@@ -13,7 +13,7 @@
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
- class AAM_Backend_Feature_User {
17
 
18
  /**
19
  * Retrieve list of users
@@ -25,7 +25,7 @@ class AAM_Backend_Feature_User {
25
  * @access public
26
  */
27
  public function getTable() {
28
- if (AAM_Backend_View::userCan('list_users')) {
29
  //get total number of users
30
  $total = count_users();
31
  $result = $this->query();
@@ -100,13 +100,17 @@ class AAM_Backend_Feature_User {
100
  if ($allowed || ($user->ID == get_current_user_id())) {
101
  $actions = array('manage');
102
 
103
- if (AAM_Backend_View::userCan('aam_toggle_users')) {
104
- $actions[] = ($user->user_status ? 'unlock' : 'lock');
 
 
105
  }
106
- if (AAM_Backend_View::userCan('edit_users')) {
 
107
  $actions[] = 'edit';
108
  }
109
- if (AAM_Backend_View::userCan('aam_switch_users')) {
 
110
  $actions[] = 'switch';
111
  }
112
  } else {
@@ -154,8 +158,8 @@ class AAM_Backend_Feature_User {
154
  public function block() {
155
  $result = false;
156
 
157
- if (AAM_Backend_View::userCan('aam_toggle_users')) {
158
- $subject = AAM_Backend_View::getSubject();
159
 
160
  //user is not allowed to lock himself
161
  if ($subject->getId() != get_current_user_id()) {
13
  * @package AAM
14
  * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
  */
16
+ class AAM_Backend_Feature_Subject_User {
17
 
18
  /**
19
  * Retrieve list of users
25
  * @access public
26
  */
27
  public function getTable() {
28
+ if (current_user_can('list_users')) {
29
  //get total number of users
30
  $total = count_users();
31
  $result = $this->query();
100
  if ($allowed || ($user->ID == get_current_user_id())) {
101
  $actions = array('manage');
102
 
103
+ if (AAM_Core_Config::get('secure-login', true)) {
104
+ if (current_user_can('aam_toggle_users')) {
105
+ $actions[] = ($user->user_status ? 'unlock' : 'lock');
106
+ }
107
  }
108
+
109
+ if (current_user_can('edit_users')) {
110
  $actions[] = 'edit';
111
  }
112
+
113
+ if (current_user_can('aam_switch_users')) {
114
  $actions[] = 'switch';
115
  }
116
  } else {
158
  public function block() {
159
  $result = false;
160
 
161
+ if (current_user_can('aam_toggle_users')) {
162
+ $subject = AAM_Backend_Subject::getInstance();
163
 
164
  //user is not allowed to lock himself
165
  if ($subject->getId() != get_current_user_id()) {
Application/Backend/Feature/Teaser.php DELETED
@@ -1,98 +0,0 @@
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
- * Content teaser manager
12
- *
13
- * @package AAM
14
- * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
- */
16
- class AAM_Backend_Feature_Teaser extends AAM_Backend_Feature_Abstract {
17
-
18
- /**
19
- *
20
- * @return type
21
- */
22
- public function isDefault() {
23
- return (AAM_Backend_View::getSubject()->getUID() == 'default');
24
- }
25
-
26
- /**
27
- * Check inheritance status
28
- *
29
- * Check if teaser settings are overwritten
30
- *
31
- * @return boolean
32
- *
33
- * @access protected
34
- */
35
- protected function isOverwritten() {
36
- $object = AAM_Backend_View::getSubject()->getObject('teaser');
37
-
38
- return $object->isOverwritten();
39
- }
40
-
41
- /**
42
- *
43
- * @param type $option
44
- * @return type
45
- */
46
- public function getOption($option, $default = null) {
47
- $object = AAM_Backend_View::getSubject()->getObject('teaser');
48
- $value = $object->get($option);
49
-
50
- return (!is_null($value) ? $value : $default);
51
- }
52
-
53
- /**
54
- * @inheritdoc
55
- */
56
- public static function getAccessOption() {
57
- return 'feature.teaser.capability';
58
- }
59
-
60
- /**
61
- * @inheritdoc
62
- */
63
- public static function getTemplate() {
64
- return 'object/teaser.phtml';
65
- }
66
-
67
- /**
68
- * Register Contact/Hire feature
69
- *
70
- * @return void
71
- *
72
- * @access public
73
- */
74
- public static function register() {
75
- if (AAM_Core_API::capabilityExists('aam_manage_content_teaser')) {
76
- $cap = 'aam_manage_content_teaser';
77
- } else {
78
- $cap = AAM_Core_Config::get(
79
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
80
- );
81
- }
82
-
83
- AAM_Backend_Feature::registerFeature((object) array(
84
- 'uid' => 'teaser',
85
- 'position' => 45,
86
- 'title' => __('Content Teaser', AAM_KEY),
87
- 'capability' => $cap,
88
- 'subjects' => array(
89
- 'AAM_Core_Subject_Role',
90
- 'AAM_Core_Subject_User',
91
- 'AAM_Core_Subject_Visitor',
92
- 'AAM_Core_Subject_Default'
93
- ),
94
- 'view' => __CLASS__
95
- ));
96
- }
97
-
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/Feature/Utility.php DELETED
@@ -1,178 +0,0 @@
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 Utility manager
12
- *
13
- * @package AAM
14
- * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
- */
16
- class AAM_Backend_Feature_Utility extends AAM_Backend_Feature_Abstract {
17
-
18
- /**
19
- * @inheritdoc
20
- */
21
- public static function getAccessOption() {
22
- return 'feature.utility.capability';
23
- }
24
-
25
- /**
26
- * @inheritdoc
27
- */
28
- public static function getTemplate() {
29
- return 'utility.phtml';
30
- }
31
-
32
- /**
33
- *
34
- * @return type
35
- */
36
- public function getUtilityOptionList($category = 'miscellaneous') {
37
- static $options = null;
38
-
39
- if (is_null($options)) {
40
- $filename = dirname(__FILE__) . '/../View/UtilityOptionList.php';
41
- $options = apply_filters(
42
- 'aam-utility-option-list-filter', include $filename
43
- );
44
- }
45
-
46
- $filtered = array();
47
-
48
- foreach($options as $id => $option) {
49
- if (isset($option['category'])) {
50
- $cat = $option['category'];
51
- } else {
52
- $cat = 'miscellaneous';
53
- }
54
-
55
- if ($cat == $category) {
56
- $filtered[$id] = $option;
57
- }
58
- }
59
-
60
- return $filtered;
61
- }
62
-
63
- /**
64
- * Save AAM utility options
65
- *
66
- * @return string
67
- *
68
- * @access public
69
- */
70
- public function save() {
71
- $param = AAM_Core_Request::post('param');
72
- $value = stripslashes(AAM_Core_Request::post('value'));
73
-
74
- AAM_Core_Config::set($param, $value);
75
-
76
- return json_encode(array('status' => 'success'));
77
- }
78
-
79
- /**
80
- *
81
- * @return type
82
- */
83
- public function export() {
84
- $exporter = new AAM_Core_Exporter(AAM_Core_Config::get(
85
- 'export', array('system' => 'roles,utilities,configpress')
86
- ));
87
-
88
- return json_encode(array(
89
- 'status' => 'success',
90
- 'content' => base64_encode(json_encode($exporter->run()))
91
- ));
92
- }
93
-
94
- /**
95
- *
96
- * @return type
97
- */
98
- public function import() {
99
- $importer = new AAM_Core_Importer(filter_input(INPUT_POST, 'json'));
100
-
101
- return json_encode(array('status' => $importer->run()));
102
- }
103
-
104
- /**
105
- * Clear all AAM settings
106
- *
107
- * @global wpdb $wpdb
108
- *
109
- * @return string
110
- *
111
- * @access public
112
- */
113
- public function clear() {
114
- global $wpdb;
115
-
116
- //clear wp_options
117
- $oquery = "DELETE FROM {$wpdb->options} WHERE (`option_name` LIKE %s) AND ";
118
- $oquery .= "(`option_name` NOT IN ('aam-extensions', 'aam-uid'))";
119
- $wpdb->query($wpdb->prepare($oquery, 'aam%' ));
120
-
121
- //clear wp_postmeta
122
- $pquery = "DELETE FROM {$wpdb->postmeta} WHERE `meta_key` LIKE %s";
123
- $wpdb->query($wpdb->prepare($pquery, 'aam%' ));
124
-
125
- //clear wp_usermeta
126
- $uquery = "DELETE FROM {$wpdb->usermeta} WHERE `meta_key` LIKE %s";
127
- $wpdb->query($wpdb->prepare($uquery, 'aam%' ));
128
-
129
- $mquery = "DELETE FROM {$wpdb->usermeta} WHERE `meta_key` LIKE %s";
130
- $wpdb->query($wpdb->prepare($mquery, $wpdb->prefix . 'aam%' ));
131
-
132
- return json_encode(array('status' => 'success'));
133
- }
134
-
135
- /**
136
- *
137
- * @return type
138
- */
139
- public function clearCache() {
140
- AAM_Core_Cache::clear();
141
-
142
- return json_encode(array('status' => 'success'));
143
- }
144
-
145
- /**
146
- * Register Contact/Hire feature
147
- *
148
- * @return void
149
- *
150
- * @access public
151
- */
152
- public static function register() {
153
- if (is_main_site()) {
154
- if (AAM_Core_API::capabilityExists('aam_manage_utilities')) {
155
- $cap = 'aam_manage_utilities';
156
- } else {
157
- $cap = AAM_Core_Config::get(
158
- self::getAccessOption(), AAM_Backend_View::getAAMCapability()
159
- );
160
- }
161
-
162
- AAM_Backend_Feature::registerFeature((object) array(
163
- 'uid' => 'utilities',
164
- 'position' => 100,
165
- 'title' => __('Utilities', AAM_KEY),
166
- 'capability' => $cap,
167
- 'subjects' => array(
168
- 'AAM_Core_Subject_Role',
169
- 'AAM_Core_Subject_User',
170
- 'AAM_Core_Subject_Visitor',
171
- 'AAM_Core_Subject_Default'
172
- ),
173
- 'view' => __CLASS__
174
- ));
175
- }
176
- }
177
-
178
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/Filter.php CHANGED
@@ -44,22 +44,23 @@ class AAM_Backend_Filter {
44
  add_action("in_admin_header", array($this, 'metaboxes'), 999);
45
 
46
  //control admin area
47
- add_action('admin_init', array($this, 'adminInit'));
48
  add_action('admin_notices', array($this, 'adminNotices'), -1);
49
  add_action('network_admin_notices', array($this, 'adminNotices'), -1);
50
  add_action('user_admin_notices', array($this, 'adminNotices'), -1);
51
 
 
 
 
52
  //post restrictions
53
  add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
54
  add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
55
- add_action('admin_action_edit', array($this, 'adminActionEdit'));
56
 
57
  //default category filder
58
- add_filter('pre_option_default_category', array($this, 'defaultCategory'));
59
 
60
  //add post filter for LIST restriction
61
  if (!AAM::isAAM() && AAM_Core_Config::get('check-post-visibility', true)) {
62
- add_filter('found_posts', array($this, 'foundPosts'), 999, 2);
63
  add_filter('posts_fields_request', array($this, 'fieldsRequest'), 999, 2);
64
  add_action('pre_get_posts', array($this, 'preparePostQuery'), 999);
65
  }
@@ -69,126 +70,12 @@ class AAM_Backend_Filter {
69
  //user profile update action
70
  add_action('profile_update', array($this, 'profileUpdate'), 10, 2);
71
 
72
- //some additional filter for user capabilities
73
- add_filter('user_has_cap', array($this, 'checkUserCap'), 999, 4);
 
 
74
 
75
- //screen options & contextual help hooks
76
- add_filter('screen_options_show_screen', array($this, 'screenOptions'));
77
- add_filter('contextual_help', array($this, 'helpOptions'), 10, 3);
78
- }
79
-
80
- /**
81
- *
82
- * @global type $wp_filter
83
- */
84
- public function adminNotices() {
85
- if (AAM_Core_API::capabilityExists('show_admin_notices')) {
86
- if (!AAM::getUser()->hasCapability('show_admin_notices')) {
87
- remove_all_actions('admin_notices');
88
- remove_all_actions('network_admin_notices');
89
- remove_all_actions('user_admin_notices');
90
- }
91
- }
92
- }
93
-
94
- /**
95
- *
96
- * @param type $id
97
- * @param type $old
98
- */
99
- public function profileUpdate($id, $old) {
100
- $user = get_user_by('ID', $id);
101
-
102
- //role changed?
103
- if (implode('', $user->roles) != implode('', $old->roles)) {
104
- AAM_Core_Cache::clear($id);
105
-
106
- //check if role has expiration data set
107
- $role = (is_array($user->roles) ? $user->roles[0] : '');
108
- $expire = AAM_Core_API::getOption("aam-role-{$role}-expiration", '');
109
-
110
- if ($expire) {
111
- update_user_option($id, "aam-original-roles", $old->roles);
112
- update_user_option($id, "aam-role-expires", strtotime($expire));
113
- }
114
- }
115
- }
116
-
117
- /**
118
- *
119
- * @param type $id
120
- * @param type $data
121
- */
122
- public function prePostUpdate($id, $data) {
123
- $post = get_post($id);
124
-
125
- if ($post->post_author != $data['post_author']) {
126
- AAM_Core_Cache::clear($id);
127
- }
128
- }
129
-
130
- /**
131
- *
132
- * @staticvar type $default
133
- * @param type $category
134
- * @return type
135
- */
136
- public function defaultCategory($category) {
137
- static $default = null;
138
-
139
- if (is_null($default)) {
140
- //check if user category is defined
141
- $id = get_current_user_id();
142
- $default = AAM_Core_Config::get('default.category.user.' . $id , null);
143
- $roles = AAM::getUser()->roles;
144
-
145
- if (is_null($default) && count($roles)) {
146
- $default = AAM_Core_Config::get(
147
- 'default.category.role.' . array_shift($roles), false
148
- );
149
- }
150
- }
151
-
152
- return ($default ? $default : $category);
153
- }
154
-
155
- /**
156
- * Control Admin Area access
157
- *
158
- * @return void
159
- *
160
- * @access public
161
- * @since 3.3
162
- */
163
- public function adminInit() {
164
- global $plugin_page;
165
-
166
- //compile menu
167
- if (empty($plugin_page)){
168
- $menu = basename(AAM_Core_Request::server('SCRIPT_NAME'));
169
- $taxonomy = AAM_Core_Request::get('taxonomy');
170
- $postType = AAM_Core_Request::get('post_type');
171
- $page = AAM_Core_Request::get('page');
172
-
173
- if (!empty($taxonomy)) {
174
- $menu .= '?taxonomy=' . $taxonomy;
175
- } elseif (!empty($postType)) {
176
- $menu .= '?post_type=' . $postType;
177
- } elseif (!empty($page)) {
178
- $menu .= '?page=' . $page;
179
- }
180
- } else {
181
- $menu = $plugin_page;
182
- }
183
-
184
- $object = AAM::getUser()->getObject('menu');
185
-
186
- if ($object->has($menu)) {
187
- AAM_Core_API::reject(
188
- 'backend',
189
- array('hook' => 'access_backend_menu', 'id' => $menu)
190
- );
191
- }
192
  }
193
 
194
  /**
@@ -206,7 +93,7 @@ class AAM_Backend_Filter {
206
 
207
  return $parent_file;
208
  }
209
-
210
  /**
211
  * Handle metabox initialization process
212
  *
@@ -231,6 +118,77 @@ class AAM_Backend_Filter {
231
  }
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  /**
235
  * Post Quick Menu Actions Filtering
236
  *
@@ -244,11 +202,8 @@ class AAM_Backend_Filter {
244
  public function postRowActions($actions, $post) {
245
  $object = AAM::getUser()->getObject('post', $post->ID, $post);
246
 
247
- $edit = $object->has('backend.edit');
248
- $others = $object->has('backend.edit_others');
249
-
250
  //filter edit menu
251
- if ($edit || ($others && !$this->isAuthor($post))) {
252
  if (isset($actions['edit'])) {
253
  unset($actions['edit']);
254
  }
@@ -257,24 +212,14 @@ class AAM_Backend_Filter {
257
  }
258
  }
259
 
260
- $delete = $object->has('backend.delete');
261
- $others = $object->has('backend.delete_others');
262
-
263
  //filter delete menu
264
- if ($delete || ($others && !$this->isAuthor($post))) {
265
- if (isset($actions['trash'])) {
266
- unset($actions['trash']);
267
- }
268
- if (isset($actions['delete'])) {
269
- unset($actions['delete']);
270
- }
271
  }
272
 
273
- $publish = $object->has('backend.publish');
274
- $others = $object->has('backend.publish_others');
275
-
276
  //filter edit menu
277
- if ($publish || ($others && !$this->isAuthor($post))) {
278
  if (isset($actions['inline hide-if-no-js'])) {
279
  unset($actions['inline hide-if-no-js']);
280
  }
@@ -282,94 +227,58 @@ class AAM_Backend_Filter {
282
 
283
  return $actions;
284
  }
285
-
286
  /**
287
- * Control Edit Post
288
- *
289
- * Make sure that current user does not have access to edit Post
290
- *
291
- * @return void
292
- *
293
- * @access public
 
 
 
294
  */
295
- public function adminActionEdit() {
296
- $post = $this->getPost();
 
 
297
 
298
- if (is_a($post, 'WP_Post')) {
299
- $object = AAM::getUser()->getObject('post', $post->ID, $post);
300
- $edit = $object->has('backend.edit');
301
- $others = $object->has('backend.edit_others');
302
-
303
- if ($edit || ($others && !$this->isAuthor($post))) {
304
- AAM_Core_API::reject(
305
- 'backend',
306
- array(
307
- 'hook' => 'post_edit',
308
- 'action' => 'backend.edit',
309
- 'post' => $post
310
- )
311
- );
312
- }
313
- }
314
- }
315
-
316
- /**
317
- * Get Post ID
318
- *
319
- * Replication of the same mechanism that is in wp-admin/post.php
320
- *
321
- * @return WP_Post|null
322
- *
323
- * @access public
324
- */
325
- public function getPost() {
326
- $post = null;
327
-
328
- if (get_post()) {
329
- $post = get_post();
330
- } elseif ($post_id = AAM_Core_Request::get('post')) {
331
- $post = get_post($post_id);
332
- } elseif ($post_id = AAM_Core_Request::get('post_ID')) {
333
- $post = get_post($post_id);
334
- }
335
-
336
- return $post;
337
  }
338
 
339
  /**
 
340
  *
341
- * @global type $wpdb
342
- * @param type $fields
343
- * @param type $query
344
- * @return type
 
 
345
  */
346
- public function fieldsRequest($fields, $query) {
347
- global $wpdb;
348
-
349
- $qfields = (isset($query->query['fields']) ? $query->query['fields'] : '');
350
 
351
- if ($qfields == 'id=>parent') {
352
- $author = "{$wpdb->posts}.post_author";
353
- if (strpos($fields, $author) === false) {
354
- $fields .= ", $author";
355
- }
356
 
357
- $status = "{$wpdb->posts}.post_status";
358
- if (strpos($fields, $status) === false) {
359
- $fields .= ", $status";
 
360
  }
361
-
362
- $type = "{$wpdb->posts}.post_type";
363
- if (strpos($fields, $type) === false) {
364
- $fields .= ", $type";
365
- }
366
  }
367
 
368
- return $fields;
369
  }
370
-
371
  /**
372
- * Filter posts from the list
373
  *
374
  * @param int $counter
375
  * @param WP_Query $query
@@ -378,7 +287,7 @@ class AAM_Backend_Filter {
378
  *
379
  * @access public
380
  */
381
- public function foundPosts($counter, $query) {
382
  $filtered = array();
383
 
384
  foreach ($query->posts as $post) {
@@ -403,6 +312,42 @@ class AAM_Backend_Filter {
403
  return $counter;
404
  }
405
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  /**
407
  * Prepare pre post query
408
  *
@@ -428,152 +373,127 @@ class AAM_Backend_Filter {
428
  }
429
  }
430
  }
431
-
432
  /**
433
- * Check user capability
434
  *
435
- * This is a hack function that add additional layout on top of WordPress
436
- * core functionality. Based on the capability passed in the $args array as
437
- * "0" element, it performs additional check on user's capability to manage
438
- * post.
439
  *
440
- * @param array $allCaps
441
- * @param array $metaCaps
442
- * @param array $args
443
  *
444
- * @return array
445
  *
446
  * @access public
447
  */
448
- public function checkUserCap($allCaps, $metaCaps, $args) {
449
- global $post;
450
 
451
- //make sure that $args[2] is actually post ID
452
- if (isset($args[2]) && is_scalar($args[2])) {
453
- switch($args[0]) {
454
- case 'edit_post':
455
- $object = AAM::getUser()->getObject('post', $args[2]);
456
- if ($object->getPost()->post_status != 'auto-draft') {
457
- $edit = $object->has('backend.edit');
458
- $others = $object->has('backend.edit_others');
459
- if ($edit || ($others && !$this->isAuthor($object->getPost()))) {
460
- $allCaps = $this->restrictPostActions($allCaps, $metaCaps);
461
- }
462
- }
463
- break;
464
-
465
- case 'delete_post' :
466
- $object = AAM::getUser()->getObject('post', $args[2]);
467
- $delete = $object->has('backend.delete');
468
- $others = $object->has('backend.delete_others');
469
- if ($delete || ($others && !$this->isAuthor($object->getPost()))) {
470
- $allCaps = $this->restrictPostActions($allCaps, $metaCaps);
471
- }
472
- break;
473
-
474
- default:
475
- $allCaps = apply_filters(
476
- 'aam-check-user-cap-filter',
477
- $allCaps,
478
- $metaCaps,
479
- $args,
480
- $this
481
- );
482
- break;
483
- }
484
- } elseif (is_a($post, 'WP_Post')) {
485
- switch ($args[0]) {
486
- case 'publish_posts':
487
- case 'publish_pages':
488
- $object = AAM::getUser()->getObject('post', $post->ID);
489
- $publish = $object->has('backend.publish');
490
- $others = $object->has('backend.publish_others');
491
- if ($publish || ($others && !$this->isAuthor($post))) {
492
- $allCaps = $this->restrictPostActions($allCaps, $metaCaps);
493
- }
494
- break;
495
-
496
- default:
497
- $allCaps = apply_filters(
498
- 'aam-check-user-cap-filter',
499
- $allCaps,
500
- $metaCaps,
501
- $args,
502
- $this
503
- );
504
- break;
505
- }
506
  }
507
-
508
- return $allCaps;
509
  }
510
 
511
  /**
 
 
 
 
 
 
 
 
512
  *
513
- * @param type $flag
514
- * @return type
515
  */
516
- public function screenOptions($flag) {
517
- if (AAM_Core_API::capabilityExists('show_screen_options')) {
518
- $flag = AAM::getUser()->hasCapability('show_screen_options');
519
- }
520
 
521
- return $flag;
 
 
 
 
 
 
 
 
 
 
 
 
522
  }
523
 
524
  /**
 
 
 
525
  *
526
- * @param array $help
527
- * @param type $id
528
- * @param type $screen
529
  * @return array
530
  */
531
- public function helpOptions($help, $id, $screen) {
532
- if (AAM_Core_API::capabilityExists('show_help_tabs')) {
533
- if (!AAM::getUser()->hasCapability('show_help_tabs')) {
534
- $screen->remove_help_tabs();
535
- $help = array();
 
 
 
536
  }
537
  }
538
 
539
- return $help;
540
  }
541
 
542
  /**
543
- * Restrict user capabilities
544
  *
545
- * Iterate through the list of meta capabilities and disable them in the
546
- * list of all user capabilities. Keep in mind that this disable caps only
547
- * for one time call.
548
  *
549
- * @param array $allCaps
550
- * @param array $metaCaps
551
  *
552
- * @return array
553
  *
554
- * @access protected
555
  */
556
- protected function restrictPostActions($allCaps, $metaCaps) {
557
- foreach($metaCaps as $cap) {
558
- $allCaps[$cap] = false;
 
 
 
 
 
 
 
559
  }
560
 
561
- return $allCaps;
562
  }
563
 
564
  /**
565
- * Check if user is post author
566
  *
567
- * @param WP_Post $post
568
  *
569
- * @return boolean
570
  *
571
- * @access protected
572
  */
573
- protected function isAuthor($post) {
574
- return ($post->post_author == get_current_user_id());
 
 
 
 
 
 
 
 
 
 
575
  }
576
-
577
  /**
578
  * Register backend filters and actions
579
  *
44
  add_action("in_admin_header", array($this, 'metaboxes'), 999);
45
 
46
  //control admin area
 
47
  add_action('admin_notices', array($this, 'adminNotices'), -1);
48
  add_action('network_admin_notices', array($this, 'adminNotices'), -1);
49
  add_action('user_admin_notices', array($this, 'adminNotices'), -1);
50
 
51
+ //admin bar
52
+ add_action('wp_before_admin_bar_render', array($this, 'filterAdminBar'), 999);
53
+
54
  //post restrictions
55
  add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
56
  add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
 
57
 
58
  //default category filder
59
+ add_filter('pre_option_default_category', array($this, 'filterDefaultCategory'));
60
 
61
  //add post filter for LIST restriction
62
  if (!AAM::isAAM() && AAM_Core_Config::get('check-post-visibility', true)) {
63
+ add_filter('found_posts', array($this, 'filterPostCount'), 999, 2);
64
  add_filter('posts_fields_request', array($this, 'fieldsRequest'), 999, 2);
65
  add_action('pre_get_posts', array($this, 'preparePostQuery'), 999);
66
  }
70
  //user profile update action
71
  add_action('profile_update', array($this, 'profileUpdate'), 10, 2);
72
 
73
+ //user/role filters
74
+ add_filter('editable_roles', array($this, 'filterRoles'));
75
+ add_action('pre_get_users', array($this, 'filterUserQuery'), 999);
76
+ add_filter('views_users', array($this, 'filterViews'));
77
 
78
+ AAM_Backend_Authorization::bootstrap(); //bootstrap backend authorization
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
 
81
  /**
93
 
94
  return $parent_file;
95
  }
96
+
97
  /**
98
  * Handle metabox initialization process
99
  *
118
  }
119
  }
120
 
121
+ /**
122
+ * Manage notifications visibility
123
+ *
124
+ * @return void
125
+ *
126
+ * @access public
127
+ */
128
+ public function adminNotices() {
129
+ if (AAM_Core_API::capabilityExists('show_admin_notices')) {
130
+ if (!AAM::getUser()->hasCapability('show_admin_notices')) {
131
+ remove_all_actions('admin_notices');
132
+ remove_all_actions('network_admin_notices');
133
+ remove_all_actions('user_admin_notices');
134
+ }
135
+ }
136
+ }
137
+
138
+ /**
139
+ * Filter top admin bar
140
+ *
141
+ * The filter will be performed based on the Backend Menu access settings
142
+ *
143
+ * @return void
144
+ *
145
+ * @access public
146
+ * @global WP_Admin_Bar $wp_admin_bar
147
+ */
148
+ public function filterAdminBar() {
149
+ global $wp_admin_bar;
150
+
151
+ $menu = AAM::getUser()->getObject('menu');
152
+ foreach($wp_admin_bar->get_nodes() as $id => $node) {
153
+ if (!empty($node->href)) {
154
+ $suffix = str_replace(admin_url(), '', $node->href);
155
+ if ($menu->has($suffix, true)) {
156
+ if (empty($node->parent) && $this->hasChildren($id)) { //root level
157
+ $node->href = '#';
158
+ $wp_admin_bar->add_node($node);
159
+ } else {
160
+ $wp_admin_bar->remove_menu($id);
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+
167
+ /**
168
+ * Check if specified top bar item has children
169
+ *
170
+ * @param string $id
171
+ *
172
+ * @return boolean
173
+ *
174
+ * @access protected
175
+ * @global WP_Admin_Bar $wp_admin_bar
176
+ */
177
+ protected function hasChildren($id) {
178
+ global $wp_admin_bar;
179
+
180
+ $has = false;
181
+
182
+ foreach($wp_admin_bar->get_nodes() as $node) {
183
+ if ($node->parent == $id) {
184
+ $has = true;
185
+ break;
186
+ }
187
+ }
188
+
189
+ return $has;
190
+ }
191
+
192
  /**
193
  * Post Quick Menu Actions Filtering
194
  *
202
  public function postRowActions($actions, $post) {
203
  $object = AAM::getUser()->getObject('post', $post->ID, $post);
204
 
 
 
 
205
  //filter edit menu
206
+ if (!$this->isAllowed('backend.edit', $object)) {
207
  if (isset($actions['edit'])) {
208
  unset($actions['edit']);
209
  }
212
  }
213
  }
214
 
 
 
 
215
  //filter delete menu
216
+ if (!$this->isAllowed('backend.delete', $object)) {
217
+ if (isset($actions['trash'])) { unset($actions['trash']); }
218
+ if (isset($actions['delete'])) { unset($actions['delete']); }
 
 
 
 
219
  }
220
 
 
 
 
221
  //filter edit menu
222
+ if (!$this->isAllowed('backend.publish', $object)) {
223
  if (isset($actions['inline hide-if-no-js'])) {
224
  unset($actions['inline hide-if-no-js']);
225
  }
227
 
228
  return $actions;
229
  }
230
+
231
  /**
232
+ * Check if action is allowed
233
+ *
234
+ * This method will take in consideration also *_others action
235
+ *
236
+ * @param string $action
237
+ * @param AAM_Core_Object_Post $object
238
+ *
239
+ * @return boolean
240
+ *
241
+ * @access protected
242
  */
243
+ protected function isAllowed($action, $object) {
244
+ $edit = $object->has($action);
245
+ $others = $object->has("{$action}_others");
246
+ $author = ($object->post_author == get_current_user_id());
247
 
248
+ return ($edit || ($others && !$author)) ? false : true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  }
250
 
251
  /**
252
+ * Override default category if defined
253
  *
254
+ * @param type $category
255
+ *
256
+ * @return int
257
+ *
258
+ * @access public
259
+ * @staticvar type $default
260
  */
261
+ public function filterDefaultCategory($category) {
262
+ static $default = null;
 
 
263
 
264
+ if (is_null($default)) {
265
+ //check if user category is defined
266
+ $id = get_current_user_id();
267
+ $default = AAM_Core_Config::get('default.category.user.' . $id , null);
268
+ $roles = AAM::getUser()->roles;
269
 
270
+ if (is_null($default) && count($roles)) {
271
+ $default = AAM_Core_Config::get(
272
+ 'default.category.role.' . array_shift($roles), false
273
+ );
274
  }
 
 
 
 
 
275
  }
276
 
277
+ return ($default ? $default : $category);
278
  }
279
+
280
  /**
281
+ * Filter post count for pagination
282
  *
283
  * @param int $counter
284
  * @param WP_Query $query
287
  *
288
  * @access public
289
  */
290
+ public function filterPostCount($counter, $query) {
291
  $filtered = array();
292
 
293
  foreach ($query->posts as $post) {
312
  return $counter;
313
  }
314
 
315
+ /**
316
+ * Filter pages fields
317
+ *
318
+ * @param string $fields
319
+ * @param WP_Query $query
320
+ *
321
+ * @return string
322
+ *
323
+ * @access public
324
+ * @global WPDB $wpdb
325
+ */
326
+ public function fieldsRequest($fields, $query) {
327
+ global $wpdb;
328
+
329
+ $qfields = (isset($query->query['fields']) ? $query->query['fields'] : '');
330
+
331
+ if ($qfields == 'id=>parent') {
332
+ $author = "{$wpdb->posts}.post_author";
333
+ if (strpos($fields, $author) === false) {
334
+ $fields .= ", $author";
335
+ }
336
+
337
+ $status = "{$wpdb->posts}.post_status";
338
+ if (strpos($fields, $status) === false) {
339
+ $fields .= ", $status";
340
+ }
341
+
342
+ $type = "{$wpdb->posts}.post_type";
343
+ if (strpos($fields, $type) === false) {
344
+ $fields .= ", $type";
345
+ }
346
+ }
347
+
348
+ return $fields;
349
+ }
350
+
351
  /**
352
  * Prepare pre post query
353
  *
373
  }
374
  }
375
  }
376
+
377
  /**
378
+ * Post update hook
379
  *
380
+ * Clear cache if post owner changed
 
 
 
381
  *
382
+ * @param int $id
383
+ * @param array $data
 
384
  *
385
+ * @return void
386
  *
387
  * @access public
388
  */
389
+ public function prePostUpdate($id, $data) {
390
+ $post = get_post($id);
391
 
392
+ if ($post->post_author != $data['post_author']) {
393
+ AAM_Core_Cache::clear($id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  }
 
 
395
  }
396
 
397
  /**
398
+ * Profile updated hook
399
+ *
400
+ * Adjust expiration time and user cache if profile updated
401
+ *
402
+ * @param int $id
403
+ * @param WP_User $old
404
+ *
405
+ * @return void
406
  *
407
+ * @access public
 
408
  */
409
+ public function profileUpdate($id, $old) {
410
+ $user = get_user_by('ID', $id);
 
 
411
 
412
+ //role changed?
413
+ if (implode('', $user->roles) != implode('', $old->roles)) {
414
+ AAM_Core_Cache::clear($id);
415
+
416
+ //check if role has expiration data set
417
+ $role = (is_array($user->roles) ? $user->roles[0] : '');
418
+ $expire = AAM_Core_API::getOption("aam-role-{$role}-expiration", '');
419
+
420
+ if ($expire) {
421
+ update_user_option($id, "aam-original-roles", $old->roles);
422
+ update_user_option($id, "aam-role-expires", strtotime($expire));
423
+ }
424
+ }
425
  }
426
 
427
  /**
428
+ * Filter roles
429
+ *
430
+ * @param array $roles
431
  *
 
 
 
432
  * @return array
433
  */
434
+ public function filterRoles($roles) {
435
+ $userLevel = AAM_Core_API::maxLevel(AAM::getUser()->allcaps);
436
+
437
+ //filter roles
438
+ foreach($roles as $id => $role) {
439
+ $roleLevel = AAM_Core_API::maxLevel($role['capabilities']);
440
+ if ($userLevel < $roleLevel) {
441
+ unset($roles[$id]);
442
  }
443
  }
444
 
445
+ return $roles;
446
  }
447
 
448
  /**
449
+ * Filter user query
450
  *
451
+ * Exclude all users that have higher user level
 
 
452
  *
453
+ * @param object $query
 
454
  *
455
+ * @access public
456
  *
457
+ * @return void
458
  */
459
+ public function filterUserQuery($query) {
460
+ //current user max level
461
+ $max = AAM_Core_API::maxLevel(AAM::getUser()->allcaps);
462
+ $exclude = array();
463
+ $roles = AAM_Core_API::getRoles();
464
+
465
+ foreach($roles->role_objects as $id => $role) {
466
+ if (AAM_Core_API::maxLevel($role->capabilities) > $max) {
467
+ $exclude[] = $id;
468
+ }
469
  }
470
 
471
+ $query->query_vars['role__not_in'] = $exclude;
472
  }
473
 
474
  /**
475
+ * Filter user list view options
476
  *
477
+ * @param array $views
478
  *
479
+ * @return array
480
  *
481
+ * @access public
482
  */
483
+ public function filterViews($views) {
484
+ $max = AAM_Core_API::maxLevel(AAM::getUser()->allcaps);
485
+ $roles = AAM_Core_API::getRoles();
486
+
487
+ foreach($roles->role_objects as $id => $role) {
488
+ if (isset($views[$id])
489
+ && AAM_Core_API::maxLevel($role->capabilities) > $max) {
490
+ unset($views[$id]);
491
+ }
492
+ }
493
+
494
+ return $views;
495
  }
496
+
497
  /**
498
  * Register backend filters and actions
499
  *
Application/Backend/Manager.php CHANGED
@@ -41,13 +41,23 @@ class AAM_Backend_Manager {
41
  //print required JS & CSS
42
  add_action('admin_print_scripts', array($this, 'printJavascript'));
43
  add_action('admin_print_styles', array($this, 'printStylesheet'));
 
 
 
 
 
 
 
 
 
 
44
 
45
  //manager Admin Menu
46
  if (is_multisite() && is_network_admin()) {
47
  //register AAM in the network admin panel
48
- add_action('network_admin_menu', array($this, 'adminMenu'), 999);
49
  } else {
50
- add_action('admin_menu', array($this, 'adminMenu'), 999);
51
  add_action('all_admin_notices', array($this, 'notification'));
52
  }
53
 
@@ -89,16 +99,86 @@ class AAM_Backend_Manager {
89
  add_action('admin_init', array($this, 'adminInit'));
90
 
91
  //register login widget
92
- add_action('widgets_init', array($this, 'registerLoginWidget'));
93
- add_action('wp_ajax_nopriv_aamlogin', array($this, 'handleLogin'));
 
 
94
 
95
  //register backend hooks and filters
96
  if (AAM_Core_Config::get('backend-access-control', true)) {
97
  AAM_Backend_Filter::register();
98
  }
99
 
100
- //register CodePinch affiliate
101
- AAM_Backend_View_CodePinch::bootstrap();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
 
104
  /**
@@ -116,18 +196,10 @@ class AAM_Backend_Manager {
116
  *
117
  */
118
  public function adminInit() {
119
- $user = AAM::getUser();
120
-
121
- if (AAM_Core_API::capabilityExists('aam_manage_posts')) {
122
- $cap = 'aam_manage_posts';
123
- } else {
124
- $cap = AAM_Core_Config::get(
125
- AAM_Backend_Feature_Post::getAccessOption(),
126
- AAM_Backend_View::getAAMCapability()
127
- );
128
- }
129
 
130
- if (AAM_Core_Request::get('aamframe') && $user->hasCapability($cap)) {
131
  echo AAM_Backend_View::getInstance()->renderAccessFrame();
132
  exit;
133
  }
@@ -233,19 +305,10 @@ class AAM_Backend_Manager {
233
  *
234
  */
235
  public function metabox() {
236
- if (AAM_Core_API::capabilityExists('aam_manage_posts')) {
237
- $cap = 'aam_manage_posts';
238
- } else {
239
- $cap = AAM_Core_Config::get(
240
- AAM_Backend_Feature_Post::getAccessOption(),
241
- AAM_Backend_View::getAAMCapability()
242
- );
243
- }
244
-
245
  $frontend = AAM_Core_Config::get('frontend-access-control', true);
246
  $backend = AAM_Core_Config::get('backend-access-control', true);
247
 
248
- if (($frontend || $backend) && AAM::getUser()->hasCapability($cap)) {
249
  add_meta_box(
250
  'aam-acceess-manager',
251
  __('Access Manager', AAM_KEY) . ' <small style="color:#999999;">by AAM plugin</small>',
@@ -275,19 +338,10 @@ class AAM_Backend_Manager {
275
  */
276
  public function renderTermMetabox($term) {
277
  if (is_a($term, 'WP_Term') && is_taxonomy_hierarchical($term->taxonomy)) {
278
- if (AAM_Core_API::capabilityExists('aam_manage_posts')) {
279
- $cap = 'aam_manage_posts';
280
- } else {
281
- $option = AAM_Backend_Feature_Post::getAccessOption();
282
- $cap = AAM_Core_Config::get(
283
- $option, AAM_Backend_View::getAAMCapability()
284
- );
285
- }
286
-
287
  $frontend = AAM_Core_Config::get('frontend-access-control', true);
288
  $backend = AAM_Core_Config::get('backend-access-control', true);
289
 
290
- if (($frontend || $backend) && AAM::getUser()->hasCapability($cap)) {
291
  echo AAM_Backend_View::getInstance()->renderTermMetabox($term);
292
  }
293
  }
@@ -313,7 +367,7 @@ class AAM_Backend_Manager {
313
  $screen = '';
314
  }
315
 
316
- $model = new AAM_Backend_Feature_Metabox;
317
  $model->initialize($screen);
318
  }
319
  }
@@ -340,7 +394,7 @@ class AAM_Backend_Manager {
340
  * @return string
341
  */
342
  public function postRowActions($actions, $post) {
343
- if (AAM::getUser()->hasCapability(AAM_Backend_View::getAAMCapability())) {
344
  $url = admin_url('admin.php?page=aam&oid=' . $post->ID . '&otype=post#post');
345
 
346
  $actions['aam'] = '<a href="' . $url . '" target="_blank">';
@@ -357,7 +411,7 @@ class AAM_Backend_Manager {
357
  * @return string
358
  */
359
  public function tagRowActions($actions, $term) {
360
- if (AAM::getUser()->hasCapability(AAM_Backend_View::getAAMCapability())) {
361
  $oid = $term->term_id . '|' . $term->taxonomy;
362
  $url = admin_url('admin.php?page=aam&oid=' . $oid . '&otype=term#post');
363
 
@@ -381,7 +435,7 @@ class AAM_Backend_Manager {
381
  * @access public
382
  */
383
  public function userActions($actions, $user) {
384
- if (current_user_can(AAM_Backend_View::getAAMCapability(), $user->ID)) {
385
  $url = admin_url('admin.php?page=aam&user=' . $user->ID);
386
 
387
  $actions['aam'] = '<a href="' . $url . '" target="_blank">';
@@ -390,6 +444,20 @@ class AAM_Backend_Manager {
390
 
391
  return $actions;
392
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
 
394
  /**
395
  * Print javascript libraries
@@ -418,7 +486,7 @@ class AAM_Backend_Manager {
418
  * @access protected
419
  */
420
  protected function printLocalization($localKey) {
421
- $subject = $this->getCurrentSubject();
422
 
423
  $locals = array(
424
  'nonce' => wp_create_nonce('aam_ajax'),
@@ -430,16 +498,16 @@ class AAM_Backend_Manager {
430
  ),
431
  'level' => AAM_Core_API::maxLevel(wp_get_current_user()->allcaps),
432
  'subject' => array(
433
- 'type' => $subject->type,
434
- 'id' => $subject->id,
435
- 'name' => $subject->name,
436
- 'level' => $subject->level,
437
  'blog' => get_current_blog_id()
438
  ),
439
- 'translation' => require (dirname(__FILE__) . '/View/Localization.php'),
440
  'caps' => array(
441
- 'create_roles' => AAM_Backend_View::userCan('aam_create_roles'),
442
- 'create_users' => AAM_Backend_View::userCan('create_users')
443
  )
444
  );
445
 
@@ -450,60 +518,6 @@ class AAM_Backend_Manager {
450
  wp_localize_script($localKey, 'aamLocal', $locals);
451
  }
452
 
453
- /**
454
- * Get current subject
455
- *
456
- * @return stdClass
457
- *
458
- * @access protected
459
- */
460
- protected function getCurrentSubject() {
461
- $userId = AAM_Core_Request::get('user');
462
- if ($userId && AAM_Backend_View::userCan('list_users')) {
463
- $u = get_user_by('id', $userId);
464
- $subject = array(
465
- 'type' => 'user',
466
- 'id' => $userId,
467
- 'name' => ($u->display_name ? $u->display_name : $u->user_nicename),
468
- 'level' => AAM_Core_API::maxLevel($u->allcaps)
469
- );
470
- } elseif (AAM_Backend_View::userCan('aam_list_roles')) {
471
- $roles = array_keys(get_editable_roles());
472
- $id = array_shift($roles);
473
- $role = AAM_Core_API::getRoles()->get_role($id);
474
-
475
- $subject = array(
476
- 'type' => 'role',
477
- 'id' => $id,
478
- 'name' => $role->name,
479
- 'level' => AAM_Core_API::maxLevel($role->capabilities)
480
- );
481
- } elseif (AAM_Backend_View::userCan('aam_manage_visitors')) {
482
- $subject = array(
483
- 'type' => 'visitor',
484
- 'id' => null,
485
- 'name' => __('Anonymous', AAM_KEY),
486
- 'level' => 0
487
- );
488
- } elseif (AAM_Backend_View::userCan('aam_manage_default')) {
489
- $subject = array(
490
- 'type' => 'default',
491
- 'id' => null,
492
- 'name' => __('All Users, Roles and Visitor', AAM_KEY),
493
- 'level' => 0
494
- );
495
- } else {
496
- $subject = array(
497
- 'type' => null,
498
- 'id' => null,
499
- 'name' => null,
500
- 'level' => 0
501
- );
502
- }
503
-
504
- return (object) $subject;
505
- }
506
-
507
  /**
508
  * Print necessary styles
509
  *
@@ -527,7 +541,7 @@ class AAM_Backend_Manager {
527
  * @access public
528
  */
529
  public function adminMenu() {
530
- if (AAM_Core_Console::hasIssues()) {
531
  $counter = '&nbsp;<span class="update-plugins">'
532
  . '<span class="plugin-count">' . AAM_Core_Console::count()
533
  . '</span></span>';
@@ -539,7 +553,7 @@ class AAM_Backend_Manager {
539
  add_menu_page(
540
  'AAM',
541
  'AAM' . $counter,
542
- AAM_Backend_View::getAAMCapability(),
543
  'aam',
544
  array($this, 'renderPage'),
545
  AAM_MEDIA . '/active-menu.svg'
@@ -570,8 +584,10 @@ class AAM_Backend_Manager {
570
  public function renderContent() {
571
  check_ajax_referer('aam_ajax');
572
 
573
- if (AAM::getUser()->hasCapability(AAM_Backend_View::getAAMCapability())) {
574
- echo AAM_Backend_View::getInstance()->renderContent();
 
 
575
  } else {
576
  echo __('Access Denied', AAM_KEY);
577
  }
@@ -593,7 +609,7 @@ class AAM_Backend_Manager {
593
  while (@ob_end_clean()){}
594
 
595
  //process ajax request
596
- if (AAM::getUser()->hasCapability(AAM_Backend_View::getAAMCapability())) {
597
  echo AAM_Backend_View::getInstance()->processAjax();
598
  } else {
599
  echo __('Access Denied', AAM_KEY);
41
  //print required JS & CSS
42
  add_action('admin_print_scripts', array($this, 'printJavascript'));
43
  add_action('admin_print_styles', array($this, 'printStylesheet'));
44
+
45
+ //map AAM UI specific capabilities
46
+ add_filter('map_meta_cap', array($this, 'mapMetaCap'), 10, 4);
47
+
48
+ //post title decorator
49
+ add_filter('the_title', array($this, 'theTitle'), 10, 2);
50
+
51
+ //screen options & contextual help hooks
52
+ add_filter('screen_options_show_screen', array($this, 'screenOptions'));
53
+ add_filter('contextual_help', array($this, 'helpOptions'), 10, 3);
54
 
55
  //manager Admin Menu
56
  if (is_multisite() && is_network_admin()) {
57
  //register AAM in the network admin panel
58
+ add_action('network_admin_menu', array($this, 'adminMenu'));
59
  } else {
60
+ add_action('admin_menu', array($this, 'adminMenu'));
61
  add_action('all_admin_notices', array($this, 'notification'));
62
  }
63
 
99
  add_action('admin_init', array($this, 'adminInit'));
100
 
101
  //register login widget
102
+ if (AAM_Core_Config::get('secure-login', true)) {
103
+ add_action('widgets_init', array($this, 'registerLoginWidget'));
104
+ add_action('wp_ajax_nopriv_aamlogin', array($this, 'handleLogin'));
105
+ }
106
 
107
  //register backend hooks and filters
108
  if (AAM_Core_Config::get('backend-access-control', true)) {
109
  AAM_Backend_Filter::register();
110
  }
111
 
112
+ AAM_Extension_Repository::getInstance()->hasUpdates();
113
+ }
114
+
115
+ /**
116
+ *
117
+ * @param type $caps
118
+ * @param type $cap
119
+ * @return type
120
+ */
121
+ public function mapMetaCap($caps, $cap) {
122
+ if (in_array($cap, AAM_Backend_Feature_Main_Capability::$groups['aam'])) {
123
+ if (!AAM_Core_API::capabilityExists($cap)) {
124
+ $caps = array(AAM_Core_Config::get('page.capability', 'administrator'));
125
+ }
126
+ }
127
+
128
+ return $caps;
129
+ }
130
+
131
+ /**
132
+ *
133
+ * @param type $title
134
+ * @param type $id
135
+ * @return type
136
+ */
137
+ public function theTitle($title, $id) {
138
+ if (empty($title)) {
139
+ $title = '[No Title]: ID ' . $id;
140
+ }
141
+
142
+ return $title;
143
+ }
144
+
145
+ /**
146
+ *
147
+ * @param type $flag
148
+ * @return type
149
+ */
150
+ public function screenOptions($flag) {
151
+ if (AAM_Core_API::capabilityExists('show_screen_options')) {
152
+ $flag = AAM::getUser()->hasCapability('show_screen_options');
153
+ }
154
+
155
+ if (AAM::isAAM()) {
156
+ $flag = false;
157
+ }
158
+
159
+ return $flag;
160
+ }
161
+
162
+ /**
163
+ *
164
+ * @param array $help
165
+ * @param type $id
166
+ * @param type $screen
167
+ * @return array
168
+ */
169
+ public function helpOptions($help, $id, $screen) {
170
+ if (AAM_Core_API::capabilityExists('show_help_tabs')) {
171
+ if (!AAM::getUser()->hasCapability('show_help_tabs')) {
172
+ $screen->remove_help_tabs();
173
+ $help = array();
174
+ }
175
+ }
176
+
177
+ if (AAM::isAAM()) {
178
+ $screen->remove_help_tabs();
179
+ }
180
+
181
+ return $help;
182
  }
183
 
184
  /**
196
  *
197
  */
198
  public function adminInit() {
199
+ $user = AAM::getUser();
200
+ $frame = AAM_Core_Request::get('aamframe');
 
 
 
 
 
 
 
 
201
 
202
+ if ($frame && $user->hasCapability('aam_manage_posts')) {
203
  echo AAM_Backend_View::getInstance()->renderAccessFrame();
204
  exit;
205
  }
305
  *
306
  */
307
  public function metabox() {
 
 
 
 
 
 
 
 
 
308
  $frontend = AAM_Core_Config::get('frontend-access-control', true);
309
  $backend = AAM_Core_Config::get('backend-access-control', true);
310
 
311
+ if (($frontend || $backend) && AAM::getUser()->hasCapability('aam_manage_posts')) {
312
  add_meta_box(
313
  'aam-acceess-manager',
314
  __('Access Manager', AAM_KEY) . ' <small style="color:#999999;">by AAM plugin</small>',
338
  */
339
  public function renderTermMetabox($term) {
340
  if (is_a($term, 'WP_Term') && is_taxonomy_hierarchical($term->taxonomy)) {
 
 
 
 
 
 
 
 
 
341
  $frontend = AAM_Core_Config::get('frontend-access-control', true);
342
  $backend = AAM_Core_Config::get('backend-access-control', true);
343
 
344
+ if (($frontend || $backend) && AAM::getUser()->hasCapability('aam_manage_posts')) {
345
  echo AAM_Backend_View::getInstance()->renderTermMetabox($term);
346
  }
347
  }
367
  $screen = '';
368
  }
369
 
370
+ $model = new AAM_Backend_Feature_Main_Metabox;
371
  $model->initialize($screen);
372
  }
373
  }
394
  * @return string
395
  */
396
  public function postRowActions($actions, $post) {
397
+ if ($this->renderExternalUIFeature('aam_manage_posts')) {
398
  $url = admin_url('admin.php?page=aam&oid=' . $post->ID . '&otype=post#post');
399
 
400
  $actions['aam'] = '<a href="' . $url . '" target="_blank">';
411
  * @return string
412
  */
413
  public function tagRowActions($actions, $term) {
414
+ if ($this->renderExternalUIFeature('aam_manage_posts')) {
415
  $oid = $term->term_id . '|' . $term->taxonomy;
416
  $url = admin_url('admin.php?page=aam&oid=' . $oid . '&otype=term#post');
417
 
435
  * @access public
436
  */
437
  public function userActions($actions, $user) {
438
+ if ($this->renderExternalUIFeature('list_users')) {
439
  $url = admin_url('admin.php?page=aam&user=' . $user->ID);
440
 
441
  $actions['aam'] = '<a href="' . $url . '" target="_blank">';
444
 
445
  return $actions;
446
  }
447
+
448
+ /**
449
+ *
450
+ * @param type $cap
451
+ * @return type
452
+ */
453
+ protected function renderExternalUIFeature($cap) {
454
+ $frontend = AAM_Core_Config::get('frontend-access-control', true);
455
+ $backend = AAM_Core_Config::get('backend-access-control', true);
456
+ $aamManager = AAM::getUser()->hasCapability('aam_manager');
457
+ $featureManager = AAM::getUser()->hasCapability($cap);
458
+
459
+ return ($frontend || $backend) && $aamManager && $featureManager;
460
+ }
461
 
462
  /**
463
  * Print javascript libraries
486
  * @access protected
487
  */
488
  protected function printLocalization($localKey) {
489
+ $subject = AAM_Backend_Subject::getInstance();
490
 
491
  $locals = array(
492
  'nonce' => wp_create_nonce('aam_ajax'),
498
  ),
499
  'level' => AAM_Core_API::maxLevel(wp_get_current_user()->allcaps),
500
  'subject' => array(
501
+ 'type' => $subject->getUID(),
502
+ 'id' => $subject->getId(),
503
+ 'name' => $subject->getName(),
504
+ 'level' => $subject->getMaxLevel(),
505
  'blog' => get_current_blog_id()
506
  ),
507
+ 'translation' => AAM_Backend_View_Localization::get(),
508
  'caps' => array(
509
+ 'create_roles' => current_user_can('aam_create_roles'),
510
+ 'create_users' => current_user_can('create_users')
511
  )
512
  );
513
 
518
  wp_localize_script($localKey, 'aamLocal', $locals);
519
  }
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  /**
522
  * Print necessary styles
523
  *
541
  * @access public
542
  */
543
  public function adminMenu() {
544
+ if (AAM_Core_Console::count()) {
545
  $counter = '&nbsp;<span class="update-plugins">'
546
  . '<span class="plugin-count">' . AAM_Core_Console::count()
547
  . '</span></span>';
553
  add_menu_page(
554
  'AAM',
555
  'AAM' . $counter,
556
+ 'aam_manager',
557
  'aam',
558
  array($this, 'renderPage'),
559
  AAM_MEDIA . '/active-menu.svg'
584
  public function renderContent() {
585
  check_ajax_referer('aam_ajax');
586
 
587
+ if (AAM::getUser()->hasCapability('aam_manager')) {
588
+ echo AAM_Backend_View::getInstance()->renderContent(
589
+ AAM_Core_Request::post('uiType', 'main')
590
+ );
591
  } else {
592
  echo __('Access Denied', AAM_KEY);
593
  }
609
  while (@ob_end_clean()){}
610
 
611
  //process ajax request
612
+ if (AAM::getUser()->hasCapability('aam_manager')) {
613
  echo AAM_Backend_View::getInstance()->processAjax();
614
  } else {
615
  echo __('Access Denied', AAM_KEY);
Application/Backend/Subject.php ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 subject
12
+ *
13
+ * Currently managed subject. Based on the HTTP request critiria, define what subject
14
+ * is currently managed with AAM UI.
15
+ *
16
+ * @package AAM
17
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
18
+ */
19
+ class AAM_Backend_Subject {
20
+
21
+ /**
22
+ * Single instance of itself
23
+ *
24
+ * @var AAM_Backend_Subject
25
+ *
26
+ * @access protected
27
+ * @static
28
+ */
29
+ protected static $instance = null;
30
+
31
+ /**
32
+ * Subject information
33
+ *
34
+ * @var AAM_Core_Subject
35
+ *
36
+ * @access protected
37
+ */
38
+ protected $subject = null;
39
+
40
+ /**
41
+ * Constructor
42
+ *
43
+ * @return void
44
+ *
45
+ * @access protected
46
+ */
47
+ protected function __construct() {
48
+ $subject = AAM_Core_Request::request('subject');
49
+
50
+ if ($subject) {
51
+ $this->initRequestedSubject(
52
+ $subject, AAM_Core_Request::request('subjectId')
53
+ );
54
+ } else {
55
+ $this->initDefaultSubject();
56
+ }
57
+ }
58
+
59
+ /**
60
+ * Initialize requested subject
61
+ *
62
+ * @param string $type
63
+ * @param string $id
64
+ *
65
+ * @return void
66
+ *
67
+ * @access protected
68
+ */
69
+ protected function initRequestedSubject($type, $id) {
70
+ $classname = 'AAM_Core_Subject_' . ucfirst($type);
71
+
72
+ if (class_exists($classname)) {
73
+ $this->setSubject(new $classname(stripslashes($id)));
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Initialize default subject
79
+ *
80
+ * Based on user permissions, pick the first available subject that current user
81
+ * can manage with AAM UI
82
+ *
83
+ * @return void
84
+ *
85
+ * @access protected
86
+ */
87
+ protected function initDefaultSubject() {
88
+ $user = intval(AAM_Core_Request::get('user'));
89
+
90
+ if ($user && current_user_can('list_users')) {
91
+ $this->initRequestedSubject(AAM_Core_Subject_User::UID, $user);
92
+ } elseif (current_user_can('aam_list_roles')) {
93
+ $roles = array_keys(get_editable_roles());
94
+ $this->initRequestedSubject(AAM_Core_Subject_Role::UID, array_shift($roles));
95
+ } elseif (current_user_can('aam_manage_visitors')) {
96
+ $this->initRequestedSubject(AAM_Core_Subject_Visitor::UID, null);
97
+ } elseif (current_user_can('aam_manage_default')) {
98
+ $this->initRequestedSubject(AAM_Core_Subject_Default::UID, null);
99
+ }
100
+ }
101
+
102
+ /**
103
+ * Set subject
104
+ *
105
+ * @param AAM_Core_Subject $subject
106
+ *
107
+ * @access protected
108
+ */
109
+ protected function setSubject(AAM_Core_Subject $subject) {
110
+ $this->subject = $subject;
111
+ }
112
+
113
+ /**
114
+ * Get subject property
115
+ *
116
+ * @return mixed
117
+ *
118
+ * @access public
119
+ */
120
+ public function __get($name) {
121
+ return (!empty($this->subject->$name) ? $this->subject->$name : null);
122
+ }
123
+
124
+ /**
125
+ * Call subject's method
126
+ *
127
+ * @param string $name
128
+ * @param array $args
129
+ *
130
+ * @return mized
131
+ *
132
+ * @access public
133
+ */
134
+ public function __call($name, $args) {
135
+ //make sure that method is callable
136
+ if (method_exists($this->subject, $name)) {
137
+ $response = call_user_func_array(array($this->subject, $name), $args);
138
+ } else {
139
+ $response = null;
140
+ }
141
+
142
+ return $response;
143
+ }
144
+
145
+ /**
146
+ * Get AAM subject
147
+ *
148
+ * @return AAM_Core_Subject
149
+ *
150
+ * @access public
151
+ */
152
+ public function get() {
153
+ return $this->subject;
154
+ }
155
+
156
+ /**
157
+ * Get single instance of the subject
158
+ *
159
+ * @return AAM_Backend_Subject
160
+ *
161
+ * @access public
162
+ * @static
163
+ */
164
+ public static function getInstance() {
165
+ if (is_null(self::$instance)) {
166
+ self::$instance = new self;
167
+ }
168
+
169
+ return self::$instance;
170
+ }
171
+
172
+ }
Application/Backend/View.php CHANGED
@@ -24,15 +24,6 @@ class AAM_Backend_View {
24
  */
25
  private static $_instance = null;
26
 
27
- /**
28
- * Current Subject
29
- *
30
- * @var AAM_Core_Subject
31
- *
32
- * @access private
33
- */
34
- private static $_subject = null;
35
-
36
  /**
37
  * Construct the view object
38
  *
@@ -41,34 +32,22 @@ class AAM_Backend_View {
41
  * @access protected
42
  */
43
  protected function __construct() {
44
- if (AAM_Core_Request::request('subject')) {
45
- $classname = 'AAM_Core_Subject_' . ucfirst(
46
- AAM_Core_Request::request('subject')
47
- );
48
- if (class_exists($classname)) {
49
- $this->setSubject(new $classname(
50
- stripslashes(AAM_Core_Request::request('subjectId'))
51
- ));
52
- }
53
- }
54
-
55
  //register default features
56
- AAM_Backend_Feature_Menu::register();
57
- AAM_Backend_Feature_Metabox::register();
58
- AAM_Backend_Feature_Capability::register();
59
- AAM_Backend_Feature_Post::register();
60
- AAM_Backend_Feature_Redirect::register();
61
- AAM_Backend_Feature_Teaser::register();
62
- AAM_Backend_Feature_LoginRedirect::register();
63
- AAM_Backend_Feature_LogoutRedirect::register();
64
- AAM_Backend_Feature_Extension::register();
65
- AAM_Backend_Feature_Security::register();
66
- AAM_Backend_Feature_Utility::register();
67
- AAM_Backend_Feature_Contact::register();
68
- AAM_Backend_Feature_404Redirect::register();
69
 
70
  //feature registration hook
71
- do_action('aam-feature-registration');
72
  }
73
 
74
  /**
@@ -158,20 +137,29 @@ class AAM_Backend_View {
158
  }
159
 
160
  return apply_filters(
161
- 'aam-ajax-filter', $response, $this->getSubject(), $action
 
 
 
162
  );
163
  }
164
 
165
  /**
166
  * Render the Main Control Area
167
  *
 
 
168
  * @return void
169
  *
170
  * @access public
171
  */
172
- public function renderContent() {
173
  ob_start();
174
- require_once(dirname(__FILE__) . '/phtml/main-panel.phtml');
 
 
 
 
175
  $content = ob_get_contents();
176
  ob_end_clean();
177
 
@@ -208,7 +196,9 @@ class AAM_Backend_View {
208
  $param = AAM_Core_Request::post('param');
209
  $value = AAM_Core_Request::post('value');
210
 
211
- $result = $this->getSubject()->save($param, $value, $object, $objectId);
 
 
212
 
213
  return json_encode(array('status' => ($result ? 'success' : 'failure')));
214
  }
@@ -218,7 +208,9 @@ class AAM_Backend_View {
218
  * @return type
219
  */
220
  public function reset() {
221
- return $this->getSubject()->resetObject(AAM_Core_Request::post('object'));
 
 
222
  }
223
 
224
  /**
@@ -231,7 +223,7 @@ class AAM_Backend_View {
231
  'reason' => 'You are not allowed to switch to this user'
232
  );
233
 
234
- if (self::userCan('aam_switch_users')) {
235
  $user = new WP_User(AAM_Core_Request::post('user'));
236
  $max = AAM_Core_API::maxLevel(wp_get_current_user()->allcaps);
237
 
@@ -251,59 +243,6 @@ class AAM_Backend_View {
251
  return json_encode($response);
252
  }
253
 
254
- /**
255
- *
256
- * @param type $capability
257
- * @return type
258
- */
259
- public static function userCan($capability) {
260
- if (AAM_Core_API::capabilityExists($capability)) {
261
- $can = AAM::getUser()->hasCapability($capability);
262
- } else {
263
- $can = AAM::getUser()->hasCapability(self::getAAMCapability());
264
- }
265
-
266
- return ($can ? 1 : 0);
267
- }
268
-
269
- /**
270
- *
271
- * @return type
272
- */
273
- public static function getAAMCapability() {
274
- if (AAM_Core_API::capabilityExists('aam_manager')) {
275
- $cap = 'aam_manager';
276
- } else {
277
- $cap = AAM_Core_Config::get('page.capability', 'administrator');
278
- }
279
-
280
- return $cap;
281
- }
282
-
283
- /**
284
- * Get Subject
285
- *
286
- * @return AAM_Core_Subject
287
- *
288
- * @access public
289
- */
290
- public static function getSubject() {
291
- return self::$_subject;
292
- }
293
-
294
- /**
295
- * Set Subject
296
- *
297
- * @param AAM_Core_Subject $subject
298
- *
299
- * @return void
300
- *
301
- * @access public
302
- */
303
- protected function setSubject(AAM_Core_Subject $subject) {
304
- self::$_subject = $subject;
305
- }
306
-
307
  /**
308
  * Get instance of itself
309
  *
24
  */
25
  private static $_instance = null;
26
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * Construct the view object
29
  *
32
  * @access protected
33
  */
34
  protected function __construct() {
 
 
 
 
 
 
 
 
 
 
 
35
  //register default features
36
+ AAM_Backend_Feature_Main_Menu::register();
37
+ AAM_Backend_Feature_Main_Metabox::register();
38
+ AAM_Backend_Feature_Main_Capability::register();
39
+ AAM_Backend_Feature_Main_Post::register();
40
+ AAM_Backend_Feature_Main_Redirect::register();
41
+ AAM_Backend_Feature_Main_LoginRedirect::register();
42
+ AAM_Backend_Feature_Main_LogoutRedirect::register();
43
+ AAM_Backend_Feature_Main_404Redirect::register();
44
+
45
+ AAM_Backend_Feature_Settings_Core::register();
46
+ AAM_Backend_Feature_Settings_Content::register();
47
+ AAM_Backend_Feature_Settings_Tools::register();
 
48
 
49
  //feature registration hook
50
+ do_action('aam-feature-registration-action');
51
  }
52
 
53
  /**
137
  }
138
 
139
  return apply_filters(
140
+ 'aam-ajax-filter',
141
+ $response,
142
+ AAM_Backend_Subject::getInstance()->get(),
143
+ $action
144
  );
145
  }
146
 
147
  /**
148
  * Render the Main Control Area
149
  *
150
+ * @param string $type
151
+ *
152
  * @return void
153
  *
154
  * @access public
155
  */
156
+ public function renderContent($type = 'main') {
157
  ob_start();
158
+ if ($type == 'extensions') {
159
+ AAM_Backend_Feature_Extension_Manager::getInstance()->render();
160
+ } else {
161
+ require_once(dirname(__FILE__) . '/phtml/main-panel.phtml');
162
+ }
163
  $content = ob_get_contents();
164
  ob_end_clean();
165
 
196
  $param = AAM_Core_Request::post('param');
197
  $value = AAM_Core_Request::post('value');
198
 
199
+ $result = AAM_Backend_Subject::getInstance()->save(
200
+ $param, $value, $object, $objectId
201
+ );
202
 
203
  return json_encode(array('status' => ($result ? 'success' : 'failure')));
204
  }
208
  * @return type
209
  */
210
  public function reset() {
211
+ return AAM_Backend_Subject::getInstance()->resetObject(
212
+ AAM_Core_Request::post('object')
213
+ );
214
  }
215
 
216
  /**
223
  'reason' => 'You are not allowed to switch to this user'
224
  );
225
 
226
+ if (current_user_can('aam_switch_users')) {
227
  $user = new WP_User(AAM_Core_Request::post('user'));
228
  $max = AAM_Core_API::maxLevel(wp_get_current_user()->allcaps);
229
 
243
  return json_encode($response);
244
  }
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  /**
247
  * Get instance of itself
248
  *
Application/Backend/View/CodePinch.php DELETED
@@ -1,151 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Copyright (C) <2016> CodePinch LLC <support@codepinch.com>
5
- *
6
- * This program is free software: you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation, either version 3 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
- */
19
-
20
- /**
21
- * CodePinch affiliate main class
22
- *
23
- * @author Vasyl Martyniuk <vasyl@vasyltech.com>
24
- */
25
- class AAM_Backend_View_CodePinch {
26
-
27
- /**
28
- * Single instance of itself
29
- *
30
- * @var AAM_Backend_View_CodePinch
31
- *
32
- * @access private
33
- */
34
- private static $_instance = null;
35
-
36
- /**
37
- * Affiliate construct
38
- *
39
- * @return void
40
- *
41
- * @access protected
42
- */
43
- protected function __construct() {
44
- if (is_admin()) {
45
- //store Affiliate code when plugin information pop-up is opened
46
- add_action(
47
- 'install_plugins_pre_search',
48
- array($this, 'saveAffiliate')
49
- );
50
- }
51
- }
52
-
53
- /**
54
- * Save affiliate code
55
- *
56
- * Store affiliate code to the database when plugin's information pop-up is
57
- * open.
58
- *
59
- * @return void
60
- *
61
- * @access public
62
- */
63
- public function saveAffiliate() {
64
- $affiliate = filter_input(INPUT_GET, 'affiliate');
65
-
66
- if ($affiliate) {
67
- update_option('codepinch-affiliate', $affiliate);
68
- }
69
- }
70
-
71
- /**
72
- * Bootstrap the SKD
73
- *
74
- * The best way to initialize the CodePinch affiliate SDK is in the init
75
- * action so it can register the menu for CodePinch installation process.
76
- *
77
- * @return void
78
- *
79
- * @access public
80
- * @static
81
- */
82
- public static function bootstrap() {
83
- self::$_instance = new self;
84
- }
85
-
86
- /**
87
- * Get URL
88
- *
89
- * Prepare and return CodePinch installation URL based on the passed
90
- * affiliate code
91
- *
92
- * @param string $affiliate
93
- *
94
- * @return string
95
- *
96
- * @access public
97
- */
98
- public static function getUrl($affiliate = null) {
99
- $link = 'plugin-install.php?tab=plugin-information&';
100
- $link .= 's=codepinch&affiliate=' . $affiliate . '&';
101
- $link .= 'tab=search&type=term';
102
-
103
- return self_admin_url($link);
104
- }
105
-
106
- /**
107
- * Check plugin's status
108
- *
109
- * Check if CodePinch is already installed
110
- *
111
- * @return boolean
112
- *
113
- * @access public
114
- * @static
115
- */
116
- public static function isInstalled() {
117
- return self::find();
118
- }
119
-
120
- /**
121
- * Get plugin's status
122
- *
123
- * @return string
124
- *
125
- * @access protected
126
- * @static
127
- */
128
- protected static function find() {
129
- static $status = null;
130
-
131
- if (is_null($status)) {
132
- $status = false;
133
-
134
- if (file_exists(ABSPATH . 'wp-admin/includes/plugin.php')) {
135
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
- }
137
-
138
- if (function_exists('get_plugin_data')) {
139
- foreach(get_plugins() as $plugin) {
140
- if ($plugin['Name'] == 'CodePinch') {
141
- $status = true;
142
- break;
143
- }
144
- }
145
- }
146
- }
147
-
148
- return $status;
149
- }
150
-
151
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/View/Helper.php CHANGED
@@ -50,17 +50,4 @@ class AAM_Backend_View_Helper {
50
  $value = '/\\' . ($index % 2 ? ']' : '[') . '/';
51
  }
52
 
53
- /**
54
- * Conver string to readable
55
- *
56
- * @param string $text
57
- *
58
- * @return string
59
- *
60
- * @access public
61
- */
62
- public static function getHumanText($text) {
63
- return implode(' ', array_map('ucfirst', explode('_', $text)));
64
- }
65
-
66
  }
50
  $value = '/\\' . ($index % 2 ? ']' : '[') . '/';
51
  }
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
Application/Backend/View/Localization.php CHANGED
@@ -7,47 +7,65 @@
7
  * ======================================================================
8
  */
9
 
10
- return array(
11
- 'Search Capability' => __('Search Capability', AAM_KEY),
12
- '_TOTAL_ capability(s)' => __('_TOTAL_ capability(s)', AAM_KEY),
13
- 'Saving...' => __('Saving...', AAM_KEY),
14
- 'Failed to add new capability' => __('Failed to add new capability', AAM_KEY),
15
- 'Application error' => __('Application error', AAM_KEY),
16
- 'Add Capability' => __('Add Capability', AAM_KEY),
17
- 'Show Menu' => __('Show Menu', AAM_KEY),
18
- 'Restrict Menu' => __('Restrict Menu', AAM_KEY),
19
- 'Failed to retrieve mataboxes' => __('Failed to retrieve mataboxes', AAM_KEY),
20
- 'Search' => __('Search', AAM_KEY),
21
- '_TOTAL_ object(s)' => __('_TOTAL_ object(s)', AAM_KEY),
22
- 'Failed' => __('Failed', AAM_KEY),
23
- 'Loading...' => __('Loading...', AAM_KEY),
24
- 'No Role' => __('No Role', AAM_KEY),
25
- 'Search Role' => __('Search Role', AAM_KEY),
26
- '_TOTAL_ role(s)' => __('_TOTAL_ role(s)', AAM_KEY),
27
- 'Create' => __('Create', AAM_KEY),
28
- 'Users' => __('Users', AAM_KEY),
29
- 'Failed to add new role' => __('Failed to add new role', AAM_KEY),
30
- 'Add Role' => __('Add Role', AAM_KEY),
31
- 'Failed to update role' => __('Failed to update role', AAM_KEY),
32
- 'Update' => __('Update', AAM_KEY),
33
- 'Deleting...' => __('Deleting...', AAM_KEY),
34
- 'Failed to delete role' => __('Failed to delete role', AAM_KEY),
35
- 'Delete Role' => __('Delete Role', AAM_KEY),
36
- 'Failed to block user' => __('Failed to block user', AAM_KEY),
37
- 'Search User' => __('Search User', AAM_KEY),
38
- '_TOTAL_ user(s)' => __('_TOTAL_ user(s)', AAM_KEY),
39
- 'Role' => __('Role', AAM_KEY),
40
- 'Anonymous' => __('Anonymous', AAM_KEY),
41
- 'Current user' => __('Current user', AAM_KEY),
42
- 'Current role' => __('Current role', AAM_KEY),
43
- 'Manage Access' => __('Manage Access', AAM_KEY),
44
- 'Edit' => __('Edit', AAM_KEY),
45
- 'Manage Role' => __('Manage Role', AAM_KEY),
46
- 'Edit Role' => __('Edit Role', AAM_KEY),
47
- 'Delete Role' => __('Delete Role', AAM_KEY),
48
- 'Manage User' => __('Manage User', AAM_KEY),
49
- 'Edit User' => __('Edit User', AAM_KEY),
50
- 'Lock User' => __('Lock User', AAM_KEY),
51
- 'Unlock User' => __('Unlock User', AAM_KEY),
52
- 'Failed to grand capability - WordPress policy' => __('Failed to grand capability - WordPress policy', AAM_KEY),
53
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  * ======================================================================
8
  */
9
 
10
+ /**
11
+ * Localization
12
+ *
13
+ */
14
+ class AAM_Backend_View_Localization {
15
+
16
+ /**
17
+ * Get localization array
18
+ *
19
+ * @return array
20
+ *
21
+ * @access public
22
+ * @static
23
+ */
24
+ public static function get() {
25
+ return array(
26
+ 'Search Capability' => __('Search Capability', AAM_KEY),
27
+ '_TOTAL_ capability(s)' => __('_TOTAL_ capability(s)', AAM_KEY),
28
+ 'Saving...' => __('Saving...', AAM_KEY),
29
+ 'Failed to add new capability' => __('Failed to add new capability', AAM_KEY),
30
+ 'Application error' => __('Application error', AAM_KEY),
31
+ 'Add Capability' => __('Add Capability', AAM_KEY),
32
+ 'Show Menu' => __('Show Menu', AAM_KEY),
33
+ 'Restrict Menu' => __('Restrict Menu', AAM_KEY),
34
+ 'Failed to retrieve mataboxes' => __('Failed to retrieve mataboxes', AAM_KEY),
35
+ 'Search' => __('Search', AAM_KEY),
36
+ '_TOTAL_ object(s)' => __('_TOTAL_ object(s)', AAM_KEY),
37
+ 'Failed' => __('Failed', AAM_KEY),
38
+ 'Loading...' => __('Loading...', AAM_KEY),
39
+ 'No Role' => __('No Role', AAM_KEY),
40
+ 'Search Role' => __('Search Role', AAM_KEY),
41
+ '_TOTAL_ role(s)' => __('_TOTAL_ role(s)', AAM_KEY),
42
+ 'Create' => __('Create', AAM_KEY),
43
+ 'Users' => __('Users', AAM_KEY),
44
+ 'Failed to add new role' => __('Failed to add new role', AAM_KEY),
45
+ 'Add Role' => __('Add Role', AAM_KEY),
46
+ 'Failed to update role' => __('Failed to update role', AAM_KEY),
47
+ 'Update' => __('Update', AAM_KEY),
48
+ 'Deleting...' => __('Deleting...', AAM_KEY),
49
+ 'Failed to delete role' => __('Failed to delete role', AAM_KEY),
50
+ 'Delete Role' => __('Delete Role', AAM_KEY),
51
+ 'Failed to block user' => __('Failed to block user', AAM_KEY),
52
+ 'Search User' => __('Search User', AAM_KEY),
53
+ '_TOTAL_ user(s)' => __('_TOTAL_ user(s)', AAM_KEY),
54
+ 'Role' => __('Role', AAM_KEY),
55
+ 'Anonymous' => __('Anonymous', AAM_KEY),
56
+ 'Current user' => __('Current user', AAM_KEY),
57
+ 'Current role' => __('Current role', AAM_KEY),
58
+ 'Manage Access' => __('Manage Access', AAM_KEY),
59
+ 'Edit' => __('Edit', AAM_KEY),
60
+ 'Manage Role' => __('Manage Role', AAM_KEY),
61
+ 'Edit Role' => __('Edit Role', AAM_KEY),
62
+ 'Delete Role' => __('Delete Role', AAM_KEY),
63
+ 'Manage User' => __('Manage User', AAM_KEY),
64
+ 'Edit User' => __('Edit User', AAM_KEY),
65
+ 'Lock User' => __('Lock User', AAM_KEY),
66
+ 'Unlock User' => __('Unlock User', AAM_KEY),
67
+ 'Failed to grand capability - WordPress policy' => __('Failed to grand capability - WordPress policy', AAM_KEY),
68
+ );
69
+ }
70
+
71
+ }
Application/Backend/View/PostOptionList.php CHANGED
@@ -7,81 +7,102 @@
7
  * ======================================================================
8
  */
9
 
10
- return array(
11
- 'frontend' => array(
12
- 'list' => array(
13
- 'title' => __('List', AAM_KEY),
14
- 'descr' => __('Hide %s however access with a direct URL will be still allowed. When there are more than 500 posts, this option may not be applied immediately because, for performance reasons, AAM checks limited number of posts per request.', AAM_KEY) . sprintf(__(' %sSee in action.%s', AAM_KEY), "<a href='https://youtu.be/2jiu_CL6JJg' target='_blank'>", '</a>')
15
- ),
16
- 'list_others' => array(
17
- 'title' => __('List To Others', AAM_KEY),
18
- 'descr' => __('Hide %s for all except author (whoever created %s or was assigned on the Author metabox). Access with a direct URL will be still allowed. When there are more than 500 posts, this option may not be applied immediately because, for performance reasons, AAM checks limited number of posts per request.', AAM_KEY)
19
- ),
20
- 'read' => array(
21
- 'title' => __('Read', AAM_KEY),
22
- 'descr' => __('Restrict access to read %s. Any attempts to read, view or open %s will result in redirecting user based on the Access Denied Redirect rule.', AAM_KEY) . sprintf(__(' %sSee in action.%s', AAM_KEY), "<a href='https://youtu.be/1742nVeGvgs' target='_blank'>", '</a>')
23
- ),
24
- 'read_others' => array(
25
- 'title' => __('Read By Others', AAM_KEY),
26
- 'descr' => __('Restrict access to read %s for all except author (whoever created %s or was assigned on the Author metabox). Any attempts to read, view or open %s will result in redirecting user based on the Access Denied Redirect rule.', AAM_KEY)
27
- ),
28
- 'limit' => array(
29
- 'title' => __('Limit', AAM_KEY),
30
- 'sub' => '<small>' . sprintf(__('Teaser message: %s', AAM_KEY), '<b data-preview="frontend.teaser" id="post-teaser"></b>' ) . ' <a href="#" class="change-teaser" data-ref="frontend.teaser" data-preview-id="post-teaser">' . __('change', AAM_KEY) . '</a></small>',
31
- 'descr' => __('When checked, show defined teaser message instead of the %s content.', AAM_KEY)
32
- ),
33
- 'comment' => array(
34
- 'title' => __('Comment', AAM_KEY),
35
- 'descr' => __('Restrict access to comment on %s when commenting feature is enabled.', AAM_KEY)
36
- ),
37
- 'redirect' => array(
38
- 'title' => __('Redirect', AAM_KEY),
39
- 'sub' => '<small>' . sprintf(__('Redirect to: %s', AAM_KEY), '<b data-preview="frontend.location" id="post-location"></b>' ) . ' <a href="#" class="change-location" data-ref="frontend.location" data-preview-id="post-location">' . __('change', AAM_KEY) . '</a></small>',
40
- 'descr' => __('Redirect user to defined location when user tries to read the %s. Define either valid full URL or public page ID within the website. The REDIRECT option will be ignored if READ option checked and user will be redirected based on the Access Denied Redirect rule.', AAM_KEY)
41
- ),
42
- 'protected' => array(
43
- 'title' => __('Password Protected', AAM_KEY),
44
- 'sub' => '<small>' . sprintf(__('Password: %s', AAM_KEY), '<b data-preview="frontend.password" id="post-password"></b>' ) . ' <a href="#" class="change-password" data-ref="frontend.password" data-preview-id="post-password">' . __('change', AAM_KEY) . '</a></small>',
45
- 'descr' => __('Add the password protection for the %s. Available with WordPress 4.7.0 or higher.', AAM_KEY)
46
- ),
47
- 'expire' => array(
48
- 'title' => __('Access Expiration', AAM_KEY),
49
- 'sub' => '<small>' . sprintf(__('Expires: %s', AAM_KEY), '<b data-preview="frontend.expire_datetime" id="post-expire"></b>' ) . ' <a href="#" class="change-expiration" data-ref="frontend.expire_datetime" data-preview-id="post-expire">' . __('change', AAM_KEY) . '</a></small>',
50
- 'descr' => __('Define when access is expired for %s.', AAM_KEY) . sprintf(__('After the expiration date, the access to READ will be denied unless this behavior is overwritten in ConfigPress. For more information %scheck this article%s or ', AAM_KEY), "<a href='https://aamplugin.com/help/how-to-set-expiration-date-for-any-wordpress-content' target='_blank'>", '</a>') . sprintf(__(' %ssee in action.%s', AAM_KEY), "<a href='https://youtu.be/IgtgVoWs35w' target='_blank'>", '</a>')
51
- ),
52
- ),
53
- 'backend' => array(
54
- 'list' => array(
55
- 'title' => __('List', AAM_KEY),
56
- 'descr' => __('Hide %s however access with a direct URL is still allowed. When there are more than 500 posts, this option may not be applied immediately because, for performance reasons, AAM checks limited number of posts per request.', AAM_KEY)
57
- ),
58
- 'list_others' => array(
59
- 'title' => __('List To Others', AAM_KEY),
60
- 'descr' => __('Hide %s for all except author (whoever created %s or was assigned on the Author metabox). Access with a direct URL is still allowed. When there are more than 500 posts, this option may not be applied immediately because, for performance reasons, AAM checks limited number of posts per request.', AAM_KEY)
61
- ),
62
- 'edit' => array(
63
- 'title' => __('Edit', AAM_KEY),
64
- 'descr' => __('Restrict access to edit %s. Any attempts to edit %s will result in redirecting user based on the Access Denied Redirect rule.', AAM_KEY)
65
- ),
66
- 'edit_others' => array(
67
- 'title' => __('Edit By Others', AAM_KEY),
68
- 'descr' => __('Restrict access to edit %s for all except author (whoever created %s or was assigned on the Author metabox). Any attempts to edit %s will result in redirecting user based on the Access Denied Redirect rule.', AAM_KEY)
69
- ),
70
- 'delete' => array(
71
- 'title' => __('Delete', AAM_KEY),
72
- 'descr' => __('Restrict access to trash or permanently delete %s.', AAM_KEY)
73
- ),
74
- 'delete_others' => array(
75
- 'title' => __('Delete By Others', AAM_KEY),
76
- 'descr' => __('Restrict access to trash or permanently delete %s for all except author (whoever created %s or was assigned on the Author metabox).', AAM_KEY)
77
- ),
78
- 'publish' => array(
79
- 'title' => __('Publish', AAM_KEY),
80
- 'descr' => __('Restrict access to publish %s. User will be allowed only submit for review. Quick Edit inline action is also removed from the list page.', AAM_KEY)
81
- ),
82
- 'publish_others' => array(
83
- 'title' => __('Publish By Others', AAM_KEY),
84
- 'descr' => __('Restrict access to publish %s for all except author (whoever created %s or was assigned on the Author metabox). User will be allowed only submit for review. Quick Edit inline action is also removed from the list page.', AAM_KEY)
85
- )
86
- )
87
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  * ======================================================================
8
  */
9
 
10
+ /**
11
+ * Post option list
12
+ */
13
+ class AAM_Backend_View_PostOptionList {
14
+
15
+ /**
16
+ * Get post option list
17
+ *
18
+ * @return array
19
+ *
20
+ * @access public
21
+ */
22
+ public static function get() {
23
+ return array(
24
+ 'frontend' => array(
25
+ 'list' => array(
26
+ 'title' => __('List', AAM_KEY),
27
+ 'descr' => __('Hide %s however access with a direct URL will be still allowed. When there are more than 500 posts, this option may not be applied immediately because, for performance reasons, AAM checks limited number of posts per request.', AAM_KEY) . sprintf(__(' %sSee in action.%s', AAM_KEY), "<a href='https://youtu.be/2jiu_CL6JJg' target='_blank'>", '</a>'),
28
+ 'config' => 'check-post-visibility'
29
+ ),
30
+ 'read' => array(
31
+ 'title' => __('Read', AAM_KEY),
32
+ 'descr' => __('Restrict access to read the %s. Any attempts to read, view or open the %s will be denied and redirected based on the Access Denied Redirect rule.', AAM_KEY) . sprintf(__(' %sSee in action.%s', AAM_KEY), "<a href='https://youtu.be/1742nVeGvgs' target='_blank'>", '</a>')
33
+ ),
34
+ 'limit' => array(
35
+ 'title' => __('Limit', AAM_KEY),
36
+ 'sub' => __('Teaser message', AAM_KEY),
37
+ 'option' => 'frontend.teaser',
38
+ 'preview' => 'frontend-teaser-preview',
39
+ 'descr' => __('When checked, show defined teaser message instead of the %s content.', AAM_KEY)
40
+ ),
41
+ 'access_counter' => array(
42
+ 'title' => __('Read Counter', AAM_KEY),
43
+ 'sub' => __('Threshold', AAM_KEY),
44
+ 'option' => 'frontend.access_counter_limit',
45
+ 'preview' => 'frontend-access_counter_limit-preview',
46
+ 'exclude' => array(AAM_Core_Subject_Visitor::UID),
47
+ 'descr' => __('Define how many times the %s can be opened to read, view or download. After number of time exceeds the defined threshold, the access will be denied to the %s and redirected based on the Access Denied Redirect rule.', AAM_KEY)
48
+ ),
49
+ 'comment' => array(
50
+ 'title' => __('Comment', AAM_KEY),
51
+ 'descr' => __('Restrict access to comment on %s when commenting feature is enabled.', AAM_KEY)
52
+ ),
53
+ 'redirect' => array(
54
+ 'title' => __('Redirect', AAM_KEY),
55
+ 'sub' => __('Redirect Rule', AAM_KEY),
56
+ 'option' => 'frontend.location',
57
+ 'preview' => 'frontend-location-preview',
58
+ 'descr' => sprintf(__('Redirect user based on the defined redirect rule when user tries to read the %s. The REDIRECT option will be ignored if READ option checked. For more information about this option please refer to the %sHelp Section%s.', AAM_KEY), '%s', '<a href="https://aamplugin.com/help#post-redirect" target="_blank">', '</a>')
59
+ ),
60
+ 'protected' => array(
61
+ 'title' => __('Password Protected', AAM_KEY),
62
+ 'sub' => __('Password', AAM_KEY),
63
+ 'option' => 'frontend.password',
64
+ 'preview' => 'frontend-option-preview',
65
+ 'descr' => __('Password protect the %s. Available with WordPress 4.7.0 or higher.', AAM_KEY)
66
+ ),
67
+ 'expire' => array(
68
+ 'title' => __('Access Expiration', AAM_KEY),
69
+ 'sub' => __('Expires:', AAM_KEY),
70
+ 'option' => 'frontend.expire_datetime',
71
+ 'preview' => 'frontend-expire_datetime-preview',
72
+ 'descr' => __('Define when access expires for %s.', AAM_KEY) . sprintf(__('After expiration, the access to %s will be denied and user will be redirected based on the Access Denied Redirect rule. For more information %scheck this article%s or ', AAM_KEY), '%s', "<a href='https://aamplugin.com/help/how-to-set-expiration-date-for-any-wordpress-content' target='_blank'>", '</a>') . sprintf(__(' %ssee in action.%s', AAM_KEY), "<a href='https://youtu.be/IgtgVoWs35w' target='_blank'>", '</a>')
73
+ ),
74
+ 'monetize' => array(
75
+ 'title' => __('Monetized Access', AAM_KEY),
76
+ 'sub' => __('E-Product', AAM_KEY),
77
+ 'option' => 'frontend.eproduct',
78
+ 'preview' => 'frontend-eproduct-preview',
79
+ 'exclude' => array(AAM_Core_Subject_Visitor::UID),
80
+ 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('[Premium feature!] Start selling access to the %s. Access will be granted to read, view or download %s only if selected E-Product had been purchased. For more information %scheck this article%s.', 'b'), '%s', '%s', "<a href='https://aamplugin.com/help/how-to-monetize-access-to-the-wordpress-content' target='_blank'>", '</a>')
81
+ ),
82
+ ),
83
+ 'backend' => array(
84
+ 'list' => array(
85
+ 'title' => __('List', AAM_KEY),
86
+ 'exclude' => array(AAM_Core_Subject_Visitor::UID),
87
+ 'descr' => __('Hide %s however access with a direct URL is still allowed. When there are more than 500 posts, this option may not be applied immediately because, for performance reasons, AAM checks limited number of posts per request.', AAM_KEY),
88
+ 'config' => 'check-post-visibility'
89
+ ),
90
+ 'edit' => array(
91
+ 'title' => __('Edit', AAM_KEY),
92
+ 'exclude' => array(AAM_Core_Subject_Visitor::UID),
93
+ 'descr' => __('Restrict access to edit the %s. Any attempts to edit %s will result in redirecting user based on the Access Denied Redirect rule.', AAM_KEY)
94
+ ),
95
+ 'delete' => array(
96
+ 'title' => __('Delete', AAM_KEY),
97
+ 'exclude' => array(AAM_Core_Subject_Visitor::UID),
98
+ 'descr' => __('Restrict access to trash or permanently delete %s.', AAM_KEY)
99
+ ),
100
+ 'publish' => array(
101
+ 'title' => __('Publish', AAM_KEY),
102
+ 'exclude' => array(AAM_Core_Subject_Visitor::UID),
103
+ 'descr' => __('Restrict access to publish the %s. User will be allowed only submit the %s for review.', AAM_KEY)
104
+ )
105
+ )
106
+ );
107
+ }
108
+ }
Application/Backend/View/SecurityOptionList.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * ======================================================================
5
- * LICENSE: This file is subject to the terms and conditions defined in *
6
- * file 'license.txt', which is part of this source code package. *
7
- * ======================================================================
8
- */
9
-
10
- return array(
11
- 'login-timeout' => array(
12
- 'title' => __('Login Timeout', AAM_KEY),
13
- 'descr' => sprintf(__('Delay the login process for %s second to significantly reduce the chance for brute force or dictionary attack.', AAM_KEY), AAM_Core_Config::get('security.login.timeout', 1)),
14
- 'value' => AAM_Core_Config::get('login-timeout', false)
15
- ),
16
- 'login-ip-track' => array(
17
- 'title' => __('Track IP Address', AAM_KEY),
18
- 'descr' => __('Track the IP address for the last successful user login and trigger double authentication via email when the same username/password combination is used to login from a different IP address.', AAM_KEY),
19
- 'value' => AAM_Core_Config::get('login-ip-track', false),
20
- ),
21
- 'brute-force-lockout' => array(
22
- 'title' => __('Brute Force Lockout', AAM_KEY),
23
- 'descr' => sprintf(__('Automatically reject login attempts if number of unsuccessful login attempts is more than %s over the period of %s.', AAM_KEY), AAM_Core_Config::get('security.login.attempts', 20), AAM_Core_Config::get('security.login.period', '2 minutes')),
24
- 'value' => AAM_Core_Config::get('brute-force-lockout', false),
25
- )
26
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/View/UtilityOptionList.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * ======================================================================
5
- * LICENSE: This file is subject to the terms and conditions defined in *
6
- * file 'license.txt', which is part of this source code package. *
7
- * ======================================================================
8
- */
9
-
10
- return array(
11
- 'manage-capability' => array(
12
- 'title' => __('Edit/Delete Capabilities', AAM_KEY),
13
- 'descr' => AAM_Backend_View_Helper::preparePhrase('Allow to edit or delete any capability on the Capabilities tab. [Note!] For experienced users only. Changing or deleting capability may result in loosing access to some features or the entire website.', 'b'),
14
- 'value' => AAM_Core_Config::get('manage-capability', false),
15
- 'category' => 'core'
16
- ),
17
- 'backend-access-control' => array(
18
- 'title' => __('Backend Access Control', AAM_KEY),
19
- 'descr' => __('Allow AAM to manage access to backend resources. If there is no need to manage access to the website backend then keep this option unchecked as it may increase your webiste performance.', AAM_KEY),
20
- 'value' => AAM_Core_Config::get('backend-access-control', true),
21
- 'category' => 'core'
22
- ),
23
- 'frontend-access-control' => array(
24
- 'title' => __('Frontend Access Control', AAM_KEY),
25
- 'descr' => __('Allow AAM to manage access to frontend resources. If there is no need to manage access to the website frontend then keep this option unchecked as it may increase your webiste performance.', AAM_KEY),
26
- 'value' => AAM_Core_Config::get('frontend-access-control', true),
27
- 'category' => 'core'
28
- ),
29
- 'media-access-control' => array(
30
- 'title' => __('Media Files Access Control', AAM_KEY),
31
- 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Allow AAM to manage a physically access to all media files located in the defined by the system [uploads] folder. [Note!] This feature requires additional steps as described in %sthis article%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-media-access" target="_blank">', '</a>'),
32
- 'value' => AAM_Core_Config::get('media-access-control', false),
33
- 'category' => 'post'
34
- ),
35
- 'check-post-visibility' => array(
36
- 'title' => __('Check Post Visibility', AAM_KEY),
37
- 'descr' => __('For performance reasons, keep this option uncheck if do not use LIST or LIST TO OTHERS access options on Posts & Pages tab. When it is checked, AAM will filter list of posts that are hidden for a user on both frontend and backend.', AAM_KEY),
38
- 'value' => AAM_Core_Config::get('check-post-visibility', true),
39
- 'category' => 'post'
40
- ),
41
- 'manage-hidden-post-types' => array(
42
- 'title' => __('Manage Hidden Post Types', AAM_KEY),
43
- 'descr' => __('By default AAM allows you to manage access only to public post types on Posts & Pages tab. By enabling this feature, you also will be able to manage access to hidden post types like revisions, navigation menus or any other custom post types that are not registered as public.', AAM_KEY),
44
- 'value' => AAM_Core_Config::get('manage-hidden-post-types', false),
45
- 'category' => 'post'
46
- ),
47
- 'render-access-metabox' => array(
48
- 'title' => __('Render Access Manager Metabox', AAM_KEY),
49
- 'descr' => __('Render Access Manager metabox on all post and category edit pages. Access Manager metabox is the quick way to manage access to any post or category without leaving an edit page.', AAM_KEY),
50
- 'value' => AAM_Core_Config::get('render-access-metabox', true),
51
- 'category' => 'core'
52
- ),
53
- 'show-access-link' => array(
54
- 'title' => __('Show Access Link', AAM_KEY),
55
- 'descr' => __('Show Access shortcut link under any post, page, custom post type, category, custom taxonomy title or user name.', AAM_KEY),
56
- 'value' => AAM_Core_Config::get('show-access-link', true),
57
- 'category' => 'core'
58
- ),
59
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/phtml/contact.phtml DELETED
@@ -1,18 +0,0 @@
1
- <?php if (defined('AAM_KEY')) { ?>
2
- <div class="aam-feature" id="contact-content">
3
- <div class="row">
4
- <div class="col-xs-12">
5
- <p class="aam-info">
6
- <?php echo __('Contact us if you have any questions or concerns but follow few simple rules:'); ?>
7
- </p>
8
- <ol class="text-larger">
9
- <li>Keep your message short. As longer message as more times we will take to response;</li>
10
- <li>Use English, Polish, Russian or Ukrainian language. Otherwise we may ignore your message;</li>
11
- <li>In case of a problem with the plugin, include screenshots, videos or step-by-step description on how to reproduce the issue;</li>
12
- <li>Email us at <a href="mailto:support@aamplugin.com" class="aam-highlight">support@aamplugin.com</a>, add us to Google Hangout or submit contact form on <a href="https://aamplugin.com/help" target="_blank">aamplugin.com</a> website to speed-up the response. Any other channels of communication we will be ignored.</li>
13
- <li>Be patient. It might take up to 3 business days for us to response.</li>
14
- </ol>
15
- </div>
16
- </div>
17
- </div>
18
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/phtml/{extension.phtml → extensions.phtml} RENAMED
@@ -1,9 +1,9 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
- <div class="aam-feature" id="extension-content">
3
  <div class="row">
4
  <div class="col-xs-12">
5
  <p class="aam-info">
6
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('By purchasing any extension below you obtain the license to use it [for one life site] unless you purchased %sdevelopment package%s. The license can be used for unlimited number of test or development sites where URL is either [localhost] or starts with [dev.], [staging.], [test.] or [demo.] [before it is activated on the life site]. Contact us immediately if you have troubles installing extension. [Money back guaranteed] within 10 day from the time of purchase.', 'b', 'i', 'i', 'i', 'i', 'i', 'b', 'b'), '<a href="https://aamplugin.com/development-package" target="_blank">', '</a>'); ?><br/>
7
  </p>
8
  </div>
9
  </div>
@@ -36,31 +36,26 @@
36
  <table class="table table-striped table-bordered">
37
  <tbody>
38
  <?php foreach ($commercial as $i => $product) { ?>
39
- <?php if ($i == 2) { ?>
40
- <tr class="aam-highligh-row">
41
- <td colspan="2">Do not know which extension to choose? <b>Please do not hesitate to <a href="mailto:support@aamplugin.com">send us a message to support@aamplugin.com</a></b>. We speak English, Russian, Ukrainian and Polish. Any other language is acceptable, however we might have some lost in translation.</td>
42
- </tr>
43
- <?php } ?>
44
- <tr>
45
- <td>
46
- <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['new']) ? ' <span class="badge">NEW</span> ' : ''), (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''); ?></span>
47
- <?php if (!empty($product['license']) && $this->canShowLicense()) { ?><small class="aam-license-key"><b>License:</b> <?php echo $product['license'] . (!empty($product['expire']) ? " (updates expire at {$product['expire']})" : ''); ?></small><?php } ?>
48
- <p class="aam-extension-description">
49
- <?php echo $product['description']; ?>
50
- </p>
51
- </td>
52
- <td>
53
- <?php if ($product['status'] == AAM_Extension_Repository::STATUS_INSTALLED) { ?>
54
- <span class="aam-extension-installed"><i class="icon-check"></i> <?php echo __('Installed', AAM_KEY); ?></span>
55
- <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_UPDATE) { ?>
56
- <a href="#" class="btn btn-sm btn-warning btn-block aam-update-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-arrows-cw"></i> <?php echo __('Update', AAM_KEY); ?></a>
57
- <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_INACTIVE) { ?>
58
- <span class="aam-extension-inactive"><i class="icon-stop"></i> <?php echo __('Inactive', AAM_KEY); ?></span>
59
- <?php } else { ?>
60
- <a href="<?php echo $product['storeURL']; ?>" target="_blank" class="btn btn-sm btn-primary btn-block"><i class="icon-link"></i> <?php echo __('Read More', AAM_KEY); ?></a>
61
- <?php } ?>
62
- </td>
63
- </tr>
64
  <?php } ?>
65
  </tbody>
66
  </table>
@@ -70,7 +65,7 @@
70
  <tbody>
71
  <?php foreach ($free as $product) { ?>
72
  <tr>
73
- <td>
74
  <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''), ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></span>
75
  <p class="aam-extension-description">
76
  <?php echo $product['description']; ?>
@@ -78,9 +73,11 @@
78
  </td>
79
  <td>
80
  <?php if ($product['status'] == AAM_Extension_Repository::STATUS_INSTALLED) { ?>
81
- <span class="aam-extension-installed"><i class="icon-check"></i> <?php echo __('Installed', AAM_KEY); ?></span>
82
  <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_UPDATE) { ?>
83
  <a href="#" class="btn btn-sm btn-warning btn-block aam-update-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-arrows-cw"></i> <?php echo __('Update', AAM_KEY); ?></a>
 
 
84
  <?php } else { ?>
85
  <a href="#" class="btn btn-sm btn-success btn-block aam-download-extension" data-license="<?php echo $product['license']; ?>"><i class="icon-download-cloud"></i> <?php echo __('Download', AAM_KEY); ?></a>
86
  <?php } ?>
1
  <?php if (defined('AAM_KEY')) { ?>
2
+ <div id="extension-content" class="extension-container">
3
  <div class="row">
4
  <div class="col-xs-12">
5
  <p class="aam-info">
6
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('By purchasing any of the extensions below, you obtain the license that allows you to install and use our software for life and for one physical WordPress installation only. However you will be able to download new updates for one year from the time of purchase unless you purchased the [Extended version]. Exceptions are websites where URL is either [localhost] or starts with [dev.], [staging.], [test.] or [demo.] They are considered as development websites and you can use the purchased license unlimited number of times before it is activated on a production website. [Money back guaranteed] within 10 day from the time of purchase.', 'i', 'i', 'i', 'i', 'i', 'i', 'b'), '<a href="https://aamplugin.com/development-package" target="_blank">', '</a>'); ?><br/>
7
  </p>
8
  </div>
9
  </div>
36
  <table class="table table-striped table-bordered">
37
  <tbody>
38
  <?php foreach ($commercial as $i => $product) { ?>
39
+ <tr>
40
+ <td width="80%">
41
+ <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['new']) ? ' <span class="badge">NEW</span> ' : ''), (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''); ?></span>
42
+ <?php if (!empty($product['license']) && $this->canShowLicense()) { ?><small class="aam-license-key"><b>License:</b> <?php echo $product['license'] . (!empty($product['expire']) ? " (updates expire on {$product['expire']})" : ''); ?></small><?php } ?>
43
+ <p class="aam-extension-description">
44
+ <?php echo $product['description']; ?>
45
+ </p>
46
+ </td>
47
+ <td>
48
+ <?php if ($product['status'] == AAM_Extension_Repository::STATUS_INSTALLED) { ?>
49
+ <a href="#" class="btn btn-sm btn-danger btn-block aam-deactivate-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-attention-circled"></i> <?php echo __('Deactivate', AAM_KEY); ?></a>
50
+ <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_UPDATE) { ?>
51
+ <a href="#" class="btn btn-sm btn-warning btn-block aam-update-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-arrows-cw"></i> <?php echo __('Update', AAM_KEY); ?></a>
52
+ <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_INACTIVE) { ?>
53
+ <a href="#" class="btn btn-sm btn-success btn-block aam-activate-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-check"></i> <?php echo __('Activate', AAM_KEY); ?></a>
54
+ <?php } else { ?>
55
+ <a href="<?php echo $product['url']; ?>" target="_blank" class="btn btn-sm btn-primary btn-block"><i class="icon-link"></i> <?php echo __('Read More', AAM_KEY); ?></a>
56
+ <?php } ?>
57
+ </td>
58
+ </tr>
 
 
 
 
 
59
  <?php } ?>
60
  </tbody>
61
  </table>
65
  <tbody>
66
  <?php foreach ($free as $product) { ?>
67
  <tr>
68
+ <td width="80%">
69
  <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['version']) ? ' <small class="text-muted">v' . $product['version'] . '</small>' : ''), ' - ' . ('<span class="text-success">' . __('Free', AAM_KEY) . '</span>'); ?></span>
70
  <p class="aam-extension-description">
71
  <?php echo $product['description']; ?>
73
  </td>
74
  <td>
75
  <?php if ($product['status'] == AAM_Extension_Repository::STATUS_INSTALLED) { ?>
76
+ <a href="#" class="btn btn-sm btn-danger btn-block aam-deactivate-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-attention-circled"></i> <?php echo __('Deactivate', AAM_KEY); ?></a>
77
  <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_UPDATE) { ?>
78
  <a href="#" class="btn btn-sm btn-warning btn-block aam-update-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-arrows-cw"></i> <?php echo __('Update', AAM_KEY); ?></a>
79
+ <?php } elseif ($product['status'] == AAM_Extension_Repository::STATUS_INACTIVE) { ?>
80
+ <a href="#" class="btn btn-sm btn-success btn-block aam-activate-extension" data-product="<?php echo $product['id']; ?>"><i class="icon-check"></i> <?php echo __('Activate', AAM_KEY); ?></a>
81
  <?php } else { ?>
82
  <a href="#" class="btn btn-sm btn-success btn-block aam-download-extension" data-license="<?php echo $product['license']; ?>"><i class="icon-download-cloud"></i> <?php echo __('Download', AAM_KEY); ?></a>
83
  <?php } ?>
Application/Backend/phtml/frame.phtml CHANGED
@@ -13,7 +13,7 @@
13
 
14
  <?php do_action( 'admin_print_scripts' ); ?>
15
 
16
- <?php $object = AAM_Backend_Feature_Post::getCurrentObject(); ?>
17
  </head>
18
 
19
  <body id="aam-container">
@@ -22,21 +22,21 @@
22
  <div class="panel panel-default" style="border-radius:0;">
23
  <div class="panel-body">
24
  <ul class="nav nav-tabs" role="tablist">
25
- <?php if (AAM_Backend_View::userCan('aam_list_roles')) { ?>
26
  <li role="presentation" class="active"><a href="#roles" aria-controls="roles" role="tab" data-toggle="tab"><i class="icon-users" data-toggle="tooltip" data-placement="top" title="Roles"></i></a></li>
27
  <?php } ?>
28
- <?php if (AAM_Backend_View::userCan('list_users')) { ?>
29
  <li role="presentation"><a href="#users" aria-controls="users" role="tab" data-toggle="tab"><i class="icon-user" data-toggle="tooltip" data-placement="top" title="Users"></i></a></li>
30
  <?php } ?>
31
- <?php if (AAM_Backend_View::userCan('aam_manage_visitors')) { ?>
32
  <li role="presentation"><a href="#visitor" aria-controls="visitor" role="tab" data-toggle="tab"><i class="icon-user-secret" data-toggle="tooltip" data-placement="top" title="Visitor"></i></a></li>
33
  <?php } ?>
34
- <?php if (AAM_Backend_View::userCan('aam_manage_default')) { ?>
35
  <li role="presentation"><a href="#default" aria-controls="default" role="tab" data-toggle="tab" class="text-danger"><i class="icon-asterisk" data-toggle="tooltip" data-placement="top" title="Default"></i></a></li>
36
  <?php } ?>
37
  </ul>
38
  <div class="tab-content">
39
- <?php if (AAM_Backend_View::userCan('aam_list_roles')) { ?>
40
  <div role="tabpanel" class="tab-pane active" id="roles">
41
  <table id="role-list" class="table table-striped table-bordered">
42
  <thead>
@@ -52,7 +52,7 @@
52
  </table>
53
  </div>
54
  <?php } ?>
55
- <?php if (AAM_Backend_View::userCan('list_users')) { ?>
56
  <div role="tabpanel" class="tab-pane" id="users">
57
  <table id="user-list" class="table table-striped table-bordered">
58
  <thead>
@@ -68,7 +68,7 @@
68
  </table>
69
  </div>
70
  <?php } ?>
71
- <?php if (AAM_Backend_View::userCan('aam_manage_visitors')) { ?>
72
  <div role="tabpanel" class="tab-pane" id="visitor">
73
  <div class="visitor-message">
74
  <span class="aam-bordered"><?php echo sprintf(__('Manage access to %s for visitors (any user that is not authenticated)', AAM_KEY), '<b>' . ($object->type == 'post' ? $object->post->post_title : $object->term->name) . '</b>'); ?>.</span>
@@ -76,7 +76,7 @@
76
  </div>
77
  </div>
78
  <?php } ?>
79
- <?php if (AAM_Backend_View::userCan('aam_manage_default')) { ?>
80
  <div role="tabpanel" class="tab-pane" id="default">
81
  <div class="visitor-message">
82
  <span class="aam-bordered"><?php echo sprintf(__('Manage default access to %s for all users, roles and visitor. This includes Administrator role and yourself', AAM_KEY), '<b>' . ($object->type == 'post' ? $object->post->post_title : $object->term->name) . '</b>'); ?>.</span>
@@ -102,7 +102,7 @@
102
  </div>
103
 
104
  <?php if ($object->id) { ?>
105
- <input type="hidden" id="load-post-object" value="<?php echo ($object->type == 'post' ? $object->post->ID : $object->term->term_id); ?>" />
106
  <input type="hidden" id="load-post-object-type" value="<?php echo $object->type; ?>" />
107
  <input type="hidden" id="load-post-object-title" value="<?php echo ($object->type == 'post' ? $object->post->post_title : $object->term->name); ?>" />
108
  <?php } ?>
@@ -111,22 +111,23 @@
111
  <?php if ($object->type == 'post') { ?>
112
  <table class="table table-striped table-bordered">
113
  <tbody>
114
- <?php if (AAM_Core_Config::get('frontend-access-control', true)) { ?>
 
 
 
115
  <tr>
116
  <td colspan="2" class="aam-table-group">
117
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Frontend', AAM_KEY); ?></strong>
118
  </td>
119
  </tr>
120
 
121
- <?php foreach (AAM_Backend_Feature_Post::getAccessOptionList('frontend') as $option => $data) { ?>
122
  <tr>
123
  <td width="90%">
124
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
125
- <?php
126
- if (!empty($data['sub'])) {
127
- echo $data['sub'];
128
- }
129
- ?>
130
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>">---</p>
131
  </td>
132
  <td>
@@ -136,26 +137,22 @@
136
  </td>
137
  </tr>
138
  <?php } ?>
139
-
140
- <?php do_action('aam-post-access-option-action', 'post', 'frontend'); ?>
141
  <?php } ?>
142
 
143
- <?php if (AAM_Core_Config::get('backend-access-control', true)) { ?>
144
  <tr class="aam-backend-post-access">
145
  <td colspan="2" class="aam-table-group">
146
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Backend', AAM_KEY); ?></strong>
147
  </td>
148
  </tr>
149
 
150
- <?php foreach (AAM_Backend_Feature_Post::getAccessOptionList('backend') as $option => $data) { ?>
151
  <tr class="aam-backend-post-access">
152
  <td width="90%">
153
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
154
- <?php
155
- if (!empty($data['sub'])) {
156
- echo $data['sub'];
157
- }
158
- ?>
159
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>">---</p>
160
  </td>
161
  <td>
@@ -165,8 +162,6 @@
165
  </td>
166
  </tr>
167
  <?php } ?>
168
-
169
- <?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
170
  <?php } ?>
171
  </tbody>
172
  </table>
13
 
14
  <?php do_action( 'admin_print_scripts' ); ?>
15
 
16
+ <?php $object = AAM_Backend_Feature_Main_Post::getCurrentObject(); ?>
17
  </head>
18
 
19
  <body id="aam-container">
22
  <div class="panel panel-default" style="border-radius:0;">
23
  <div class="panel-body">
24
  <ul class="nav nav-tabs" role="tablist">
25
+ <?php if (current_user_can('aam_list_roles')) { ?>
26
  <li role="presentation" class="active"><a href="#roles" aria-controls="roles" role="tab" data-toggle="tab"><i class="icon-users" data-toggle="tooltip" data-placement="top" title="Roles"></i></a></li>
27
  <?php } ?>
28
+ <?php if (current_user_can('list_users')) { ?>
29
  <li role="presentation"><a href="#users" aria-controls="users" role="tab" data-toggle="tab"><i class="icon-user" data-toggle="tooltip" data-placement="top" title="Users"></i></a></li>
30
  <?php } ?>
31
+ <?php if (current_user_can('aam_manage_visitors')) { ?>
32
  <li role="presentation"><a href="#visitor" aria-controls="visitor" role="tab" data-toggle="tab"><i class="icon-user-secret" data-toggle="tooltip" data-placement="top" title="Visitor"></i></a></li>
33
  <?php } ?>
34
+ <?php if (current_user_can('aam_manage_default')) { ?>
35
  <li role="presentation"><a href="#default" aria-controls="default" role="tab" data-toggle="tab" class="text-danger"><i class="icon-asterisk" data-toggle="tooltip" data-placement="top" title="Default"></i></a></li>
36
  <?php } ?>
37
  </ul>
38
  <div class="tab-content">
39
+ <?php if (current_user_can('aam_list_roles')) { ?>
40
  <div role="tabpanel" class="tab-pane active" id="roles">
41
  <table id="role-list" class="table table-striped table-bordered">
42
  <thead>
52
  </table>
53
  </div>
54
  <?php } ?>
55
+ <?php if (current_user_can('list_users')) { ?>
56
  <div role="tabpanel" class="tab-pane" id="users">
57
  <table id="user-list" class="table table-striped table-bordered">
58
  <thead>
68
  </table>
69
  </div>
70
  <?php } ?>
71
+ <?php if (current_user_can('aam_manage_visitors')) { ?>
72
  <div role="tabpanel" class="tab-pane" id="visitor">
73
  <div class="visitor-message">
74
  <span class="aam-bordered"><?php echo sprintf(__('Manage access to %s for visitors (any user that is not authenticated)', AAM_KEY), '<b>' . ($object->type == 'post' ? $object->post->post_title : $object->term->name) . '</b>'); ?>.</span>
76
  </div>
77
  </div>
78
  <?php } ?>
79
+ <?php if (current_user_can('aam_manage_default')) { ?>
80
  <div role="tabpanel" class="tab-pane" id="default">
81
  <div class="visitor-message">
82
  <span class="aam-bordered"><?php echo sprintf(__('Manage default access to %s for all users, roles and visitor. This includes Administrator role and yourself', AAM_KEY), '<b>' . ($object->type == 'post' ? $object->post->post_title : $object->term->name) . '</b>'); ?>.</span>
102
  </div>
103
 
104
  <?php if ($object->id) { ?>
105
+ <input type="hidden" id="load-post-object" value="<?php echo ($object->type == 'post' ? $object->post->ID : $object->term->term_id . '|' . $object->term->taxonomy); ?>" />
106
  <input type="hidden" id="load-post-object-type" value="<?php echo $object->type; ?>" />
107
  <input type="hidden" id="load-post-object-title" value="<?php echo ($object->type == 'post' ? $object->post->post_title : $object->term->name); ?>" />
108
  <?php } ?>
111
  <?php if ($object->type == 'post') { ?>
112
  <table class="table table-striped table-bordered">
113
  <tbody>
114
+ <?php $frontend = AAM_Backend_Feature_Main_Post::getAccessOptionList('frontend'); ?>
115
+ <?php $backend = AAM_Backend_Feature_Main_Post::getAccessOptionList('backend'); ?>
116
+
117
+ <?php if (count($frontend) && AAM_Core_Config::get('frontend-access-control', true)) { ?>
118
  <tr>
119
  <td colspan="2" class="aam-table-group">
120
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Frontend', AAM_KEY); ?></strong>
121
  </td>
122
  </tr>
123
 
124
+ <?php foreach ($frontend as $option => $data) { ?>
125
  <tr>
126
  <td width="90%">
127
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
128
+ <?php if (!empty($data['sub'])) { ?>
129
+ <small><?php echo $data['sub']; ?>: <b id="<?php echo $data['preview']; ?>" data-ref="<?php echo $data['option']; ?>" class="option-preview">...</b> <a href="#modal-<?php echo str_replace('.', '-', $data['option']); ?>" data-toggle="modal" class="advanced-post-option" data-ref="<?php echo $data['option']; ?>" data-preview="#<?php echo $data['preview']; ?>"><?php echo __('change', AAM_KEY); ?></a></small>
130
+ <?php } ?>
 
 
131
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>">---</p>
132
  </td>
133
  <td>
137
  </td>
138
  </tr>
139
  <?php } ?>
 
 
140
  <?php } ?>
141
 
142
+ <?php if (count($backend) && AAM_Core_Config::get('backend-access-control', true)) { ?>
143
  <tr class="aam-backend-post-access">
144
  <td colspan="2" class="aam-table-group">
145
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Backend', AAM_KEY); ?></strong>
146
  </td>
147
  </tr>
148
 
149
+ <?php foreach ($backend as $option => $data) { ?>
150
  <tr class="aam-backend-post-access">
151
  <td width="90%">
152
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
153
+ <?php if (!empty($data['sub'])) { ?>
154
+ <small><?php echo $data['sub']; ?>: <b id="<?php echo $data['preview']; ?>" data-ref="<?php echo $data['option']; ?>" class="option-preview">...</b> <a href="#modal-<?php echo str_replace('.', '-', $data['option']); ?>" data-toggle="modal" class="advanced-post-option" data-ref="<?php echo $data['option']; ?>" data-preview="#<?php echo $data['preview']; ?>"><?php echo __('change', AAM_KEY); ?></a></small>
155
+ <?php } ?>
 
 
156
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>">---</p>
157
  </td>
158
  <td>
162
  </td>
163
  </tr>
164
  <?php } ?>
 
 
165
  <?php } ?>
166
  </tbody>
167
  </table>
Application/Backend/phtml/index.phtml CHANGED
@@ -1,6 +1,6 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="wrap" id="aam-container">
3
- <div class="row">
4
  <div class="col-xs-12 col-md-8">
5
  <div class="aam-current-subject"></div>
6
  </div>
@@ -11,7 +11,7 @@
11
  <div class="metabox-holder">
12
  <div class="postbox">
13
  <h3 class="hndle">
14
- <span><?php echo __('Access Control 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">
@@ -24,7 +24,6 @@
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
- <p class="text-larger"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('[Still do not know where to start?] Check our %s[Get Started]%s section.', 'b', 'b'), '<a href="https://aamplugin.com/get-started" target="_blank">', '</a>'); ?></p>
28
  </div>
29
  </div>
30
  </div>
@@ -32,9 +31,9 @@
32
  </div>
33
  </div>
34
 
35
- <div class="col-xs-12 col-md-4">
36
- <?php if (AAM_Core_Console::hasIssues()) { ?>
37
- <div class="metabox-holder">
38
  <div class="postbox">
39
  <h3 class="hndle text-danger">
40
  <i class='icon-attention-circled'></i> <span><?php echo __('Notifications', AAM_KEY); ?></span>
@@ -42,7 +41,7 @@
42
  <div class="inside">
43
  <div class="aam-postbox-inside">
44
  <ul class="aam-error-list">
45
- <?php foreach (AAM_Core_Console::getWarnings() as $message) { ?>
46
  <li><?php echo $message; ?></li>
47
  <?php } ?>
48
  </ul>
@@ -52,29 +51,48 @@
52
  </div>
53
  <?php } ?>
54
 
55
- <div class="metabox-holder">
56
  <div class="postbox">
57
  <div class="inside">
58
  <div class="aam-social">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  <a href="https://aamplugin.com/help" title="Help" target="_blank">
60
  <i class="icon-help-circled"></i>
61
  <span>Help</span>
62
  </a>
63
- <a target="_blank" href="mailto:support@aamplugin.com">
64
- <i class="icon-mail-alt"></i>
65
- <span>Email Us</span>
66
- </a>
67
- <a href="https://wordpress.org/support/plugin/advanced-access-manager/reviews/" title="Rate Me" target="_blank">
68
- <i class="icon-star"></i>
69
- <span>Reviews</span>
70
- </a>
 
 
 
71
  </div>
72
  </div>
73
  </div>
74
  </div>
75
 
76
  <?php if (is_network_admin() && !defined('AAM_MULTISITE')) { ?>
77
- <div class="metabox-holder">
78
  <div class="postbox">
79
  <h3 class="hndle text-warning">
80
  <i class='icon-attention-circled'></i> <span><?php echo __('AAM Multisite', AAM_KEY); ?></span>
@@ -89,30 +107,30 @@
89
 
90
  <?php do_action('aam-sidebar-ui-action', 'top'); ?>
91
 
92
- <div class="metabox-holder">
93
  <div class="postbox">
94
  <h3 class="hndle">
95
- <span><?php echo __('Users/Roles Panel', AAM_KEY); ?></span>
96
  <span class="aam-help-menu" data-target="#user-role-manager-inside"><i class="icon-help-circled"></i></span>
97
  </h3>
98
  <div class="inside" id="user-role-manager-inside">
99
  <div class="aam-postbox-inside">
100
  <ul class="nav nav-tabs" role="tablist">
101
- <?php if (AAM_Backend_View::userCan('aam_list_roles')) { ?>
102
  <li role="presentation" class="active text-center"><a href="#roles" aria-controls="roles" role="tab" data-toggle="tab"><i class="icon-users"></i><br/><?php echo __('Roles', AAM_KEY); ?></a></li>
103
  <?php } ?>
104
- <?php if (AAM_Backend_View::userCan('list_users')) { ?>
105
  <li role="presentation" class="text-center"><a href="#users" aria-controls="users" role="tab" data-toggle="tab"><i class="icon-user"></i><br/><?php echo __('Users', AAM_KEY); ?></a></li>
106
  <?php } ?>
107
- <?php if (AAM_Backend_View::userCan('aam_manage_visitors')) { ?>
108
  <li role="presentation" class="text-center"><a href="#visitor" aria-controls="visitor" role="tab" data-toggle="tab"><i class="icon-user-secret"></i><br/><?php echo __('Visitor', AAM_KEY); ?></a></li>
109
  <?php } ?>
110
- <?php if (AAM_Backend_View::userCan('aam_manage_default')) { ?>
111
  <li role="presentation" class="text-center"><a href="#default" aria-controls="default" role="tab" data-toggle="tab" class="text-danger"><i class="icon-asterisk"></i><br/><?php echo __('Default', AAM_KEY); ?></a></li>
112
  <?php } ?>
113
  </ul>
114
  <div class="tab-content">
115
- <?php if (AAM_Backend_View::userCan('aam_list_roles')) { ?>
116
  <div role="tabpanel" class="tab-pane active" id="roles">
117
  <table id="role-list" class="table table-striped table-bordered">
118
  <thead>
@@ -144,6 +162,7 @@
144
  <label><?php echo __('Role Expiration', AAM_KEY); ?> <a href="https://aamplugin.com/help/how-to-manage-wordpress-roles" target="_blank" data-toggle="tooltip" title="For how long user can have this role. Click to learn more."><i class="icon-help-circled"></i></a></label>
145
  <input type="text" class="form-control" name="expire" placeholder="<?php echo __('Enter Expiration Rule', AAM_KEY); ?>" />
146
  </div>
 
147
  <?php echo apply_filters('aam-add-role-ui-filter', AAM_Backend_View::getInstance()->loadPartial('role-inheritance.phtml')); ?>
148
  </div>
149
  <div class="modal-footer">
@@ -199,7 +218,7 @@
199
  </div>
200
  </div>
201
  <?php } ?>
202
- <?php if (AAM_Backend_View::userCan('list_users')) { ?>
203
  <div role="tabpanel" class="tab-pane" id="users">
204
  <table id="user-list" class="table table-striped table-bordered">
205
  <thead>
@@ -215,7 +234,7 @@
215
  </table>
216
  </div>
217
  <?php } ?>
218
- <?php if (AAM_Backend_View::userCan('aam_manage_visitors')) { ?>
219
  <div role="tabpanel" class="tab-pane" id="visitor">
220
  <div class="visitor-message">
221
  <span class="aam-bordered"><?php echo __('Manage access to your website for visitors (any user that is not authenticated)', AAM_KEY); ?>.</span>
@@ -223,7 +242,7 @@
223
  </div>
224
  </div>
225
  <?php } ?>
226
- <?php if (AAM_Backend_View::userCan('aam_manage_default')) { ?>
227
  <div role="tabpanel" class="tab-pane" id="default">
228
  <div class="visitor-message">
229
  <span class="aam-bordered"><?php echo __('Manage default access to your website resources for all users, roles and visitor. This includes Administrator role and your user', AAM_KEY); ?>.</span>
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="wrap" id="aam-container">
3
+ <div class="row" id="aam-subject-banner">
4
  <div class="col-xs-12 col-md-8">
5
  <div class="aam-current-subject"></div>
6
  </div>
11
  <div class="metabox-holder">
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">
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>
31
  </div>
32
  </div>
33
 
34
+ <div class="col-xs-12 col-md-4 aam-sidebar">
35
+ <?php if (AAM_Core_Console::count() && current_user_can('aam_show_notifications')) { ?>
36
+ <div class="metabox-holder shared-metabox">
37
  <div class="postbox">
38
  <h3 class="hndle text-danger">
39
  <i class='icon-attention-circled'></i> <span><?php echo __('Notifications', AAM_KEY); ?></span>
41
  <div class="inside">
42
  <div class="aam-postbox-inside">
43
  <ul class="aam-error-list">
44
+ <?php foreach (AAM_Core_Console::getAll() as $message) { ?>
45
  <li><?php echo $message; ?></li>
46
  <?php } ?>
47
  </ul>
51
  </div>
52
  <?php } ?>
53
 
54
+ <div class="metabox-holder shared-metabox">
55
  <div class="postbox">
56
  <div class="inside">
57
  <div class="aam-social">
58
+ <a href="#" title="Access" data-type="main" class="aam-area text-danger">
59
+ <i class="icon-cog-alt"></i>
60
+ <span>Access</span>
61
+ </a>
62
+ <?php if (current_user_can('aam_manage_settings')) { ?>
63
+ <a href="#" title="Settings" data-type="settings" class="aam-area">
64
+ <i class="icon-wrench"></i>
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>
72
+ </a>
73
+ <?php } ?>
74
  <a href="https://aamplugin.com/help" title="Help" target="_blank">
75
  <i class="icon-help-circled"></i>
76
  <span>Help</span>
77
  </a>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ <div class="metabox-holder extensions-metabox" style="display:none;">
84
+ <div class="postbox">
85
+ <div class="inside">
86
+ <div class="aam-postbox-inside text-center">
87
+ <p class="alert alert-info text-larger"><?php echo AAM_Backend_View_Helper::preparePhrase('The [Development Package] allows you to get all premium extensions for [unlimited number of websites].', 'i', 'b'); ?></p>
88
+ <a href="https://aamplugin.com/development-package" target="_blank" class="btn btn-sm btn-primary btn-block"><i class="icon-link"></i> <?php echo __('Read More', AAM_KEY); ?></a>
89
  </div>
90
  </div>
91
  </div>
92
  </div>
93
 
94
  <?php if (is_network_admin() && !defined('AAM_MULTISITE')) { ?>
95
+ <div class="metabox-holder main-metabox">
96
  <div class="postbox">
97
  <h3 class="hndle text-warning">
98
  <i class='icon-attention-circled'></i> <span><?php echo __('AAM Multisite', AAM_KEY); ?></span>
107
 
108
  <?php do_action('aam-sidebar-ui-action', 'top'); ?>
109
 
110
+ <div class="metabox-holder main-metabox">
111
  <div class="postbox">
112
  <h3 class="hndle">
113
+ <span><?php echo __('Users/Roles Manager', AAM_KEY); ?></span>
114
  <span class="aam-help-menu" data-target="#user-role-manager-inside"><i class="icon-help-circled"></i></span>
115
  </h3>
116
  <div class="inside" id="user-role-manager-inside">
117
  <div class="aam-postbox-inside">
118
  <ul class="nav nav-tabs" role="tablist">
119
+ <?php if (current_user_can('aam_list_roles')) { ?>
120
  <li role="presentation" class="active text-center"><a href="#roles" aria-controls="roles" role="tab" data-toggle="tab"><i class="icon-users"></i><br/><?php echo __('Roles', AAM_KEY); ?></a></li>
121
  <?php } ?>
122
+ <?php if (current_user_can('list_users')) { ?>
123
  <li role="presentation" class="text-center"><a href="#users" aria-controls="users" role="tab" data-toggle="tab"><i class="icon-user"></i><br/><?php echo __('Users', AAM_KEY); ?></a></li>
124
  <?php } ?>
125
+ <?php if (current_user_can('aam_manage_visitors')) { ?>
126
  <li role="presentation" class="text-center"><a href="#visitor" aria-controls="visitor" role="tab" data-toggle="tab"><i class="icon-user-secret"></i><br/><?php echo __('Visitor', AAM_KEY); ?></a></li>
127
  <?php } ?>
128
+ <?php if (current_user_can('aam_manage_default')) { ?>
129
  <li role="presentation" class="text-center"><a href="#default" aria-controls="default" role="tab" data-toggle="tab" class="text-danger"><i class="icon-asterisk"></i><br/><?php echo __('Default', AAM_KEY); ?></a></li>
130
  <?php } ?>
131
  </ul>
132
  <div class="tab-content">
133
+ <?php if (current_user_can('aam_list_roles')) { ?>
134
  <div role="tabpanel" class="tab-pane active" id="roles">
135
  <table id="role-list" class="table table-striped table-bordered">
136
  <thead>
162
  <label><?php echo __('Role Expiration', AAM_KEY); ?> <a href="https://aamplugin.com/help/how-to-manage-wordpress-roles" target="_blank" data-toggle="tooltip" title="For how long user can have this role. Click to learn more."><i class="icon-help-circled"></i></a></label>
163
  <input type="text" class="form-control" name="expire" placeholder="<?php echo __('Enter Expiration Rule', AAM_KEY); ?>" />
164
  </div>
165
+ <?php do_action('aam-add-role-ui-action'); ?>
166
  <?php echo apply_filters('aam-add-role-ui-filter', AAM_Backend_View::getInstance()->loadPartial('role-inheritance.phtml')); ?>
167
  </div>
168
  <div class="modal-footer">
218
  </div>
219
  </div>
220
  <?php } ?>
221
+ <?php if (current_user_can('list_users')) { ?>
222
  <div role="tabpanel" class="tab-pane" id="users">
223
  <table id="user-list" class="table table-striped table-bordered">
224
  <thead>
234
  </table>
235
  </div>
236
  <?php } ?>
237
+ <?php if (current_user_can('aam_manage_visitors')) { ?>
238
  <div role="tabpanel" class="tab-pane" id="visitor">
239
  <div class="visitor-message">
240
  <span class="aam-bordered"><?php echo __('Manage access to your website for visitors (any user that is not authenticated)', AAM_KEY); ?>.</span>
242
  </div>
243
  </div>
244
  <?php } ?>
245
+ <?php if (current_user_can('aam_manage_default')) { ?>
246
  <div role="tabpanel" class="tab-pane" id="default">
247
  <div class="visitor-message">
248
  <span class="aam-bordered"><?php echo __('Manage default access to your website resources for all users, roles and visitor. This includes Administrator role and your user', AAM_KEY); ?>.</span>
Application/Backend/phtml/main-panel.phtml CHANGED
@@ -1,10 +1,11 @@
1
  <?php if (defined('AAM_KEY')) { ?>
 
2
  <div class="row">
3
- <?php if (count(AAM_Backend_Feature::retriveList())) { ?>
4
  <div class="col-xs-12 col-md-4">
5
  <ul class="list-group" id="feature-list">
6
  <?php
7
- foreach (AAM_Backend_Feature::retriveList() as $i => $feature) {
8
  echo '<li class="list-group-item' . (isset($feature->class) ? ' ' . $feature->class : '') . '" data-feature="' . $feature->uid . '">';
9
  echo $feature->title;
10
  echo (empty($feature->notification) ? '' : ' <span class="badge">' . $feature->notification . '</span>');
@@ -15,10 +16,10 @@
15
  </div>
16
  <div class="col-xs-12 col-md-8">
17
  <?php
18
- foreach (AAM_Backend_Feature::retriveList() as $feature) {
19
- echo $feature->view->getContent();
20
- }
21
- do_action('aam-content-action');
22
  ?>
23
  </div>
24
  <?php } else { ?>
1
  <?php if (defined('AAM_KEY')) { ?>
2
+ <?php $features = AAM_Backend_Feature::retriveList($type); ?>
3
  <div class="row">
4
+ <?php if (count($features)) { ?>
5
  <div class="col-xs-12 col-md-4">
6
  <ul class="list-group" id="feature-list">
7
  <?php
8
+ foreach ($features as $i => $feature) {
9
  echo '<li class="list-group-item' . (isset($feature->class) ? ' ' . $feature->class : '') . '" data-feature="' . $feature->uid . '">';
10
  echo $feature->title;
11
  echo (empty($feature->notification) ? '' : ' <span class="badge">' . $feature->notification . '</span>');
16
  </div>
17
  <div class="col-xs-12 col-md-8">
18
  <?php
19
+ foreach ($features as $feature) {
20
+ echo $feature->view->getContent();
21
+ }
22
+ do_action('aam-content-action');
23
  ?>
24
  </div>
25
  <?php } else { ?>
Application/Backend/phtml/{404redirect.phtml → main/404redirect.phtml} RENAMED
@@ -1,5 +1,6 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="404redirect-content">
 
3
  <div class="row">
4
  <div class="col-xs-12">
5
  <p class="aam-info">
@@ -7,9 +8,11 @@
7
  </p>
8
  </div>
9
  </div>
 
10
 
11
  <div class="row">
12
  <div class="col-xs-12">
 
13
  <?php $type = AAM_Core_Config::get('frontend.404redirect.type', 'default'); ?>
14
 
15
  <div class="radio">
@@ -32,16 +35,16 @@
32
  <div class="form-group aam-404redirect-action" id="404redirect-page-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
33
  <label for="frontend-page"><?php echo __('Existing Page', AAM_KEY); ?></label>
34
  <?php
35
- wp_dropdown_pages(array(
36
- 'depth' => 99,
37
- 'selected' => AAM_Core_Config::get('frontend.404redirect.page'),
38
- 'echo' => 1,
39
- 'name' => 'frontend.404redirect.page',
40
- 'id' => 'frontend-page', // string
41
- 'class' => 'form-control', // string
42
- 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
43
- ));
44
- ?>
45
  </div>
46
 
47
  <div class="form-group aam-404redirect-action" id="404redirect-url-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;">
@@ -53,6 +56,9 @@
53
  <label for="frontend-url"><?php echo __('PHP Callback Function', AAM_KEY); ?></label>
54
  <input type="text" class="form-control" placeholder="Enter valid callback" name="frontend.404redirect.callback" value="<?php echo AAM_Core_Config::get('frontend.404redirect.callback'); ?>" />
55
  </div>
 
 
 
56
  </div>
57
  </div>
58
  </div>
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="404redirect-content">
3
+ <?php if (AAM_Backend_Subject::getInstance()->getUID() == AAM_Core_Subject_Default::UID) { ?>
4
  <div class="row">
5
  <div class="col-xs-12">
6
  <p class="aam-info">
8
  </p>
9
  </div>
10
  </div>
11
+ <?php } ?>
12
 
13
  <div class="row">
14
  <div class="col-xs-12">
15
+ <?php if (AAM_Backend_Subject::getInstance()->getUID() == AAM_Core_Subject_Default::UID) { ?>
16
  <?php $type = AAM_Core_Config::get('frontend.404redirect.type', 'default'); ?>
17
 
18
  <div class="radio">
35
  <div class="form-group aam-404redirect-action" id="404redirect-page-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
36
  <label for="frontend-page"><?php echo __('Existing Page', AAM_KEY); ?></label>
37
  <?php
38
+ wp_dropdown_pages(array(
39
+ 'depth' => 99,
40
+ 'selected' => AAM_Core_Config::get('frontend.404redirect.page'),
41
+ 'echo' => 1,
42
+ 'name' => 'frontend.404redirect.page',
43
+ 'id' => '404-redirect-page', // string
44
+ 'class' => 'form-control', // string
45
+ 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
46
+ ));
47
+ ?>
48
  </div>
49
 
50
  <div class="form-group aam-404redirect-action" id="404redirect-url-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;">
56
  <label for="frontend-url"><?php echo __('PHP Callback Function', AAM_KEY); ?></label>
57
  <input type="text" class="form-control" placeholder="Enter valid callback" name="frontend.404redirect.callback" value="<?php echo AAM_Core_Config::get('frontend.404redirect.callback'); ?>" />
58
  </div>
59
+ <?php } else { ?>
60
+ <p class="alert alert-info text-center"><?php echo AAM_Backend_View_Helper::preparePhrase('You cannot setup 404 redirect for specific user, role or visitors. Switch to [Manage Default Access] and define default 404 redirect for everybody.', 'strong'); ?></p>
61
+ <?php } ?>
62
  </div>
63
  </div>
64
  </div>
Application/Backend/phtml/{object → main}/capability.phtml RENAMED
@@ -1,11 +1,11 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="capability-content">
3
- <?php $subject = AAM_Backend_View::getSubject(); ?>
4
 
5
  <div class="row">
6
  <div class="col-xs-12">
7
- <p class="aam-info">
8
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Manage list of capabilities for current %s. For more information about concept of capabilities check %sWhat is a WordPress capability%s article.', 'b'), AAM_Backend_View::getSubject()->getUID(), '<a href="https://aamplugin.com/help/what-is-a-wordpress-capability" target="_blank">', '</a>'); ?>
9
  </p>
10
  </div>
11
  </div>
@@ -98,7 +98,7 @@
98
  <h4 class="modal-title"><?php echo __('Delete Capability', AAM_KEY); ?></h4>
99
  </div>
100
  <div class="modal-body">
101
- <p class="text-center aam-confirm-message" data-message="<?php echo __('Are you sure that you want to delete %s capability for all roles?', AAM_KEY); ?>"></p>
102
  </div>
103
  <div class="modal-footer">
104
  <button type="button" class="btn btn-danger" id="delete-capability-btn"><?php echo __('Delete', AAM_KEY); ?></button>
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="capability-content">
3
+ <?php $subject = AAM_Backend_Subject::getInstance(); ?>
4
 
5
  <div class="row">
6
  <div class="col-xs-12">
7
+ <p class="aam-notification">
8
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('[Be careful!] Manage capabilities for [%s]. For more information about the concept of capabilities check %sWhat is a WordPress capability%s article.', 'b', 'b'), AAM_Backend_Subject::getInstance()->getName(), '<a href="https://aamplugin.com/help/what-is-a-wordpress-capability" target="_blank">', '</a>'); ?>
9
  </p>
10
  </div>
11
  </div>
98
  <h4 class="modal-title"><?php echo __('Delete Capability', AAM_KEY); ?></h4>
99
  </div>
100
  <div class="modal-body">
101
+ <p class="text-center aam-confirm-message alert alert-danger" data-message="<?php echo __('Are you sure that you want to delete %s capability for all roles?', AAM_KEY); ?>"></p>
102
  </div>
103
  <div class="modal-footer">
104
  <button type="button" class="btn btn-danger" id="delete-capability-btn"><?php echo __('Delete', AAM_KEY); ?></button>
Application/Backend/phtml/{object → main}/login-redirect.phtml RENAMED
@@ -4,11 +4,11 @@
4
  <div class="col-xs-12">
5
  <?php if ($this->isDefault()) { ?>
6
  <p class="aam-info">
7
- <?php echo AAM_Backend_View_Helper::preparePhrase('Define the [default] login redirect for all users, roles when the authentication completed successfully. [Please note!] The login redirect works only with the default WordPress login page.', 'strong', 'strong'); ?>
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize login redirect for this %s when the authentication completed successfully. [Please note!] The login redirect works only with the default WordPress login page.', 'strong'), AAM_Backend_View::getSubject()->getUID()); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-login-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
@@ -42,16 +42,16 @@
42
  <div class="form-group login-redirect-action" id="page-login-redirect-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
43
  <label><?php echo __('Existing Page', AAM_KEY); ?></label>
44
  <?php
45
- wp_dropdown_pages(array(
46
- 'depth' => 99,
47
- 'selected' => $this->getOption('login.redirect.page'),
48
- 'echo' => 1,
49
- 'name' => 'login.redirect.page',
50
- 'id' => 'page-redirect', // string
51
- 'class' => 'form-control', // string
52
- 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
53
- ));
54
- ?>
55
  </div>
56
 
57
  <div class="form-group login-redirect-action" id="url-login-redirect-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;">
4
  <div class="col-xs-12">
5
  <?php if ($this->isDefault()) { ?>
6
  <p class="aam-info">
7
+ <?php echo AAM_Backend_View_Helper::preparePhrase('Define the [default] login redirect for all users and roles when authentication is completed successfully.', 'strong'); ?>
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize login redirect for [%s] when the authentication is completed successfully.', 'strong'), AAM_Backend_Subject::getInstance()->getName()); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-login-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
42
  <div class="form-group login-redirect-action" id="page-login-redirect-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
43
  <label><?php echo __('Existing Page', AAM_KEY); ?></label>
44
  <?php
45
+ wp_dropdown_pages(array(
46
+ 'depth' => 99,
47
+ 'selected' => $this->getOption('login.redirect.page'),
48
+ 'echo' => 1,
49
+ 'name' => 'login.redirect.page',
50
+ 'id' => 'login-redirect-page', // string
51
+ 'class' => 'form-control', // string
52
+ 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
53
+ ));
54
+ ?>
55
  </div>
56
 
57
  <div class="form-group login-redirect-action" id="url-login-redirect-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;">
Application/Backend/phtml/{object → main}/logout-redirect.phtml RENAMED
@@ -8,7 +8,7 @@
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize logout redirect for this %s.'), AAM_Backend_View::getSubject()->getUID()); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-logout-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
@@ -42,16 +42,16 @@
42
  <div class="form-group logout-redirect-action" id="page-logout-redirect-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
43
  <label><?php echo __('Existing Page', AAM_KEY); ?></label>
44
  <?php
45
- wp_dropdown_pages(array(
46
- 'depth' => 99,
47
- 'selected' => $this->getOption('logout.redirect.page'),
48
- 'echo' => 1,
49
- 'name' => 'logout.redirect.page',
50
- 'id' => 'page-redirect', // string
51
- 'class' => 'form-control', // string
52
- 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
53
- ));
54
- ?>
55
  </div>
56
 
57
  <div class="form-group logout-redirect-action" id="url-logout-redirect-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;">
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize logout redirect for [%s].', 'strong'), AAM_Backend_Subject::getInstance()->getName()); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-logout-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
42
  <div class="form-group logout-redirect-action" id="page-logout-redirect-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
43
  <label><?php echo __('Existing Page', AAM_KEY); ?></label>
44
  <?php
45
+ wp_dropdown_pages(array(
46
+ 'depth' => 99,
47
+ 'selected' => $this->getOption('logout.redirect.page'),
48
+ 'echo' => 1,
49
+ 'name' => 'logout.redirect.page',
50
+ 'id' => 'logout-redirect-page', // string
51
+ 'class' => 'form-control', // string
52
+ 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
53
+ ));
54
+ ?>
55
  </div>
56
 
57
  <div class="form-group logout-redirect-action" id="url-logout-redirect-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;">
Application/Backend/phtml/{object → main}/menu.phtml RENAMED
@@ -3,7 +3,7 @@
3
  <div class="row">
4
  <div class="col-xs-12">
5
  <p class="aam-info">
6
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Protect your backend area. The list of menus and submenus is based on list of capabilities that current %s has. For more information about this feature, please check %sHow to manage WordPress backend menu%s.', 'b'), AAM_Backend_View::getSubject()->getUID(), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-backend-menu" target="_blank">', '</a>'); ?>
7
  </p>
8
  </div>
9
  </div>
@@ -19,7 +19,7 @@
19
  <div class="panel-group" id="admin-menu" role="tablist" aria-multiselectable="true">
20
  <?php
21
  $first = false;
22
- $object = AAM_Backend_View::getSubject()->getObject('menu');
23
  foreach ($this->getMenu() as $i => $menu) {
24
  ?>
25
  <div class="panel panel-default">
@@ -28,14 +28,18 @@
28
  <a role="button" data-toggle="collapse" data-parent="#admin-menu" href="#menu-<?php echo $i; ?>" aria-controls="menu-<?php echo $i; ?>" <?php if (!$first) { echo 'aria-expanded="true"'; } ?>>
29
  <?php echo $menu['name']; ?> <small class="aam-menu-capability"><?php echo $menu['capability']; ?></small>
30
  </a>
31
- <?php echo ($object->has($menu['id']) ? '<i class="aam-panel-title-icon icon-eye-off text-danger"></i>' : ''); ?>
 
 
 
 
32
  </h4>
33
  </div>
34
 
35
  <div id="menu-<?php echo $i; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="menu-<?php echo $i; ?>-heading">
36
  <div class="panel-body">
37
  <?php if (!empty($menu['submenu'])) { ?>
38
- <div class="row aam-bordered">
39
  <?php echo ($object->has($menu['id']) ? '<div class="aam-lock"></div>' : ''); ?>
40
  <?php foreach ($menu['submenu'] as $j => $submenu) { ?>
41
  <?php if ($submenu['id'] == 'index.php') { ?>
@@ -47,11 +51,13 @@
47
  <div class="col-xs-12 col-md-6 aam-submenu-item">
48
  <label for="menu-item-<?php echo $i . $j; ?>"><?php echo $submenu['name']; ?> <small class="aam-menu-capability"><?php echo $submenu['capability']; ?></small></label>
49
  <input type="checkbox" class="aam-checkbox-danger" id="menu-item-<?php echo $i . $j; ?>" data-menu-id="<?php echo $submenu['id']; ?>"<?php echo ($object->has($submenu['id']) ? ' checked="checked"' : ''); ?> />
50
- <label for="menu-item-<?php echo $i . $j; ?>"></label>
51
  </div>
52
  <?php } ?>
53
  <?php } ?>
54
  </div>
 
 
55
  <?php } ?>
56
 
57
  <div class="row<?php echo (!empty($menu['submenu']) ? ' aam-margin-top-xs' : ''); ?>">
@@ -81,9 +87,10 @@
81
  <h4 class="modal-title"><?php echo __('Dashboard Lockdown', AAM_KEY); ?></h4>
82
  </div>
83
  <div class="modal-body">
84
- <p class="text-center alert alert-warning"><strong><?php echo __('You cannot restrict access to Dashboard home page.', AAM_KEY); ?></strong></p>
85
-
86
- <p class="aam-outer-top-xs text-center"><?php echo sprintf(__('Dashboard home page is the default page every user is redirected after login. If you need to lockdown user from the entire website dashboard, %splease check this article%s.', AAM_KEY), '<a href="https://aamplugin.com/help/how-to-lockdown-wordpress-backend" target="_blank">', '</a>'); ?></p>
 
87
  </div>
88
  <div class="modal-footer">
89
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('OK', AAM_KEY); ?></button>
3
  <div class="row">
4
  <div class="col-xs-12">
5
  <p class="aam-info">
6
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Protect your backend area. The list of menus and submenus is based on capabilities [%s] has. For more information please check %sHow to manage WordPress backend menu%s.', 'b', 'b'), AAM_Backend_Subject::getInstance()->getName(), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-backend-menu" target="_blank">', '</a>'); ?>
7
  </p>
8
  </div>
9
  </div>
19
  <div class="panel-group" id="admin-menu" role="tablist" aria-multiselectable="true">
20
  <?php
21
  $first = false;
22
+ $object = AAM_Backend_Subject::getInstance()->getObject('menu');
23
  foreach ($this->getMenu() as $i => $menu) {
24
  ?>
25
  <div class="panel panel-default">
28
  <a role="button" data-toggle="collapse" data-parent="#admin-menu" href="#menu-<?php echo $i; ?>" aria-controls="menu-<?php echo $i; ?>" <?php if (!$first) { echo 'aria-expanded="true"'; } ?>>
29
  <?php echo $menu['name']; ?> <small class="aam-menu-capability"><?php echo $menu['capability']; ?></small>
30
  </a>
31
+ <?php if ($object->has($menu['id'])) { ?>
32
+ <i class="aam-panel-title-icon icon-eye-off text-danger"></i>
33
+ <?php } elseif ($this->hasSubmenuChecked($object, $menu['submenu'])) { ?>
34
+ <i class="aam-panel-title-icon icon-attention-circled text-warning"></i>
35
+ <?php } ?>
36
  </h4>
37
  </div>
38
 
39
  <div id="menu-<?php echo $i; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="menu-<?php echo $i; ?>-heading">
40
  <div class="panel-body">
41
  <?php if (!empty($menu['submenu'])) { ?>
42
+ <div class="row">
43
  <?php echo ($object->has($menu['id']) ? '<div class="aam-lock"></div>' : ''); ?>
44
  <?php foreach ($menu['submenu'] as $j => $submenu) { ?>
45
  <?php if ($submenu['id'] == 'index.php') { ?>
51
  <div class="col-xs-12 col-md-6 aam-submenu-item">
52
  <label for="menu-item-<?php echo $i . $j; ?>"><?php echo $submenu['name']; ?> <small class="aam-menu-capability"><?php echo $submenu['capability']; ?></small></label>
53
  <input type="checkbox" class="aam-checkbox-danger" id="menu-item-<?php echo $i . $j; ?>" data-menu-id="<?php echo $submenu['id']; ?>"<?php echo ($object->has($submenu['id']) ? ' checked="checked"' : ''); ?> />
54
+ <label for="menu-item-<?php echo $i . $j; ?>" data-toggle="tooltip" title="<?php echo ($object->has($submenu['id']) ? __('Uncheck to allow', AAM_KEY) : __('Check to restrict', AAM_KEY)); ?>"></label>
55
  </div>
56
  <?php } ?>
57
  <?php } ?>
58
  </div>
59
+
60
+ <hr class="aam-divider" />
61
  <?php } ?>
62
 
63
  <div class="row<?php echo (!empty($menu['submenu']) ? ' aam-margin-top-xs' : ''); ?>">
87
  <h4 class="modal-title"><?php echo __('Dashboard Lockdown', AAM_KEY); ?></h4>
88
  </div>
89
  <div class="modal-body">
90
+ <p class="text-center alert alert-warning text-larger">
91
+ <strong><?php echo __('You cannot restrict access to Dashboard home page.', AAM_KEY); ?></strong><br/>
92
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('The [Home] is the default page every user is redirected after login. To restrict access to the entire backend, please check %sHow to lockdown WordPress backend%s article.', 'b'), '<a href="https://aamplugin.com/help/how-to-lockdown-wordpress-backend" target="_blank">', '</a>'); ?>
93
+ </p>
94
  </div>
95
  <div class="modal-footer">
96
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('OK', AAM_KEY); ?></button>
Application/Backend/phtml/{object → main}/metabox.phtml RENAMED
@@ -1,5 +1,13 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="metabox-content">
 
 
 
 
 
 
 
 
3
  <div class="aam-feature-top-actions text-right">
4
  <a href="#" class="btn btn-xs btn-primary" id="refresh-metabox-list"><i class="icon-arrows-cw"></i> <?php echo __('Refresh', AAM_KEY); ?></a>
5
  <a href="#init-url-modal" class="btn btn-xs btn-primary" data-toggle="modal"><i class="icon-link"></i> <?php echo __('Init URL', AAM_KEY); ?></a>
@@ -18,7 +26,7 @@
18
  global $wp_post_types;
19
 
20
  $first = false;
21
- $object = AAM_Backend_View::getSubject()->getObject('metabox');
22
  $metaboxList = $this->getMetaboxList();
23
  ?>
24
 
@@ -49,12 +57,12 @@
49
  </div>
50
  <div id="group-<?php echo $screen; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="group-<?php echo $screen; ?>-heading">
51
  <div class="panel-body">
52
- <div class="row aam-bordered">
53
  <?php foreach ($metaboxes as $metabox) { ?>
54
  <div class="col-xs-12 col-md-6 aam-submenu-item">
55
  <label for="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>"><?php echo $metabox['title']; ?></label>
56
  <input type="checkbox" class="aam-checkbox-danger" id="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>" data-metabox="<?php echo $screen; ?>|<?php echo $metabox['id']; ?>"<?php echo ($object->has($screen, $metabox['id']) ? ' checked="checked"' : ''); ?> />
57
- <label for="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>"></label>
58
  </div>
59
  <?php } ?>
60
  </div>
@@ -66,7 +74,10 @@
66
  <?php } else { ?>
67
  <div class="row">
68
  <div class="col-xs-12 text-center">
69
- <p class="aam-notification-message"><?php echo __('The list is not initialized. Click Refresh button above.'); ?></p>
 
 
 
70
  </div>
71
  </div>
72
  <?php } ?>
@@ -80,7 +91,7 @@
80
  </div>
81
  <div class="modal-body">
82
  <p class="aam-info">
83
- <?php echo __('Some metaboxes are "conditional" and appear on the Edit Screen when certain conditions are met. For example metabox "Comments" appears only for existing page and not for new page. If you do not see a desired metabox, try to copy & paste a full URL to a backend page where that metabox appears.'); ?>
84
  </p>
85
  <div class="form-group">
86
  <label><?php echo __('Backend page URL', AAM_KEY); ?></label>
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="metabox-content">
3
+ <div class="row">
4
+ <div class="col-xs-12">
5
+ <p class="aam-info">
6
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Hide unnecessary or restricted metaboxes and widgets for [%s]. For more information please check %sHow to hide WordPress metaboxes and widgets%s.', 'b', 'b'), AAM_Backend_Subject::getInstance()->getName(), '<a href="https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets" target="_blank">', '</a>'); ?>
7
+ </p>
8
+ </div>
9
+ </div>
10
+
11
  <div class="aam-feature-top-actions text-right">
12
  <a href="#" class="btn btn-xs btn-primary" id="refresh-metabox-list"><i class="icon-arrows-cw"></i> <?php echo __('Refresh', AAM_KEY); ?></a>
13
  <a href="#init-url-modal" class="btn btn-xs btn-primary" data-toggle="modal"><i class="icon-link"></i> <?php echo __('Init URL', AAM_KEY); ?></a>
26
  global $wp_post_types;
27
 
28
  $first = false;
29
+ $object = AAM_Backend_Subject::getInstance()->getObject('metabox');
30
  $metaboxList = $this->getMetaboxList();
31
  ?>
32
 
57
  </div>
58
  <div id="group-<?php echo $screen; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="group-<?php echo $screen; ?>-heading">
59
  <div class="panel-body">
60
+ <div class="row">
61
  <?php foreach ($metaboxes as $metabox) { ?>
62
  <div class="col-xs-12 col-md-6 aam-submenu-item">
63
  <label for="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>"><?php echo $metabox['title']; ?></label>
64
  <input type="checkbox" class="aam-checkbox-danger" id="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>" data-metabox="<?php echo $screen; ?>|<?php echo $metabox['id']; ?>"<?php echo ($object->has($screen, $metabox['id']) ? ' checked="checked"' : ''); ?> />
65
+ <label for="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>" data-toggle="tooltip" title="<?php echo ($object->has($screen, $metabox['id']) ? __('Uncheck to show', AAM_KEY) : __('Check to hide', AAM_KEY)); ?>"></label>
66
  </div>
67
  <?php } ?>
68
  </div>
74
  <?php } else { ?>
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.'); ?><br/>
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>
83
  <?php } ?>
91
  </div>
92
  <div class="modal-body">
93
  <p class="aam-info">
94
+ <?php echo __('Some metaboxes are "conditional" and appear on the Edit screen when certain conditions are met. For example metabox "Comments" appears only for existing page and not for new page. If you do not see a desired metabox, try to copy & paste the full URL to the backend page where that metabox appears.'); ?>
95
  </p>
96
  <div class="form-group">
97
  <label><?php echo __('Backend page URL', AAM_KEY); ?></label>
Application/Backend/phtml/{object → main}/post.phtml RENAMED
@@ -12,13 +12,13 @@
12
  <div class="row">
13
  <div class="col-xs-12">
14
  <p class="aam-info">
15
- <?php echo sprintf(__('Manage access to posts, pages and custom post types. For more information about this functionality check %sWhat is a WordPress post%s article.'), '<a href="https://aamplugin.com/help/what-is-a-wordpress-post" target="_blank">', '</a>'); ?>
16
  </p>
17
  </div>
18
  </div>
19
  <?php } ?>
20
 
21
- <?php if (defined('AAM_PLUS_PACKAGE') || AAM_Backend_View::getSubject()->getUID() != 'default') { ?>
22
  <?php $current = $this->getCurrentObject();?>
23
 
24
  <div class="aam-post-breadcrumb">
@@ -71,18 +71,23 @@
71
  <a href="#" class="btn btn-xs btn-primary post-back btn-right">&Lt; <?php echo __('Go Back', AAM_KEY); ?></a>
72
  <table class="table table-striped table-bordered">
73
  <tbody>
74
- <?php if (AAM_Core_Config::get('frontend-access-control', true)) { ?>
 
 
 
75
  <tr>
76
  <td colspan="2" class="aam-table-group">
77
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Frontend', AAM_KEY); ?></strong>
78
  </td>
79
  </tr>
80
 
81
- <?php foreach($this->getAccessOptionList('frontend') as $option => $data) { ?>
82
  <tr>
83
  <td width="90%">
84
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
85
- <?php if (!empty($data['sub'])) { echo $data['sub']; } ?>
 
 
86
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>"></p>
87
  </td>
88
  <td>
@@ -92,22 +97,22 @@
92
  </td>
93
  </tr>
94
  <?php } ?>
95
-
96
- <?php do_action('aam-post-access-option-action', 'post', 'frontend'); ?>
97
  <?php } ?>
98
 
99
- <?php if (AAM_Core_Config::get('backend-access-control', true)) { ?>
100
  <tr class="aam-backend-post-access">
101
  <td colspan="2" class="aam-table-group">
102
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Backend', AAM_KEY); ?></strong>
103
  </td>
104
  </tr>
105
 
106
- <?php foreach($this->getAccessOptionList('backend') as $option => $data) { ?>
107
  <tr class="aam-backend-post-access">
108
  <td width="90%">
109
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
110
- <?php if (!empty($data['sub'])) { echo $data['sub']; } ?>
 
 
111
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>"></p>
112
  </td>
113
  <td>
@@ -117,8 +122,6 @@
117
  </td>
118
  </tr>
119
  <?php } ?>
120
-
121
- <?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
122
  <?php } ?>
123
  </tbody>
124
  </table>
12
  <div class="row">
13
  <div class="col-xs-12">
14
  <p class="aam-info">
15
+ <?php echo sprintf(__('Manage access to posts, pages and custom post types. For more information about this functionality check %sHow to manage access to the WordPress content%s article.'), '<a href="https://aamplugin.com/help/how-to-manage-access-to-the-wordpress-content" target="_blank">', '</a>'); ?>
16
  </p>
17
  </div>
18
  </div>
19
  <?php } ?>
20
 
21
+ <?php if (defined('AAM_PLUS_PACKAGE') || AAM_Backend_Subject::getInstance()->getUID() != AAM_Core_Subject_Default::UID) { ?>
22
  <?php $current = $this->getCurrentObject();?>
23
 
24
  <div class="aam-post-breadcrumb">
71
  <a href="#" class="btn btn-xs btn-primary post-back btn-right">&Lt; <?php echo __('Go Back', AAM_KEY); ?></a>
72
  <table class="table table-striped table-bordered">
73
  <tbody>
74
+ <?php $frontend = $this->getAccessOptionList('frontend'); ?>
75
+ <?php $backend = $this->getAccessOptionList('backend'); ?>
76
+
77
+ <?php if (count($frontend) && AAM_Core_Config::get('frontend-access-control', true)) { ?>
78
  <tr>
79
  <td colspan="2" class="aam-table-group">
80
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Frontend', AAM_KEY); ?></strong>
81
  </td>
82
  </tr>
83
 
84
+ <?php foreach($frontend as $option => $data) { ?>
85
  <tr>
86
  <td width="90%">
87
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
88
+ <?php if (!empty($data['sub'])) { ?>
89
+ <small><?php echo $data['sub']; ?>: <b id="<?php echo $data['preview']; ?>" data-ref="<?php echo $data['option']; ?>" class="option-preview">...</b> <a href="#modal-<?php echo str_replace('.', '-', $data['option']); ?>" data-toggle="modal" class="advanced-post-option" data-ref="<?php echo $data['option']; ?>" data-preview="#<?php echo $data['preview']; ?>"><?php echo __('change', AAM_KEY); ?></a></small>
90
+ <?php } ?>
91
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>"></p>
92
  </td>
93
  <td>
97
  </td>
98
  </tr>
99
  <?php } ?>
 
 
100
  <?php } ?>
101
 
102
+ <?php if (count($backend) && AAM_Core_Config::get('backend-access-control', true)) { ?>
103
  <tr class="aam-backend-post-access">
104
  <td colspan="2" class="aam-table-group">
105
  <i class="icon-doc-text-inv"></i> <strong><?php echo __('Backend', AAM_KEY); ?></strong>
106
  </td>
107
  </tr>
108
 
109
+ <?php foreach($backend as $option => $data) { ?>
110
  <tr class="aam-backend-post-access">
111
  <td width="90%">
112
  <strong class="aam-block aam-highlight text-uppercase"><?php echo $data['title']; ?></strong>
113
+ <?php if (!empty($data['sub'])) { ?>
114
+ <small><?php echo $data['sub']; ?>: <b id="<?php echo $data['preview']; ?>" data-ref="<?php echo $data['option']; ?>" class="option-preview">...</b> <a href="#modal-<?php echo str_replace('.', '-', $data['option']); ?>" data-toggle="modal" class="advanced-post-option" data-ref="<?php echo $data['option']; ?>" data-preview="#<?php echo $data['preview']; ?>"><?php echo __('change', AAM_KEY); ?></a></small>
115
+ <?php } ?>
116
  <p class="aam-hint" data-dynamic-post-label="<?php echo $data['descr']; ?>"></p>
117
  </td>
118
  <td>
122
  </td>
123
  </tr>
124
  <?php } ?>
 
 
125
  <?php } ?>
126
  </tbody>
127
  </table>
Application/Backend/phtml/{object → main}/redirect.phtml RENAMED
@@ -8,7 +8,7 @@
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize redirect for this %s when access is denied to restricted resources like posts, categories, menus, etc. For more information about this feature, please check %sHow to redirect WordPress user when access is denied%s.'), AAM_Backend_View::getSubject()->getUID(), '<a href="https://aamplugin.com/help/how-to-redirect-wordpress-user-when-access-is-denied" target="_blank">', '</a>'); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
@@ -23,7 +23,7 @@
23
  <div>
24
  <ul class="nav nav-tabs" role="tablist">
25
  <?php if (AAM_Core_Config::get('frontend-access-control', true)) { ?> <li role="presentation" class="active"><a href="#frontend-redirect" aria-controls="frontend-redirect" role="tab" data-toggle="tab"><i class="icon-home"></i> <?php echo __('Frontend Redirect', AAM_KEY); ?></a></li><?php } ?>
26
- <?php if (AAM_Core_Config::get('backend-access-control', true)) { ?><li role="presentation"><a href="#backend-redirect" aria-controls="backend-redirect" role="tab" data-toggle="tab"><i class="icon-circle"></i> <?php echo __('Backend Redirect', AAM_KEY); ?></a></li><?php } ?>
27
  </ul>
28
 
29
  <?php $frontendType = $this->getOption('frontend.redirect.type', 'default'); ?>
8
  </p>
9
  <?php } else { ?>
10
  <p class="aam-info">
11
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize redirect for %s when access is denied to restricted resources like posts, categories, menus, etc. For more information about this feature, please check %sHow to redirect WordPress user when access is denied%s.'), AAM_Backend_Subject::getInstance()->getName(), '<a href="https://aamplugin.com/help/how-to-redirect-wordpress-user-when-access-is-denied" target="_blank">', '</a>'); ?>
12
  </p>
13
  <?php } ?>
14
  <div class="aam-overwrite" id="aam-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
23
  <div>
24
  <ul class="nav nav-tabs" role="tablist">
25
  <?php if (AAM_Core_Config::get('frontend-access-control', true)) { ?> <li role="presentation" class="active"><a href="#frontend-redirect" aria-controls="frontend-redirect" role="tab" data-toggle="tab"><i class="icon-home"></i> <?php echo __('Frontend Redirect', AAM_KEY); ?></a></li><?php } ?>
26
+ <?php if (AAM_Core_Config::get('backend-access-control', true) && !$this->isVisitor()) { ?><li role="presentation"><a href="#backend-redirect" aria-controls="backend-redirect" role="tab" data-toggle="tab"><i class="icon-circle"></i> <?php echo __('Backend Redirect', AAM_KEY); ?></a></li><?php } ?>
27
  </ul>
28
 
29
  <?php $frontendType = $this->getOption('frontend.redirect.type', 'default'); ?>
Application/Backend/phtml/object/teaser.phtml DELETED
@@ -1,41 +0,0 @@
1
- <?php if (defined('AAM_KEY')) { ?>
2
- <div class="aam-feature" id="teaser-content">
3
- <div class="row">
4
- <div class="col-xs-12">
5
- <p class="aam-notification">
6
- <?php echo AAM_Backend_View_Helper::preparePhrase('[Warning!] The Content Teaser tab is deprecated and has been moved to the [Posts & Pages tab]. Now you can define teaser message for an individual post, category or all posts for any user, role or visitors. Please adjust your AAM settings because Content Teaser tab will be removed in AAM 5.0. For any feedback of questions, do not hesistate to contact us directly.', 'strong', 'strong'); ?>
7
- </p>
8
- <?php if ($this->isDefault()) { ?>
9
- <p class="aam-info">
10
- <?php echo AAM_Backend_View_Helper::preparePhrase('Define the [default] teaser message for all users, roles and visitors when access is limited to any post on your website.', 'strong'); ?>
11
- </p>
12
- <?php } else { ?>
13
- <p class="aam-info">
14
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize the teaser message for this %s when access is limited to any post, page or custom post type on your website.'), AAM_Backend_View::getSubject()->getUID()); ?>
15
- </p>
16
- <?php } ?>
17
- <div class="aam-overwrite" id="aam-teaser-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
18
- <span><i class="icon-check"></i> Settings are customized</span>
19
- <span><a href="#" id="teaser-reset" class="btn btn-xs btn-primary">Reset To Default</a></span>
20
- </div>
21
- </div>
22
- </div>
23
-
24
- <div class="row">
25
- <div class="col-xs-12">
26
- <div>
27
- <div class="form-group">
28
- <label><?php echo __('Teaser Message', AAM_KEY); ?></label>
29
- <textarea class="form-control" name="frontend.teaser.message" rows="3" placeholder="<?php echo __('Enter teaser message...', AAM_KEY); ?>"><?php echo stripslashes($this->getOption('frontend.teaser.message')); ?></textarea>
30
- </div>
31
- <div class="checkbox">
32
- <label>
33
- <input type="checkbox" name="frontend.teaser.excerpt" value="1" <?php echo intval($this->getOption('frontend.teaser.excerpt')) ? 'checked' : ''; ?> />
34
- <?php echo __('Add excerpt before teaser message', AAM_KEY); ?>
35
- </label>
36
- </div>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Backend/phtml/partial/post-advanced-settings.phtml CHANGED
@@ -1,5 +1,26 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
- <div class="modal fade" id="password-modal" tabindex="-1" role="dialog">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <div class="modal-dialog modal-sm" role="document">
4
  <div class="modal-content">
5
  <div class="modal-header">
@@ -9,39 +30,40 @@
9
  <div class="modal-body">
10
  <div class="form-group">
11
  <label><?php echo __('Password', AAM_KEY); ?></label>
12
- <input type="text" class="form-control" id="password-value" placeholder="<?php echo __('Enter Password', AAM_KEY); ?>" />
13
  </div>
14
  </div>
15
  <div class="modal-footer">
16
- <button type="button" class="btn btn-success extended-post-access-btn" id="change-password-btn"><?php echo __('Set', AAM_KEY); ?></button>
17
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
18
  </div>
19
  </div>
20
  </div>
21
  </div>
22
 
23
- <div class="modal fade" id="location-modal" tabindex="-1" role="dialog">
24
  <div class="modal-dialog" role="document">
25
  <div class="modal-content">
26
  <div class="modal-header">
27
  <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
28
- <h4 class="modal-title"><?php echo __('Set Redirect', AAM_KEY); ?></h4>
29
  </div>
30
  <div class="modal-body">
31
- <div class="form-group">
32
- <label><?php echo __('Valid URL, Page ID or PHP callback function', AAM_KEY); ?></label>
33
- <input type="text" class="form-control" id="location-value" placeholder="<?php echo __('Enter Redirect', AAM_KEY); ?>" />
 
34
  </div>
35
  </div>
36
  <div class="modal-footer">
37
- <button type="button" class="btn btn-success extended-post-access-btn" id="change-location-btn"><?php echo __('Set', AAM_KEY); ?></button>
38
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
39
  </div>
40
  </div>
41
  </div>
42
  </div>
43
 
44
- <div class="modal fade" id="expiration-modal" tabindex="-1" role="dialog">
45
  <div class="modal-dialog" role="document">
46
  <div class="modal-content">
47
  <div class="modal-header">
@@ -57,18 +79,18 @@
57
  </p>
58
  <div class="form-group">
59
  <label><?php echo __('Enter expiration critiria', AAM_KEY); ?></label>
60
- <input type="text" class="form-control" id="expiration-value" placeholder="<?php echo __('Enter critiria', AAM_KEY); ?>" />
61
  </div>
62
  </div>
63
  <div class="modal-footer">
64
- <button type="button" class="btn btn-success extended-post-access-btn" id="change-expiration-btn"><?php echo __('Set', AAM_KEY); ?></button>
65
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
66
  </div>
67
  </div>
68
  </div>
69
  </div>
70
 
71
- <div class="modal fade" id="teaser-modal" tabindex="-1" role="dialog">
72
  <div class="modal-dialog" role="document">
73
  <div class="modal-content">
74
  <div class="modal-header">
@@ -78,11 +100,34 @@
78
  <div class="modal-body">
79
  <div class="form-group">
80
  <label><?php echo __('Simple text or valid HTML', AAM_KEY); ?></label>
81
- <textarea class="form-control" id="teaser-value" placeholder="<?php echo __('Enter your teaser', AAM_KEY); ?>" rows="5"></textarea>
82
  </div>
83
  </div>
84
  <div class="modal-footer">
85
- <button type="button" class="btn btn-success extended-post-access-btn" id="change-teaser-btn"><?php echo __('Save', AAM_KEY); ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
87
  </div>
88
  </div>
1
  <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="modal fade" id="modal-frontend-access_counter_limit" tabindex="-1" role="dialog">
3
+ <div class="modal-dialog modal-sm" role="document">
4
+ <div class="modal-content">
5
+ <div class="modal-header">
6
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
7
+ <h4 class="modal-title"><?php echo __('Define Threshold', AAM_KEY); ?></h4>
8
+ </div>
9
+ <div class="modal-body">
10
+ <div class="form-group">
11
+ <label><?php echo __('Threshold', AAM_KEY); ?></label>
12
+ <input type="text" class="form-control" placeholder="<?php echo __('Enter digital number', AAM_KEY); ?>" id="aam-read-counter" />
13
+ </div>
14
+ </div>
15
+ <div class="modal-footer">
16
+ <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-access_counter_limit" data-field="#aam-read-counter"><?php echo __('Update', AAM_KEY); ?></button>
17
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </div>
22
+
23
+ <div class="modal fade" id="modal-frontend-password" tabindex="-1" role="dialog">
24
  <div class="modal-dialog modal-sm" role="document">
25
  <div class="modal-content">
26
  <div class="modal-header">
30
  <div class="modal-body">
31
  <div class="form-group">
32
  <label><?php echo __('Password', AAM_KEY); ?></label>
33
+ <input type="text" class="form-control" placeholder="<?php echo __('Enter Password', AAM_KEY); ?>" id="aam-access-password" />
34
  </div>
35
  </div>
36
  <div class="modal-footer">
37
+ <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-password" data-field="#aam-access-password"><?php echo __('Update', AAM_KEY); ?></button>
38
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
39
  </div>
40
  </div>
41
  </div>
42
  </div>
43
 
44
+ <div class="modal fade" id="modal-frontend-location" tabindex="-1" role="dialog">
45
  <div class="modal-dialog" role="document">
46
  <div class="modal-content">
47
  <div class="modal-header">
48
  <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
49
+ <h4 class="modal-title"><?php echo __('Define Redirect Rule', AAM_KEY); ?></h4>
50
  </div>
51
  <div class="modal-body">
52
+ <p class="aam-info"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('To learn more about REDIRECT option, please refer to our [%sHelp Section%s].', 'b'), '<a href="https://aamplugin.com/help#post-redirect" target="_blank">', '</a>'); ?></p>
53
+ <div class="form-group aam-outer-top-xs">
54
+ <label><?php echo __('Enter Redirect Rule', AAM_KEY); ?></label>
55
+ <input type="text" class="form-control" placeholder="<?php echo __('Enter rule', AAM_KEY); ?>" id="aam-access-redirect" />
56
  </div>
57
  </div>
58
  <div class="modal-footer">
59
+ <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-location" data-field="#aam-access-redirect"><?php echo __('Update', AAM_KEY); ?></button>
60
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
61
  </div>
62
  </div>
63
  </div>
64
  </div>
65
 
66
+ <div class="modal fade" id="modal-frontend-expire_datetime" tabindex="-1" role="dialog">
67
  <div class="modal-dialog" role="document">
68
  <div class="modal-content">
69
  <div class="modal-header">
79
  </p>
80
  <div class="form-group">
81
  <label><?php echo __('Enter expiration critiria', AAM_KEY); ?></label>
82
+ <input type="text" class="form-control" placeholder="<?php echo __('Enter critiria', AAM_KEY); ?>" id="aam-expire-datetime" />
83
  </div>
84
  </div>
85
  <div class="modal-footer">
86
+ <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-expire_datetime" data-field="#aam-expire-datetime"><?php echo __('Update', AAM_KEY); ?></button>
87
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
88
  </div>
89
  </div>
90
  </div>
91
  </div>
92
 
93
+ <div class="modal fade" id="modal-frontend-teaser" tabindex="-1" role="dialog">
94
  <div class="modal-dialog" role="document">
95
  <div class="modal-content">
96
  <div class="modal-header">
100
  <div class="modal-body">
101
  <div class="form-group">
102
  <label><?php echo __('Simple text or valid HTML', AAM_KEY); ?></label>
103
+ <textarea class="form-control" placeholder="<?php echo __('Enter your teaser', AAM_KEY); ?>" rows="5" id="aam-teaser-message"></textarea>
104
  </div>
105
  </div>
106
  <div class="modal-footer">
107
+ <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-teaser" data-field="#aam-teaser-message"><?php echo __('Save', AAM_KEY); ?></button>
108
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <div class="modal fade" id="modal-frontend-eproduct" tabindex="-1" role="dialog">
115
+ <div class="modal-dialog" role="document">
116
+ <div class="modal-content">
117
+ <div class="modal-header">
118
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
119
+ <h4 class="modal-title"><?php echo __('E-Commerce Setup', AAM_KEY); ?></h4>
120
+ </div>
121
+ <div class="modal-body">
122
+ <?php
123
+ echo apply_filters(
124
+ 'aam-frontend-eproduct-setup',
125
+ '<p class="alert alert-warning text-center">' . AAM_Backend_View_Helper::preparePhrase('Monetization is the premium feature that is available with [Payment] extension.', 'b') . '</p>'
126
+ );
127
+ ?>
128
+ </div>
129
+ <div class="modal-footer">
130
+ <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-eproduct" data-field="#aam-selected-eproduct"><?php echo __('Update', AAM_KEY); ?></button>
131
  <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
132
  </div>
133
  </div>
Application/Backend/phtml/partial/teaser.phtml DELETED
@@ -1,5 +0,0 @@
1
- <?php if (defined('AAM_KEY')) { ?>
2
- <p class="aam-info">
3
- <?php echo AAM_Backend_View_Helper::preparePhrase('Setup [default] teaser message for all users, roles and visitors when access is limited to read posts or pages.', 'strong'); ?>
4
- </p>
5
- <?php }
 
 
 
 
 
Application/Backend/phtml/security.phtml DELETED
@@ -1,7 +0,0 @@
1
- <?php if (defined('AAM_KEY')) { ?>
2
- <div class="aam-feature" id="security-content">
3
- <p class="aam-notification">
4
- <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('[Warning!] The Security feature has been deprecated and will be removed in AAM 5.0. This feature has been replaced with AAM Secure Login Widget and Shortcode. For more information please check %sHow does AAM Secure Login works%s article. For any feedback of questions, do not hesistate to contact us directly.', 'strong'), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'); ?>
5
- </p>
6
- </div>
7
- <?php }
 
 
 
 
 
 
 
Application/Backend/phtml/settings/content.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="aam-feature settings" id="settings-content-content">
3
+ <table class="table table-striped table-bordered">
4
+ <tbody>
5
+ <?php foreach($this->getList() as $id => $option) { ?>
6
+ <tr>
7
+ <td>
8
+ <span class='aam-setting-title'><?php echo $option['title']; ?></span>
9
+ <p class="aam-setting-description">
10
+ <?php echo $option['descr']; ?>
11
+ </p>
12
+ </td>
13
+ <td class="text-center">
14
+ <input data-toggle="toggle" name="<?php echo $id; ?>" id="utility-<?php echo $id; ?>" <?php echo ($option['value'] ? 'checked' : ''); ?> type="checkbox" data-on="Enabled" data-off="Disabled" data-size="small" />
15
+ </td>
16
+ </tr>
17
+ <?php } ?>
18
+ </tbody>
19
+ </table>
20
+ </div>
21
+ <?php }
Application/Backend/phtml/settings/core.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="aam-feature settings" id="settings-core-content">
3
+ <table class="table table-striped table-bordered">
4
+ <tbody>
5
+ <?php foreach($this->getList() as $id => $option) { ?>
6
+ <tr>
7
+ <td>
8
+ <span class='aam-setting-title'><?php echo $option['title']; ?></span>
9
+ <p class="aam-setting-description">
10
+ <?php echo $option['descr']; ?>
11
+ </p>
12
+ </td>
13
+ <td class="text-center">
14
+ <input data-toggle="toggle" name="<?php echo $id; ?>" id="utility-<?php echo $id; ?>" <?php echo ($option['value'] ? 'checked' : ''); ?> type="checkbox" data-on="Enabled" data-off="Disabled" data-size="small" />
15
+ </td>
16
+ </tr>
17
+ <?php } ?>
18
+ </tbody>
19
+ </table>
20
+ </div>
21
+ <?php }
Application/Backend/phtml/settings/tools.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="aam-feature settings" id="settings-tools-content">
3
+ <div role="tabpanel" class="tab-pane" id="utility-tools">
4
+ <table class="table table-striped table-bordered">
5
+ <tbody>
6
+ <tr>
7
+ <td>
8
+ <span class='aam-setting-title'><?php echo __('Export AAM Settings', AAM_KEY); ?></span>
9
+ <p class="aam-setting-description">
10
+ <?php echo sprintf(__('Export selected AAM settings to the file. For more information about this feature check %sHow to export and import AAM settings%s article.', AAM_KEY), '<a href="https://aamplugin.com/help/how-to-export-and-import-aam-settings" target="_blank">', '</a>'); ?>
11
+ </p>
12
+ </td>
13
+ <td>
14
+ <a href="#" class="btn btn-success btn-block" id="export-aam">Export</a>
15
+ </td>
16
+ </tr>
17
+ <tr>
18
+ <td>
19
+ <span class='aam-setting-title'><?php echo __('Import AAM Settings', AAM_KEY); ?></span>
20
+ <p class="aam-setting-description">
21
+ <?php echo __('Import AAM settings from the file.', AAM_KEY); ?>
22
+ </p>
23
+ </td>
24
+ <td>
25
+ <div class="hidden"><input type="file" id="aam-import-file" /></div>
26
+ <a href="#" class="btn btn-warning btn-block" id="import-aam">Import</a>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <td>
31
+ <span class='aam-setting-title'><?php echo __('Clear Cache', AAM_KEY); ?></span>
32
+ <p class="aam-setting-description">
33
+ <?php echo __('Clear all AAM cache.', AAM_KEY); ?>
34
+ </p>
35
+ </td>
36
+ <td>
37
+ <a href="#" class="btn btn-primary btn-block" id="clear-cache">Clear</a>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td>
42
+ <span class='aam-setting-title'><?php echo __('Clear All Settings', AAM_KEY); ?></span>
43
+ <p class="aam-setting-description">
44
+ <?php echo __('Remove all the settings related to AAM from the database.', AAM_KEY); ?>
45
+ </p>
46
+ </td>
47
+ <td>
48
+ <a href="#clear-settings-modal" data-toggle="modal" class="btn btn-danger btn-block">Clear</a>
49
+ </td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
53
+ </div>
54
+
55
+ <div class="modal fade" id="clear-settings-modal" tabindex="-1" role="dialog">
56
+ <div class="modal-dialog modal-sm" role="document">
57
+ <div class="modal-content">
58
+ <div class="modal-header">
59
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
60
+ <h4 class="modal-title"><?php echo __('Clear all settings', AAM_KEY); ?></h4>
61
+ </div>
62
+ <div class="modal-body">
63
+ <p class="text-center alert alert-danger text-larger"><?php echo __('All AAM settings will be removed.', AAM_KEY); ?></p>
64
+ </div>
65
+ <div class="modal-footer">
66
+ <button type="button" class="btn btn-danger" id="clear-settings"><?php echo __('Clear', AAM_KEY); ?></button>
67
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Cancel', AAM_KEY); ?></button>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <?php
74
+ }
Application/Backend/phtml/utility.phtml DELETED
@@ -1,148 +0,0 @@
1
- <?php if (defined('AAM_KEY')) { ?>
2
- <div class="aam-feature" id="utilities-content">
3
- <ul class="nav nav-tabs" role="tablist">
4
- <li role="presentation" class="active"><a href="#utility-core" aria-controls="utility-core" role="tab" data-toggle="tab"><?php echo __('AAM Core', AAM_KEY); ?></a></li>
5
- <li role="presentation"><a href="#utility-post" aria-controls="utility-post" role="tab" data-toggle="tab"><?php echo __('Posts Access', AAM_KEY); ?></a></li>
6
- <li role="presentation"><a href="#utility-tools" aria-controls="utility-tools" role="tab" data-toggle="tab"><?php echo __('Tools', AAM_KEY); ?></a></li>
7
- <li role="presentation"><a href="#utility-miscellaneous" aria-controls="utility-miscellaneous" role="tab" data-toggle="tab"><?php echo __('Miscellaneous', AAM_KEY); ?></a></li>
8
- </ul>
9
-
10
- <div class="tab-content">
11
- <div role="tabpanel" class="tab-pane active" id="utility-core">
12
- <table class="table table-striped table-bordered">
13
- <tbody>
14
- <?php foreach($this->getUtilityOptionList('core') as $id => $option) { ?>
15
- <tr>
16
- <td>
17
- <span class='aam-setting-title'><?php echo $option['title']; ?></span>
18
- <p class="aam-setting-description">
19
- <?php echo $option['descr']; ?>
20
- </p>
21
- </td>
22
- <td class="text-center">
23
- <input data-toggle="toggle" name="<?php echo $id; ?>" id="utility-<?php echo $id; ?>" <?php echo ($option['value'] ? 'checked' : ''); ?> type="checkbox" data-on="Enabled" data-off="Disabled" data-size="small" />
24
- </td>
25
- </tr>
26
- <?php } ?>
27
- </tbody>
28
- </table>
29
- </div>
30
- <div role="tabpanel" class="tab-pane" id="utility-post">
31
- <table class="table table-striped table-bordered">
32
- <tbody>
33
- <?php foreach($this->getUtilityOptionList('post') as $id => $option) { ?>
34
- <tr>
35
- <td>
36
- <span class='aam-setting-title'><?php echo $option['title']; ?></span>
37
- <p class="aam-setting-description">
38
- <?php echo $option['descr']; ?>
39
- </p>
40
- </td>
41
- <td class="text-center">
42
- <input data-toggle="toggle" name="<?php echo $id; ?>" id="utility-<?php echo $id; ?>" <?php echo ($option['value'] ? 'checked' : ''); ?> type="checkbox" data-on="Enabled" data-off="Disabled" data-size="small" />
43
- </td>
44
- </tr>
45
- <?php } ?>
46
- </tbody>
47
- </table>
48
- </div>
49
- <div role="tabpanel" class="tab-pane" id="utility-tools">
50
- <table class="table table-striped table-bordered">
51
- <tbody>
52
- <tr>
53
- <td>
54
- <span class='aam-setting-title'><?php echo __('Export AAM Settings', AAM_KEY); ?></span>
55
- <p class="aam-setting-description">
56
- <?php echo sprintf(__('Export selected AAM settings to the file. For more information about this feature check %sHow to export and import AAM settings%s article.', AAM_KEY), '<a href="https://aamplugin.com/help/how-to-export-and-import-aam-settings" target="_blank">', '</a>'); ?>
57
- </p>
58
- </td>
59
- <td>
60
- <a href="#" class="btn btn-success btn-block" id="export-aam">Export</a>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>
65
- <span class='aam-setting-title'><?php echo __('Import AAM Settings', AAM_KEY); ?></span>
66
- <p class="aam-setting-description">
67
- <?php echo __('Import AAM settings from the file.', AAM_KEY); ?>
68
- </p>
69
- </td>
70
- <td>
71
- <div class="hidden"><input type="file" id="aam-import-file" /></div>
72
- <a href="#" class="btn btn-warning btn-block" id="import-aam">Import</a>
73
- </td>
74
- </tr>
75
- <tr>
76
- <td>
77
- <span class='aam-setting-title'><?php echo __('Clear Cache', AAM_KEY); ?></span>
78
- <p class="aam-setting-description">
79
- <?php echo __('Clear all AAM cache.', AAM_KEY); ?>
80
- </p>
81
- </td>
82
- <td>
83
- <a href="#" class="btn btn-primary btn-block" id="clear-cache">Clear</a>
84
- </td>
85
- </tr>
86
- <tr>
87
- <td>
88
- <span class='aam-setting-title'><?php echo __('Clear All Settings', AAM_KEY); ?></span>
89
- <p class="aam-setting-description">
90
- <?php echo __('Remove all the settings related to AAM from the database.', AAM_KEY); ?>
91
- </p>
92
- </td>
93
- <td>
94
- <a href="#clear-settings-modal" data-toggle="modal" class="btn btn-danger btn-block">Clear</a>
95
- </td>
96
- </tr>
97
- </tbody>
98
- </table>
99
- </div>
100
- <div role="tabpanel" class="tab-pane" id="utility-miscellaneous">
101
- <table class="table table-striped table-bordered">
102
- <tbody>
103
- <?php $misc = $this->getUtilityOptionList('miscellaneous'); ?>
104
- <?php if (count($misc)) { ?>
105
- <?php foreach($this->getUtilityOptionList('miscellaneous') as $id => $option) { ?>
106
- <tr>
107
- <td>
108
- <span class='aam-setting-title'><?php echo $option['title']; ?></span>
109
- <p class="aam-setting-description">
110
- <?php echo $option['descr']; ?>
111
- </p>
112
- </td>
113
- <td class="text-center">
114
- <input data-toggle="toggle" name="<?php echo $id; ?>" id="utility-<?php echo $id; ?>" <?php echo ($option['value'] ? 'checked' : ''); ?> type="checkbox" data-on="Enabled" data-off="Disabled" data-size="small" />
115
- </td>
116
- </tr>
117
- <?php } ?>
118
- <?php } else { ?>
119
- <tr>
120
- <td colspan="2" class="text-center"><?php echo __('No miscellaneous options found.', AAM_KEY); ?></td>
121
- </tr>
122
- <?php } ?>
123
-
124
- <?php do_action('aam-post-utilities-setting'); ?>
125
- </tbody>
126
- </table>
127
- </div>
128
- </div>
129
-
130
- <div class="modal fade" id="clear-settings-modal" tabindex="-1" role="dialog">
131
- <div class="modal-dialog modal-sm" role="document">
132
- <div class="modal-content">
133
- <div class="modal-header">
134
- <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
135
- <h4 class="modal-title"><?php echo __('Clear all settings', AAM_KEY); ?></h4>
136
- </div>
137
- <div class="modal-body">
138
- <p class="text-center alert alert-danger text-larger"><?php echo __('All AAM settings will be removed.', AAM_KEY); ?></p>
139
- </div>
140
- <div class="modal-footer">
141
- <button type="button" class="btn btn-danger" id="clear-settings"><?php echo __('Clear', AAM_KEY); ?></button>
142
- <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Cancel', AAM_KEY); ?></button>
143
- </div>
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Core/API.php CHANGED
@@ -231,25 +231,29 @@ final class AAM_Core_API {
231
  * @access public
232
  */
233
  public static function reject($area = 'frontend', $args = array()) {
234
- $object = AAM::getUser()->getObject('redirect');
235
- $type = $object->get("{$area}.redirect.type");
236
-
237
- if (!empty($type) && ($type == 'login')) {
238
- $redirect = add_query_arg(
239
- array('aam-redirect' => 'login'),
240
- wp_login_url(AAM_Core_Request::server('REQUEST_URI'))
241
- );
242
- } elseif (!empty($type) && ($type != 'default')) {
243
- $redirect = $object->get("{$area}.redirect.{$type}");
244
- } else { //ConfigPress setup
245
- $redirect = AAM_Core_Config::get(
246
- "{$area}.access.deny.redirect", __('Access Denied', AAM_KEY)
247
- );
 
 
 
 
 
 
 
 
248
  }
249
-
250
- do_action('aam-rejected-action', $area, $args);
251
-
252
- self::redirect($redirect, $args);
253
  }
254
 
255
  /**
@@ -263,7 +267,8 @@ final class AAM_Core_API {
263
  * @access public
264
  */
265
  public static function redirect($rule, $args = null) {
266
- if (filter_var($rule, FILTER_VALIDATE_URL)) {
 
267
  wp_redirect($rule, 307);
268
  } elseif (preg_match('/^[\d]+$/', $rule)) {
269
  wp_safe_redirect(get_page_link($rule), 307);
@@ -423,4 +428,35 @@ final class AAM_Core_API {
423
  return $type;
424
  }
425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  }
231
  * @access public
232
  */
233
  public static function reject($area = 'frontend', $args = array()) {
234
+ if (AAM_Core_Request::server('REQUEST_METHOD') != 'POST') {
235
+ $object = AAM::getUser()->getObject('redirect');
236
+ $type = $object->get("{$area}.redirect.type");
237
+
238
+ if (!empty($type) && ($type == 'login')) {
239
+ $redirect = add_query_arg(
240
+ array('aam-redirect' => 'login'),
241
+ wp_login_url(AAM_Core_Request::server('REQUEST_URI'))
242
+ );
243
+ } elseif (!empty($type) && ($type != 'default')) {
244
+ $redirect = $object->get("{$area}.redirect.{$type}");
245
+ } else { //ConfigPress setup
246
+ $redirect = AAM_Core_Config::get(
247
+ "{$area}.access.deny.redirect", __('Access Denied', AAM_KEY)
248
+ );
249
+ }
250
+
251
+ do_action('aam-rejected-action', $area, $args);
252
+
253
+ self::redirect($redirect, $args);
254
+ } else {
255
+ wp_die(-1);
256
  }
 
 
 
 
257
  }
258
 
259
  /**
267
  * @access public
268
  */
269
  public static function redirect($rule, $args = null) {
270
+ $path = parse_url($rule);
271
+ if ($path && !empty($path['host'])) {
272
  wp_redirect($rule, 307);
273
  } elseif (preg_match('/^[\d]+$/', $rule)) {
274
  wp_safe_redirect(get_page_link($rule), 307);
428
  return $type;
429
  }
430
 
431
+ /**
432
+ * Get current post
433
+ *
434
+ * @global type $wp_query
435
+ *
436
+ * @return WP_Post|null
437
+ */
438
+ public static function getCurrentPost() {
439
+ global $wp_query, $post;
440
+
441
+ $res = null;
442
+
443
+ if (!empty($wp_query->queried_object)) {
444
+ $res = $wp_query->queried_object;
445
+ } elseif (!empty($wp_query->post)) {
446
+ $res = $wp_query->post;
447
+ } elseif (!empty($wp_query->query['name']) && !empty($wp_query->posts)) {
448
+ //Important! Cover the scenario of NOT LIST but ALLOW READ
449
+ foreach($wp_query->posts as $post) {
450
+ if ($post->post_name == $wp_query->query['name']) {
451
+ $res = $post;
452
+ break;
453
+ }
454
+ }
455
+ }
456
+
457
+ $user = AAM::getUser();
458
+
459
+ return (is_a($res, 'WP_Post') ? $user->getObject('post', $res->ID) : null);
460
+ }
461
+
462
  }
Application/Core/Cache.php CHANGED
@@ -18,7 +18,7 @@ class AAM_Core_Cache {
18
  /**
19
  * DB Cache option
20
  */
21
- const CACHE_OPTION = 'cache';
22
 
23
  /**
24
  * Core config
@@ -94,12 +94,13 @@ class AAM_Core_Cache {
94
  $oquery = "DELETE FROM {$wpdb->options} WHERE `option_name` = %s";
95
  $wpdb->query($wpdb->prepare($oquery, 'aam_visitor_cache' ));
96
 
 
97
  $mquery = "DELETE FROM {$wpdb->usermeta} WHERE `meta_key` = %s";
98
- $wpdb->query($wpdb->prepare($mquery, $wpdb->prefix . 'aam_cache' ));
99
  } else {
100
  $query = "DELETE FROM {$wpdb->usermeta} WHERE (`user_id` = %d) AND ";
101
  $query .= "`meta_key` = %s";
102
- $wpdb->query($wpdb->prepare($query, $user, $wpdb->prefix . 'aam_cache'));
103
  }
104
 
105
  self::$cache = false;
@@ -119,7 +120,7 @@ class AAM_Core_Cache {
119
  */
120
  public static function save() {
121
  if (self::$updated) {
122
- AAM::getUser()->updateOption(self::$cache, self::CACHE_OPTION);
123
  }
124
  }
125
 
@@ -134,7 +135,7 @@ class AAM_Core_Cache {
134
  */
135
  public static function bootstrap() {
136
  if (!AAM::isAAM()) {
137
- $cache = AAM::getUser()->readOption(self::CACHE_OPTION);
138
  self::$cache = (is_array($cache) ? $cache : array());
139
 
140
  add_action('shutdown', 'AAM_Core_Cache::save');
18
  /**
19
  * DB Cache option
20
  */
21
+ const CACHE_OPTION = 'aam-cache';
22
 
23
  /**
24
  * Core config
94
  $oquery = "DELETE FROM {$wpdb->options} WHERE `option_name` = %s";
95
  $wpdb->query($wpdb->prepare($oquery, 'aam_visitor_cache' ));
96
 
97
+ //clear all users cache
98
  $mquery = "DELETE FROM {$wpdb->usermeta} WHERE `meta_key` = %s";
99
+ $wpdb->query($wpdb->prepare($mquery, self::CACHE_OPTION));
100
  } else {
101
  $query = "DELETE FROM {$wpdb->usermeta} WHERE (`user_id` = %d) AND ";
102
  $query .= "`meta_key` = %s";
103
+ $wpdb->query($wpdb->prepare($query, $user, self::CACHE_OPTION));
104
  }
105
 
106
  self::$cache = false;
120
  */
121
  public static function save() {
122
  if (self::$updated) {
123
+ update_user_meta(AAM::getUser()->ID, self::CACHE_OPTION, self::$cache);
124
  }
125
  }
126
 
135
  */
136
  public static function bootstrap() {
137
  if (!AAM::isAAM()) {
138
+ $cache = get_user_meta(AAM::getUser(), self::CACHE_OPTION, true);
139
  self::$cache = (is_array($cache) ? $cache : array());
140
 
141
  add_action('shutdown', 'AAM_Core_Cache::save');
Application/Core/Compatibility.php CHANGED
@@ -22,6 +22,7 @@ class AAM_Core_Compatibility {
22
  public static function initExtensions() {
23
  //block deprecated extensions from loading
24
  define('AAM_UTILITIES', '99');
 
25
  define('AAM_POST_FILTER', '99');
26
  define('AAM_REDIRECT', '99');
27
  define('AAM_CONTENT_TEASER', '99');
22
  public static function initExtensions() {
23
  //block deprecated extensions from loading
24
  define('AAM_UTILITIES', '99');
25
+ define('AAM_ROLE_FILTER', '99');
26
  define('AAM_POST_FILTER', '99');
27
  define('AAM_REDIRECT', '99');
28
  define('AAM_CONTENT_TEASER', '99');
Application/Core/Console.php CHANGED
@@ -26,12 +26,13 @@ class AAM_Core_Console {
26
  * @access private
27
  * @static
28
  */
29
- private static $_warnings = array();
30
 
31
  /**
32
  * Add new warning
33
  *
34
  * @param string $message
 
35
  *
36
  * @return void
37
  *
@@ -39,19 +40,20 @@ class AAM_Core_Console {
39
  * @static
40
  */
41
  public static function add($message) {
42
- self::$_warnings[] = $message;
43
- }
44
-
45
- /**
46
- * Check if there is any warning during execution
47
- *
48
- * @return boolean
49
- *
50
- * @access public
51
- * @static
52
- */
53
- public static function hasIssues() {
54
- return (count(self::$_warnings) ? true : false);
 
55
  }
56
 
57
  /**
@@ -62,8 +64,8 @@ class AAM_Core_Console {
62
  * @access public
63
  * @static
64
  */
65
- public static function getWarnings() {
66
- return self::$_warnings;
67
  }
68
 
69
  /**
@@ -71,7 +73,20 @@ class AAM_Core_Console {
71
  * @return type
72
  */
73
  public static function count() {
74
- return count(self::$_warnings);
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
 
77
  }
26
  * @access private
27
  * @static
28
  */
29
+ private static $_messages = array();
30
 
31
  /**
32
  * Add new warning
33
  *
34
  * @param string $message
35
+ * @param stirng $args...
36
  *
37
  * @return void
38
  *
40
  * @static
41
  */
42
  public static function add($message) {
43
+ //prepare search patterns
44
+ $num = func_num_args();
45
+ $search = ($num > 1 ? array_fill(0, ($num - 1) * 2, null) : array());
46
+
47
+ array_walk($search, 'AAM_Core_Console::walk');
48
+
49
+ $replace = array();
50
+ foreach (array_slice(func_get_args(), 1) as $key) {
51
+ array_push($replace, "<{$key}>", "</{$key}>");
52
+ }
53
+
54
+ self::$_messages[] = preg_replace(
55
+ $search, $replace, __($message, AAM_KEY), 1
56
+ );
57
  }
58
 
59
  /**
64
  * @access public
65
  * @static
66
  */
67
+ public static function getAll() {
68
+ return self::$_messages;
69
  }
70
 
71
  /**
73
  * @return type
74
  */
75
  public static function count() {
76
+ return count(self::$_messages);
77
+ }
78
+
79
+ /**
80
+ * Replace place holders with markup
81
+ *
82
+ * @param string $value
83
+ * @param int $index
84
+ *
85
+ * @access protected
86
+ * @static
87
+ */
88
+ protected static function walk(&$value, $index) {
89
+ $value = '/\\' . ($index % 2 ? ']' : '[') . '/';
90
  }
91
 
92
  }
Application/Core/Object/LoginRedirect.php CHANGED
@@ -43,7 +43,7 @@ class AAM_Core_Object_LoginRedirect extends AAM_Core_Object {
43
  if (empty($option)) {
44
  //inherit from parent subject
45
  $option = $this->getSubject()->inheritFromParent('loginredirect');
46
- } elseif (method_exists($this, 'setOverwritten')) { //TODO - Support legacy
47
  $this->setOverwritten(true);
48
  }
49
 
43
  if (empty($option)) {
44
  //inherit from parent subject
45
  $option = $this->getSubject()->inheritFromParent('loginredirect');
46
+ } else {
47
  $this->setOverwritten(true);
48
  }
49
 
Application/Core/Object/LogoutRedirect.php CHANGED
@@ -43,7 +43,7 @@ class AAM_Core_Object_LogoutRedirect extends AAM_Core_Object {
43
  if (empty($option)) {
44
  //inherit from parent subject
45
  $option = $this->getSubject()->inheritFromParent('logoutredirect');
46
- } elseif (method_exists($this, 'setOverwritten')) { //TODO - Support legacy
47
  $this->setOverwritten(true);
48
  }
49
 
43
  if (empty($option)) {
44
  //inherit from parent subject
45
  $option = $this->getSubject()->inheritFromParent('logoutredirect');
46
+ } else {
47
  $this->setOverwritten(true);
48
  }
49
 
Application/Core/Object/Menu.php CHANGED
@@ -142,12 +142,12 @@ class AAM_Core_Object_Menu extends AAM_Core_Object {
142
  *
143
  * @access public
144
  */
145
- public function has($menu) {
146
  //decode URL in case of any special characters like &amp;
147
  $decoded = htmlspecialchars_decode($menu);
148
  $options = $this->getOption();
149
 
150
- return !empty($options[$decoded]);
151
  }
152
 
153
  /**
142
  *
143
  * @access public
144
  */
145
+ public function has($menu, $both = false) {
146
  //decode URL in case of any special characters like &amp;
147
  $decoded = htmlspecialchars_decode($menu);
148
  $options = $this->getOption();
149
 
150
+ return !empty($options[$decoded]) || ($both && !empty($options['menu-' . $decoded]));
151
  }
152
 
153
  /**
Application/Core/Object/Redirect.php CHANGED
@@ -49,7 +49,7 @@ class AAM_Core_Object_Redirect extends AAM_Core_Object {
49
  $this->readByArea('frontend', $option);
50
  $this->readByArea('backend', $option);
51
  }
52
- } elseif (method_exists($this, 'setOverwritten')) { //TODO - Support legacy
53
  $this->setOverwritten(true);
54
  }
55
 
49
  $this->readByArea('frontend', $option);
50
  $this->readByArea('backend', $option);
51
  }
52
+ } else {
53
  $this->setOverwritten(true);
54
  }
55
 
Application/Core/Object/Teaser.php DELETED
@@ -1,124 +0,0 @@
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
- * Teaser object
12
- *
13
- * @package AAM
14
- * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
- */
16
- class AAM_Core_Object_Teaser extends AAM_Core_Object {
17
-
18
- /**
19
- * Constructor
20
- *
21
- * @param AAM_Core_Subject $subject
22
- *
23
- * @return void
24
- *
25
- * @access public
26
- */
27
- public function __construct(AAM_Core_Subject $subject) {
28
- parent::__construct($subject);
29
-
30
- $this->read();
31
- }
32
-
33
- /**
34
- *
35
- * @return void
36
- *
37
- * @access public
38
- */
39
- public function read() {
40
- $option = $this->getSubject()->readOption('teaser');
41
-
42
- //inherit from default Administrator role
43
- if (empty($option)) {
44
- //inherit from parent subject
45
- $option = $this->getSubject()->inheritFromParent('teaser');
46
- if (empty($option)) {
47
- $option = array();
48
- $this->readByArea('frontend', $option);
49
- }
50
- } elseif (method_exists($this, 'setOverwritten')) { //TODO - Support legacy
51
- $this->setOverwritten(true);
52
- }
53
-
54
- $this->setOption($option);
55
- }
56
-
57
- /**
58
- *
59
- * @param type $area
60
- * @param type $option
61
- */
62
- protected function readByArea($area, &$option) {
63
- $message = AAM_Core_Config::get("{$area}.teaser.message");
64
- $excerpt = AAM_Core_Config::get("{$area}.teaser.excerpt");
65
- if ($message || $excerpt) {
66
- $option["{$area}.teaser.message"] = $message;
67
- $option["{$area}.teaser.excerpt"] = $excerpt;
68
- }
69
- }
70
-
71
- /**
72
- * Save options
73
- *
74
- * @param string $property
75
- * @param boolean $value
76
- *
77
- * @return boolean
78
- *
79
- * @access public
80
- */
81
- public function save($property, $value) {
82
- $option = $this->getOption();
83
- $option[$property] = $value;
84
-
85
- return $this->getSubject()->updateOption($option, 'teaser');
86
- }
87
-
88
- /**
89
- *
90
- * @return type
91
- */
92
- public function reset() {
93
- return $this->getSubject()->deleteOption('teaser');
94
- }
95
-
96
- /**
97
- *
98
- * @param string $param
99
- *
100
- * @return boolean
101
- *
102
- * @access public
103
- */
104
- public function has($param) {
105
- $option = $this->getOption();
106
-
107
- return isset($option[$param]);
108
- }
109
-
110
- /**
111
- *
112
- * @param string $param
113
- *
114
- * @return boolean
115
- *
116
- * @access public
117
- */
118
- public function get($param) {
119
- $option = $this->getOption();
120
-
121
- return !empty($option[$param]) ? $option[$param] : null;
122
- }
123
-
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Application/Core/Server.php CHANGED
@@ -22,11 +22,6 @@ final class AAM_Core_Server {
22
  */
23
  const SERVER_URL = 'https://aamplugin.com/api/v1';
24
 
25
- /**
26
- * Fallback endpoint
27
- */
28
- const FALLBACK_URL = 'http://rest.vasyltech.com/v1';
29
-
30
  /**
31
  * Fetch the extension list
32
  *
@@ -68,7 +63,7 @@ final class AAM_Core_Server {
68
  $response = self::send('/check', $params);
69
  $result = array();
70
 
71
- if (!is_wp_error($response)) {
72
  //WP Error Fix bug report
73
  if ($response->error !== true && !empty($response->products)) {
74
  $result = $response->products;
@@ -121,17 +116,13 @@ final class AAM_Core_Server {
121
  *
122
  * @access protected
123
  */
124
- protected static function send($request, $params, $timeout = 20) {
125
  $response = self::parseResponse(
126
- AAM_Core_API::cURL(self::SERVER_URL . $request, false, $params, $timeout)
 
 
127
  );
128
 
129
- if (empty($response) || is_wp_error($response)) {
130
- $response = self::parseResponse(
131
- AAM_Core_API::cURL(self::FALLBACK_URL . $request, false, $params, $timeout)
132
- );
133
- }
134
-
135
  return $response;
136
  }
137
 
22
  */
23
  const SERVER_URL = 'https://aamplugin.com/api/v1';
24
 
 
 
 
 
 
25
  /**
26
  * Fetch the extension list
27
  *
63
  $response = self::send('/check', $params);
64
  $result = array();
65
 
66
+ if (!is_wp_error($response) && is_object($response)) {
67
  //WP Error Fix bug report
68
  if ($response->error !== true && !empty($response->products)) {
69
  $result = $response->products;
116
  *
117
  * @access protected
118
  */
119
+ protected static function send($request, $params, $timeout = 10) {
120
  $response = self::parseResponse(
121
+ AAM_Core_API::cURL(
122
+ self::SERVER_URL . $request, false, $params, $timeout
123
+ )
124
  );
125
 
 
 
 
 
 
 
126
  return $response;
127
  }
128
 
Application/Core/Subject.php CHANGED
@@ -142,6 +142,22 @@ abstract class AAM_Core_Subject {
142
  public function getId() {
143
  return $this->_id;
144
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  /**
147
  * Get Subject
142
  public function getId() {
143
  return $this->_id;
144
  }
145
+
146
+ /**
147
+ *
148
+ * @return type
149
+ */
150
+ public function getName() {
151
+ return null;
152
+ }
153
+
154
+ /**
155
+ *
156
+ * @return int
157
+ */
158
+ public function getMaxLevel() {
159
+ return 0;
160
+ }
161
 
162
  /**
163
  * Get Subject
Application/Core/Subject/Default.php CHANGED
@@ -70,6 +70,14 @@ class AAM_Core_Subject_Default extends AAM_Core_Subject {
70
  return self::UID;
71
  }
72
 
 
 
 
 
 
 
 
 
73
  /**
74
  *
75
  * @return type
70
  return self::UID;
71
  }
72
 
73
+ /**
74
+ *
75
+ * @return type
76
+ */
77
+ public function getName() {
78
+ return __('All Users, Roles and Visitor', AAM_KEY);
79
+ }
80
+
81
  /**
82
  *
83
  * @return type
Application/Core/Subject/Role.php CHANGED
@@ -186,4 +186,20 @@ class AAM_Core_Subject_Role extends AAM_Core_Subject {
186
  );
187
  }
188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  }
186
  );
187
  }
188
 
189
+ /**
190
+ *
191
+ * @return type
192
+ */
193
+ public function getName() {
194
+ return $this->name;
195
+ }
196
+
197
+ /**
198
+ *
199
+ * @return type
200
+ */
201
+ public function getMaxLevel() {
202
+ return AAM_Core_API::maxLevel($this->capabilities);
203
+ }
204
+
205
  }
Application/Core/Subject/User.php CHANGED
@@ -35,6 +35,27 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
35
  */
36
  protected $parent = null;
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  /**
39
  * Block User
40
  *
@@ -196,7 +217,7 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
196
  $result = $this->deleteOption($object);
197
  }
198
 
199
- return result;
200
  }
201
 
202
  /**
@@ -293,5 +314,23 @@ class AAM_Core_Subject_User extends AAM_Core_Subject {
293
  public function getUID() {
294
  return self::UID;
295
  }
 
 
 
 
 
 
 
 
 
 
296
 
 
 
 
 
 
 
 
 
297
  }
35
  */
36
  protected $parent = null;
37
 
38
+ /**
39
+ *
40
+ * @param type $id
41
+ */
42
+ public function __construct($id) {
43
+ parent::__construct($id);
44
+
45
+ if (get_current_user_id() == $id) {
46
+ //check if user is locked
47
+ if ($this->user_status == 1) {
48
+ wp_logout();
49
+ }
50
+
51
+ //check if user's role expired
52
+ $expire = get_user_option('aam-role-expires');
53
+ if ($expire && ($expire <= time())) {
54
+ $this->restoreRoles();
55
+ }
56
+ }
57
+ }
58
+
59
  /**
60
  * Block User
61
  *
217
  $result = $this->deleteOption($object);
218
  }
219
 
220
+ return $result;
221
  }
222
 
223
  /**
314
  public function getUID() {
315
  return self::UID;
316
  }
317
+
318
+ /**
319
+ *
320
+ * @return type
321
+ */
322
+ public function getName() {
323
+ $display = $this->display_name;
324
+
325
+ return ($display ? $display : $this->user_nicename);
326
+ }
327
 
328
+ /**
329
+ *
330
+ * @return type
331
+ */
332
+ public function getMaxLevel() {
333
+ return AAM_Core_API::maxLevel($this->allcaps);
334
+ }
335
+
336
  }
Application/Core/Subject/Visitor.php CHANGED
@@ -71,4 +71,12 @@ class AAM_Core_Subject_Visitor extends AAM_Core_Subject {
71
  return AAM_Core_Subject_Default::getInstance();
72
  }
73
 
 
 
 
 
 
 
 
 
74
  }
71
  return AAM_Core_Subject_Default::getInstance();
72
  }
73
 
74
+ /**
75
+ *
76
+ * @return type
77
+ */
78
+ public function getName() {
79
+ return __('Anonymous', AAM_KEY);
80
+ }
81
+
82
  }
Application/Extension/List.php CHANGED
@@ -7,79 +7,87 @@
7
  * ======================================================================
8
  */
9
 
10
- return array(
11
- 'AAM_COMPLETE_PACKAGE' => array(
12
- 'title' => 'AAM Complete Package',
13
- 'id' => 'AAM_COMPLETE_PACKAGE',
14
- 'type' => 'commercial',
15
- 'description' => 'Get list of all available premium extensions in one package. Any additional premium extensions in the future will be available for free. Get complete package today and instantly save over 50%.',
16
- 'storeURL' => 'https://aamplugin.com/complete-package',
17
- 'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null)
18
- ),
19
- 'AAM_PLUS_PACKAGE' => array(
20
- 'title' => 'AAM Plus Package',
21
- 'id' => 'AAM_PLUS_PACKAGE',
22
- 'type' => 'commercial',
23
- 'description' => 'Our best selling extension that allows you to manage access to unlimited number of posts, pages, custom post types, categories, custom hierarchical taxonomies or define the default access to all.',
24
- 'storeURL' => 'https://aamplugin.com/extension/plus-package',
25
- 'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null)
26
- ),
27
- 'AAM_IP_CHECK' => array(
28
- 'title' => 'AAM IP Check',
29
- 'id' => 'AAM_IP_CHECK',
30
- 'type' => 'commercial',
31
- 'new' => true,
32
- 'description' => 'Manage access to your website based on a visitor geo-location, refered host or IP address.',
33
- 'storeURL' => 'https://aamplugin.com/extension/ip-check',
34
- 'version' => (defined('AAM_IP_CHECK') ? constant('AAM_IP_CHECK') : null)
35
- ),
36
- 'AAM_ROLE_HIERARCHY' => array(
37
- 'title' => 'AAM Role Hierarchy',
38
- 'id' => 'AAM_ROLE_HIERARCHY',
39
- 'type' => 'commercial',
40
- 'description' => 'Create complex role hierarchy and automatically inherit access settings from parent roles.',
41
- 'storeURL' => 'https://aamplugin.com/extension/role-hierarchy',
42
- 'version' => (defined('AAM_ROLE_HIERARCHY') ? constant('AAM_ROLE_HIERARCHY') : null)
43
- ),
44
- 'AAM_ROLE_FILTER' => array(
45
- 'title' => 'AAM Role Filter',
46
- 'id' => 'AAM_ROLE_FILTER',
47
- 'type' => 'commercial',
48
- 'description' => 'Based on user levels, restrict access to manage list of roles and users that have higher user level.',
49
- 'storeURL' => 'https://aamplugin.com/extension/role-filter',
50
- 'version' => (defined('AAM_ROLE_FILTER') ? constant('AAM_ROLE_FILTER') : null)
51
- ),
52
- 'AAM_PAYMENT' => array(
53
- 'title' => 'AAM Payment',
54
- 'id' => 'AAM_PAYMENT',
55
- 'type' => 'commercial',
56
- 'new' => true,
57
- 'description' => 'Start selling access to your posts, categories or user levels.',
58
- 'storeURL' => 'https://aamplugin.com/extension/payment',
59
- 'version' => (defined('AAM_PAYMENT') ? constant('AAM_PAYMENT') : null)
60
- ),
61
- 'AAM_MULTISITE' => array(
62
- 'title' => 'AAM Multisite',
63
- 'id' => 'AAM_MULTISITE',
64
- 'type' => 'GNU',
65
- 'license' => 'AAMMULTISITE',
66
- 'description' => 'Convenient way to navigate between different sites in the Network Admin Panel.',
67
- 'version' => (defined('AAM_MULTISITE') ? constant('AAM_MULTISITE') : null)
68
- ),
69
- 'AAM_CONFIGPRESS' => array(
70
- 'title' => 'AAM ConfigPress',
71
- 'id' => 'AAM_CONFIGPRESS',
72
- 'type' => 'GNU',
73
- 'license' => 'AAMCONFIGPRESS',
74
- 'description' => 'Extension to manage AAM core functionality with advanced configuration settings.',
75
- 'version' => (defined('AAM_CONFIGPRESS') ? constant('AAM_CONFIGPRESS') : null)
76
- ),
77
- 'AAM_USER_ACTIVITY' => array(
78
- 'title' => 'AAM User Activities',
79
- 'id' => 'AAM_USER_ACTIVITY',
80
- 'type' => 'GNU',
81
- 'license' => 'AAMUSERACTIVITY',
82
- 'description' => 'Track any kind of user or visitor activity on your website. <a href="https://aamplugin.com/help/how-to-track-any-wordpress-user-activity" target="_blank">Read more.</a>',
83
- 'version' => (defined('AAM_USER_ACTIVITY') ? constant('AAM_USER_ACTIVITY') : null)
84
- ),
85
- );
 
 
 
 
 
 
 
 
7
  * ======================================================================
8
  */
9
 
10
+ class AAM_Extension_List {
11
+
12
+ /**
13
+ *
14
+ * @return type
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 with updates for no additional cost.',
23
+ 'url' => 'https://aamplugin.com/complete-package',
24
+ 'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null)
25
+ ),
26
+ 'AAM_PLUS_PACKAGE' => array(
27
+ 'title' => 'Plus Package',
28
+ 'id' => 'AAM_PLUS_PACKAGE',
29
+ 'type' => 'commercial',
30
+ 'description' => 'The best selling extension that has the most advanced content management features for WordPress CMS. Manage accsss to any post, page, custom post type, category, custom hierarchical taxonomy or define the default access to all.',
31
+ 'url' => 'https://aamplugin.com/extension/plus-package',
32
+ 'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null)
33
+ ),
34
+ 'AAM_IP_CHECK' => array(
35
+ 'title' => 'IP Check',
36
+ 'id' => 'AAM_IP_CHECK',
37
+ 'type' => 'commercial',
38
+ 'description' => 'This extension was designed to manage access to your entire website based on visitor\'s geo-location, refered host or IP address.',
39
+ 'url' => 'https://aamplugin.com/extension/ip-check',
40
+ 'version' => (defined('AAM_IP_CHECK') ? constant('AAM_IP_CHECK') : null)
41
+ ),
42
+ 'AAM_ROLE_HIERARCHY' => array(
43
+ 'title' => 'Role Hierarchy',
44
+ 'id' => 'AAM_ROLE_HIERARCHY',
45
+ 'type' => 'commercial',
46
+ 'description' => 'This extension alters default WordPress linear role system and give you the ability to create complex role hierarchy tree where all access settings are automatically inherited from parent roles.',
47
+ 'url' => 'https://aamplugin.com/extension/role-hierarchy',
48
+ 'version' => (defined('AAM_ROLE_HIERARCHY') ? constant('AAM_ROLE_HIERARCHY') : null)
49
+ ),
50
+ 'AAM_ECOMMERCE' => array(
51
+ 'title' => 'E-Commerce',
52
+ 'id' => 'AAM_ECOMMERCE',
53
+ 'type' => 'commercial',
54
+ 'new' => true,
55
+ 'description' => 'Start selling access to your website content. This extension gives ability to define the list of E-Commerce products that you can bind with any content on your website. The properly configured AAM Payment widget allows any authenticated user to purchase access with credit/debig card or PayPal. Braintree and Stripe gateways are used to handle actual purchase.',
56
+ 'url' => 'https://aamplugin.com/extension/ecommerce',
57
+ 'version' => (defined('AAM_ECOMMERCE') ? constant('AAM_ECOMMERCE') : null)
58
+ ),
59
+ 'AAM_PAYMENT' => array(
60
+ 'title' => 'Payment',
61
+ 'id' => 'AAM_PAYMENT',
62
+ 'type' => 'commercial',
63
+ 'description' => AAM_Backend_View_Helper::preparePhrase('[Deprecated!]. The extension is deprecated and replaces with more sophisticated E-Commerce extension. If you already purchased it, please contact us to upgrade your license for no additional cost.', 'b'),
64
+ 'url' => 'https://aamplugin.com/extension/ecommerce',
65
+ 'version' => (defined('AAM_PAYMENT') ? constant('AAM_PAYMENT') : null)
66
+ ),
67
+ 'AAM_MULTISITE' => array(
68
+ 'title' => 'Multisite',
69
+ 'id' => 'AAM_MULTISITE',
70
+ 'type' => 'GNU',
71
+ 'license' => 'AAMMULTISITE',
72
+ 'description' => 'Convenient way to navigate between different sites in the Network Admin Panel.',
73
+ 'version' => (defined('AAM_MULTISITE') ? constant('AAM_MULTISITE') : null)
74
+ ),
75
+ 'AAM_CONFIGPRESS' => array(
76
+ 'title' => 'ConfigPress',
77
+ 'id' => 'AAM_CONFIGPRESS',
78
+ 'type' => 'GNU',
79
+ 'license' => 'AAMCONFIGPRESS',
80
+ 'description' => 'Extension to manage AAM core functionality with advanced configuration settings.',
81
+ 'version' => (defined('AAM_CONFIGPRESS') ? constant('AAM_CONFIGPRESS') : null)
82
+ ),
83
+ 'AAM_USER_ACTIVITY' => array(
84
+ 'title' => 'User Activities',
85
+ 'id' => 'AAM_USER_ACTIVITY',
86
+ 'type' => 'GNU',
87
+ 'license' => 'AAMUSERACTIVITY',
88
+ 'description' => 'Track any kind of user or visitor activity on your website. <a href="https://aamplugin.com/help/how-to-track-any-wordpress-user-activity" target="_blank">Read more.</a>',
89
+ 'version' => (defined('AAM_USER_ACTIVITY') ? constant('AAM_USER_ACTIVITY') : null)
90
+ ),
91
+ );
92
+ }
93
+ }
Application/Extension/Repository.php CHANGED
@@ -72,24 +72,6 @@ class AAM_Extension_Repository {
72
  */
73
  protected function __construct() {}
74
 
75
- /**
76
- * Get single instance of itself
77
- *
78
- * @param AAM $parent
79
- *
80
- * @return AAM_Extension_Repository
81
- *
82
- * @access public
83
- * @static
84
- */
85
- public static function getInstance() {
86
- if (is_null(self::$_instance)) {
87
- self::$_instance = new self;
88
- }
89
-
90
- return self::$_instance;
91
- }
92
-
93
  /**
94
  * Load active extensions
95
  *
@@ -127,9 +109,30 @@ class AAM_Extension_Repository {
127
  * @access protected
128
  */
129
  protected function bootstrapExtension($path) {
 
 
 
 
 
 
 
 
130
  $bootstrap = "{$path}/bootstrap.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
- if (file_exists($bootstrap)) { //bootstrap the extension
133
  require($bootstrap);
134
  }
135
  }
@@ -183,6 +186,22 @@ class AAM_Extension_Repository {
183
  return $result;
184
  }
185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  /**
187
  * Get extension version
188
  *
@@ -205,18 +224,14 @@ class AAM_Extension_Repository {
205
  */
206
  public function getList() {
207
  if (empty($this->list)) {
208
- $list = require dirname(__FILE__) . '/List.php';
209
  $index = AAM_Core_Compatibility::getLicenseList();
210
  $check = AAM_Core_API::getOption('aam-check', array(), 'site');
211
 
212
  foreach ($list as $id => &$item) {
213
  //get premium license from the stored license index
214
  if (empty($item['license'])) {
215
- // TODO - Fix bug with EXTENDED license
216
- if (!empty($index[$id . '_EXTENDED']['license'])) {
217
- $item['license'] = $index[$id . '_EXTENDED']['license'];
218
- $item['expire'] = (isset($index[$id . '_EXTENDED']['expire']) ? date('Y-m-d', strtotime($index[$id . '_EXTENDED']['expire'])) : null);
219
- } elseif (!empty($index[$id]['license'])) {
220
  $item['license'] = $index[$id]['license'];
221
  $item['expire'] = (isset($index[$id]['expire']) ? date('Y-m-d', strtotime($index[$id]['expire'])) : null);
222
  } else {
@@ -225,7 +240,7 @@ class AAM_Extension_Repository {
225
  }
226
 
227
  //update extension status
228
- $item['status'] = $this->checkStatus($item, $check);
229
  }
230
 
231
  $this->list = $list;
@@ -240,23 +255,32 @@ class AAM_Extension_Repository {
240
  * @param type $index
241
  * @return type
242
  */
243
- protected function checkStatus($item, $index) {
244
- $id = $item['id'];
245
- $status = AAM_Extension_Repository::STATUS_INSTALLED;
246
-
247
- if ($item['type'] == 'commercial') {
248
- $valid = !empty($item['license']);
249
- } else {
250
- $valid = true;
251
- }
252
 
253
- if (defined($id)) { //extension is installed
254
- if ($valid && isset($index->$id)
255
- && version_compare(constant($id), $index->$id->version) == -1) {
 
 
 
 
 
 
 
 
 
 
256
  $status = AAM_Extension_Repository::STATUS_UPDATE;
 
 
 
 
 
 
257
  }
258
  } else {
259
- $status = AAM_Extension_Repository::STATUS_DOWNLOAD;
260
  }
261
 
262
  return $status;
@@ -296,7 +320,46 @@ class AAM_Extension_Repository {
296
  * @access public
297
  */
298
  public function getBasedir() {
299
- return AAM_Core_Config::get('extention.directory', AAM_EXTENSION_BASE);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
 
302
  }
72
  */
73
  protected function __construct() {}
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  /**
76
  * Load active extensions
77
  *
109
  * @access protected
110
  */
111
  protected function bootstrapExtension($path) {
112
+ static $cache = null;
113
+
114
+ if (is_null($cache)) {
115
+ $cache = AAM_Core_Compatibility::getLicenseList();
116
+ }
117
+
118
+ $load = true;
119
+ $config = "{$path}/config.php";
120
  $bootstrap = "{$path}/bootstrap.php";
121
+
122
+ if (file_exists($config)) {
123
+ $conf = require $config;
124
+ $load = empty($cache[$conf['id']]['status']) || ($cache[$conf['id']]['status'] != self::STATUS_INACTIVE);
125
+ } else { // TODO - Remove May 2018
126
+ AAM_Core_Console::add(AAM_Backend_View_Helper::preparePhrase(
127
+ sprintf(
128
+ __('The [%s] file is missing. Update all your extensions to the latest version.', AAM_KEY),
129
+ str_replace(AAM_EXTENSION_BASE . '/', '', $config)
130
+ ),
131
+ 'b'
132
+ ));
133
+ }
134
 
135
+ if ($load && file_exists($bootstrap)) { //bootstrap the extension
136
  require($bootstrap);
137
  }
138
  }
186
  return $result;
187
  }
188
 
189
+ /**
190
+ * Update extension status
191
+ *
192
+ * @param string $id
193
+ * @param string $status
194
+ */
195
+ public function updateStatus($id, $status) {
196
+ //retrieve the installed list of extensions
197
+ $list = AAM_Core_Compatibility::getLicenseList();
198
+
199
+ $list[$id]['status'] = $status;
200
+
201
+ //update the extension list
202
+ AAM_Core_API::updateOption('aam-extensions', $list);
203
+ }
204
+
205
  /**
206
  * Get extension version
207
  *
224
  */
225
  public function getList() {
226
  if (empty($this->list)) {
227
+ $list = AAM_Extension_List::get();
228
  $index = AAM_Core_Compatibility::getLicenseList();
229
  $check = AAM_Core_API::getOption('aam-check', array(), 'site');
230
 
231
  foreach ($list as $id => &$item) {
232
  //get premium license from the stored license index
233
  if (empty($item['license'])) {
234
+ if (!empty($index[$id]['license'])) {
 
 
 
 
235
  $item['license'] = $index[$id]['license'];
236
  $item['expire'] = (isset($index[$id]['expire']) ? date('Y-m-d', strtotime($index[$id]['expire'])) : null);
237
  } else {
240
  }
241
 
242
  //update extension status
243
+ $item['status'] = $this->checkStatus($item, $check, $index);
244
  }
245
 
246
  $this->list = $list;
255
  * @param type $index
256
  * @return type
257
  */
258
+ protected function checkStatus($item, $retrieved, $stored) {
259
+ $id = $item['id'];
 
 
 
 
 
 
 
260
 
261
+ if (!defined($id)) {
262
+ $status = AAM_Extension_Repository::STATUS_DOWNLOAD;
263
+ } elseif (empty($stored[$id]['status'])) {
264
+ $status = AAM_Extension_Repository::STATUS_INSTALLED;
265
+
266
+ if ($item['type'] == 'commercial') {
267
+ $valid = !empty($item['license']);
268
+ } else {
269
+ $valid = true;
270
+ }
271
+
272
+ if ($valid && isset($retrieved->$id)
273
+ && version_compare(constant($id), $retrieved->$id->version) == -1) {
274
  $status = AAM_Extension_Repository::STATUS_UPDATE;
275
+ AAM_Core_Console::add(
276
+ AAM_Backend_View_Helper::preparePhrase(sprintf(
277
+ 'The [%s] extension has new update available for download;',
278
+ $item['title']
279
+ ), 'b')
280
+ );
281
  }
282
  } else {
283
+ $status = $stored[$id]['status'];
284
  }
285
 
286
  return $status;
320
  * @access public
321
  */
322
  public function getBasedir() {
323
+ $dirname = AAM_Core_Config::get('extention.directory', AAM_EXTENSION_BASE);
324
+
325
+ if (file_exists($dirname) === false) {
326
+ @mkdir($dirname, fileperms( ABSPATH ) & 0777 | 0755);
327
+ }
328
+
329
+ return $dirname;
330
+ }
331
+
332
+ /**
333
+ * Check if there are any updates
334
+ *
335
+ * @return type
336
+ */
337
+ public function hasUpdates() {
338
+ $updates = 0;
339
+
340
+ foreach($this->getList() as $item) {
341
+ $updates += ($item['status'] == self::STATUS_UPDATE);
342
+ }
343
+
344
+ return $updates ? true : false;
345
+ }
346
+
347
+ /**
348
+ * Get single instance of itself
349
+ *
350
+ * @param AAM $parent
351
+ *
352
+ * @return AAM_Extension_Repository
353
+ *
354
+ * @access public
355
+ * @static
356
+ */
357
+ public static function getInstance() {
358
+ if (is_null(self::$_instance)) {
359
+ self::$_instance = new self;
360
+ }
361
+
362
+ return self::$_instance;
363
  }
364
 
365
  }
Application/Frontend/Authorization.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * AAM frontend authorization
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Frontend_Authorization {
17
+
18
+ /**
19
+ * Instance of itself
20
+ *
21
+ * @var AAM_Frontend_Authorization
22
+ *
23
+ * @access private
24
+ */
25
+ private static $_instance = null;
26
+
27
+ /**
28
+ * Check post access
29
+ *
30
+ * Based on the provided post object, check if current user has access to it.
31
+ * This method run multiple checks at-once
32
+ *
33
+ * @param AAM_Core_Object_Post $post
34
+ *
35
+ * @return void
36
+ *
37
+ * @access public
38
+ */
39
+ public function post(AAM_Core_Object_Post $post) {
40
+ // pre post access hook
41
+ do_action('aam-pre-post-authorization-action', $post);
42
+
43
+ // Step #1. Check if access expired to the post
44
+ $this->checkExpiration($post);
45
+
46
+ // Step #2. Check if user has access to read the post
47
+ $this->checkReadAccess($post);
48
+
49
+ // Step #3. Check if counter exceeded max allowed views
50
+ $this->checkCounter($post);
51
+
52
+ // Step #4. Check if redirect is defined for the post
53
+ $this->checkRedirect($post);
54
+
55
+ // post post access hook
56
+ do_action('aam-post-post-authorization-action', $post);
57
+ }
58
+
59
+ /**
60
+ * Check ACCESS_EXPIRATION option
61
+ *
62
+ * If access is expired, override the access settings based on the
63
+ * post.access.expired ConfigPress settings (default frontend.read)
64
+ *
65
+ * @param AAM_Core_Object_Post $post
66
+ *
67
+ * @return void
68
+ *
69
+ * @access protected
70
+ */
71
+ protected function checkExpiration($post) {
72
+ $expire = $post->has('frontend.expire');
73
+
74
+ if ($expire) {
75
+ $date = strtotime($post->get('frontend.expire_datetime'));
76
+ if ($date <= time()) {
77
+ $actions = AAM_Core_Config::get(
78
+ 'post.access.expired', 'frontend.read'
79
+ );
80
+
81
+ foreach(array_map('trim', explode(',', $actions)) as $action) {
82
+ $post->set($action, 1);
83
+ }
84
+ }
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Check READ & READ_OTHERS options
90
+ *
91
+ * @param AAM_Core_Object_Post $post
92
+ *
93
+ * @return void
94
+ *
95
+ * @access protected
96
+ */
97
+ protected function checkReadAccess(AAM_Core_Object_Post $post) {
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
+ }
105
+
106
+ /**
107
+ * Check ACCESS_COUNTER option
108
+ *
109
+ * @param AAM_Core_Object_Post $post
110
+ *
111
+ * @return void
112
+ *
113
+ * @access protected
114
+ */
115
+ protected function checkCounter(AAM_Core_Object_Post $post) {
116
+ $user = get_current_user_id();
117
+
118
+ //check counter only for authenticated users and if ACCESS COUNTER is set
119
+ if ($user && $post->has('frontend.access_counter')) {
120
+ $counter = intval(get_user_meta(
121
+ $user, 'aam-post-' . $post->ID . '-access-counter', true
122
+ ));
123
+
124
+ if ($counter >= $post->get('frontend.access_counter_limit')) {
125
+ $this->deny('post_read', 'frontend.access_counter', $post->getPost());
126
+ } else {
127
+ update_user_meta(
128
+ $user, 'aam-post-' . $post->ID . '-access-counter', ++$counter
129
+ );
130
+ }
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Check REDIRECT option
136
+ *
137
+ * @param AAM_Core_Object_Post $post
138
+ *
139
+ * @return void
140
+ *
141
+ * @access protected
142
+ */
143
+ protected function checkRedirect(AAM_Core_Object_Post $post) {
144
+ if ($post->has('frontend.redirect')) {
145
+ AAM_Core_API::redirect($post->get('frontend.location'));
146
+ }
147
+ }
148
+
149
+ /**
150
+ * Deny access
151
+ *
152
+ * @param string $hook
153
+ * @param string $action
154
+ * @param WP_Post $post
155
+ *
156
+ * @return void
157
+ *
158
+ * @access protected
159
+ */
160
+ protected function deny($hook, $action, $post) {
161
+ AAM_Core_API::reject('frontend', array(
162
+ 'hook' => $hook, 'action' => $action, 'post' => $post
163
+ ));
164
+ }
165
+
166
+ /**
167
+ * Alias for the bootstrap
168
+ *
169
+ * @return AAM_Frontend_Authorization
170
+ *
171
+ * @access public
172
+ * @static
173
+ */
174
+ public static function getInstance() {
175
+ return self::bootstrap();
176
+ }
177
+
178
+ /**
179
+ * Bootstrap authorization layer
180
+ *
181
+ * @return void
182
+ *
183
+ * @access public
184
+ */
185
+ public static function bootstrap() {
186
+ if (is_null(self::$_instance)) {
187
+ self::$_instance = new self;
188
+ }
189
+
190
+ return self::$_instance;
191
+ }
192
+
193
+ }
Application/Frontend/Filter.php ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * AAM frontend filter
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Frontend_Filter {
17
+
18
+ /**
19
+ * Instance of itself
20
+ *
21
+ * @var AAM_Frontend_Filter
22
+ *
23
+ * @access private
24
+ */
25
+ private static $_instance = null;
26
+
27
+ /**
28
+ * Constructor
29
+ *
30
+ * @return void
31
+ *
32
+ * @access protected
33
+ */
34
+ protected function __construct() {
35
+ //bootstrap authorization layer
36
+ AAM_Frontend_Authorization::bootstrap();
37
+
38
+ //manage access to frontend posts & pages
39
+ add_action('wp', array($this, 'wp'), 999);
40
+ add_action('404_template', array($this, 'themeRedirect'), 999);
41
+
42
+ //important to keep this option optional for optimization reasons
43
+ if (AAM_Core_Config::get('check-post-visibility', true)) {
44
+ //filter navigation pages & taxonomies
45
+ add_filter('get_pages', array($this, 'filterPostList'), 999);
46
+ add_filter('wp_get_nav_menu_items', array($this, 'getNavigationMenu'), 999);
47
+
48
+ //add post filter for LIST restriction
49
+ add_filter('the_posts', array($this, 'filterPostList'), 999);
50
+ add_action('pre_get_posts', array($this, 'preparePostQuery'), 999);
51
+ }
52
+
53
+ //password protected filter
54
+ add_filter('post_password_required', array($this, 'isPassProtected'), 10, 2);
55
+ //manage password check expiration
56
+ add_filter('post_password_expires', array($this, 'checkPassExpiration'));
57
+
58
+ //widget filters
59
+ add_filter('sidebars_widgets', array($this, 'filterWidgets'), 999);
60
+
61
+ //get control over commenting stuff
62
+ add_filter('comments_open', array($this, 'commentOpen'), 10, 2);
63
+
64
+ //filter post content
65
+ add_filter('the_content', array($this, 'filterPostContent'), 999);
66
+ }
67
+
68
+ /**
69
+ * Main frontend access control hook
70
+ *
71
+ * @return void
72
+ *
73
+ * @access public
74
+ * @global WP_Post $post
75
+ */
76
+ public function wp() {
77
+ global $wp_query;
78
+
79
+ if ($wp_query->is_404) { // Handle 404 redirect
80
+ $type = AAM_Core_Config::get('frontend.404redirect.type', 'default');
81
+ do_action('aam-rejected-action', 'frontend', array(
82
+ 'hook' => 'aam_404',
83
+ 'uri' => AAM_Core_Request::server('REQUEST_URI')
84
+ ));
85
+
86
+ if ($type != 'default') {
87
+ AAM_Core_API::redirect(
88
+ AAM_Core_Config::get("frontend.404redirect.{$type}")
89
+ );
90
+ }
91
+ } elseif ($wp_query->is_single || $wp_query->is_page
92
+ || $wp_query->is_posts_page || $wp_query->is_home) {
93
+ $post = AAM_Core_API::getCurrentPost();
94
+
95
+ if ($post) {
96
+ AAM_Frontend_Authorization::getInstance()->post($post);
97
+ }
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Theme redirect
103
+ *
104
+ * Super important function that cover the 404 redirect that triggered by theme
105
+ * when page is not found. This covers the scenario when page is restricted from
106
+ * listing and read.
107
+ *
108
+ * @global type $wp_query
109
+ *
110
+ * @param type $template
111
+ *
112
+ * @return string
113
+ *
114
+ * @access public
115
+ */
116
+ public function themeRedirect($template) {
117
+ $post = AAM_Core_API::getCurrentPost();
118
+
119
+ if ($post) {
120
+ AAM_Frontend_Authorization::getInstance()->post($post);
121
+ }
122
+
123
+ return $template;
124
+ }
125
+
126
+ /**
127
+ * Filter posts from the list
128
+ *
129
+ * @param array $posts
130
+ *
131
+ * @return array
132
+ *
133
+ * @access public
134
+ */
135
+ public function filterPostList($posts) {
136
+ $current = AAM_Core_API::getCurrentPost();
137
+
138
+ if (is_array($posts) && !$this->isMainWP()) {
139
+ foreach ($posts as $i => $post) {
140
+ if ($current && ($current->ID == $post->ID)) { continue; }
141
+
142
+ if (AAM_Core_API::isHiddenPost($post, $post->post_type)) {
143
+ unset($posts[$i]);
144
+ }
145
+ }
146
+
147
+ $posts = array_values($posts);
148
+ }
149
+
150
+ return $posts;
151
+ }
152
+
153
+ /**
154
+ * Filter Navigation menu
155
+ *
156
+ * @param array $pages
157
+ *
158
+ * @return array
159
+ *
160
+ * @access public
161
+ */
162
+ public function getNavigationMenu($pages) {
163
+ if (is_array($pages)) {
164
+ foreach ($pages as $i => $page) {
165
+ if (in_array($page->type, array('post_type', 'custom'))) {
166
+ $post = get_post($page->object_id);
167
+ if (AAM_Core_API::isHiddenPost($post, $post->post_type)) {
168
+ unset($pages[$i]);
169
+ }
170
+ }
171
+ }
172
+ }
173
+
174
+ return $pages;
175
+ }
176
+
177
+ /**
178
+ * Build pre-post query request
179
+ *
180
+ * This is used to solve the problem or pagination
181
+ *
182
+ * @param stdClass $query
183
+ *
184
+ * @return void
185
+ *
186
+ * @access public
187
+ */
188
+ public function preparePostQuery($query) {
189
+ static $skip = false;
190
+
191
+ if (($skip === false) && $this->isMainWP()) { // avoid loop
192
+ $skip = true;
193
+ $filtered = AAM_Core_API::getFilteredPostList($query);
194
+ $skip = false;
195
+
196
+ if (isset($query->query_vars['post__not_in'])
197
+ && is_array($query->query_vars['post__not_in'])) {
198
+ $query->query_vars['post__not_in'] = array_merge(
199
+ $query->query_vars['post__not_in'], $filtered
200
+ );
201
+ } else {
202
+ $query->query_vars['post__not_in'] = $filtered;
203
+ }
204
+ }
205
+ }
206
+
207
+ /**
208
+ * Check if post is password protected
209
+ *
210
+ * @param boolean $res
211
+ * @param WP_Post $post
212
+ *
213
+ * @return boolean
214
+ *
215
+ * @access public
216
+ */
217
+ public function isPassProtected($res, $post) {
218
+ if (is_a($post, 'WP_Post')) {
219
+ $object = AAM::getUser()->getObject('post', $post->ID);
220
+
221
+ if ($object->has('frontend.protected')) {
222
+ require_once( ABSPATH . 'wp-includes/class-phpass.php' );
223
+ $hasher = new PasswordHash( 8, true );
224
+ $pass = $object->get('frontend.password');
225
+ $hash = wp_unslash(
226
+ AAM_Core_Request::cookie('wp-postpass_' . COOKIEHASH)
227
+ );
228
+
229
+ $res = empty($hash) ? true : !$hasher->CheckPassword($pass, $hash);
230
+ }
231
+ }
232
+
233
+ return $res;
234
+ }
235
+
236
+ /**
237
+ * Get password expiration TTL
238
+ *
239
+ * @param int $expire
240
+ *
241
+ * @return int
242
+ *
243
+ * @access public
244
+ */
245
+ public function checkPassExpiration($expire) {
246
+ $overwrite = AAM_Core_Config::get('post.password.expires', null);
247
+
248
+ if ($overwrite !== null) {
249
+ $expire = ($overwrite ? time() + strtotime($overwrite) : 0);
250
+ }
251
+
252
+ return $expire;
253
+ }
254
+
255
+ /**
256
+ * Filter frontend widgets
257
+ *
258
+ * @param array $widgets
259
+ *
260
+ * @return array
261
+ *
262
+ * @access public
263
+ */
264
+ public function filterWidgets($widgets) {
265
+ return AAM::getUser()->getObject('metabox')->filterFrontend($widgets);
266
+ }
267
+
268
+ /**
269
+ * Control frontend commenting feature
270
+ *
271
+ * @param boolean $open
272
+ * @param int $post_id
273
+ *
274
+ * @return boolean
275
+ *
276
+ * @access public
277
+ */
278
+ public function commentOpen($open, $post_id) {
279
+ $object = AAM::getUser()->getObject('post', $post_id);
280
+
281
+ return ($object->has('frontend.comment') ? false : $open);
282
+ }
283
+
284
+ /**
285
+ * Filter post content
286
+ *
287
+ * @param string $content
288
+ *
289
+ * @return string
290
+ *
291
+ * @access public
292
+ * @global WP_Post $post
293
+ */
294
+ public function filterPostContent($content) {
295
+ $post = AAM_Core_API::getCurrentPost();
296
+
297
+ if ($post && $post->has('frontend.limit')) {
298
+ if ($post->has('frontend.teaser')) {
299
+ $message = $post->get('frontend.teaser');
300
+ } else {
301
+ $message = __('[No teaser message provided]', AAM_KEY);
302
+ }
303
+
304
+ $content = do_shortcode(stripslashes($message));
305
+ }
306
+
307
+ return $content;
308
+ }
309
+
310
+ /**
311
+ * Check if request comes from wp()
312
+ *
313
+ * Super important method is used to solve the problem with hidden posts
314
+ *
315
+ * @return boolean
316
+ *
317
+ * @access protected
318
+ */
319
+ protected function isMainWP() {
320
+ $result = false;
321
+
322
+ foreach(debug_backtrace() as $level) {
323
+ $class = (isset($level['class']) ? $level['class'] : null);
324
+ $func = (isset($level['function']) ? $level['function'] : null);
325
+
326
+ if ($class == 'WP' && $func == 'main') {
327
+ $result = true;
328
+ break;
329
+ }
330
+ }
331
+
332
+ return $result;
333
+ }
334
+
335
+ /**
336
+ * Register backend filters and actions
337
+ *
338
+ * @return void
339
+ *
340
+ * @access public
341
+ */
342
+ public static function register() {
343
+ if (is_null(self::$_instance)) {
344
+ self::$_instance = new self;
345
+ }
346
+ }
347
+
348
+ }
Application/Frontend/Manager.php CHANGED
@@ -24,11 +24,6 @@ class AAM_Frontend_Manager {
24
  */
25
  private static $_instance = null;
26
 
27
- /**
28
- * pre_get_posts flag
29
- */
30
- protected $skip = false;
31
-
32
  /**
33
  * Construct the manager
34
  *
@@ -38,359 +33,36 @@ class AAM_Frontend_Manager {
38
  */
39
  public function __construct() {
40
  if (AAM_Core_Config::get('frontend-access-control', true)) {
41
- //control WordPress frontend
42
- add_action('wp', array($this, 'wp'), 999);
43
- add_action('404_template', array($this, 'themeRedirect'), 999);
44
-
45
- //support login widget
46
- add_action('wp_enqueue_scripts', array($this, 'printJavascript'));
47
-
48
- if (AAM_Core_Config::get('check-post-visibility', true)) {
49
- //filter navigation pages & taxonomies
50
- add_filter('get_pages', array($this, 'thePosts'), 999);
51
- add_filter('wp_get_nav_menu_items', array($this, 'getNavigationMenu'), 999);
52
-
53
- //add post filter for LIST restriction
54
- add_filter('the_posts', array($this, 'thePosts'), 999, 2);
55
- add_action('pre_get_posts', array($this, 'preparePostQuery'), 999);
56
- }
57
-
58
- //widget filters
59
- add_filter('sidebars_widgets', array($this, 'widgetFilter'), 999);
60
- //get control over commenting stuff
61
- add_filter('comments_open', array($this, 'commentOpen'), 10, 2);
62
-
63
- //password protected filter
64
- add_filter('post_password_required', array($this, 'isProtected'), 10, 2);
65
-
66
- //filter post content
67
- add_filter('the_content', array($this, 'theContent'), 999);
68
-
69
- //manage AAM shortcode
70
- add_shortcode('aam', array($this, 'processShortcode'));
71
-
72
- //core AAM filter
73
- add_filter('aam-object-filter', array($this, 'getObject'), 10, 4);
74
-
75
- //manage password check expiration
76
- add_filter('post_password_expires', array($this, 'postPasswordExpires'));
77
-
78
- //admin bar
79
- $this->checkAdminBar();
80
  }
81
 
82
- //register login widget
83
- add_action('widgets_init', array($this, 'registerLoginWidget'));
84
-
85
- if (AAM_Core_Request::get('action') == 'aam-auth') {
86
- $this->doubleAuthentication();
87
- }
88
- }
89
-
90
- /**
91
- *
92
- * @param type $expire
93
- * @return type
94
- */
95
- public function postPasswordExpires($expire) {
96
- $overwrite = AAM_Core_Config::get('post.password.expires', null);
97
 
98
- if ($overwrite !== null) {
99
- $expire = ($overwrite ? time() + strtotime($overwrite) : 0);
100
- }
101
 
102
- return $expire;
103
- }
104
-
105
- /**
106
- *
107
- */
108
- public function registerLoginWidget() {
109
- register_widget('AAM_Backend_Widget_Login');
110
- }
111
-
112
- /**
113
- * Print javascript libraries
114
- *
115
- * @return void
116
- *
117
- * @access public
118
- */
119
- public function printJavascript() {
120
- wp_enqueue_script('aam-login', AAM_MEDIA . '/js/aam-login.js');
121
-
122
- //add plugin localization
123
- $locals = array(
124
- 'nonce' => wp_create_nonce('aam_ajax'),
125
- 'ajaxurl' => admin_url('admin-ajax.php')
126
- );
127
-
128
- wp_localize_script('aam-login', 'aamLocal', $locals);
129
- }
130
-
131
- /**
132
- *
133
- * @param type $object
134
- * @param type $type
135
- * @param type $id
136
- * @param type $subject
137
- * @return type
138
- */
139
- public function getObject($object, $type, $id, $subject) {
140
- if (is_a($object, 'AAM_Core_Object_Post')) {
141
- $expire = $object->has('frontend.expire');
142
- $date = strtotime($object->get('frontend.expire_datetime'));
143
-
144
- if ($expire && ($date <= time())) {
145
- $actions = AAM_Core_Config::get('post.access.expire.action', 'read');
146
-
147
- $object->set('frontend.expire', 0);
148
-
149
- foreach(array_map('trim', explode(',', $actions)) as $action) {
150
- $object->set('frontend.' . $action, 1);
151
- }
152
- }
153
- }
154
-
155
- return $object;
156
- }
157
-
158
- /**
159
- *
160
- * @param type $response
161
- * @param WP_Post $post
162
- * @return type
163
- */
164
- public function isProtected($response, $post) {
165
- if (is_a($post, 'WP_Post')) {
166
- $object = AAM::getUser()->getObject('post', $post->ID);
167
-
168
- if ($object->has('frontend.protected')) {
169
- require_once( ABSPATH . 'wp-includes/class-phpass.php' );
170
- $hasher = new PasswordHash( 8, true );
171
- $hash = wp_unslash(AAM_Core_Request::cookie('wp-postpass_' . COOKIEHASH));
172
-
173
- if (empty($hash)) {
174
- $response = true;
175
- } else {
176
- $response = !$hasher->CheckPassword(
177
- $object->get('frontend.password'), $hash
178
- );
179
- }
180
- }
181
- }
182
-
183
- return $response;
184
- }
185
-
186
- /**
187
- * Main frontend access control hook
188
- *
189
- * @return void
190
- *
191
- * @access public
192
- * @global WP_Post $post
193
- */
194
- public function wp() {
195
- global $wp_query;
196
-
197
- if ($wp_query->is_404) {
198
- $type = AAM_Core_Config::get('frontend.404redirect.type', 'default');
199
- do_action('aam-rejected-action', 'frontend', array(
200
- 'hook' => 'aam_404',
201
- 'uri' => AAM_Core_Request::server('REQUEST_URI')
202
- ));
203
-
204
- if ($type != 'default') {
205
- AAM_Core_API::redirect(
206
- AAM_Core_Config::get("frontend.404redirect.{$type}")
207
- );
208
- }
209
- } elseif ($wp_query->is_single || $wp_query->is_page
210
- || $wp_query->is_posts_page || $wp_query->is_home) {
211
- $post = $this->getCurrentPost();
212
-
213
- if (is_a($post, 'WP_Post')) {
214
- $this->checkPostReadAccess($post);
215
- }
216
  }
217
  }
218
 
219
  /**
220
- * Theme redirect
221
  *
222
- * Super important function that cover the 404 redirect that triggered by theme
223
- * when page is not found. This covers the scenario when page is restricted from
224
- * listing and read.
225
- *
226
- * @global type $wp_query
227
- *
228
- * @param type $template
229
  *
230
  * @return string
231
  *
232
  * @access public
233
  */
234
- public function themeRedirect($template) {
235
- global $wp_query;
236
-
237
- $object = (isset($wp_query->queried_object) ? $wp_query->queried_object : 0);
238
- if ($object && is_a($object, 'WP_Post')) {
239
- $this->checkPostReadAccess($object);
240
- }
241
-
242
- return $template;
243
- }
244
-
245
- /**
246
- *
247
- * @global type $wp_query
248
- * @return type
249
- */
250
- protected function getCurrentPost() {
251
- global $wp_query, $post;
252
-
253
- $current = null;
254
-
255
- if (!empty($wp_query->queried_object)) {
256
- $current = $wp_query->queried_object;
257
- } elseif (!empty($wp_query->post)) {
258
- $current = $wp_query->post;
259
- } elseif (!empty($wp_query->query['name']) && !empty($wp_query->posts)) {
260
- //Important! Cover the scenario of NOT LIST but ALLOW READ
261
- foreach($wp_query->posts as $post) {
262
- if ($post->post_name == $wp_query->query['name']) {
263
- $current = $post;
264
- break;
265
- }
266
- }
267
- }
268
-
269
- return (is_a($current, 'WP_Post') ? $current : null);
270
- }
271
-
272
- /**
273
- * Check post read access
274
- *
275
- * @param WP_Post $post
276
- *
277
- * @return void
278
- *
279
- * @access protected
280
- */
281
- protected function checkPostReadAccess($post) {
282
- $object = AAM::getUser()->getObject('post', $post->ID);
283
- $read = $object->has('frontend.read');
284
- $others = $object->has('frontend.read_others');
285
-
286
- $restrict = apply_filters(
287
- 'aam-check-post-read-access-filer',
288
- ($read || ($others && !$this->isAuthor($post))),
289
- $object
290
- );
291
-
292
- if ($restrict) {
293
- AAM_Core_API::reject(
294
- 'frontend',
295
- array(
296
- 'hook' => 'post_read',
297
- 'action' => 'frontend.read',
298
- 'post' => $post
299
- )
300
- );
301
- }
302
-
303
- //check post redirect
304
- if ($object->has('frontend.redirect')) {
305
- AAM_Core_API::redirect($object->get('frontend.location'));
306
- }
307
-
308
- //trigger any action
309
- do_action('aam-wp-action', $object);
310
- }
311
-
312
- /**
313
- * Filter posts from the list
314
- *
315
- * @param array $posts
316
- *
317
- * @return array
318
- *
319
- * @access public
320
- */
321
- public function thePosts($posts) {
322
- $current = $this->getCurrentPost();
323
-
324
- if (is_array($posts) && !$this->isMainWP()) {
325
- foreach ($posts as $i => $post) {
326
- if ($current && ($current->ID == $post->ID)) { continue; }
327
-
328
- if (AAM_Core_API::isHiddenPost($post, $post->post_type)) {
329
- unset($posts[$i]);
330
- }
331
- }
332
-
333
- $posts = array_values($posts);
334
- }
335
-
336
- return $posts;
337
- }
338
-
339
- /**
340
- * Filter Navigation menu
341
- *
342
- * @param array $pages
343
- *
344
- * @return array
345
- *
346
- * @access public
347
- */
348
- public function getNavigationMenu($pages) {
349
- if (is_array($pages)) {
350
- foreach ($pages as $i => $page) {
351
- if (in_array($page->type, array('post_type', 'custom'))) {
352
- $post = get_post($page->object_id);
353
- if (AAM_Core_API::isHiddenPost($post, $post->post_type)) {
354
- unset($pages[$i]);
355
- }
356
- }
357
- }
358
- }
359
-
360
- return $pages;
361
- }
362
-
363
- /**
364
- * Filter Frontend widgets
365
- *
366
- * @param array $widgets
367
- *
368
- * @return array
369
- *
370
- * @access public
371
- */
372
- public function widgetFilter($widgets) {
373
- return AAM::getUser()->getObject('metabox')->filterFrontend($widgets);
374
- }
375
-
376
- /**
377
- * Control Frontend commenting freature
378
- *
379
- * @param boolean $open
380
- * @param int $post_id
381
- *
382
- * @return boolean
383
- *
384
- * @access public
385
- */
386
- public function commentOpen($open, $post_id) {
387
- $object = AAM::getUser()->getObject('post', $post_id);
388
 
389
- if ($object->has('frontend.comment')) {
390
- $open = false;
391
- }
392
-
393
- return $open;
394
  }
395
 
396
  /**
@@ -409,107 +81,39 @@ class AAM_Frontend_Manager {
409
  }
410
  }
411
  }
412
-
413
  /**
 
 
 
414
  *
415
- * @param type $query
416
  */
417
- public function preparePostQuery($query) {
418
- if (($this->skip === false) && $this->isMainWP()) {
419
- $this->skip = true;
420
- $filtered = AAM_Core_API::getFilteredPostList($query);
421
- $this->skip = false;
422
-
423
- if (isset($query->query_vars['post__not_in'])
424
- && is_array($query->query_vars['post__not_in'])) {
425
- $query->query_vars['post__not_in'] = array_merge(
426
- $query->query_vars['post__not_in'], $filtered
427
- );
428
- } else {
429
- $query->query_vars['post__not_in'] = $filtered;
430
- }
431
- }
432
  }
433
-
434
  /**
435
- * Undocumented function
 
 
436
  *
437
- * @return boolean
438
  */
439
- protected function isMainWP() {
440
- $result = false;
441
-
442
- foreach(debug_backtrace() as $level) {
443
- $class = (isset($level['class']) ? $level['class'] : null);
444
- $func = (isset($level['function']) ? $level['function'] : null);
445
-
446
- if ($class == 'WP' && $func == 'main') {
447
- $result = true;
448
- break;
449
- }
450
- }
451
 
452
- return $result;
453
- }
 
 
 
454
 
455
- /**
456
- *
457
- * @global WP_Post $post
458
- * @param type $content
459
- *
460
- * @return string
461
- *
462
- * @access public
463
- */
464
- public function theContent($content) {
465
- global $post;
466
-
467
- if (is_a($post, 'WP_Post')) {
468
- $object = AAM::getUser()->getObject('post', $post->ID);
469
- if ($object->has('frontend.limit')) {
470
- if ($object->has('frontend.teaser')) {
471
- $message = $object->get('frontend.teaser');
472
- $excerpt = false;
473
- } else {
474
- $teaser = AAM::getUser()->getObject('teaser');
475
- $message = $teaser->get('frontend.teaser.message');
476
- $excerpt = $teaser->get('frontend.teaser.excerpt');
477
- }
478
-
479
- $html = (intval($excerpt) ? $post->post_excerpt : '');
480
- $html .= stripslashes($message);
481
- $content = do_shortcode($html);
482
- }
483
  }
484
-
485
- return $content;
486
  }
487
 
488
- /**
489
- *
490
- * @param type $args
491
- * @param type $content
492
- * @return type
493
- */
494
- public function processShortcode($args, $content) {
495
- $shortcode = new AAM_Shortcode_Factory($args, $content);
496
-
497
- return $shortcode->process();
498
- }
499
-
500
- /**
501
- * Check if user is post author
502
- *
503
- * @param WP_Post $post
504
- *
505
- * @return boolean
506
- *
507
- * @access protected
508
- */
509
- protected function isAuthor($post) {
510
- return ($post->post_author == get_current_user_id());
511
- }
512
-
513
  /**
514
  * Bootstrap the manager
515
  *
24
  */
25
  private static $_instance = null;
26
 
 
 
 
 
 
27
  /**
28
  * Construct the manager
29
  *
33
  */
34
  public function __construct() {
35
  if (AAM_Core_Config::get('frontend-access-control', true)) {
36
+ AAM_Frontend_Filter::register();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
+ //manage AAM shortcode
40
+ add_shortcode('aam', array($this, 'processShortcode'));
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
+ //admin bar
43
+ $this->checkAdminBar();
 
44
 
45
+ //register login widget
46
+ if (AAM_Core_Config::get('secure-login', true)) {
47
+ add_action('widgets_init', array($this, 'registerLoginWidget'));
48
+ add_action('wp_enqueue_scripts', array($this, 'printJavascript'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
  }
51
 
52
  /**
53
+ * Process AAM short-codes
54
  *
55
+ * @param array $args
56
+ * @param string $content
 
 
 
 
 
57
  *
58
  * @return string
59
  *
60
  * @access public
61
  */
62
+ public function processShortcode($args, $content) {
63
+ $shortcode = new AAM_Shortcode_Factory($args, $content);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
+ return $shortcode->process();
 
 
 
 
66
  }
67
 
68
  /**
81
  }
82
  }
83
  }
84
+
85
  /**
86
+ * Register login widget
87
+ *
88
+ * @return void
89
  *
90
+ * @access public
91
  */
92
+ public function registerLoginWidget() {
93
+ register_widget('AAM_Backend_Widget_Login');
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
+
96
  /**
97
+ * Print JS libraries
98
+ *
99
+ * @return void
100
  *
101
+ * @access public
102
  */
103
+ public function printJavascript() {
104
+ if (AAM_Core_Config::get('secure-login', true)) {
105
+ wp_enqueue_script('aam-login', AAM_MEDIA . '/js/aam-login.js');
 
 
 
 
 
 
 
 
 
106
 
107
+ //add plugin localization
108
+ $locals = array(
109
+ 'nonce' => wp_create_nonce('aam_ajax'),
110
+ 'ajaxurl' => admin_url('admin-ajax.php')
111
+ );
112
 
113
+ wp_localize_script('aam-login', 'aamLocal', $locals);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
 
 
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /**
118
  * Bootstrap the manager
119
  *
Lang/advanced-access-manager-en_US.mo CHANGED
Binary file
Lang/advanced-access-manager-en_US.po CHANGED
@@ -1,13 +1,13 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: AAM\n"
4
- "POT-Creation-Date: 2017-05-30 19:56-0400\n"
5
  "PO-Revision-Date: \n"
6
  "Language-Team: WP AAM <vasyl@vasyltech.com>\n"
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.0.2\n"
11
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
12
  "X-Poedit-SourceCharset: UTF-8\n"
13
  "X-Poedit-KeywordsList: __\n"
@@ -16,323 +16,388 @@ msgstr ""
16
  "Language: en_US\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
- #: Application/Backend/Feature/404Redirect.php:68
20
- msgid "404 Redirect"
21
  msgstr ""
22
 
23
- #: Application/Backend/Feature/Abstract.php:31
24
- #: Application/Backend/Manager.php:539 Application/Backend/Manager.php:562
25
- #: Application/Core/API.php:246
26
- msgid "Access Denied"
27
  msgstr ""
28
 
29
- #: Application/Backend/Feature/Capability.php:96
30
  msgid "Capability already exists"
31
  msgstr ""
32
 
33
- #: Application/Backend/Feature/Capability.php:125
34
  msgid "Can not remove the capability"
35
  msgstr ""
36
 
37
- #: Application/Backend/Feature/Capability.php:235
38
- #: Application/Backend/Feature/Capability.php:276
39
  msgid "System"
40
  msgstr ""
41
 
42
- #: Application/Backend/Feature/Capability.php:236
43
- #: Application/Backend/Feature/Capability.php:278
44
- #: Application/Backend/Feature/Post.php:467
45
  msgid "Posts & Pages"
46
  msgstr ""
47
 
48
- #: Application/Backend/Feature/Capability.php:237
49
- #: Application/Backend/Feature/Capability.php:280
50
- #: Application/Backend/phtml/frame.phtml:143
51
- #: Application/Backend/phtml/object/post.phtml:96
52
  msgid "Backend"
53
  msgstr ""
54
 
55
- #: Application/Backend/Feature/Capability.php:238
56
- #: Application/Backend/Feature/Capability.php:282
57
  msgid "AAM Interface"
58
  msgstr ""
59
 
60
- #: Application/Backend/Feature/Capability.php:239
61
- #: Application/Backend/Feature/Capability.php:284
62
- #: Application/Backend/phtml/utility.phtml:7
63
  msgid "Miscellaneous"
64
  msgstr ""
65
 
66
- #: Application/Backend/Feature/Capability.php:324
67
  msgid "Capabilities"
68
  msgstr ""
69
 
70
- #: Application/Backend/Feature/Contact.php:51
71
- msgid "Contact Us"
72
  msgstr ""
73
 
74
- #: Application/Backend/Feature/Extension.php:96
75
- msgid "Enter license key to update extension."
76
  msgstr ""
77
 
78
- #: Application/Backend/Feature/Extension.php:164
79
- msgid "Extensions"
80
  msgstr ""
81
 
82
- #: Application/Backend/Feature/LoginRedirect.php:109
83
- msgid "Login Redirect"
84
  msgstr ""
85
 
86
- #: Application/Backend/Feature/LogoutRedirect.php:110
87
- msgid "Logout Redirect"
88
  msgstr ""
89
 
90
- #: Application/Backend/Feature/Menu.php:209
91
- msgid "Backend Menu"
92
  msgstr ""
93
 
94
- #: Application/Backend/Feature/Metabox.php:245
95
- msgid "Metaboxes & Widgets"
96
  msgstr ""
97
 
98
- #: Application/Backend/Feature/Redirect.php:117
99
- msgid "Access Denied Redirect"
 
 
 
100
  msgstr ""
101
 
102
- #: Application/Backend/Feature/Security.php:79
103
- msgid "Security"
104
  msgstr ""
105
 
106
- #: Application/Backend/Feature/Teaser.php:109
107
- msgid "Content Teaser"
 
 
 
 
108
  msgstr ""
109
 
110
- #: Application/Backend/Feature/Utility.php:140
111
- msgid "Utilities"
112
  msgstr ""
113
 
114
- #: Application/Backend/Manager.php:216
115
- msgid "Access Manager"
116
  msgstr ""
117
 
118
- #: Application/Backend/Manager.php:309 Application/Backend/Manager.php:327
119
- #: Application/Backend/Manager.php:350
120
- msgid "Access"
121
  msgstr ""
122
 
123
- #: Application/Backend/Manager.php:448
124
- #: Application/Backend/View/Localization.php:40 media/js/aam-interface.js:713
125
- msgid "Anonymous"
 
 
126
  msgstr ""
127
 
128
- #: Application/Backend/Manager.php:455 media/js/aam-interface.js:745
129
- msgid "All Users, Roles and Visitor"
130
  msgstr ""
131
 
132
- #: Application/Backend/View.php:229
133
- msgid "Invalid Email"
 
 
 
134
  msgstr ""
135
 
136
- #: Application/Backend/View/Localization.php:11 media/js/aam-interface.js:1075
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  msgid "Search Capability"
138
  msgstr ""
139
 
140
- #: Application/Backend/View/Localization.php:12 media/js/aam-interface.js:1076
141
  msgid "_TOTAL_ capability(s)"
142
  msgstr ""
143
 
144
- #: Application/Backend/View/Localization.php:13 media/js/aam-interface.js:286
145
- #: media/js/aam-interface.js:341 media/js/aam-interface.js:1179
146
- #: media/js/aam-interface.js:1225 media/js/aam-interface.js:1760
147
- #: media/js/aam-interface.js:1807 media/js/aam-interface.js:1853
148
  msgid "Saving..."
149
  msgstr ""
150
 
151
- #: Application/Backend/View/Localization.php:14 media/js/aam-interface.js:1187
152
  msgid "Failed to add new capability"
153
  msgstr ""
154
 
155
- #: Application/Backend/View/Localization.php:15 media/js/aam-interface.js:306
156
- #: media/js/aam-interface.js:353 media/js/aam-interface.js:390
157
- #: media/js/aam-interface.js:484 media/js/aam-interface.js:516
158
- #: media/js/aam-interface.js:890 media/js/aam-interface.js:927
159
- #: media/js/aam-interface.js:963 media/js/aam-interface.js:1192
160
- #: media/js/aam-interface.js:1238 media/js/aam-interface.js:1279
161
- #: media/js/aam-interface.js:1473 media/js/aam-interface.js:1523
162
- #: media/js/aam-interface.js:1915 media/js/aam-interface.js:2010
163
- #: media/js/aam-interface.js:2109 media/js/aam-interface.js:2203
164
- #: media/js/aam-interface.js:2284 media/js/aam-interface.js:2358
165
- #: media/js/aam.js:207
166
  msgid "Application error"
167
  msgstr ""
168
 
169
- #: Application/Backend/View/Localization.php:16 media/js/aam-interface.js:1195
170
  msgid "Add Capability"
171
  msgstr ""
172
 
173
- #: Application/Backend/View/Localization.php:17 media/js/aam-interface.js:795
174
- #: Application/Backend/phtml/object/menu.phtml:63
175
  msgid "Show Menu"
176
  msgstr ""
177
 
178
- #: Application/Backend/View/Localization.php:18 media/js/aam-interface.js:810
179
- #: Application/Backend/phtml/object/menu.phtml:67
180
  msgid "Restrict Menu"
181
  msgstr ""
182
 
183
- #: Application/Backend/View/Localization.php:19 media/js/aam-interface.js:922
184
  msgid "Failed to retrieve mataboxes"
185
  msgstr ""
186
 
187
- #: Application/Backend/View/Localization.php:20 media/js/aam-interface.js:1562
188
  msgid "Search"
189
  msgstr ""
190
 
191
- #: Application/Backend/View/Localization.php:21 media/js/aam-interface.js:1563
192
  msgid "_TOTAL_ object(s)"
193
  msgstr ""
194
 
195
- #: Application/Backend/View/Localization.php:22
196
  msgid "Failed"
197
  msgstr ""
198
 
199
- #: Application/Backend/View/Localization.php:23 media/js/aam-interface.js:44
200
  msgid "Loading..."
201
  msgstr ""
202
 
203
- #: Application/Backend/View/Localization.php:24 media/js/aam-interface.js:49
204
- #: Application/Backend/phtml/partial/role-inheritance.phtml:5
205
- msgid "Select Role"
206
  msgstr ""
207
 
208
- #: Application/Backend/View/Localization.php:25 media/js/aam-interface.js:90
209
  msgid "Search Role"
210
  msgstr ""
211
 
212
- #: Application/Backend/View/Localization.php:26 media/js/aam-interface.js:91
213
  msgid "_TOTAL_ role(s)"
214
  msgstr ""
215
 
216
- #: Application/Backend/View/Localization.php:27 media/js/aam-interface.js:99
217
- #: media/js/aam-interface.js:555 Application/Backend/phtml/index.phtml:122
218
- #: Application/Backend/phtml/object/capability.phtml:26
219
- #: Application/Backend/phtml/object/capability.phtml:66
220
  msgid "Create"
221
  msgstr ""
222
 
223
- #: Application/Backend/View/Localization.php:28 media/js/aam-interface.js:120
224
- #: Application/Backend/phtml/index.phtml:82
225
- #: Application/Backend/phtml/index.phtml:215
226
  msgid "Users"
227
  msgstr ""
228
 
229
- #: Application/Backend/View/Localization.php:29 media/js/aam-interface.js:301
230
  msgid "Failed to add new role"
231
  msgstr ""
232
 
233
- #: Application/Backend/View/Localization.php:30 media/js/aam-interface.js:309
234
  msgid "Add Role"
235
  msgstr ""
236
 
237
- #: Application/Backend/View/Localization.php:31 media/js/aam-interface.js:348
238
  msgid "Failed to update role"
239
  msgstr ""
240
 
241
- #: Application/Backend/View/Localization.php:32 media/js/aam-interface.js:357
242
- #: Application/Backend/phtml/extension.phtml:55
243
- #: Application/Backend/phtml/extension.phtml:82
244
- #: Application/Backend/phtml/index.phtml:144
245
- #: Application/Backend/phtml/object/capability.phtml:88
 
 
 
 
 
246
  msgid "Update"
247
  msgstr ""
248
 
249
- #: Application/Backend/View/Localization.php:33 media/js/aam-interface.js:380
250
- #: media/js/aam-interface.js:1266
251
  msgid "Deleting..."
252
  msgstr ""
253
 
254
- #: Application/Backend/View/Localization.php:34 media/js/aam-interface.js:386
255
  msgid "Failed to delete role"
256
  msgstr ""
257
 
258
- #: Application/Backend/View/Localization.php:35
259
- #: Application/Backend/View/Localization.php:47 media/js/aam-interface.js:211
260
- #: media/js/aam-interface.js:394 Application/Backend/phtml/index.phtml:156
261
  msgid "Delete Role"
262
  msgstr ""
263
 
264
- #: Application/Backend/View/Localization.php:36 media/js/aam-interface.js:480
265
  msgid "Failed to block user"
266
  msgstr ""
267
 
268
- #: Application/Backend/View/Localization.php:37 media/js/aam-interface.js:546
269
  msgid "Search User"
270
  msgstr ""
271
 
272
- #: Application/Backend/View/Localization.php:38 media/js/aam-interface.js:547
273
  msgid "_TOTAL_ user(s)"
274
  msgstr ""
275
 
276
- #: Application/Backend/View/Localization.php:39 media/js/aam-interface.js:573
277
  #: Application/Backend/phtml/frame.phtml:46
278
- #: Application/Backend/phtml/index.phtml:99
279
  msgid "Role"
280
  msgstr ""
281
 
282
- #: Application/Backend/View/Localization.php:41
 
 
 
 
 
283
  msgid "Current user"
284
  msgstr ""
285
 
286
- #: Application/Backend/View/Localization.php:42
287
  msgid "Current role"
288
  msgstr ""
289
 
290
- #: Application/Backend/View/Localization.php:43 media/js/aam-interface.js:1647
291
  msgid "Manage Access"
292
  msgstr ""
293
 
294
- #: Application/Backend/View/Localization.php:44
295
- #: Application/Backend/View/PostOptionList.php:62
296
- #: media/js/aam-interface.js:1659
297
  msgid "Edit"
298
  msgstr ""
299
 
300
- #: Application/Backend/View/Localization.php:45 media/js/aam-interface.js:157
301
  msgid "Manage Role"
302
  msgstr ""
303
 
304
- #: Application/Backend/View/Localization.php:46 media/js/aam-interface.js:174
305
- msgid "Edit Role Name"
306
  msgstr ""
307
 
308
- #: Application/Backend/View/Localization.php:48 media/js/aam-interface.js:605
309
  msgid "Manage User"
310
  msgstr ""
311
 
312
- #: Application/Backend/View/Localization.php:49 media/js/aam-interface.js:619
313
  msgid "Edit User"
314
  msgstr ""
315
 
316
- #: Application/Backend/View/Localization.php:50 media/js/aam-interface.js:475
317
- #: media/js/aam-interface.js:476 media/js/aam-interface.js:632
318
  msgid "Lock User"
319
  msgstr ""
320
 
321
- #: Application/Backend/View/Localization.php:51 media/js/aam-interface.js:469
322
- #: media/js/aam-interface.js:470 media/js/aam-interface.js:645
323
  msgid "Unlock User"
324
  msgstr ""
325
 
326
- #: Application/Backend/View/Localization.php:52 media/js/aam-interface.js:1040
327
  msgid "Failed to grand capability - WordPress policy"
328
  msgstr ""
329
 
330
- #: Application/Backend/View/PostOptionList.php:13
331
- #: Application/Backend/View/PostOptionList.php:54
332
  msgid "List"
333
  msgstr ""
334
 
335
- #: Application/Backend/View/PostOptionList.php:14
336
  #, php-format
337
  msgid ""
338
  "Hide %s however access with a direct URL will be still allowed. When there "
@@ -340,563 +405,413 @@ msgid ""
340
  "for performance reasons, AAM checks limited number of posts per request."
341
  msgstr ""
342
 
343
- #: Application/Backend/View/PostOptionList.php:14
344
- #: Application/Backend/View/PostOptionList.php:22
345
  #, php-format
346
  msgid " %sSee in action.%s"
347
  msgstr ""
348
 
349
- #: Application/Backend/View/PostOptionList.php:17
350
- #: Application/Backend/View/PostOptionList.php:58
351
- msgid "List To Others"
352
  msgstr ""
353
 
354
- #: Application/Backend/View/PostOptionList.php:18
355
  #, php-format
356
  msgid ""
357
- "Hide %s for all except author (whoever created %s or was assigned on the "
358
- "Author metabox). Access with a direct URL will be still allowed. When there "
359
- "are more than 500 posts, this option may not be applied immediately because, "
360
- "for performance reasons, AAM checks limited number of posts per request."
361
  msgstr ""
362
 
363
- #: Application/Backend/View/PostOptionList.php:21
364
- msgid "Read"
365
  msgstr ""
366
 
367
- #: Application/Backend/View/PostOptionList.php:22
368
- #, php-format
369
- msgid ""
370
- "Restrict access to read %s. Any attempts to read, view or open %s will "
371
- "result in redirecting user based on the Access Denied Redirect rule."
372
  msgstr ""
373
 
374
- #: Application/Backend/View/PostOptionList.php:25
375
- msgid "Read By Others"
 
376
  msgstr ""
377
 
378
- #: Application/Backend/View/PostOptionList.php:26
379
- #, php-format
380
- msgid ""
381
- "Restrict access to read %s for all except author (whoever created %s or was "
382
- "assigned on the Author metabox). Any attempts to read, view or open %s will "
383
- "result in redirecting user based on the Access Denied Redirect rule."
384
  msgstr ""
385
 
386
- #: Application/Backend/View/PostOptionList.php:29
387
- msgid "Limit"
 
388
  msgstr ""
389
 
390
- #: Application/Backend/View/PostOptionList.php:30
391
  #, php-format
392
  msgid ""
393
- "When checked, show defined on the Content Teaser tab teaser message instead "
394
- "of the %s content."
 
395
  msgstr ""
396
 
397
- #: Application/Backend/View/PostOptionList.php:33
398
  msgid "Comment"
399
  msgstr ""
400
 
401
- #: Application/Backend/View/PostOptionList.php:34
402
  #, php-format
403
  msgid "Restrict access to comment on %s when commenting feature is enabled."
404
  msgstr ""
405
 
406
- #: Application/Backend/View/PostOptionList.php:37
407
  msgid "Redirect"
408
  msgstr ""
409
 
410
- #: Application/Backend/View/PostOptionList.php:38
411
- #, php-format
412
- msgid "Redirect to: %s"
413
- msgstr ""
414
-
415
- #: Application/Backend/View/PostOptionList.php:38
416
- #: Application/Backend/View/PostOptionList.php:43
417
- #: Application/Backend/View/PostOptionList.php:48
418
- msgid "change"
419
  msgstr ""
420
 
421
- #: Application/Backend/View/PostOptionList.php:39
422
  #, php-format
423
  msgid ""
424
- "Redirect user to defined location when user tries to read the %s. Define "
425
- "either valid full URL or public page ID within the website."
 
426
  msgstr ""
427
 
428
- #: Application/Backend/View/PostOptionList.php:42
429
  msgid "Password Protected"
430
  msgstr ""
431
 
432
- #: Application/Backend/View/PostOptionList.php:43
433
- #, php-format
434
- msgid "Password: %s"
435
  msgstr ""
436
 
437
- #: Application/Backend/View/PostOptionList.php:44
438
  #, php-format
439
- msgid ""
440
- "Add the password protection for the %s. Available with WordPress 4.7.0 or "
441
- "higher."
442
  msgstr ""
443
 
444
- #: Application/Backend/View/PostOptionList.php:47
445
  msgid "Access Expiration"
446
  msgstr ""
447
 
448
- #: Application/Backend/View/PostOptionList.php:48
449
- #, php-format
450
- msgid "Expires: %s"
451
  msgstr ""
452
 
453
- #: Application/Backend/View/PostOptionList.php:49
454
  #, php-format
455
- msgid "Define when access is expired for %s."
456
  msgstr ""
457
 
458
- #: Application/Backend/View/PostOptionList.php:49
459
  #, php-format
460
  msgid ""
461
- "After the expiration date, the access to READ will be denied unless this "
462
- "behavior is overwritten in ConfigPress. For more information %scheck this "
463
- "article%s or "
464
  msgstr ""
465
 
466
- #: Application/Backend/View/PostOptionList.php:49
467
  #, php-format
468
  msgid " %ssee in action.%s"
469
  msgstr ""
470
 
471
- #: Application/Backend/View/PostOptionList.php:55
472
- #, php-format
473
- msgid ""
474
- "Hide %s however access with a direct URL is still allowed. When there are "
475
- "more than 500 posts, this option may not be applied immediately because, for "
476
- "performance reasons, AAM checks limited number of posts per request."
477
  msgstr ""
478
 
479
- #: Application/Backend/View/PostOptionList.php:59
480
- #, php-format
481
- msgid ""
482
- "Hide %s for all except author (whoever created %s or was assigned on the "
483
- "Author metabox). Access with a direct URL is still allowed. When there are "
484
- "more than 500 posts, this option may not be applied immediately because, for "
485
- "performance reasons, AAM checks limited number of posts per request."
486
  msgstr ""
487
 
488
- #: Application/Backend/View/PostOptionList.php:63
489
  #, php-format
490
  msgid ""
491
- "Restrict access to edit %s. Any attempts to edit %s will result in "
492
- "redirecting user based on the Access Denied Redirect rule."
493
- msgstr ""
494
-
495
- #: Application/Backend/View/PostOptionList.php:66
496
- msgid "Edit By Others"
497
  msgstr ""
498
 
499
- #: Application/Backend/View/PostOptionList.php:67
500
  #, php-format
501
  msgid ""
502
- "Restrict access to edit %s for all except author (whoever created %s or was "
503
- "assigned on the Author metabox). Any attempts to edit %s will result in "
504
  "redirecting user based on the Access Denied Redirect rule."
505
  msgstr ""
506
 
507
- #: Application/Backend/View/PostOptionList.php:70
508
- #: Application/Backend/phtml/index.phtml:162
509
- #: Application/Backend/phtml/object/capability.phtml:106
510
  msgid "Delete"
511
  msgstr ""
512
 
513
- #: Application/Backend/View/PostOptionList.php:71
514
  #, php-format
515
  msgid "Restrict access to trash or permanently delete %s."
516
  msgstr ""
517
 
518
- #: Application/Backend/View/PostOptionList.php:74
519
- msgid "Delete By Others"
520
- msgstr ""
521
-
522
- #: Application/Backend/View/PostOptionList.php:75
523
- #, php-format
524
- msgid ""
525
- "Restrict access to trash or permanently delete %s for all except author "
526
- "(whoever created %s or was assigned on the Author metabox)."
527
- msgstr ""
528
-
529
- #: Application/Backend/View/PostOptionList.php:78
530
  msgid "Publish"
531
  msgstr ""
532
 
533
- #: Application/Backend/View/PostOptionList.php:79
534
  #, php-format
535
  msgid ""
536
- "Restrict access to publish %s. User will be allowed only submit for review. "
537
- "Quick Edit inline action is also removed from the list page."
538
  msgstr ""
539
 
540
- #: Application/Backend/View/PostOptionList.php:82
541
- msgid "Publish By Others"
542
  msgstr ""
543
 
544
- #: Application/Backend/View/PostOptionList.php:83
545
- #, php-format
546
- msgid ""
547
- "Restrict access to publish %s for all except author (whoever created %s or "
548
- "was assigned on the Author metabox). User will be allowed only submit for "
549
- "review. Quick Edit inline action is also removed from the list page."
550
  msgstr ""
551
 
552
- #: Application/Backend/View/SecurityOptionList.php:12
553
- msgid "Login Timeout"
 
554
  msgstr ""
555
 
556
- #: Application/Backend/View/SecurityOptionList.php:13
557
- #, php-format
558
- msgid ""
559
- "Delay the login process for %s second to significantly reduce the chance for "
560
- "brute force or dictionary attack."
561
  msgstr ""
562
 
563
- #: Application/Backend/View/SecurityOptionList.php:17
564
- msgid "Track IP Address"
565
  msgstr ""
566
 
567
- #: Application/Backend/View/SecurityOptionList.php:18
568
- msgid ""
569
- "Track the IP address for the last successful user login and trigger double "
570
- "authentication via email when the same username/password combination is used "
571
- "to login from a different IP address."
572
- msgstr ""
573
-
574
- #: Application/Backend/View/SecurityOptionList.php:22
575
- msgid "Brute Force Lockout"
576
  msgstr ""
577
 
578
- #: Application/Backend/View/SecurityOptionList.php:23
579
  #, php-format
580
  msgid ""
581
- "Automatically reject login attempts if number of unsuccessful login attempts "
582
- "is more than %s over the period of %s."
583
- msgstr ""
584
-
585
- #: Application/Backend/View/UtilityOptionList.php:12
586
- msgid "Edit/Delete Capabilities"
587
- msgstr ""
588
-
589
- #: Application/Backend/View/UtilityOptionList.php:18
590
- msgid "Backend Access Control"
591
- msgstr ""
592
-
593
- #: Application/Backend/View/UtilityOptionList.php:19
594
- msgid ""
595
- "Allow AAM to manage access to backend resources. If there is no need to "
596
- "manage access to the website backend then keep this option unchecked as it "
597
- "may increase your webiste performance."
598
- msgstr ""
599
-
600
- #: Application/Backend/View/UtilityOptionList.php:24
601
- msgid "Frontend Access Control"
602
- msgstr ""
603
-
604
- #: Application/Backend/View/UtilityOptionList.php:25
605
- msgid ""
606
- "Allow AAM to manage access to frontend resources. If there is no need to "
607
- "manage access to the website frontend then keep this option unchecked as it "
608
- "may increase your webiste performance."
609
  msgstr ""
610
 
611
- #: Application/Backend/View/UtilityOptionList.php:30
612
- msgid "Media Files Access Control"
613
- msgstr ""
614
-
615
- #: Application/Backend/View/UtilityOptionList.php:36
616
- msgid "Check Post Visibility"
617
- msgstr ""
618
-
619
- #: Application/Backend/View/UtilityOptionList.php:37
620
- msgid ""
621
- "For performance reasons, keep this option uncheck if do not use LIST or LIST "
622
- "TO OTHERS access options on Posts & Pages tab. When it is checked, AAM will "
623
- "filter list of posts that are hidden for a user on both frontend and backend."
624
- msgstr ""
625
-
626
- #: Application/Backend/View/UtilityOptionList.php:42
627
- msgid "Manage Hidden Post Types"
628
- msgstr ""
629
-
630
- #: Application/Backend/View/UtilityOptionList.php:43
631
- msgid ""
632
- "By default AAM allows you to manage access only to public post types on "
633
- "Posts & Pages tab. By enabling this feature, you also will be able to manage "
634
- "access to hidden post types like revisions, navigation menus or any other "
635
- "custom post types that are not registered as public."
636
- msgstr ""
637
-
638
- #: Application/Backend/View/UtilityOptionList.php:48
639
- msgid "Render Access Manager Metabox"
640
- msgstr ""
641
-
642
- #: Application/Backend/View/UtilityOptionList.php:49
643
- msgid ""
644
- "Render Access Manager metabox on all post and category edit pages. Access "
645
- "Manager metabox is the quick way to manage access to any post or category "
646
- "without leaving an edit page."
647
- msgstr ""
648
-
649
- #: Application/Backend/View/UtilityOptionList.php:54
650
- msgid "Show Access Link"
651
- msgstr ""
652
-
653
- #: Application/Backend/View/UtilityOptionList.php:55
654
- msgid ""
655
- "Show Access shortcut link under any post, page, custom post type, category, "
656
- "custom taxonomy title or user name."
657
- msgstr ""
658
-
659
- #: Application/Extension/Repository.php:276
660
  #, php-format
661
  msgid "Failed to create %s"
662
  msgstr ""
663
 
664
- #: Application/Extension/Repository.php:280
665
  #, php-format
666
  msgid "Directory %s is not writable"
667
  msgstr ""
668
 
669
- #: Application/Frontend/Manager.php:104
670
- msgid "Access denied. Please login to get access."
671
  msgstr ""
672
 
673
- #: Application/Frontend/Manager.php:261
674
- #, php-format
675
- msgid "[%s] Double Authentication"
676
  msgstr ""
677
 
678
- #: Application/Frontend/Manager.php:263
679
- #, php-format
680
- msgid "Someone was trying to login from the different IP address %s:"
681
  msgstr ""
682
 
683
- #: Application/Frontend/Manager.php:264
684
- #, php-format
685
- msgid "Website: %s"
686
  msgstr ""
687
 
688
- #: Application/Frontend/Manager.php:265
689
- #, php-format
690
- msgid "Username: %s"
691
  msgstr ""
692
 
693
- #: Application/Frontend/Manager.php:266
694
- msgid "Visit the following address to authorize the login:"
695
  msgstr ""
696
 
697
- #: Application/Shortcode/Factory.php:52
698
- msgid "No valid strategy found for the given context"
 
699
  msgstr ""
700
 
701
- #: aam.php:176
702
- msgid "PHP 5.2 or higher is required."
703
  msgstr ""
704
 
705
- #: aam.php:178
706
- msgid "WP 3.8 or higher is required."
707
  msgstr ""
708
 
709
- #: media/js/aam-interface.js:190
710
- msgid "Clone Role"
711
  msgstr ""
712
 
713
- #: media/js/aam-interface.js:658
714
- msgid "Switch To User"
715
  msgstr ""
716
 
717
- #: media/js/aam-interface.js:950
718
- msgid "Processing"
719
  msgstr ""
720
 
721
- #: media/js/aam-interface.js:958
722
- msgid "Failed to initialize URL"
723
  msgstr ""
724
 
725
- #: media/js/aam-interface.js:966
726
- #: Application/Backend/phtml/object/metabox.phtml:93
727
- msgid "Initialize"
728
  msgstr ""
729
 
730
- #: media/js/aam-interface.js:1078
 
 
 
 
731
  msgid "Nothing to show"
732
  msgstr ""
733
 
734
- #: media/js/aam-interface.js:1233
735
  msgid "Failed to update capability"
736
  msgstr ""
737
 
738
- #: media/js/aam-interface.js:1241
739
- #: Application/Backend/phtml/object/capability.phtml:78
740
  msgid "Update Capability"
741
  msgstr ""
742
 
743
- #: media/js/aam-interface.js:1274
744
  msgid "Failed to delete capability"
745
  msgstr ""
746
 
747
- #: media/js/aam-interface.js:1282
748
- #: Application/Backend/phtml/object/capability.phtml:100
749
  msgid "Delete Capability"
750
  msgstr ""
751
 
752
- #: media/js/aam-interface.js:1629
753
  msgid "Drill-Down"
754
  msgstr ""
755
 
756
- #: media/js/aam-interface.js:1782 media/js/aam-interface.js:1828
757
- #: media/js/aam-interface.js:1873
758
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
759
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
760
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:64
761
- msgid "Set"
762
- msgstr ""
763
-
764
- #: media/js/aam-interface.js:1965 media/js/aam-interface.js:2065
765
- #: media/js/aam-interface.js:2159 media/js/aam-interface.js:2245
766
- #: media/js/aam-interface.js:2467 media/js/aam-interface.js:2501
767
- #: media/js/aam-interface.js:2522 media/js/aam-interface.js:2560
768
- #: media/js/aam-interface.js:2697
769
- msgid "Application Error"
770
- msgstr ""
771
-
772
- #: media/js/aam-interface.js:2690
773
- msgid "Your are subscribed now!"
774
  msgstr ""
775
 
776
- #: Application/Backend/phtml/404redirect.phtml:33
777
- #: Application/Backend/phtml/object/login-redirect.phtml:43
778
- #: Application/Backend/phtml/object/logout-redirect.phtml:43
779
- #: Application/Backend/phtml/object/redirect.phtml:67
780
- #: Application/Backend/phtml/object/redirect.phtml:119
781
- msgid "Existing Page"
782
  msgstr ""
783
 
784
- #: Application/Backend/phtml/404redirect.phtml:42
785
- #: Application/Backend/phtml/object/login-redirect.phtml:52
786
- #: Application/Backend/phtml/object/logout-redirect.phtml:52
787
- #: Application/Backend/phtml/object/redirect.phtml:76
788
- #: Application/Backend/phtml/object/redirect.phtml:128
789
- msgid "-- Select Page --"
790
  msgstr ""
791
 
792
- #: Application/Backend/phtml/404redirect.phtml:48
793
- #: Application/Backend/phtml/object/login-redirect.phtml:58
794
- #: Application/Backend/phtml/object/logout-redirect.phtml:58
795
- #: Application/Backend/phtml/object/redirect.phtml:82
796
- #: Application/Backend/phtml/object/redirect.phtml:134
797
- msgid "The URL"
798
  msgstr ""
799
 
800
- #: Application/Backend/phtml/404redirect.phtml:53
801
- #: Application/Backend/phtml/object/login-redirect.phtml:63
802
- #: Application/Backend/phtml/object/logout-redirect.phtml:63
803
- #: Application/Backend/phtml/object/redirect.phtml:87
804
- #: Application/Backend/phtml/object/redirect.phtml:139
805
- msgid "PHP Callback Function"
806
  msgstr ""
807
 
808
- #: Application/Backend/phtml/contact.phtml:6
809
- msgid ""
810
- "Contact us if you have any questions or concerns but follow few simple rules:"
811
  msgstr ""
812
 
813
- #: Application/Backend/phtml/extension.phtml:11
814
  msgid "Install/Update Extension"
815
  msgstr ""
816
 
817
- #: Application/Backend/phtml/extension.phtml:15
818
  msgid "License Key"
819
  msgstr ""
820
 
821
- #: Application/Backend/phtml/extension.phtml:19
822
- #: Application/Backend/phtml/index.phtml:278
823
  msgid "Submit"
824
  msgstr ""
825
 
826
- #: Application/Backend/phtml/extension.phtml:28
827
  msgid "Premium"
828
  msgstr ""
829
 
830
- #: Application/Backend/phtml/extension.phtml:29
831
- #: Application/Backend/phtml/extension.phtml:73
832
  msgid "Free"
833
  msgstr ""
834
 
835
- #: Application/Backend/phtml/extension.phtml:53
836
- #: Application/Backend/phtml/extension.phtml:80
837
- msgid "Installed"
838
  msgstr ""
839
 
840
- #: Application/Backend/phtml/extension.phtml:57
841
- msgid "Inactive"
 
842
  msgstr ""
843
 
844
- #: Application/Backend/phtml/extension.phtml:59
 
 
 
 
 
 
845
  msgid "Read More"
846
  msgstr ""
847
 
848
- #: Application/Backend/phtml/extension.phtml:84
849
- #: Application/Backend/phtml/extension.phtml:115
850
  msgid "Download"
851
  msgstr ""
852
 
853
- #: Application/Backend/phtml/extension.phtml:99
854
- #: Application/Backend/phtml/extension.phtml:126
855
- #: Application/Backend/phtml/extension.phtml:137
856
- #: Application/Backend/phtml/index.phtml:111
857
- #: Application/Backend/phtml/index.phtml:123
858
- #: Application/Backend/phtml/index.phtml:133
859
- #: Application/Backend/phtml/index.phtml:145
860
- #: Application/Backend/phtml/index.phtml:155
861
- #: Application/Backend/phtml/index.phtml:163
862
- #: Application/Backend/phtml/object/capability.phtml:56
863
- #: Application/Backend/phtml/object/capability.phtml:67
864
- #: Application/Backend/phtml/object/capability.phtml:77
865
- #: Application/Backend/phtml/object/capability.phtml:89
866
- #: Application/Backend/phtml/object/capability.phtml:99
867
- #: Application/Backend/phtml/object/capability.phtml:107
868
- #: Application/Backend/phtml/object/menu.phtml:82
869
- #: Application/Backend/phtml/object/metabox.phtml:80
870
- #: Application/Backend/phtml/object/metabox.phtml:94
871
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
872
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:17
873
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:27
874
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:38
875
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:48
876
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:65
877
- #: Application/Backend/phtml/utility.phtml:111
 
 
 
 
 
 
878
  msgid "Close"
879
  msgstr ""
880
 
881
- #: Application/Backend/phtml/extension.phtml:100
882
  msgid "Notification"
883
  msgstr ""
884
 
885
- #: Application/Backend/phtml/extension.phtml:104
886
  msgid ""
887
  "Extension requires manual installation. Please follow few simple steps below."
888
  msgstr ""
889
 
890
- #: Application/Backend/phtml/extension.phtml:116
891
- #: Application/Backend/phtml/utility.phtml:119
892
  msgid "Cancel"
893
  msgstr ""
894
 
895
- #: Application/Backend/phtml/extension.phtml:127
896
  msgid "Install Extension"
897
  msgstr ""
898
 
899
- #: Application/Backend/phtml/extension.phtml:131
900
  msgid ""
901
  "Insert license key that you recieved after the payment (find the email "
902
  "example below). It might take up to 2 hours to process the payment. Please "
@@ -904,7 +819,7 @@ msgid ""
904
  msgstr ""
905
 
906
  #: Application/Backend/phtml/frame.phtml:62
907
- #: Application/Backend/phtml/index.phtml:177
908
  msgid "Username"
909
  msgstr ""
910
 
@@ -914,7 +829,7 @@ msgid "Manage access to %s for visitors (any user that is not authenticated)"
914
  msgstr ""
915
 
916
  #: Application/Backend/phtml/frame.phtml:75
917
- #: Application/Backend/phtml/index.phtml:190
918
  msgid "Manage Visitors"
919
  msgstr ""
920
 
@@ -926,415 +841,494 @@ msgid ""
926
  msgstr ""
927
 
928
  #: Application/Backend/phtml/frame.phtml:84
929
- #: Application/Backend/phtml/index.phtml:198
930
  msgid "Manage Default Access"
931
  msgstr ""
932
 
933
  #: Application/Backend/phtml/frame.phtml:100
934
- #: Application/Backend/phtml/object/menu.phtml:14
935
- #: Application/Backend/phtml/object/metabox.phtml:12
936
- #: Application/Backend/phtml/object/post.phtml:35
937
  msgid "Settings are customized"
938
  msgstr ""
939
 
940
  #: Application/Backend/phtml/frame.phtml:101
941
- #: Application/Backend/phtml/object/capability.phtml:34
942
- #: Application/Backend/phtml/object/menu.phtml:15
943
- #: Application/Backend/phtml/object/metabox.phtml:13
944
- #: Application/Backend/phtml/object/post.phtml:36
945
  msgid "Reset To Default"
946
  msgstr ""
947
 
948
- #: Application/Backend/phtml/frame.phtml:116
949
- #: Application/Backend/phtml/object/post.phtml:73
950
  msgid "Frontend"
951
  msgstr ""
952
 
 
 
 
 
 
 
 
953
  #: Application/Backend/phtml/index.phtml:14
954
- msgid "Access Control Panel"
955
  msgstr ""
956
 
957
- #: Application/Backend/phtml/index.phtml:21
958
  msgid ""
959
  "Appreciate your interest in Advanced Access Manager (AAM). With strong "
960
  "knowledge and experience in WordPress, AAM becomes a very powerful tool to "
961
  "manage access to your frontend and backend."
962
  msgstr ""
963
 
964
- #: Application/Backend/phtml/index.phtml:22
965
  msgid "Please Note!"
966
  msgstr ""
967
 
968
- #: Application/Backend/phtml/index.phtml:23
969
  msgid ""
970
  "AAM was thoroughly tested on the fresh installation of WordPress and in the "
971
  "latest versions of Chrome, Safari, IE and Firefox. If you have any issues, "
972
  "the most typical case is the conflict with other plugins or themes."
973
  msgstr ""
974
 
975
- #: Application/Backend/phtml/index.phtml:24
976
  #, php-format
977
  msgid ""
978
  "Check our %sHelp%s section to find some useful articles about AAM "
979
  "functionality or %scontact us%s directly."
980
  msgstr ""
981
 
982
- #: Application/Backend/phtml/index.phtml:38
983
  msgid "Notifications"
984
  msgstr ""
985
 
986
- #: Application/Backend/phtml/index.phtml:57
987
  msgid "AAM Multisite"
988
  msgstr ""
989
 
990
- #: Application/Backend/phtml/index.phtml:61
991
  msgid "Install AAM Multisite"
992
  msgstr ""
993
 
994
- #: Application/Backend/phtml/index.phtml:72
995
- msgid "Users/Roles Panel"
996
  msgstr ""
997
 
998
- #: Application/Backend/phtml/index.phtml:79
999
- #: Application/Backend/phtml/index.phtml:210
1000
  msgid "Roles"
1001
  msgstr ""
1002
 
1003
- #: Application/Backend/phtml/index.phtml:85
1004
- #: Application/Backend/phtml/index.phtml:220
1005
  msgid "Visitor"
1006
  msgstr ""
1007
 
1008
- #: Application/Backend/phtml/index.phtml:88
1009
- #: Application/Backend/phtml/index.phtml:225
1010
  msgid "Default"
1011
  msgstr ""
1012
 
1013
- #: Application/Backend/phtml/index.phtml:100
1014
- #: Application/Backend/phtml/index.phtml:178
1015
  msgid "Action"
1016
  msgstr ""
1017
 
1018
- #: Application/Backend/phtml/index.phtml:112
1019
  msgid "Create Role"
1020
  msgstr ""
1021
 
1022
- #: Application/Backend/phtml/index.phtml:116
1023
- #: Application/Backend/phtml/index.phtml:138
1024
  msgid "Role Name"
1025
  msgstr ""
1026
 
1027
- #: Application/Backend/phtml/index.phtml:117
1028
- #: Application/Backend/phtml/index.phtml:139
1029
  msgid "Enter Role Name"
1030
  msgstr ""
1031
 
1032
- #: Application/Backend/phtml/index.phtml:134
 
 
 
 
 
 
 
 
 
 
1033
  msgid "Update Role"
1034
  msgstr ""
1035
 
1036
- #: Application/Backend/phtml/index.phtml:159
1037
  #, php-format
1038
  msgid "Are you sure that you want to delete the %s role?"
1039
  msgstr ""
1040
 
1041
- #: Application/Backend/phtml/index.phtml:189
1042
  msgid ""
1043
  "Manage access to your website for visitors (any user that is not "
1044
  "authenticated)"
1045
  msgstr ""
1046
 
1047
- #: Application/Backend/phtml/index.phtml:197
1048
  msgid ""
1049
  "Manage default access to your website resources for all users, roles and "
1050
  "visitor. This includes Administrator role and your user"
1051
  msgstr ""
1052
 
1053
- #: Application/Backend/phtml/index.phtml:211
1054
  msgid ""
1055
  "With Roles tab you can manage access for any defined role, edit role's name, "
1056
  "create new role or even delete existing (but only when there is no users "
1057
  "assigned to it). You are not allowed to delete Administrator role."
1058
  msgstr ""
1059
 
1060
- #: Application/Backend/phtml/index.phtml:216
1061
  msgid ""
1062
  "Manage access for any user. As a bonus feature, you can block user. It means "
1063
  "that user will be not able to login to your website anymore."
1064
  msgstr ""
1065
 
1066
- #: Application/Backend/phtml/index.phtml:221
1067
  msgid ""
1068
  "Visitor can be considered any user that is not authenticated to your website."
1069
  msgstr ""
1070
 
1071
- #: Application/Backend/phtml/index.phtml:226
1072
  msgid ""
1073
  "Manage default access settings to your website resources for all users, "
1074
  "roles and visitors."
1075
  msgstr ""
1076
 
1077
- #: Application/Backend/phtml/index.phtml:270
1078
- msgid "Subscribe to updates"
1079
  msgstr ""
1080
 
1081
- #: Application/Backend/phtml/index.phtml:270
1082
- msgid "Get once a month the email with the latest AAM features and promo-codes"
 
 
 
 
1083
  msgstr ""
1084
 
1085
- #: Application/Backend/phtml/index.phtml:274
1086
- msgid "Your Email Address"
 
 
 
 
1087
  msgstr ""
1088
 
1089
- #: Application/Backend/phtml/main-panel.phtml:26
1090
- msgid "You are not allowed to manage any of the existing features."
 
 
 
 
 
 
 
 
 
 
 
 
1091
  msgstr ""
1092
 
1093
- #: Application/Backend/phtml/object/capability.phtml:16
1094
  msgid "Filter"
1095
  msgstr ""
1096
 
1097
- #: Application/Backend/phtml/object/capability.phtml:23
1098
  msgid "All Capabilities"
1099
  msgstr ""
1100
 
1101
- #: Application/Backend/phtml/object/capability.phtml:33
1102
  msgid "Capabilities are customized"
1103
  msgstr ""
1104
 
1105
- #: Application/Backend/phtml/object/capability.phtml:44
1106
  msgid "Category"
1107
  msgstr ""
1108
 
1109
- #: Application/Backend/phtml/object/capability.phtml:45
1110
- #: Application/Backend/phtml/object/capability.phtml:61
1111
- #: Application/Backend/phtml/object/capability.phtml:82
1112
  msgid "Capability"
1113
  msgstr ""
1114
 
1115
- #: Application/Backend/phtml/object/capability.phtml:46
1116
- #: Application/Backend/phtml/object/post.phtml:52
1117
  msgid "Actions"
1118
  msgstr ""
1119
 
1120
- #: Application/Backend/phtml/object/capability.phtml:57
1121
  msgid "Create Capability"
1122
  msgstr ""
1123
 
1124
- #: Application/Backend/phtml/object/capability.phtml:62
1125
- #: Application/Backend/phtml/object/capability.phtml:83
1126
  msgid "Enter Capability"
1127
  msgstr ""
1128
 
1129
- #: Application/Backend/phtml/object/capability.phtml:103
1130
  #, php-format
1131
  msgid "Are you sure that you want to delete %s capability for all roles?"
1132
  msgstr ""
1133
 
1134
- #: Application/Backend/phtml/object/login-redirect.phtml:27
1135
- #: Application/Backend/phtml/object/logout-redirect.phtml:27
1136
  msgid "WordPress default behavior"
1137
  msgstr ""
1138
 
1139
- #: Application/Backend/phtml/object/menu.phtml:83
1140
  msgid "Dashboard Lockdown"
1141
  msgstr ""
1142
 
1143
- #: Application/Backend/phtml/object/menu.phtml:86
1144
  msgid "You cannot restrict access to Dashboard home page."
1145
  msgstr ""
1146
 
1147
- #: Application/Backend/phtml/object/menu.phtml:88
1148
- #, php-format
1149
- msgid ""
1150
- "Dashboard home page is the default page every user is redirected after "
1151
- "login. If you need to lockdown user from the entire website dashboard, "
1152
- "%splease check this article%s."
1153
- msgstr ""
1154
-
1155
- #: Application/Backend/phtml/object/menu.phtml:91
1156
  msgid "OK"
1157
  msgstr ""
1158
 
1159
- #: Application/Backend/phtml/object/metabox.phtml:4
1160
  msgid "Refresh"
1161
  msgstr ""
1162
 
1163
- #: Application/Backend/phtml/object/metabox.phtml:5
1164
  msgid "Init URL"
1165
  msgstr ""
1166
 
1167
- #: Application/Backend/phtml/object/metabox.phtml:37
1168
  msgid "Dashboard Widgets"
1169
  msgstr ""
1170
 
1171
- #: Application/Backend/phtml/object/metabox.phtml:41
1172
  msgid "Frontend Widgets"
1173
  msgstr ""
1174
 
1175
- #: Application/Backend/phtml/object/metabox.phtml:71
1176
  msgid "The list is not initialized. Click Refresh button above."
1177
  msgstr ""
1178
 
1179
- #: Application/Backend/phtml/object/metabox.phtml:81
1180
  msgid "Initialize URL"
1181
  msgstr ""
1182
 
1183
- #: Application/Backend/phtml/object/metabox.phtml:85
1184
  msgid ""
1185
- "Some metaboxes are conditional and appear on an edit screen when certain "
1186
- "conditions are met. For example metabox \"Comments\" appears only for "
1187
- "existing page and not for new page. That is why if you do not see a desired "
1188
- "metabox below, try to copy & paste full URL to an edit screen where that "
1189
- "metabox appears."
1190
  msgstr ""
1191
 
1192
- #: Application/Backend/phtml/object/metabox.phtml:88
1193
  msgid "Backend page URL"
1194
  msgstr ""
1195
 
1196
- #: Application/Backend/phtml/object/metabox.phtml:89
1197
  msgid "Insert valid URL"
1198
  msgstr ""
1199
 
1200
- #: Application/Backend/phtml/object/post.phtml:15
1201
  #, php-format
1202
  msgid ""
1203
  "Manage access to posts, pages and custom post types. For more information "
1204
- "about this functionality check %sWhat is a WordPress post%s article."
 
1205
  msgstr ""
1206
 
1207
- #: Application/Backend/phtml/object/post.phtml:25
1208
  msgid "Root"
1209
  msgstr ""
1210
 
1211
- #: Application/Backend/phtml/object/post.phtml:51
1212
  msgid "Title"
1213
  msgstr ""
1214
 
1215
- #: Application/Backend/phtml/object/post.phtml:60
1216
- #: Application/Backend/phtml/object/post.phtml:65
1217
- #: Application/Backend/phtml/object/post.phtml:120
 
 
 
1218
  msgid "Go Back"
1219
  msgstr ""
1220
 
1221
- #: Application/Backend/phtml/object/redirect.phtml:25
1222
  msgid "Frontend Redirect"
1223
  msgstr ""
1224
 
1225
- #: Application/Backend/phtml/object/redirect.phtml:26
1226
  msgid "Backend Redirect"
1227
  msgstr ""
1228
 
1229
- #: Application/Backend/phtml/object/redirect.phtml:62
1230
- #: Application/Backend/phtml/object/redirect.phtml:114
1231
  msgid "Customized Message"
1232
  msgstr ""
1233
 
1234
- #: Application/Backend/phtml/object/redirect.phtml:63
1235
- #: Application/Backend/phtml/object/redirect.phtml:115
1236
  msgid "Enter message..."
1237
  msgstr ""
1238
 
1239
- #: Application/Backend/phtml/object/teaser.phtml:25
1240
- msgid "Teaser Message"
1241
- msgstr ""
1242
-
1243
- #: Application/Backend/phtml/object/teaser.phtml:26
1244
- msgid "Enter teaser message..."
1245
  msgstr ""
1246
 
1247
- #: Application/Backend/phtml/object/teaser.phtml:31
1248
- msgid "Add excerpt before teaser message"
1249
  msgstr ""
1250
 
1251
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:7
1252
  msgid "Set Password"
1253
  msgstr ""
1254
 
1255
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:11
1256
- msgid "Password"
1257
- msgstr ""
1258
-
1259
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:12
1260
  msgid "Enter Password"
1261
  msgstr ""
1262
 
1263
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:28
1264
- msgid "Set Redirect"
1265
  msgstr ""
1266
 
1267
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:32
1268
- msgid "Valid URL, Page ID or PHP callback function"
1269
  msgstr ""
1270
 
1271
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:33
1272
- msgid "Enter Redirect"
1273
  msgstr ""
1274
 
1275
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:49
1276
  msgid "Set Expiration"
1277
  msgstr ""
1278
 
1279
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:59
1280
  msgid "Enter expiration critiria"
1281
  msgstr ""
1282
 
1283
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:60
1284
  msgid "Enter critiria"
1285
  msgstr ""
1286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1287
  #: Application/Backend/phtml/partial/role-inheritance.phtml:3
1288
  msgid "Inherit Capabilities From"
1289
  msgstr ""
1290
 
1291
- #: Application/Backend/phtml/security.phtml:30
1292
- msgid ""
1293
- "Improve your website security and keep your website error free with "
1294
- "CodePinch."
1295
  msgstr ""
1296
 
1297
- #: Application/Backend/phtml/utility.phtml:4
1298
- msgid "AAM Core"
1299
  msgstr ""
1300
 
1301
- #: Application/Backend/phtml/utility.phtml:5
1302
- msgid "Posts Access"
 
 
 
1303
  msgstr ""
1304
 
1305
- #: Application/Backend/phtml/utility.phtml:6
1306
- msgid "Tools"
 
 
 
 
1307
  msgstr ""
1308
 
1309
- #: Application/Backend/phtml/utility.phtml:54
1310
  msgid "Clear Cache"
1311
  msgstr ""
1312
 
1313
- #: Application/Backend/phtml/utility.phtml:56
1314
  msgid "Clear all AAM cache."
1315
  msgstr ""
1316
 
1317
- #: Application/Backend/phtml/utility.phtml:65
1318
  msgid "Clear All Settings"
1319
  msgstr ""
1320
 
1321
- #: Application/Backend/phtml/utility.phtml:67
1322
- msgid ""
1323
- "Remove all the settings related to AAM (including all extension licenses)."
1324
- msgstr ""
1325
-
1326
- #: Application/Backend/phtml/utility.phtml:97
1327
- msgid "No miscellaneous options found."
1328
  msgstr ""
1329
 
1330
- #: Application/Backend/phtml/utility.phtml:112
1331
  msgid "Clear all settings"
1332
  msgstr ""
1333
 
1334
- #: Application/Backend/phtml/utility.phtml:115
1335
  msgid "All AAM settings will be removed."
1336
  msgstr ""
1337
 
1338
- #: Application/Backend/phtml/utility.phtml:118
1339
- msgid "Clear"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1340
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: AAM\n"
4
+ "POT-Creation-Date: 2017-11-26 16:25-0500\n"
5
  "PO-Revision-Date: \n"
6
  "Language-Team: WP AAM <vasyl@vasyltech.com>\n"
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.0.4\n"
11
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
12
  "X-Poedit-SourceCharset: UTF-8\n"
13
  "X-Poedit-KeywordsList: __\n"
16
  "Language: en_US\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: Application/Backend/Feature/Extension/Manager.php:106
20
+ msgid "Enter license key to update extension."
21
  msgstr ""
22
 
23
+ #: Application/Backend/Feature/Main/404Redirect.php:53
24
+ msgid "404 Redirect"
 
 
25
  msgstr ""
26
 
27
+ #: Application/Backend/Feature/Main/Capability.php:98
28
  msgid "Capability already exists"
29
  msgstr ""
30
 
31
+ #: Application/Backend/Feature/Main/Capability.php:127
32
  msgid "Can not remove the capability"
33
  msgstr ""
34
 
35
+ #: Application/Backend/Feature/Main/Capability.php:218
36
+ #: Application/Backend/Feature/Main/Capability.php:259
37
  msgid "System"
38
  msgstr ""
39
 
40
+ #: Application/Backend/Feature/Main/Capability.php:219
41
+ #: Application/Backend/Feature/Main/Capability.php:261
42
+ #: Application/Backend/Feature/Main/Post.php:549
43
  msgid "Posts & Pages"
44
  msgstr ""
45
 
46
+ #: Application/Backend/Feature/Main/Capability.php:220
47
+ #: Application/Backend/Feature/Main/Capability.php:263
48
+ #: Application/Backend/phtml/frame.phtml:145
49
+ #: Application/Backend/phtml/main/post.phtml:105
50
  msgid "Backend"
51
  msgstr ""
52
 
53
+ #: Application/Backend/Feature/Main/Capability.php:221
54
+ #: Application/Backend/Feature/Main/Capability.php:265
55
  msgid "AAM Interface"
56
  msgstr ""
57
 
58
+ #: Application/Backend/Feature/Main/Capability.php:222
59
+ #: Application/Backend/Feature/Main/Capability.php:267
 
60
  msgid "Miscellaneous"
61
  msgstr ""
62
 
63
+ #: Application/Backend/Feature/Main/Capability.php:299
64
  msgid "Capabilities"
65
  msgstr ""
66
 
67
+ #: Application/Backend/Feature/Main/LoginRedirect.php:73
68
+ msgid "Login Redirect"
69
  msgstr ""
70
 
71
+ #: Application/Backend/Feature/Main/LogoutRedirect.php:73
72
+ msgid "Logout Redirect"
73
  msgstr ""
74
 
75
+ #: Application/Backend/Feature/Main/Menu.php:195
76
+ msgid "Backend Menu"
77
  msgstr ""
78
 
79
+ #: Application/Backend/Feature/Main/Metabox.php:236
80
+ msgid "Metaboxes & Widgets"
81
  msgstr ""
82
 
83
+ #: Application/Backend/Feature/Main/Redirect.php:83
84
+ msgid "Access Denied Redirect"
85
  msgstr ""
86
 
87
+ #: Application/Backend/Feature/Settings/Content.php:32
88
+ msgid "Media Files Access Control"
89
  msgstr ""
90
 
91
+ #: Application/Backend/Feature/Settings/Content.php:37
92
+ msgid "Check Post Visibility"
93
  msgstr ""
94
 
95
+ #: Application/Backend/Feature/Settings/Content.php:38
96
+ msgid ""
97
+ "For performance reasons, keep this option uncheck if do not use LIST or LIST "
98
+ "TO OTHERS access options on Posts & Pages tab. When it is checked, AAM will "
99
+ "filter list of posts that are hidden for a user on both frontend and backend."
100
  msgstr ""
101
 
102
+ #: Application/Backend/Feature/Settings/Content.php:42
103
+ msgid "Manage Hidden Post Types"
104
  msgstr ""
105
 
106
+ #: Application/Backend/Feature/Settings/Content.php:43
107
+ msgid ""
108
+ "By default AAM allows you to manage access only to public post types on "
109
+ "Posts & Pages tab. By enabling this feature, you also will be able to manage "
110
+ "access to hidden post types like revisions, navigation menus or any other "
111
+ "custom post types that are not registered as public."
112
  msgstr ""
113
 
114
+ #: Application/Backend/Feature/Settings/Content.php:62
115
+ msgid "Content Settings"
116
  msgstr ""
117
 
118
+ #: Application/Backend/Feature/Settings/Core.php:32
119
+ msgid "Edit/Delete Capabilities"
120
  msgstr ""
121
 
122
+ #: Application/Backend/Feature/Settings/Core.php:37
123
+ msgid "Backend Access Control"
 
124
  msgstr ""
125
 
126
+ #: Application/Backend/Feature/Settings/Core.php:38
127
+ msgid ""
128
+ "Allow AAM to manage access to the backend. Keep this option disabled if "
129
+ "there is no needs to restrict backend features for other users. This option "
130
+ "may reduce your website backend performance."
131
  msgstr ""
132
 
133
+ #: Application/Backend/Feature/Settings/Core.php:42
134
+ msgid "Frontend Access Control"
135
  msgstr ""
136
 
137
+ #: Application/Backend/Feature/Settings/Core.php:43
138
+ msgid ""
139
+ "Allow AAM to manage access to frontend resources. If there is no need to "
140
+ "manage access to the website frontend then keep this option unchecked as it "
141
+ "may increase your webiste performance."
142
  msgstr ""
143
 
144
+ #: Application/Backend/Feature/Settings/Core.php:47
145
+ msgid "Render Access Manager Metabox"
146
+ msgstr ""
147
+
148
+ #: Application/Backend/Feature/Settings/Core.php:48
149
+ msgid ""
150
+ "Render Access Manager metabox on all post and category edit pages. Access "
151
+ "Manager metabox is the quick way to manage access to any post or category "
152
+ "without leaving an edit page."
153
+ msgstr ""
154
+
155
+ #: Application/Backend/Feature/Settings/Core.php:52
156
+ msgid "Render Access Link"
157
+ msgstr ""
158
+
159
+ #: Application/Backend/Feature/Settings/Core.php:53
160
+ msgid ""
161
+ "Render Access shortcut link under any post, page, custom post type, "
162
+ "category, custom taxonomy title or user name."
163
+ msgstr ""
164
+
165
+ #: Application/Backend/Feature/Settings/Core.php:57
166
+ msgid "Secure Login"
167
+ msgstr ""
168
+
169
+ #: Application/Backend/Feature/Settings/Core.php:58
170
+ msgid ""
171
+ "AAM comes with its own user login handler. With this feature you can add "
172
+ "AJAX login widget to your frontend page that significantly enhance your "
173
+ "website security."
174
+ msgstr ""
175
+
176
+ #: Application/Backend/Feature/Settings/Core.php:77
177
+ msgid "Core Settings"
178
+ msgstr ""
179
+
180
+ #: Application/Backend/Feature/Settings/Tools.php:102
181
+ msgid "Tools"
182
+ msgstr ""
183
+
184
+ #: Application/Backend/Manager.php:314
185
+ msgid "Access Manager"
186
+ msgstr ""
187
+
188
+ #: Application/Backend/Manager.php:401 Application/Backend/Manager.php:419
189
+ #: Application/Backend/Manager.php:442
190
+ msgid "Access"
191
+ msgstr ""
192
+
193
+ #: Application/Backend/Manager.php:592 Application/Backend/Manager.php:615
194
+ #: Application/Core/API.php:247
195
+ msgid "Access Denied"
196
+ msgstr ""
197
+
198
+ #: Application/Backend/View/Localization.php:26 media/js/aam.js:1140
199
  msgid "Search Capability"
200
  msgstr ""
201
 
202
+ #: Application/Backend/View/Localization.php:27 media/js/aam.js:1141
203
  msgid "_TOTAL_ capability(s)"
204
  msgstr ""
205
 
206
+ #: Application/Backend/View/Localization.php:28 media/js/aam.js:326
207
+ #: media/js/aam.js:387 media/js/aam.js:1243 media/js/aam.js:1287
208
+ #: media/js/aam.js:1805
 
209
  msgid "Saving..."
210
  msgstr ""
211
 
212
+ #: Application/Backend/View/Localization.php:29 media/js/aam.js:1251
213
  msgid "Failed to add new capability"
214
  msgstr ""
215
 
216
+ #: Application/Backend/View/Localization.php:30 media/js/aam.js:346
217
+ #: media/js/aam.js:399 media/js/aam.js:436 media/js/aam.js:530
218
+ #: media/js/aam.js:562 media/js/aam.js:958 media/js/aam.js:994
219
+ #: media/js/aam.js:1028 media/js/aam.js:1256 media/js/aam.js:1300
220
+ #: media/js/aam.js:1339 media/js/aam.js:1422 media/js/aam.js:1567
221
+ #: media/js/aam.js:2071 media/js/aam.js:2147 media/js/aam.js:2176
222
+ #: media/js/aam.js:2865 media/js/aam.js:2890
 
 
 
 
223
  msgid "Application error"
224
  msgstr ""
225
 
226
+ #: Application/Backend/View/Localization.php:31 media/js/aam.js:1259
227
  msgid "Add Capability"
228
  msgstr ""
229
 
230
+ #: Application/Backend/View/Localization.php:32 media/js/aam.js:872
231
+ #: Application/Backend/phtml/main/menu.phtml:67
232
  msgid "Show Menu"
233
  msgstr ""
234
 
235
+ #: Application/Backend/View/Localization.php:33 media/js/aam.js:882
236
+ #: Application/Backend/phtml/main/menu.phtml:71
237
  msgid "Restrict Menu"
238
  msgstr ""
239
 
240
+ #: Application/Backend/View/Localization.php:34 media/js/aam.js:989
241
  msgid "Failed to retrieve mataboxes"
242
  msgstr ""
243
 
244
+ #: Application/Backend/View/Localization.php:35 media/js/aam.js:1610
245
  msgid "Search"
246
  msgstr ""
247
 
248
+ #: Application/Backend/View/Localization.php:36 media/js/aam.js:1611
249
  msgid "_TOTAL_ object(s)"
250
  msgstr ""
251
 
252
+ #: Application/Backend/View/Localization.php:37
253
  msgid "Failed"
254
  msgstr ""
255
 
256
+ #: Application/Backend/View/Localization.php:38 media/js/aam.js:58
257
  msgid "Loading..."
258
  msgstr ""
259
 
260
+ #: Application/Backend/View/Localization.php:39 media/js/aam.js:63
261
+ msgid "No Role"
 
262
  msgstr ""
263
 
264
+ #: Application/Backend/View/Localization.php:40 media/js/aam.js:120
265
  msgid "Search Role"
266
  msgstr ""
267
 
268
+ #: Application/Backend/View/Localization.php:41 media/js/aam.js:121
269
  msgid "_TOTAL_ role(s)"
270
  msgstr ""
271
 
272
+ #: Application/Backend/View/Localization.php:42 media/js/aam.js:129
273
+ #: media/js/aam.js:602 Application/Backend/phtml/index.phtml:170
274
+ #: Application/Backend/phtml/main/capability.phtml:26
275
+ #: Application/Backend/phtml/main/capability.phtml:64
276
  msgid "Create"
277
  msgstr ""
278
 
279
+ #: Application/Backend/View/Localization.php:43 media/js/aam.js:153
280
+ #: Application/Backend/phtml/index.phtml:124
281
+ #: Application/Backend/phtml/index.phtml:267
282
  msgid "Users"
283
  msgstr ""
284
 
285
+ #: Application/Backend/View/Localization.php:44 media/js/aam.js:341
286
  msgid "Failed to add new role"
287
  msgstr ""
288
 
289
+ #: Application/Backend/View/Localization.php:45 media/js/aam.js:349
290
  msgid "Add Role"
291
  msgstr ""
292
 
293
+ #: Application/Backend/View/Localization.php:46 media/js/aam.js:394
294
  msgid "Failed to update role"
295
  msgstr ""
296
 
297
+ #: Application/Backend/View/Localization.php:47 media/js/aam.js:403
298
+ #: Application/Backend/phtml/extensions.phtml:51
299
+ #: Application/Backend/phtml/extensions.phtml:78
300
+ #: Application/Backend/phtml/index.phtml:196
301
+ #: Application/Backend/phtml/main/capability.phtml:86
302
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
303
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
304
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:59
305
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:86
306
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:130
307
  msgid "Update"
308
  msgstr ""
309
 
310
+ #: Application/Backend/View/Localization.php:48 media/js/aam.js:426
311
+ #: media/js/aam.js:1326
312
  msgid "Deleting..."
313
  msgstr ""
314
 
315
+ #: Application/Backend/View/Localization.php:49 media/js/aam.js:432
316
  msgid "Failed to delete role"
317
  msgstr ""
318
 
319
+ #: Application/Backend/View/Localization.php:50
320
+ #: Application/Backend/View/Localization.php:62 media/js/aam.js:251
321
+ #: media/js/aam.js:440 Application/Backend/phtml/index.phtml:208
322
  msgid "Delete Role"
323
  msgstr ""
324
 
325
+ #: Application/Backend/View/Localization.php:51 media/js/aam.js:526
326
  msgid "Failed to block user"
327
  msgstr ""
328
 
329
+ #: Application/Backend/View/Localization.php:52 media/js/aam.js:593
330
  msgid "Search User"
331
  msgstr ""
332
 
333
+ #: Application/Backend/View/Localization.php:53 media/js/aam.js:594
334
  msgid "_TOTAL_ user(s)"
335
  msgstr ""
336
 
337
+ #: Application/Backend/View/Localization.php:54 media/js/aam.js:619
338
  #: Application/Backend/phtml/frame.phtml:46
339
+ #: Application/Backend/phtml/index.phtml:141
340
  msgid "Role"
341
  msgstr ""
342
 
343
+ #: Application/Backend/View/Localization.php:55
344
+ #: Application/Core/Subject/Visitor.php:79 media/js/aam.js:758
345
+ msgid "Anonymous"
346
+ msgstr ""
347
+
348
+ #: Application/Backend/View/Localization.php:56
349
  msgid "Current user"
350
  msgstr ""
351
 
352
+ #: Application/Backend/View/Localization.php:57
353
  msgid "Current role"
354
  msgstr ""
355
 
356
+ #: Application/Backend/View/Localization.php:58 media/js/aam.js:1699
357
  msgid "Manage Access"
358
  msgstr ""
359
 
360
+ #: Application/Backend/View/Localization.php:59
361
+ #: Application/Backend/View/PostOptionList.php:91 media/js/aam.js:1711
 
362
  msgid "Edit"
363
  msgstr ""
364
 
365
+ #: Application/Backend/View/Localization.php:60 media/js/aam.js:192
366
  msgid "Manage Role"
367
  msgstr ""
368
 
369
+ #: Application/Backend/View/Localization.php:61 media/js/aam.js:214
370
+ msgid "Edit Role"
371
  msgstr ""
372
 
373
+ #: Application/Backend/View/Localization.php:63 media/js/aam.js:651
374
  msgid "Manage User"
375
  msgstr ""
376
 
377
+ #: Application/Backend/View/Localization.php:64 media/js/aam.js:665
378
  msgid "Edit User"
379
  msgstr ""
380
 
381
+ #: Application/Backend/View/Localization.php:65 media/js/aam.js:521
382
+ #: media/js/aam.js:522 media/js/aam.js:678
383
  msgid "Lock User"
384
  msgstr ""
385
 
386
+ #: Application/Backend/View/Localization.php:66 media/js/aam.js:515
387
+ #: media/js/aam.js:516 media/js/aam.js:691
388
  msgid "Unlock User"
389
  msgstr ""
390
 
391
+ #: Application/Backend/View/Localization.php:67
392
  msgid "Failed to grand capability - WordPress policy"
393
  msgstr ""
394
 
395
+ #: Application/Backend/View/PostOptionList.php:26
396
+ #: Application/Backend/View/PostOptionList.php:85
397
  msgid "List"
398
  msgstr ""
399
 
400
+ #: Application/Backend/View/PostOptionList.php:27
401
  #, php-format
402
  msgid ""
403
  "Hide %s however access with a direct URL will be still allowed. When there "
405
  "for performance reasons, AAM checks limited number of posts per request."
406
  msgstr ""
407
 
408
+ #: Application/Backend/View/PostOptionList.php:27
409
+ #: Application/Backend/View/PostOptionList.php:32
410
  #, php-format
411
  msgid " %sSee in action.%s"
412
  msgstr ""
413
 
414
+ #: Application/Backend/View/PostOptionList.php:31
415
+ msgid "Read"
 
416
  msgstr ""
417
 
418
+ #: Application/Backend/View/PostOptionList.php:32
419
  #, php-format
420
  msgid ""
421
+ "Restrict access to read the %s. Any attempts to read, view or open the %s "
422
+ "will be denied and redirected based on the Access Denied Redirect rule."
 
 
423
  msgstr ""
424
 
425
+ #: Application/Backend/View/PostOptionList.php:35
426
+ msgid "Limit"
427
  msgstr ""
428
 
429
+ #: Application/Backend/View/PostOptionList.php:36
430
+ msgid "Teaser message"
 
 
 
431
  msgstr ""
432
 
433
+ #: Application/Backend/View/PostOptionList.php:39
434
+ #, php-format
435
+ msgid "When checked, show defined teaser message instead of the %s content."
436
  msgstr ""
437
 
438
+ #: Application/Backend/View/PostOptionList.php:42
439
+ msgid "Read Counter"
 
 
 
 
440
  msgstr ""
441
 
442
+ #: Application/Backend/View/PostOptionList.php:43
443
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:11
444
+ msgid "Threshold"
445
  msgstr ""
446
 
447
+ #: Application/Backend/View/PostOptionList.php:47
448
  #, php-format
449
  msgid ""
450
+ "Define how many times the %s can be opened to read, view or download. After "
451
+ "number of time exceeds the defined threshold, the access will be denied to "
452
+ "the %s and redirected based on the Access Denied Redirect rule."
453
  msgstr ""
454
 
455
+ #: Application/Backend/View/PostOptionList.php:50
456
  msgid "Comment"
457
  msgstr ""
458
 
459
+ #: Application/Backend/View/PostOptionList.php:51
460
  #, php-format
461
  msgid "Restrict access to comment on %s when commenting feature is enabled."
462
  msgstr ""
463
 
464
+ #: Application/Backend/View/PostOptionList.php:54
465
  msgid "Redirect"
466
  msgstr ""
467
 
468
+ #: Application/Backend/View/PostOptionList.php:55
469
+ msgid "Redirect Rule"
 
 
 
 
 
 
 
470
  msgstr ""
471
 
472
+ #: Application/Backend/View/PostOptionList.php:58
473
  #, php-format
474
  msgid ""
475
+ "Redirect user based on the defined redirect rule when user tries to read the "
476
+ "%s. The REDIRECT option will be ignored if READ option checked. For more "
477
+ "information about this option please refer to the %sHelp Section%s."
478
  msgstr ""
479
 
480
+ #: Application/Backend/View/PostOptionList.php:61
481
  msgid "Password Protected"
482
  msgstr ""
483
 
484
+ #: Application/Backend/View/PostOptionList.php:62
485
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:32
486
+ msgid "Password"
487
  msgstr ""
488
 
489
+ #: Application/Backend/View/PostOptionList.php:65
490
  #, php-format
491
+ msgid "Password protect the %s. Available with WordPress 4.7.0 or higher."
 
 
492
  msgstr ""
493
 
494
+ #: Application/Backend/View/PostOptionList.php:68
495
  msgid "Access Expiration"
496
  msgstr ""
497
 
498
+ #: Application/Backend/View/PostOptionList.php:69
499
+ msgid "Expires:"
 
500
  msgstr ""
501
 
502
+ #: Application/Backend/View/PostOptionList.php:72
503
  #, php-format
504
+ msgid "Define when access expires for %s."
505
  msgstr ""
506
 
507
+ #: Application/Backend/View/PostOptionList.php:72
508
  #, php-format
509
  msgid ""
510
+ "After expiration, the access to %s will be denied and user will be "
511
+ "redirected based on the Access Denied Redirect rule. For more information "
512
+ "%scheck this article%s or "
513
  msgstr ""
514
 
515
+ #: Application/Backend/View/PostOptionList.php:72
516
  #, php-format
517
  msgid " %ssee in action.%s"
518
  msgstr ""
519
 
520
+ #: Application/Backend/View/PostOptionList.php:75
521
+ msgid "Monetized Access"
 
 
 
 
522
  msgstr ""
523
 
524
+ #: Application/Backend/View/PostOptionList.php:76
525
+ msgid "E-Product"
 
 
 
 
 
526
  msgstr ""
527
 
528
+ #: Application/Backend/View/PostOptionList.php:87
529
  #, php-format
530
  msgid ""
531
+ "Hide %s however access with a direct URL is still allowed. When there are "
532
+ "more than 500 posts, this option may not be applied immediately because, for "
533
+ "performance reasons, AAM checks limited number of posts per request."
 
 
 
534
  msgstr ""
535
 
536
+ #: Application/Backend/View/PostOptionList.php:93
537
  #, php-format
538
  msgid ""
539
+ "Restrict access to edit the %s. Any attempts to edit %s will result in "
 
540
  "redirecting user based on the Access Denied Redirect rule."
541
  msgstr ""
542
 
543
+ #: Application/Backend/View/PostOptionList.php:96
544
+ #: Application/Backend/phtml/index.phtml:214
545
+ #: Application/Backend/phtml/main/capability.phtml:104
546
  msgid "Delete"
547
  msgstr ""
548
 
549
+ #: Application/Backend/View/PostOptionList.php:98
550
  #, php-format
551
  msgid "Restrict access to trash or permanently delete %s."
552
  msgstr ""
553
 
554
+ #: Application/Backend/View/PostOptionList.php:101
 
 
 
 
 
 
 
 
 
 
 
555
  msgid "Publish"
556
  msgstr ""
557
 
558
+ #: Application/Backend/View/PostOptionList.php:103
559
  #, php-format
560
  msgid ""
561
+ "Restrict access to publish the %s. User will be allowed only submit the %s "
562
+ "for review."
563
  msgstr ""
564
 
565
+ #: Application/Backend/Widget/Login.php:19
566
+ msgid "AAM Secure Login Widget"
567
  msgstr ""
568
 
569
+ #: Application/Backend/Widget/Login.php:80
570
+ msgid "Login"
 
 
 
 
571
  msgstr ""
572
 
573
+ #: Application/Backend/Widget/Login.php:84
574
+ #: Application/Shortcode/Strategy/Login.php:55
575
+ msgid "Howdy, %username%"
576
  msgstr ""
577
 
578
+ #: Application/Core/Login.php:113
579
+ msgid "Access denied. Please login to get access."
 
 
 
580
  msgstr ""
581
 
582
+ #: Application/Core/Login.php:247
583
+ msgid "Username and password are required"
584
  msgstr ""
585
 
586
+ #: Application/Core/Subject/Default.php:78 media/js/aam.js:789
587
+ msgid "All Users, Roles and Visitor"
 
 
 
 
 
 
 
588
  msgstr ""
589
 
590
+ #: Application/Extension/Repository.php:128
591
  #, php-format
592
  msgid ""
593
+ "The [%s] file is missing. Update all your extensions to the latest version."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  msgstr ""
595
 
596
+ #: Application/Extension/Repository.php:304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  #, php-format
598
  msgid "Failed to create %s"
599
  msgstr ""
600
 
601
+ #: Application/Extension/Repository.php:308
602
  #, php-format
603
  msgid "Directory %s is not writable"
604
  msgstr ""
605
 
606
+ #: Application/Frontend/Filter.php:301
607
+ msgid "[No teaser message provided]"
608
  msgstr ""
609
 
610
+ #: Application/Shortcode/Factory.php:52
611
+ msgid "No valid strategy found for the given context"
 
612
  msgstr ""
613
 
614
+ #: aam.php:173
615
+ msgid "PHP 5.2 or higher is required."
 
616
  msgstr ""
617
 
618
+ #: aam.php:175
619
+ msgid "WP 3.8 or higher is required."
 
620
  msgstr ""
621
 
622
+ #: media/js/aam.js:230
623
+ msgid "Clone Role"
 
624
  msgstr ""
625
 
626
+ #: media/js/aam.js:704
627
+ msgid "Switch To User"
628
  msgstr ""
629
 
630
+ #: media/js/aam.js:837 media/js/aam.js:2346 media/js/aam.js:2391
631
+ #: media/js/aam.js:2422 media/js/aam.js:2455 media/js/aam.js:2507
632
+ msgid "Application Error"
633
  msgstr ""
634
 
635
+ #: media/js/aam.js:906 Application/Backend/phtml/main/menu.phtml:54
636
+ msgid "Uncheck to allow"
637
  msgstr ""
638
 
639
+ #: media/js/aam.js:908 Application/Backend/phtml/main/menu.phtml:54
640
+ msgid "Check to restrict"
641
  msgstr ""
642
 
643
+ #: media/js/aam.js:1015
644
+ msgid "Processing"
645
  msgstr ""
646
 
647
+ #: media/js/aam.js:1023
648
+ msgid "Failed to initialize URL"
649
  msgstr ""
650
 
651
+ #: media/js/aam.js:1031 Application/Backend/phtml/main/metabox.phtml:102
652
+ msgid "Initialize"
653
  msgstr ""
654
 
655
+ #: media/js/aam.js:1055 Application/Backend/phtml/main/metabox.phtml:65
656
+ msgid "Uncheck to show"
657
  msgstr ""
658
 
659
+ #: media/js/aam.js:1057 Application/Backend/phtml/main/metabox.phtml:65
660
+ msgid "Check to hide"
 
661
  msgstr ""
662
 
663
+ #: media/js/aam.js:1103
664
+ msgid "WordPress core does not allow to grant this capability"
665
+ msgstr ""
666
+
667
+ #: media/js/aam.js:1143
668
  msgid "Nothing to show"
669
  msgstr ""
670
 
671
+ #: media/js/aam.js:1295
672
  msgid "Failed to update capability"
673
  msgstr ""
674
 
675
+ #: media/js/aam.js:1303 Application/Backend/phtml/main/capability.phtml:76
 
676
  msgid "Update Capability"
677
  msgstr ""
678
 
679
+ #: media/js/aam.js:1334
680
  msgid "Failed to delete capability"
681
  msgstr ""
682
 
683
+ #: media/js/aam.js:1342 Application/Backend/phtml/main/capability.phtml:98
 
684
  msgid "Delete Capability"
685
  msgstr ""
686
 
687
+ #: media/js/aam.js:1685
688
  msgid "Drill-Down"
689
  msgstr ""
690
 
691
+ #: media/js/aam.js:2169
692
+ msgid "Extension status was updated successfully"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
  msgstr ""
694
 
695
+ #: media/js/aam.js:2381 media/js/aam.js:2412 media/js/aam.js:2443
696
+ #: media/js/aam.js:2496
697
+ msgid "Wait..."
 
 
 
698
  msgstr ""
699
 
700
+ #: media/js/aam.js:2385
701
+ msgid "All settings were cleared successfully"
 
 
 
 
702
  msgstr ""
703
 
704
+ #: media/js/aam.js:2395 media/js/aam.js:2426
705
+ #: Application/Backend/phtml/settings/tools.phtml:66
706
+ msgid "Clear"
 
 
 
707
  msgstr ""
708
 
709
+ #: media/js/aam.js:2416
710
+ msgid "The cache was cleared successfully"
 
 
 
 
711
  msgstr ""
712
 
713
+ #: media/js/aam.js:2503
714
+ msgid "Invalid data format"
 
715
  msgstr ""
716
 
717
+ #: Application/Backend/phtml/extensions.phtml:11
718
  msgid "Install/Update Extension"
719
  msgstr ""
720
 
721
+ #: Application/Backend/phtml/extensions.phtml:15
722
  msgid "License Key"
723
  msgstr ""
724
 
725
+ #: Application/Backend/phtml/extensions.phtml:19
 
726
  msgid "Submit"
727
  msgstr ""
728
 
729
+ #: Application/Backend/phtml/extensions.phtml:28
730
  msgid "Premium"
731
  msgstr ""
732
 
733
+ #: Application/Backend/phtml/extensions.phtml:29
734
+ #: Application/Backend/phtml/extensions.phtml:69
735
  msgid "Free"
736
  msgstr ""
737
 
738
+ #: Application/Backend/phtml/extensions.phtml:30
739
+ msgid "Check for Updates"
 
740
  msgstr ""
741
 
742
+ #: Application/Backend/phtml/extensions.phtml:49
743
+ #: Application/Backend/phtml/extensions.phtml:76
744
+ msgid "Deactivate"
745
  msgstr ""
746
 
747
+ #: Application/Backend/phtml/extensions.phtml:53
748
+ #: Application/Backend/phtml/extensions.phtml:80
749
+ msgid "Activate"
750
+ msgstr ""
751
+
752
+ #: Application/Backend/phtml/extensions.phtml:55
753
+ #: Application/Backend/phtml/index.phtml:89
754
  msgid "Read More"
755
  msgstr ""
756
 
757
+ #: Application/Backend/phtml/extensions.phtml:82
758
+ #: Application/Backend/phtml/extensions.phtml:117
759
  msgid "Download"
760
  msgstr ""
761
 
762
+ #: Application/Backend/phtml/extensions.phtml:97
763
+ #: Application/Backend/phtml/extensions.phtml:128
764
+ #: Application/Backend/phtml/extensions.phtml:139
765
+ #: Application/Backend/phtml/index.phtml:154
766
+ #: Application/Backend/phtml/index.phtml:171
767
+ #: Application/Backend/phtml/index.phtml:181
768
+ #: Application/Backend/phtml/index.phtml:197
769
+ #: Application/Backend/phtml/index.phtml:207
770
+ #: Application/Backend/phtml/index.phtml:215
771
+ #: Application/Backend/phtml/main/capability.phtml:54
772
+ #: Application/Backend/phtml/main/capability.phtml:65
773
+ #: Application/Backend/phtml/main/capability.phtml:75
774
+ #: Application/Backend/phtml/main/capability.phtml:87
775
+ #: Application/Backend/phtml/main/capability.phtml:97
776
+ #: Application/Backend/phtml/main/capability.phtml:105
777
+ #: Application/Backend/phtml/main/menu.phtml:86
778
+ #: Application/Backend/phtml/main/metabox.phtml:89
779
+ #: Application/Backend/phtml/main/metabox.phtml:103
780
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
781
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:17
782
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:27
783
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:38
784
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:48
785
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:60
786
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:70
787
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:87
788
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:97
789
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:108
790
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:118
791
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:131
792
+ #: Application/Backend/phtml/settings/tools.phtml:59
793
  msgid "Close"
794
  msgstr ""
795
 
796
+ #: Application/Backend/phtml/extensions.phtml:98
797
  msgid "Notification"
798
  msgstr ""
799
 
800
+ #: Application/Backend/phtml/extensions.phtml:102
801
  msgid ""
802
  "Extension requires manual installation. Please follow few simple steps below."
803
  msgstr ""
804
 
805
+ #: Application/Backend/phtml/extensions.phtml:118
806
+ #: Application/Backend/phtml/settings/tools.phtml:67
807
  msgid "Cancel"
808
  msgstr ""
809
 
810
+ #: Application/Backend/phtml/extensions.phtml:129
811
  msgid "Install Extension"
812
  msgstr ""
813
 
814
+ #: Application/Backend/phtml/extensions.phtml:133
815
  msgid ""
816
  "Insert license key that you recieved after the payment (find the email "
817
  "example below). It might take up to 2 hours to process the payment. Please "
819
  msgstr ""
820
 
821
  #: Application/Backend/phtml/frame.phtml:62
822
+ #: Application/Backend/phtml/index.phtml:229
823
  msgid "Username"
824
  msgstr ""
825
 
829
  msgstr ""
830
 
831
  #: Application/Backend/phtml/frame.phtml:75
832
+ #: Application/Backend/phtml/index.phtml:242
833
  msgid "Manage Visitors"
834
  msgstr ""
835
 
841
  msgstr ""
842
 
843
  #: Application/Backend/phtml/frame.phtml:84
844
+ #: Application/Backend/phtml/index.phtml:250
845
  msgid "Manage Default Access"
846
  msgstr ""
847
 
848
  #: Application/Backend/phtml/frame.phtml:100
849
+ #: Application/Backend/phtml/main/menu.phtml:13
850
+ #: Application/Backend/phtml/main/metabox.phtml:19
851
+ #: Application/Backend/phtml/main/post.phtml:35
852
  msgid "Settings are customized"
853
  msgstr ""
854
 
855
  #: Application/Backend/phtml/frame.phtml:101
856
+ #: Application/Backend/phtml/main/capability.phtml:33
857
+ #: Application/Backend/phtml/main/menu.phtml:14
858
+ #: Application/Backend/phtml/main/metabox.phtml:20
859
+ #: Application/Backend/phtml/main/post.phtml:36
860
  msgid "Reset To Default"
861
  msgstr ""
862
 
863
+ #: Application/Backend/phtml/frame.phtml:120
864
+ #: Application/Backend/phtml/main/post.phtml:80
865
  msgid "Frontend"
866
  msgstr ""
867
 
868
+ #: Application/Backend/phtml/frame.phtml:129
869
+ #: Application/Backend/phtml/frame.phtml:154
870
+ #: Application/Backend/phtml/main/post.phtml:89
871
+ #: Application/Backend/phtml/main/post.phtml:114
872
+ msgid "change"
873
+ msgstr ""
874
+
875
  #: Application/Backend/phtml/index.phtml:14
876
+ msgid "Main Panel"
877
  msgstr ""
878
 
879
+ #: Application/Backend/phtml/index.phtml:23
880
  msgid ""
881
  "Appreciate your interest in Advanced Access Manager (AAM). With strong "
882
  "knowledge and experience in WordPress, AAM becomes a very powerful tool to "
883
  "manage access to your frontend and backend."
884
  msgstr ""
885
 
886
+ #: Application/Backend/phtml/index.phtml:24
887
  msgid "Please Note!"
888
  msgstr ""
889
 
890
+ #: Application/Backend/phtml/index.phtml:25
891
  msgid ""
892
  "AAM was thoroughly tested on the fresh installation of WordPress and in the "
893
  "latest versions of Chrome, Safari, IE and Firefox. If you have any issues, "
894
  "the most typical case is the conflict with other plugins or themes."
895
  msgstr ""
896
 
897
+ #: Application/Backend/phtml/index.phtml:26
898
  #, php-format
899
  msgid ""
900
  "Check our %sHelp%s section to find some useful articles about AAM "
901
  "functionality or %scontact us%s directly."
902
  msgstr ""
903
 
904
+ #: Application/Backend/phtml/index.phtml:40
905
  msgid "Notifications"
906
  msgstr ""
907
 
908
+ #: Application/Backend/phtml/index.phtml:99
909
  msgid "AAM Multisite"
910
  msgstr ""
911
 
912
+ #: Application/Backend/phtml/index.phtml:103
913
  msgid "Install AAM Multisite"
914
  msgstr ""
915
 
916
+ #: Application/Backend/phtml/index.phtml:114
917
+ msgid "Users/Roles Manager"
918
  msgstr ""
919
 
920
+ #: Application/Backend/phtml/index.phtml:121
921
+ #: Application/Backend/phtml/index.phtml:262
922
  msgid "Roles"
923
  msgstr ""
924
 
925
+ #: Application/Backend/phtml/index.phtml:127
926
+ #: Application/Backend/phtml/index.phtml:272
927
  msgid "Visitor"
928
  msgstr ""
929
 
930
+ #: Application/Backend/phtml/index.phtml:130
931
+ #: Application/Backend/phtml/index.phtml:277
932
  msgid "Default"
933
  msgstr ""
934
 
935
+ #: Application/Backend/phtml/index.phtml:142
936
+ #: Application/Backend/phtml/index.phtml:230
937
  msgid "Action"
938
  msgstr ""
939
 
940
+ #: Application/Backend/phtml/index.phtml:155
941
  msgid "Create Role"
942
  msgstr ""
943
 
944
+ #: Application/Backend/phtml/index.phtml:159
945
+ #: Application/Backend/phtml/index.phtml:186
946
  msgid "Role Name"
947
  msgstr ""
948
 
949
+ #: Application/Backend/phtml/index.phtml:160
950
+ #: Application/Backend/phtml/index.phtml:187
951
  msgid "Enter Role Name"
952
  msgstr ""
953
 
954
+ #: Application/Backend/phtml/index.phtml:163
955
+ #: Application/Backend/phtml/index.phtml:190
956
+ msgid "Role Expiration"
957
+ msgstr ""
958
+
959
+ #: Application/Backend/phtml/index.phtml:164
960
+ #: Application/Backend/phtml/index.phtml:191
961
+ msgid "Enter Expiration Rule"
962
+ msgstr ""
963
+
964
+ #: Application/Backend/phtml/index.phtml:182
965
  msgid "Update Role"
966
  msgstr ""
967
 
968
+ #: Application/Backend/phtml/index.phtml:211
969
  #, php-format
970
  msgid "Are you sure that you want to delete the %s role?"
971
  msgstr ""
972
 
973
+ #: Application/Backend/phtml/index.phtml:241
974
  msgid ""
975
  "Manage access to your website for visitors (any user that is not "
976
  "authenticated)"
977
  msgstr ""
978
 
979
+ #: Application/Backend/phtml/index.phtml:249
980
  msgid ""
981
  "Manage default access to your website resources for all users, roles and "
982
  "visitor. This includes Administrator role and your user"
983
  msgstr ""
984
 
985
+ #: Application/Backend/phtml/index.phtml:263
986
  msgid ""
987
  "With Roles tab you can manage access for any defined role, edit role's name, "
988
  "create new role or even delete existing (but only when there is no users "
989
  "assigned to it). You are not allowed to delete Administrator role."
990
  msgstr ""
991
 
992
+ #: Application/Backend/phtml/index.phtml:268
993
  msgid ""
994
  "Manage access for any user. As a bonus feature, you can block user. It means "
995
  "that user will be not able to login to your website anymore."
996
  msgstr ""
997
 
998
+ #: Application/Backend/phtml/index.phtml:273
999
  msgid ""
1000
  "Visitor can be considered any user that is not authenticated to your website."
1001
  msgstr ""
1002
 
1003
+ #: Application/Backend/phtml/index.phtml:278
1004
  msgid ""
1005
  "Manage default access settings to your website resources for all users, "
1006
  "roles and visitors."
1007
  msgstr ""
1008
 
1009
+ #: Application/Backend/phtml/main-panel.phtml:27
1010
+ msgid "You are not allowed to manage any of the existing features."
1011
  msgstr ""
1012
 
1013
+ #: Application/Backend/phtml/main/404redirect.phtml:36
1014
+ #: Application/Backend/phtml/main/login-redirect.phtml:43
1015
+ #: Application/Backend/phtml/main/logout-redirect.phtml:43
1016
+ #: Application/Backend/phtml/main/redirect.phtml:67
1017
+ #: Application/Backend/phtml/main/redirect.phtml:119
1018
+ msgid "Existing Page"
1019
  msgstr ""
1020
 
1021
+ #: Application/Backend/phtml/main/404redirect.phtml:45
1022
+ #: Application/Backend/phtml/main/login-redirect.phtml:52
1023
+ #: Application/Backend/phtml/main/logout-redirect.phtml:52
1024
+ #: Application/Backend/phtml/main/redirect.phtml:76
1025
+ #: Application/Backend/phtml/main/redirect.phtml:128
1026
+ msgid "-- Select Page --"
1027
  msgstr ""
1028
 
1029
+ #: Application/Backend/phtml/main/404redirect.phtml:51
1030
+ #: Application/Backend/phtml/main/login-redirect.phtml:58
1031
+ #: Application/Backend/phtml/main/logout-redirect.phtml:58
1032
+ #: Application/Backend/phtml/main/redirect.phtml:82
1033
+ #: Application/Backend/phtml/main/redirect.phtml:134
1034
+ msgid "The URL"
1035
+ msgstr ""
1036
+
1037
+ #: Application/Backend/phtml/main/404redirect.phtml:56
1038
+ #: Application/Backend/phtml/main/login-redirect.phtml:63
1039
+ #: Application/Backend/phtml/main/logout-redirect.phtml:63
1040
+ #: Application/Backend/phtml/main/redirect.phtml:87
1041
+ #: Application/Backend/phtml/main/redirect.phtml:139
1042
+ msgid "PHP Callback Function"
1043
  msgstr ""
1044
 
1045
+ #: Application/Backend/phtml/main/capability.phtml:16
1046
  msgid "Filter"
1047
  msgstr ""
1048
 
1049
+ #: Application/Backend/phtml/main/capability.phtml:23
1050
  msgid "All Capabilities"
1051
  msgstr ""
1052
 
1053
+ #: Application/Backend/phtml/main/capability.phtml:32
1054
  msgid "Capabilities are customized"
1055
  msgstr ""
1056
 
1057
+ #: Application/Backend/phtml/main/capability.phtml:42
1058
  msgid "Category"
1059
  msgstr ""
1060
 
1061
+ #: Application/Backend/phtml/main/capability.phtml:43
1062
+ #: Application/Backend/phtml/main/capability.phtml:59
1063
+ #: Application/Backend/phtml/main/capability.phtml:80
1064
  msgid "Capability"
1065
  msgstr ""
1066
 
1067
+ #: Application/Backend/phtml/main/capability.phtml:44
1068
+ #: Application/Backend/phtml/main/post.phtml:52
1069
  msgid "Actions"
1070
  msgstr ""
1071
 
1072
+ #: Application/Backend/phtml/main/capability.phtml:55
1073
  msgid "Create Capability"
1074
  msgstr ""
1075
 
1076
+ #: Application/Backend/phtml/main/capability.phtml:60
1077
+ #: Application/Backend/phtml/main/capability.phtml:81
1078
  msgid "Enter Capability"
1079
  msgstr ""
1080
 
1081
+ #: Application/Backend/phtml/main/capability.phtml:101
1082
  #, php-format
1083
  msgid "Are you sure that you want to delete %s capability for all roles?"
1084
  msgstr ""
1085
 
1086
+ #: Application/Backend/phtml/main/login-redirect.phtml:27
1087
+ #: Application/Backend/phtml/main/logout-redirect.phtml:27
1088
  msgid "WordPress default behavior"
1089
  msgstr ""
1090
 
1091
+ #: Application/Backend/phtml/main/menu.phtml:87
1092
  msgid "Dashboard Lockdown"
1093
  msgstr ""
1094
 
1095
+ #: Application/Backend/phtml/main/menu.phtml:91
1096
  msgid "You cannot restrict access to Dashboard home page."
1097
  msgstr ""
1098
 
1099
+ #: Application/Backend/phtml/main/menu.phtml:96
 
 
 
 
 
 
 
 
1100
  msgid "OK"
1101
  msgstr ""
1102
 
1103
+ #: Application/Backend/phtml/main/metabox.phtml:12
1104
  msgid "Refresh"
1105
  msgstr ""
1106
 
1107
+ #: Application/Backend/phtml/main/metabox.phtml:13
1108
  msgid "Init URL"
1109
  msgstr ""
1110
 
1111
+ #: Application/Backend/phtml/main/metabox.phtml:43
1112
  msgid "Dashboard Widgets"
1113
  msgstr ""
1114
 
1115
+ #: Application/Backend/phtml/main/metabox.phtml:47
1116
  msgid "Frontend Widgets"
1117
  msgstr ""
1118
 
1119
+ #: Application/Backend/phtml/main/metabox.phtml:78
1120
  msgid "The list is not initialized. Click Refresh button above."
1121
  msgstr ""
1122
 
1123
+ #: Application/Backend/phtml/main/metabox.phtml:90
1124
  msgid "Initialize URL"
1125
  msgstr ""
1126
 
1127
+ #: Application/Backend/phtml/main/metabox.phtml:94
1128
  msgid ""
1129
+ "Some metaboxes are \"conditional\" and appear on the Edit screen when "
1130
+ "certain conditions are met. For example metabox \"Comments\" appears only "
1131
+ "for existing page and not for new page. If you do not see a desired metabox, "
1132
+ "try to copy & paste the full URL to the backend page where that metabox "
1133
+ "appears."
1134
  msgstr ""
1135
 
1136
+ #: Application/Backend/phtml/main/metabox.phtml:97
1137
  msgid "Backend page URL"
1138
  msgstr ""
1139
 
1140
+ #: Application/Backend/phtml/main/metabox.phtml:98
1141
  msgid "Insert valid URL"
1142
  msgstr ""
1143
 
1144
+ #: Application/Backend/phtml/main/post.phtml:15
1145
  #, php-format
1146
  msgid ""
1147
  "Manage access to posts, pages and custom post types. For more information "
1148
+ "about this functionality check %sHow to manage access to the WordPress "
1149
+ "content%s article."
1150
  msgstr ""
1151
 
1152
+ #: Application/Backend/phtml/main/post.phtml:25
1153
  msgid "Root"
1154
  msgstr ""
1155
 
1156
+ #: Application/Backend/phtml/main/post.phtml:51
1157
  msgid "Title"
1158
  msgstr ""
1159
 
1160
+ #: Application/Backend/phtml/main/post.phtml:59
1161
+ #: Application/Backend/phtml/main/post.phtml:61
1162
+ #: Application/Backend/phtml/main/post.phtml:65
1163
+ #: Application/Backend/phtml/main/post.phtml:67
1164
+ #: Application/Backend/phtml/main/post.phtml:71
1165
+ #: Application/Backend/phtml/main/post.phtml:129
1166
  msgid "Go Back"
1167
  msgstr ""
1168
 
1169
+ #: Application/Backend/phtml/main/redirect.phtml:25
1170
  msgid "Frontend Redirect"
1171
  msgstr ""
1172
 
1173
+ #: Application/Backend/phtml/main/redirect.phtml:26
1174
  msgid "Backend Redirect"
1175
  msgstr ""
1176
 
1177
+ #: Application/Backend/phtml/main/redirect.phtml:62
1178
+ #: Application/Backend/phtml/main/redirect.phtml:114
1179
  msgid "Customized Message"
1180
  msgstr ""
1181
 
1182
+ #: Application/Backend/phtml/main/redirect.phtml:63
1183
+ #: Application/Backend/phtml/main/redirect.phtml:115
1184
  msgid "Enter message..."
1185
  msgstr ""
1186
 
1187
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:7
1188
+ msgid "Define Threshold"
 
 
 
 
1189
  msgstr ""
1190
 
1191
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:12
1192
+ msgid "Enter digital number"
1193
  msgstr ""
1194
 
1195
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:28
1196
  msgid "Set Password"
1197
  msgstr ""
1198
 
1199
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:33
 
 
 
 
1200
  msgid "Enter Password"
1201
  msgstr ""
1202
 
1203
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:49
1204
+ msgid "Define Redirect Rule"
1205
  msgstr ""
1206
 
1207
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:54
1208
+ msgid "Enter Redirect Rule"
1209
  msgstr ""
1210
 
1211
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:55
1212
+ msgid "Enter rule"
1213
  msgstr ""
1214
 
1215
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:71
1216
  msgid "Set Expiration"
1217
  msgstr ""
1218
 
1219
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:81
1220
  msgid "Enter expiration critiria"
1221
  msgstr ""
1222
 
1223
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:82
1224
  msgid "Enter critiria"
1225
  msgstr ""
1226
 
1227
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:98
1228
+ msgid "Teaser Message"
1229
+ msgstr ""
1230
+
1231
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:102
1232
+ msgid "Simple text or valid HTML"
1233
+ msgstr ""
1234
+
1235
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:103
1236
+ msgid "Enter your teaser"
1237
+ msgstr ""
1238
+
1239
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:107
1240
+ msgid "Save"
1241
+ msgstr ""
1242
+
1243
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:119
1244
+ msgid "E-Commerce Setup"
1245
+ msgstr ""
1246
+
1247
  #: Application/Backend/phtml/partial/role-inheritance.phtml:3
1248
  msgid "Inherit Capabilities From"
1249
  msgstr ""
1250
 
1251
+ #: Application/Backend/phtml/partial/role-inheritance.phtml:5
1252
+ msgid "Select Role"
 
 
1253
  msgstr ""
1254
 
1255
+ #: Application/Backend/phtml/settings/tools.phtml:8
1256
+ msgid "Export AAM Settings"
1257
  msgstr ""
1258
 
1259
+ #: Application/Backend/phtml/settings/tools.phtml:10
1260
+ #, php-format
1261
+ msgid ""
1262
+ "Export selected AAM settings to the file. For more information about this "
1263
+ "feature check %sHow to export and import AAM settings%s article."
1264
  msgstr ""
1265
 
1266
+ #: Application/Backend/phtml/settings/tools.phtml:19
1267
+ msgid "Import AAM Settings"
1268
+ msgstr ""
1269
+
1270
+ #: Application/Backend/phtml/settings/tools.phtml:21
1271
+ msgid "Import AAM settings from the file."
1272
  msgstr ""
1273
 
1274
+ #: Application/Backend/phtml/settings/tools.phtml:31
1275
  msgid "Clear Cache"
1276
  msgstr ""
1277
 
1278
+ #: Application/Backend/phtml/settings/tools.phtml:33
1279
  msgid "Clear all AAM cache."
1280
  msgstr ""
1281
 
1282
+ #: Application/Backend/phtml/settings/tools.phtml:42
1283
  msgid "Clear All Settings"
1284
  msgstr ""
1285
 
1286
+ #: Application/Backend/phtml/settings/tools.phtml:44
1287
+ msgid "Remove all the settings related to AAM from the database."
 
 
 
 
 
1288
  msgstr ""
1289
 
1290
+ #: Application/Backend/phtml/settings/tools.phtml:60
1291
  msgid "Clear all settings"
1292
  msgstr ""
1293
 
1294
+ #: Application/Backend/phtml/settings/tools.phtml:63
1295
  msgid "All AAM settings will be removed."
1296
  msgstr ""
1297
 
1298
+ #: Application/Backend/phtml/widget/login-backend.phtml:3
1299
+ msgid "Login Title"
1300
+ msgstr ""
1301
+
1302
+ #: Application/Backend/phtml/widget/login-backend.phtml:8
1303
+ msgid "Logged In Title"
1304
+ msgstr ""
1305
+
1306
+ #: Application/Backend/phtml/widget/login-backend.phtml:14
1307
+ msgid "Login Timeout"
1308
+ msgstr ""
1309
+
1310
+ #: Application/Backend/phtml/widget/login-backend.phtml:20
1311
+ msgid "Brute Force Lockout"
1312
+ msgstr ""
1313
+
1314
+ #: Application/Backend/phtml/widget/login-backend.phtml:25
1315
+ #, php-format
1316
+ msgid ""
1317
+ "For more advanced setup like login/logout redirects or custom styling, "
1318
+ "please check %sthis article%s."
1319
+ msgstr ""
1320
+
1321
+ #: Application/Backend/phtml/widget/login-frontend.phtml:53
1322
+ #: Application/Frontend/phtml/login.phtml:40
1323
+ msgid "Dashboard"
1324
+ msgstr ""
1325
+
1326
+ #: Application/Backend/phtml/widget/login-frontend.phtml:54
1327
+ #: Application/Frontend/phtml/login.phtml:41
1328
+ msgid "Edit My Profile"
1329
+ msgstr ""
1330
+
1331
+ #: Application/Backend/phtml/widget/login-frontend.phtml:55
1332
+ #: Application/Frontend/phtml/login.phtml:42
1333
+ msgid "Log Out"
1334
  msgstr ""
Lang/advanced-access-manager.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: AAM\n"
5
- "POT-Creation-Date: 2017-05-30 19:56-0400\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: WPAAM <support@wpaam.com>\n"
8
  "Language-Team: WP AAM <vasyl@vasyltech.com>\n"
@@ -10,330 +10,395 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.0.2\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __\n"
17
  "X-Poedit-Basepath: ..\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
- #: Application/Backend/Feature/404Redirect.php:68
21
- msgid "404 Redirect"
22
  msgstr ""
23
 
24
- #: Application/Backend/Feature/Abstract.php:31
25
- #: Application/Backend/Manager.php:539 Application/Backend/Manager.php:562
26
- #: Application/Core/API.php:246
27
- msgid "Access Denied"
28
  msgstr ""
29
 
30
- #: Application/Backend/Feature/Capability.php:96
31
  msgid "Capability already exists"
32
  msgstr ""
33
 
34
- #: Application/Backend/Feature/Capability.php:125
35
  msgid "Can not remove the capability"
36
  msgstr ""
37
 
38
- #: Application/Backend/Feature/Capability.php:235
39
- #: Application/Backend/Feature/Capability.php:276
40
  msgid "System"
41
  msgstr ""
42
 
43
- #: Application/Backend/Feature/Capability.php:236
44
- #: Application/Backend/Feature/Capability.php:278
45
- #: Application/Backend/Feature/Post.php:467
46
  msgid "Posts & Pages"
47
  msgstr ""
48
 
49
- #: Application/Backend/Feature/Capability.php:237
50
- #: Application/Backend/Feature/Capability.php:280
51
- #: Application/Backend/phtml/frame.phtml:143
52
- #: Application/Backend/phtml/object/post.phtml:96
53
  msgid "Backend"
54
  msgstr ""
55
 
56
- #: Application/Backend/Feature/Capability.php:238
57
- #: Application/Backend/Feature/Capability.php:282
58
  msgid "AAM Interface"
59
  msgstr ""
60
 
61
- #: Application/Backend/Feature/Capability.php:239
62
- #: Application/Backend/Feature/Capability.php:284
63
- #: Application/Backend/phtml/utility.phtml:7
64
  msgid "Miscellaneous"
65
  msgstr ""
66
 
67
- #: Application/Backend/Feature/Capability.php:324
68
  msgid "Capabilities"
69
  msgstr ""
70
 
71
- #: Application/Backend/Feature/Contact.php:51
72
- msgid "Contact Us"
73
  msgstr ""
74
 
75
- #: Application/Backend/Feature/Extension.php:96
76
- msgid "Enter license key to update extension."
77
  msgstr ""
78
 
79
- #: Application/Backend/Feature/Extension.php:164
80
- msgid "Extensions"
81
  msgstr ""
82
 
83
- #: Application/Backend/Feature/LoginRedirect.php:109
84
- msgid "Login Redirect"
85
  msgstr ""
86
 
87
- #: Application/Backend/Feature/LogoutRedirect.php:110
88
- msgid "Logout Redirect"
89
  msgstr ""
90
 
91
- #: Application/Backend/Feature/Menu.php:209
92
- msgid "Backend Menu"
93
  msgstr ""
94
 
95
- #: Application/Backend/Feature/Metabox.php:245
96
- msgid "Metaboxes & Widgets"
97
  msgstr ""
98
 
99
- #: Application/Backend/Feature/Redirect.php:117
100
- msgid "Access Denied Redirect"
 
 
 
101
  msgstr ""
102
 
103
- #: Application/Backend/Feature/Security.php:79
104
- msgid "Security"
105
  msgstr ""
106
 
107
- #: Application/Backend/Feature/Teaser.php:109
108
- msgid "Content Teaser"
 
 
 
 
109
  msgstr ""
110
 
111
- #: Application/Backend/Feature/Utility.php:140
112
- msgid "Utilities"
113
  msgstr ""
114
 
115
- #: Application/Backend/Manager.php:216
116
- msgid "Access Manager"
117
  msgstr ""
118
 
119
- #: Application/Backend/Manager.php:309 Application/Backend/Manager.php:327
120
- #: Application/Backend/Manager.php:350
121
- msgid "Access"
122
  msgstr ""
123
 
124
- #: Application/Backend/Manager.php:448
125
- #: Application/Backend/View/Localization.php:40 media/js/aam-interface.js:713
126
- msgid "Anonymous"
 
 
127
  msgstr ""
128
 
129
- #: Application/Backend/Manager.php:455 media/js/aam-interface.js:745
130
- msgid "All Users, Roles and Visitor"
131
  msgstr ""
132
 
133
- #: Application/Backend/View.php:229
134
- msgid "Invalid Email"
 
 
 
135
  msgstr ""
136
 
137
- #: Application/Backend/View/Localization.php:11 media/js/aam-interface.js:1075
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  msgid "Search Capability"
139
  msgstr ""
140
 
141
- #: Application/Backend/View/Localization.php:12 media/js/aam-interface.js:1076
142
  msgid "_TOTAL_ capability(s)"
143
  msgstr ""
144
 
145
- #: Application/Backend/View/Localization.php:13 media/js/aam-interface.js:286
146
- #: media/js/aam-interface.js:341 media/js/aam-interface.js:1179
147
- #: media/js/aam-interface.js:1225 media/js/aam-interface.js:1760
148
- #: media/js/aam-interface.js:1807 media/js/aam-interface.js:1853
149
  msgid "Saving..."
150
  msgstr ""
151
 
152
- #: Application/Backend/View/Localization.php:14 media/js/aam-interface.js:1187
153
  msgid "Failed to add new capability"
154
  msgstr ""
155
 
156
- #: Application/Backend/View/Localization.php:15 media/js/aam-interface.js:306
157
- #: media/js/aam-interface.js:353 media/js/aam-interface.js:390
158
- #: media/js/aam-interface.js:484 media/js/aam-interface.js:516
159
- #: media/js/aam-interface.js:890 media/js/aam-interface.js:927
160
- #: media/js/aam-interface.js:963 media/js/aam-interface.js:1192
161
- #: media/js/aam-interface.js:1238 media/js/aam-interface.js:1279
162
- #: media/js/aam-interface.js:1473 media/js/aam-interface.js:1523
163
- #: media/js/aam-interface.js:1915 media/js/aam-interface.js:2010
164
- #: media/js/aam-interface.js:2109 media/js/aam-interface.js:2203
165
- #: media/js/aam-interface.js:2284 media/js/aam-interface.js:2358
166
- #: media/js/aam.js:207
167
  msgid "Application error"
168
  msgstr ""
169
 
170
- #: Application/Backend/View/Localization.php:16 media/js/aam-interface.js:1195
171
  msgid "Add Capability"
172
  msgstr ""
173
 
174
- #: Application/Backend/View/Localization.php:17 media/js/aam-interface.js:795
175
- #: Application/Backend/phtml/object/menu.phtml:63
176
  msgid "Show Menu"
177
  msgstr ""
178
 
179
- #: Application/Backend/View/Localization.php:18 media/js/aam-interface.js:810
180
- #: Application/Backend/phtml/object/menu.phtml:67
181
  msgid "Restrict Menu"
182
  msgstr ""
183
 
184
- #: Application/Backend/View/Localization.php:19 media/js/aam-interface.js:922
185
  msgid "Failed to retrieve mataboxes"
186
  msgstr ""
187
 
188
- #: Application/Backend/View/Localization.php:20 media/js/aam-interface.js:1562
189
  msgid "Search"
190
  msgstr ""
191
 
192
- #: Application/Backend/View/Localization.php:21 media/js/aam-interface.js:1563
193
  msgid "_TOTAL_ object(s)"
194
  msgstr ""
195
 
196
- #: Application/Backend/View/Localization.php:22
197
  msgid "Failed"
198
  msgstr ""
199
 
200
- #: Application/Backend/View/Localization.php:23 media/js/aam-interface.js:44
201
  msgid "Loading..."
202
  msgstr ""
203
 
204
- #: Application/Backend/View/Localization.php:24 media/js/aam-interface.js:49
205
- #: Application/Backend/phtml/partial/role-inheritance.phtml:5
206
- msgid "Select Role"
207
  msgstr ""
208
 
209
- #: Application/Backend/View/Localization.php:25 media/js/aam-interface.js:90
210
  msgid "Search Role"
211
  msgstr ""
212
 
213
- #: Application/Backend/View/Localization.php:26 media/js/aam-interface.js:91
214
  msgid "_TOTAL_ role(s)"
215
  msgstr ""
216
 
217
- #: Application/Backend/View/Localization.php:27 media/js/aam-interface.js:99
218
- #: media/js/aam-interface.js:555 Application/Backend/phtml/index.phtml:122
219
- #: Application/Backend/phtml/object/capability.phtml:26
220
- #: Application/Backend/phtml/object/capability.phtml:66
221
  msgid "Create"
222
  msgstr ""
223
 
224
- #: Application/Backend/View/Localization.php:28 media/js/aam-interface.js:120
225
- #: Application/Backend/phtml/index.phtml:82
226
- #: Application/Backend/phtml/index.phtml:215
227
  msgid "Users"
228
  msgstr ""
229
 
230
- #: Application/Backend/View/Localization.php:29 media/js/aam-interface.js:301
231
  msgid "Failed to add new role"
232
  msgstr ""
233
 
234
- #: Application/Backend/View/Localization.php:30 media/js/aam-interface.js:309
235
  msgid "Add Role"
236
  msgstr ""
237
 
238
- #: Application/Backend/View/Localization.php:31 media/js/aam-interface.js:348
239
  msgid "Failed to update role"
240
  msgstr ""
241
 
242
- #: Application/Backend/View/Localization.php:32 media/js/aam-interface.js:357
243
- #: Application/Backend/phtml/extension.phtml:55
244
- #: Application/Backend/phtml/extension.phtml:82
245
- #: Application/Backend/phtml/index.phtml:144
246
- #: Application/Backend/phtml/object/capability.phtml:88
 
 
 
 
 
247
  msgid "Update"
248
  msgstr ""
249
 
250
- #: Application/Backend/View/Localization.php:33 media/js/aam-interface.js:380
251
- #: media/js/aam-interface.js:1266
252
  msgid "Deleting..."
253
  msgstr ""
254
 
255
- #: Application/Backend/View/Localization.php:34 media/js/aam-interface.js:386
256
  msgid "Failed to delete role"
257
  msgstr ""
258
 
259
- #: Application/Backend/View/Localization.php:35
260
- #: Application/Backend/View/Localization.php:47 media/js/aam-interface.js:211
261
- #: media/js/aam-interface.js:394 Application/Backend/phtml/index.phtml:156
262
  msgid "Delete Role"
263
  msgstr ""
264
 
265
- #: Application/Backend/View/Localization.php:36 media/js/aam-interface.js:480
266
  msgid "Failed to block user"
267
  msgstr ""
268
 
269
- #: Application/Backend/View/Localization.php:37 media/js/aam-interface.js:546
270
  msgid "Search User"
271
  msgstr ""
272
 
273
- #: Application/Backend/View/Localization.php:38 media/js/aam-interface.js:547
274
  msgid "_TOTAL_ user(s)"
275
  msgstr ""
276
 
277
- #: Application/Backend/View/Localization.php:39 media/js/aam-interface.js:573
278
  #: Application/Backend/phtml/frame.phtml:46
279
- #: Application/Backend/phtml/index.phtml:99
280
  msgid "Role"
281
  msgstr ""
282
 
283
- #: Application/Backend/View/Localization.php:41
 
 
 
 
 
284
  msgid "Current user"
285
  msgstr ""
286
 
287
- #: Application/Backend/View/Localization.php:42
288
  msgid "Current role"
289
  msgstr ""
290
 
291
- #: Application/Backend/View/Localization.php:43 media/js/aam-interface.js:1647
292
  msgid "Manage Access"
293
  msgstr ""
294
 
295
- #: Application/Backend/View/Localization.php:44
296
- #: Application/Backend/View/PostOptionList.php:62
297
- #: media/js/aam-interface.js:1659
298
  msgid "Edit"
299
  msgstr ""
300
 
301
- #: Application/Backend/View/Localization.php:45 media/js/aam-interface.js:157
302
  msgid "Manage Role"
303
  msgstr ""
304
 
305
- #: Application/Backend/View/Localization.php:46 media/js/aam-interface.js:174
306
- msgid "Edit Role Name"
307
  msgstr ""
308
 
309
- #: Application/Backend/View/Localization.php:48 media/js/aam-interface.js:605
310
  msgid "Manage User"
311
  msgstr ""
312
 
313
- #: Application/Backend/View/Localization.php:49 media/js/aam-interface.js:619
314
  msgid "Edit User"
315
  msgstr ""
316
 
317
- #: Application/Backend/View/Localization.php:50 media/js/aam-interface.js:475
318
- #: media/js/aam-interface.js:476 media/js/aam-interface.js:632
319
  msgid "Lock User"
320
  msgstr ""
321
 
322
- #: Application/Backend/View/Localization.php:51 media/js/aam-interface.js:469
323
- #: media/js/aam-interface.js:470 media/js/aam-interface.js:645
324
  msgid "Unlock User"
325
  msgstr ""
326
 
327
- #: Application/Backend/View/Localization.php:52 media/js/aam-interface.js:1040
328
  msgid "Failed to grand capability - WordPress policy"
329
  msgstr ""
330
 
331
- #: Application/Backend/View/PostOptionList.php:13
332
- #: Application/Backend/View/PostOptionList.php:54
333
  msgid "List"
334
  msgstr ""
335
 
336
- #: Application/Backend/View/PostOptionList.php:14
337
  #, php-format
338
  msgid ""
339
  "Hide %s however access with a direct URL will be still allowed. When there "
@@ -341,563 +406,413 @@ msgid ""
341
  "for performance reasons, AAM checks limited number of posts per request."
342
  msgstr ""
343
 
344
- #: Application/Backend/View/PostOptionList.php:14
345
- #: Application/Backend/View/PostOptionList.php:22
346
  #, php-format
347
  msgid " %sSee in action.%s"
348
  msgstr ""
349
 
350
- #: Application/Backend/View/PostOptionList.php:17
351
- #: Application/Backend/View/PostOptionList.php:58
352
- msgid "List To Others"
353
  msgstr ""
354
 
355
- #: Application/Backend/View/PostOptionList.php:18
356
  #, php-format
357
  msgid ""
358
- "Hide %s for all except author (whoever created %s or was assigned on the "
359
- "Author metabox). Access with a direct URL will be still allowed. When there "
360
- "are more than 500 posts, this option may not be applied immediately because, "
361
- "for performance reasons, AAM checks limited number of posts per request."
362
  msgstr ""
363
 
364
- #: Application/Backend/View/PostOptionList.php:21
365
- msgid "Read"
366
  msgstr ""
367
 
368
- #: Application/Backend/View/PostOptionList.php:22
369
- #, php-format
370
- msgid ""
371
- "Restrict access to read %s. Any attempts to read, view or open %s will "
372
- "result in redirecting user based on the Access Denied Redirect rule."
373
  msgstr ""
374
 
375
- #: Application/Backend/View/PostOptionList.php:25
376
- msgid "Read By Others"
 
377
  msgstr ""
378
 
379
- #: Application/Backend/View/PostOptionList.php:26
380
- #, php-format
381
- msgid ""
382
- "Restrict access to read %s for all except author (whoever created %s or was "
383
- "assigned on the Author metabox). Any attempts to read, view or open %s will "
384
- "result in redirecting user based on the Access Denied Redirect rule."
385
  msgstr ""
386
 
387
- #: Application/Backend/View/PostOptionList.php:29
388
- msgid "Limit"
 
389
  msgstr ""
390
 
391
- #: Application/Backend/View/PostOptionList.php:30
392
  #, php-format
393
  msgid ""
394
- "When checked, show defined on the Content Teaser tab teaser message instead "
395
- "of the %s content."
 
396
  msgstr ""
397
 
398
- #: Application/Backend/View/PostOptionList.php:33
399
  msgid "Comment"
400
  msgstr ""
401
 
402
- #: Application/Backend/View/PostOptionList.php:34
403
  #, php-format
404
  msgid "Restrict access to comment on %s when commenting feature is enabled."
405
  msgstr ""
406
 
407
- #: Application/Backend/View/PostOptionList.php:37
408
  msgid "Redirect"
409
  msgstr ""
410
 
411
- #: Application/Backend/View/PostOptionList.php:38
412
- #, php-format
413
- msgid "Redirect to: %s"
414
- msgstr ""
415
-
416
- #: Application/Backend/View/PostOptionList.php:38
417
- #: Application/Backend/View/PostOptionList.php:43
418
- #: Application/Backend/View/PostOptionList.php:48
419
- msgid "change"
420
  msgstr ""
421
 
422
- #: Application/Backend/View/PostOptionList.php:39
423
  #, php-format
424
  msgid ""
425
- "Redirect user to defined location when user tries to read the %s. Define "
426
- "either valid full URL or public page ID within the website."
 
427
  msgstr ""
428
 
429
- #: Application/Backend/View/PostOptionList.php:42
430
  msgid "Password Protected"
431
  msgstr ""
432
 
433
- #: Application/Backend/View/PostOptionList.php:43
434
- #, php-format
435
- msgid "Password: %s"
436
  msgstr ""
437
 
438
- #: Application/Backend/View/PostOptionList.php:44
439
  #, php-format
440
- msgid ""
441
- "Add the password protection for the %s. Available with WordPress 4.7.0 or "
442
- "higher."
443
  msgstr ""
444
 
445
- #: Application/Backend/View/PostOptionList.php:47
446
  msgid "Access Expiration"
447
  msgstr ""
448
 
449
- #: Application/Backend/View/PostOptionList.php:48
450
- #, php-format
451
- msgid "Expires: %s"
452
  msgstr ""
453
 
454
- #: Application/Backend/View/PostOptionList.php:49
455
  #, php-format
456
- msgid "Define when access is expired for %s."
457
  msgstr ""
458
 
459
- #: Application/Backend/View/PostOptionList.php:49
460
  #, php-format
461
  msgid ""
462
- "After the expiration date, the access to READ will be denied unless this "
463
- "behavior is overwritten in ConfigPress. For more information %scheck this "
464
- "article%s or "
465
  msgstr ""
466
 
467
- #: Application/Backend/View/PostOptionList.php:49
468
  #, php-format
469
  msgid " %ssee in action.%s"
470
  msgstr ""
471
 
472
- #: Application/Backend/View/PostOptionList.php:55
473
- #, php-format
474
- msgid ""
475
- "Hide %s however access with a direct URL is still allowed. When there are "
476
- "more than 500 posts, this option may not be applied immediately because, for "
477
- "performance reasons, AAM checks limited number of posts per request."
478
  msgstr ""
479
 
480
- #: Application/Backend/View/PostOptionList.php:59
481
- #, php-format
482
- msgid ""
483
- "Hide %s for all except author (whoever created %s or was assigned on the "
484
- "Author metabox). Access with a direct URL is still allowed. When there are "
485
- "more than 500 posts, this option may not be applied immediately because, for "
486
- "performance reasons, AAM checks limited number of posts per request."
487
  msgstr ""
488
 
489
- #: Application/Backend/View/PostOptionList.php:63
490
  #, php-format
491
  msgid ""
492
- "Restrict access to edit %s. Any attempts to edit %s will result in "
493
- "redirecting user based on the Access Denied Redirect rule."
494
- msgstr ""
495
-
496
- #: Application/Backend/View/PostOptionList.php:66
497
- msgid "Edit By Others"
498
  msgstr ""
499
 
500
- #: Application/Backend/View/PostOptionList.php:67
501
  #, php-format
502
  msgid ""
503
- "Restrict access to edit %s for all except author (whoever created %s or was "
504
- "assigned on the Author metabox). Any attempts to edit %s will result in "
505
  "redirecting user based on the Access Denied Redirect rule."
506
  msgstr ""
507
 
508
- #: Application/Backend/View/PostOptionList.php:70
509
- #: Application/Backend/phtml/index.phtml:162
510
- #: Application/Backend/phtml/object/capability.phtml:106
511
  msgid "Delete"
512
  msgstr ""
513
 
514
- #: Application/Backend/View/PostOptionList.php:71
515
  #, php-format
516
  msgid "Restrict access to trash or permanently delete %s."
517
  msgstr ""
518
 
519
- #: Application/Backend/View/PostOptionList.php:74
520
- msgid "Delete By Others"
521
- msgstr ""
522
-
523
- #: Application/Backend/View/PostOptionList.php:75
524
- #, php-format
525
- msgid ""
526
- "Restrict access to trash or permanently delete %s for all except author "
527
- "(whoever created %s or was assigned on the Author metabox)."
528
- msgstr ""
529
-
530
- #: Application/Backend/View/PostOptionList.php:78
531
  msgid "Publish"
532
  msgstr ""
533
 
534
- #: Application/Backend/View/PostOptionList.php:79
535
  #, php-format
536
  msgid ""
537
- "Restrict access to publish %s. User will be allowed only submit for review. "
538
- "Quick Edit inline action is also removed from the list page."
539
  msgstr ""
540
 
541
- #: Application/Backend/View/PostOptionList.php:82
542
- msgid "Publish By Others"
543
  msgstr ""
544
 
545
- #: Application/Backend/View/PostOptionList.php:83
546
- #, php-format
547
- msgid ""
548
- "Restrict access to publish %s for all except author (whoever created %s or "
549
- "was assigned on the Author metabox). User will be allowed only submit for "
550
- "review. Quick Edit inline action is also removed from the list page."
551
  msgstr ""
552
 
553
- #: Application/Backend/View/SecurityOptionList.php:12
554
- msgid "Login Timeout"
 
555
  msgstr ""
556
 
557
- #: Application/Backend/View/SecurityOptionList.php:13
558
- #, php-format
559
- msgid ""
560
- "Delay the login process for %s second to significantly reduce the chance for "
561
- "brute force or dictionary attack."
562
  msgstr ""
563
 
564
- #: Application/Backend/View/SecurityOptionList.php:17
565
- msgid "Track IP Address"
566
  msgstr ""
567
 
568
- #: Application/Backend/View/SecurityOptionList.php:18
569
- msgid ""
570
- "Track the IP address for the last successful user login and trigger double "
571
- "authentication via email when the same username/password combination is used "
572
- "to login from a different IP address."
573
- msgstr ""
574
-
575
- #: Application/Backend/View/SecurityOptionList.php:22
576
- msgid "Brute Force Lockout"
577
  msgstr ""
578
 
579
- #: Application/Backend/View/SecurityOptionList.php:23
580
  #, php-format
581
  msgid ""
582
- "Automatically reject login attempts if number of unsuccessful login attempts "
583
- "is more than %s over the period of %s."
584
- msgstr ""
585
-
586
- #: Application/Backend/View/UtilityOptionList.php:12
587
- msgid "Edit/Delete Capabilities"
588
- msgstr ""
589
-
590
- #: Application/Backend/View/UtilityOptionList.php:18
591
- msgid "Backend Access Control"
592
- msgstr ""
593
-
594
- #: Application/Backend/View/UtilityOptionList.php:19
595
- msgid ""
596
- "Allow AAM to manage access to backend resources. If there is no need to "
597
- "manage access to the website backend then keep this option unchecked as it "
598
- "may increase your webiste performance."
599
- msgstr ""
600
-
601
- #: Application/Backend/View/UtilityOptionList.php:24
602
- msgid "Frontend Access Control"
603
- msgstr ""
604
-
605
- #: Application/Backend/View/UtilityOptionList.php:25
606
- msgid ""
607
- "Allow AAM to manage access to frontend resources. If there is no need to "
608
- "manage access to the website frontend then keep this option unchecked as it "
609
- "may increase your webiste performance."
610
  msgstr ""
611
 
612
- #: Application/Backend/View/UtilityOptionList.php:30
613
- msgid "Media Files Access Control"
614
- msgstr ""
615
-
616
- #: Application/Backend/View/UtilityOptionList.php:36
617
- msgid "Check Post Visibility"
618
- msgstr ""
619
-
620
- #: Application/Backend/View/UtilityOptionList.php:37
621
- msgid ""
622
- "For performance reasons, keep this option uncheck if do not use LIST or LIST "
623
- "TO OTHERS access options on Posts & Pages tab. When it is checked, AAM will "
624
- "filter list of posts that are hidden for a user on both frontend and backend."
625
- msgstr ""
626
-
627
- #: Application/Backend/View/UtilityOptionList.php:42
628
- msgid "Manage Hidden Post Types"
629
- msgstr ""
630
-
631
- #: Application/Backend/View/UtilityOptionList.php:43
632
- msgid ""
633
- "By default AAM allows you to manage access only to public post types on "
634
- "Posts & Pages tab. By enabling this feature, you also will be able to manage "
635
- "access to hidden post types like revisions, navigation menus or any other "
636
- "custom post types that are not registered as public."
637
- msgstr ""
638
-
639
- #: Application/Backend/View/UtilityOptionList.php:48
640
- msgid "Render Access Manager Metabox"
641
- msgstr ""
642
-
643
- #: Application/Backend/View/UtilityOptionList.php:49
644
- msgid ""
645
- "Render Access Manager metabox on all post and category edit pages. Access "
646
- "Manager metabox is the quick way to manage access to any post or category "
647
- "without leaving an edit page."
648
- msgstr ""
649
-
650
- #: Application/Backend/View/UtilityOptionList.php:54
651
- msgid "Show Access Link"
652
- msgstr ""
653
-
654
- #: Application/Backend/View/UtilityOptionList.php:55
655
- msgid ""
656
- "Show Access shortcut link under any post, page, custom post type, category, "
657
- "custom taxonomy title or user name."
658
- msgstr ""
659
-
660
- #: Application/Extension/Repository.php:276
661
  #, php-format
662
  msgid "Failed to create %s"
663
  msgstr ""
664
 
665
- #: Application/Extension/Repository.php:280
666
  #, php-format
667
  msgid "Directory %s is not writable"
668
  msgstr ""
669
 
670
- #: Application/Frontend/Manager.php:104
671
- msgid "Access denied. Please login to get access."
672
  msgstr ""
673
 
674
- #: Application/Frontend/Manager.php:261
675
- #, php-format
676
- msgid "[%s] Double Authentication"
677
  msgstr ""
678
 
679
- #: Application/Frontend/Manager.php:263
680
- #, php-format
681
- msgid "Someone was trying to login from the different IP address %s:"
682
  msgstr ""
683
 
684
- #: Application/Frontend/Manager.php:264
685
- #, php-format
686
- msgid "Website: %s"
687
  msgstr ""
688
 
689
- #: Application/Frontend/Manager.php:265
690
- #, php-format
691
- msgid "Username: %s"
692
  msgstr ""
693
 
694
- #: Application/Frontend/Manager.php:266
695
- msgid "Visit the following address to authorize the login:"
696
  msgstr ""
697
 
698
- #: Application/Shortcode/Factory.php:52
699
- msgid "No valid strategy found for the given context"
 
700
  msgstr ""
701
 
702
- #: aam.php:176
703
- msgid "PHP 5.2 or higher is required."
704
  msgstr ""
705
 
706
- #: aam.php:178
707
- msgid "WP 3.8 or higher is required."
708
  msgstr ""
709
 
710
- #: media/js/aam-interface.js:190
711
- msgid "Clone Role"
712
  msgstr ""
713
 
714
- #: media/js/aam-interface.js:658
715
- msgid "Switch To User"
716
  msgstr ""
717
 
718
- #: media/js/aam-interface.js:950
719
- msgid "Processing"
720
  msgstr ""
721
 
722
- #: media/js/aam-interface.js:958
723
- msgid "Failed to initialize URL"
724
  msgstr ""
725
 
726
- #: media/js/aam-interface.js:966
727
- #: Application/Backend/phtml/object/metabox.phtml:93
728
- msgid "Initialize"
729
  msgstr ""
730
 
731
- #: media/js/aam-interface.js:1078
 
 
 
 
732
  msgid "Nothing to show"
733
  msgstr ""
734
 
735
- #: media/js/aam-interface.js:1233
736
  msgid "Failed to update capability"
737
  msgstr ""
738
 
739
- #: media/js/aam-interface.js:1241
740
- #: Application/Backend/phtml/object/capability.phtml:78
741
  msgid "Update Capability"
742
  msgstr ""
743
 
744
- #: media/js/aam-interface.js:1274
745
  msgid "Failed to delete capability"
746
  msgstr ""
747
 
748
- #: media/js/aam-interface.js:1282
749
- #: Application/Backend/phtml/object/capability.phtml:100
750
  msgid "Delete Capability"
751
  msgstr ""
752
 
753
- #: media/js/aam-interface.js:1629
754
  msgid "Drill-Down"
755
  msgstr ""
756
 
757
- #: media/js/aam-interface.js:1782 media/js/aam-interface.js:1828
758
- #: media/js/aam-interface.js:1873
759
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
760
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
761
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:64
762
- msgid "Set"
763
- msgstr ""
764
-
765
- #: media/js/aam-interface.js:1965 media/js/aam-interface.js:2065
766
- #: media/js/aam-interface.js:2159 media/js/aam-interface.js:2245
767
- #: media/js/aam-interface.js:2467 media/js/aam-interface.js:2501
768
- #: media/js/aam-interface.js:2522 media/js/aam-interface.js:2560
769
- #: media/js/aam-interface.js:2697
770
- msgid "Application Error"
771
- msgstr ""
772
-
773
- #: media/js/aam-interface.js:2690
774
- msgid "Your are subscribed now!"
775
  msgstr ""
776
 
777
- #: Application/Backend/phtml/404redirect.phtml:33
778
- #: Application/Backend/phtml/object/login-redirect.phtml:43
779
- #: Application/Backend/phtml/object/logout-redirect.phtml:43
780
- #: Application/Backend/phtml/object/redirect.phtml:67
781
- #: Application/Backend/phtml/object/redirect.phtml:119
782
- msgid "Existing Page"
783
  msgstr ""
784
 
785
- #: Application/Backend/phtml/404redirect.phtml:42
786
- #: Application/Backend/phtml/object/login-redirect.phtml:52
787
- #: Application/Backend/phtml/object/logout-redirect.phtml:52
788
- #: Application/Backend/phtml/object/redirect.phtml:76
789
- #: Application/Backend/phtml/object/redirect.phtml:128
790
- msgid "-- Select Page --"
791
  msgstr ""
792
 
793
- #: Application/Backend/phtml/404redirect.phtml:48
794
- #: Application/Backend/phtml/object/login-redirect.phtml:58
795
- #: Application/Backend/phtml/object/logout-redirect.phtml:58
796
- #: Application/Backend/phtml/object/redirect.phtml:82
797
- #: Application/Backend/phtml/object/redirect.phtml:134
798
- msgid "The URL"
799
  msgstr ""
800
 
801
- #: Application/Backend/phtml/404redirect.phtml:53
802
- #: Application/Backend/phtml/object/login-redirect.phtml:63
803
- #: Application/Backend/phtml/object/logout-redirect.phtml:63
804
- #: Application/Backend/phtml/object/redirect.phtml:87
805
- #: Application/Backend/phtml/object/redirect.phtml:139
806
- msgid "PHP Callback Function"
807
  msgstr ""
808
 
809
- #: Application/Backend/phtml/contact.phtml:6
810
- msgid ""
811
- "Contact us if you have any questions or concerns but follow few simple rules:"
812
  msgstr ""
813
 
814
- #: Application/Backend/phtml/extension.phtml:11
815
  msgid "Install/Update Extension"
816
  msgstr ""
817
 
818
- #: Application/Backend/phtml/extension.phtml:15
819
  msgid "License Key"
820
  msgstr ""
821
 
822
- #: Application/Backend/phtml/extension.phtml:19
823
- #: Application/Backend/phtml/index.phtml:278
824
  msgid "Submit"
825
  msgstr ""
826
 
827
- #: Application/Backend/phtml/extension.phtml:28
828
  msgid "Premium"
829
  msgstr ""
830
 
831
- #: Application/Backend/phtml/extension.phtml:29
832
- #: Application/Backend/phtml/extension.phtml:73
833
  msgid "Free"
834
  msgstr ""
835
 
836
- #: Application/Backend/phtml/extension.phtml:53
837
- #: Application/Backend/phtml/extension.phtml:80
838
- msgid "Installed"
839
  msgstr ""
840
 
841
- #: Application/Backend/phtml/extension.phtml:57
842
- msgid "Inactive"
 
843
  msgstr ""
844
 
845
- #: Application/Backend/phtml/extension.phtml:59
 
 
 
 
 
 
846
  msgid "Read More"
847
  msgstr ""
848
 
849
- #: Application/Backend/phtml/extension.phtml:84
850
- #: Application/Backend/phtml/extension.phtml:115
851
  msgid "Download"
852
  msgstr ""
853
 
854
- #: Application/Backend/phtml/extension.phtml:99
855
- #: Application/Backend/phtml/extension.phtml:126
856
- #: Application/Backend/phtml/extension.phtml:137
857
- #: Application/Backend/phtml/index.phtml:111
858
- #: Application/Backend/phtml/index.phtml:123
859
- #: Application/Backend/phtml/index.phtml:133
860
- #: Application/Backend/phtml/index.phtml:145
861
- #: Application/Backend/phtml/index.phtml:155
862
- #: Application/Backend/phtml/index.phtml:163
863
- #: Application/Backend/phtml/object/capability.phtml:56
864
- #: Application/Backend/phtml/object/capability.phtml:67
865
- #: Application/Backend/phtml/object/capability.phtml:77
866
- #: Application/Backend/phtml/object/capability.phtml:89
867
- #: Application/Backend/phtml/object/capability.phtml:99
868
- #: Application/Backend/phtml/object/capability.phtml:107
869
- #: Application/Backend/phtml/object/menu.phtml:82
870
- #: Application/Backend/phtml/object/metabox.phtml:80
871
- #: Application/Backend/phtml/object/metabox.phtml:94
872
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
873
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:17
874
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:27
875
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:38
876
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:48
877
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:65
878
- #: Application/Backend/phtml/utility.phtml:111
 
 
 
 
 
 
879
  msgid "Close"
880
  msgstr ""
881
 
882
- #: Application/Backend/phtml/extension.phtml:100
883
  msgid "Notification"
884
  msgstr ""
885
 
886
- #: Application/Backend/phtml/extension.phtml:104
887
  msgid ""
888
  "Extension requires manual installation. Please follow few simple steps below."
889
  msgstr ""
890
 
891
- #: Application/Backend/phtml/extension.phtml:116
892
- #: Application/Backend/phtml/utility.phtml:119
893
  msgid "Cancel"
894
  msgstr ""
895
 
896
- #: Application/Backend/phtml/extension.phtml:127
897
  msgid "Install Extension"
898
  msgstr ""
899
 
900
- #: Application/Backend/phtml/extension.phtml:131
901
  msgid ""
902
  "Insert license key that you recieved after the payment (find the email "
903
  "example below). It might take up to 2 hours to process the payment. Please "
@@ -905,7 +820,7 @@ msgid ""
905
  msgstr ""
906
 
907
  #: Application/Backend/phtml/frame.phtml:62
908
- #: Application/Backend/phtml/index.phtml:177
909
  msgid "Username"
910
  msgstr ""
911
 
@@ -915,7 +830,7 @@ msgid "Manage access to %s for visitors (any user that is not authenticated)"
915
  msgstr ""
916
 
917
  #: Application/Backend/phtml/frame.phtml:75
918
- #: Application/Backend/phtml/index.phtml:190
919
  msgid "Manage Visitors"
920
  msgstr ""
921
 
@@ -927,415 +842,494 @@ msgid ""
927
  msgstr ""
928
 
929
  #: Application/Backend/phtml/frame.phtml:84
930
- #: Application/Backend/phtml/index.phtml:198
931
  msgid "Manage Default Access"
932
  msgstr ""
933
 
934
  #: Application/Backend/phtml/frame.phtml:100
935
- #: Application/Backend/phtml/object/menu.phtml:14
936
- #: Application/Backend/phtml/object/metabox.phtml:12
937
- #: Application/Backend/phtml/object/post.phtml:35
938
  msgid "Settings are customized"
939
  msgstr ""
940
 
941
  #: Application/Backend/phtml/frame.phtml:101
942
- #: Application/Backend/phtml/object/capability.phtml:34
943
- #: Application/Backend/phtml/object/menu.phtml:15
944
- #: Application/Backend/phtml/object/metabox.phtml:13
945
- #: Application/Backend/phtml/object/post.phtml:36
946
  msgid "Reset To Default"
947
  msgstr ""
948
 
949
- #: Application/Backend/phtml/frame.phtml:116
950
- #: Application/Backend/phtml/object/post.phtml:73
951
  msgid "Frontend"
952
  msgstr ""
953
 
 
 
 
 
 
 
 
954
  #: Application/Backend/phtml/index.phtml:14
955
- msgid "Access Control Panel"
956
  msgstr ""
957
 
958
- #: Application/Backend/phtml/index.phtml:21
959
  msgid ""
960
  "Appreciate your interest in Advanced Access Manager (AAM). With strong "
961
  "knowledge and experience in WordPress, AAM becomes a very powerful tool to "
962
  "manage access to your frontend and backend."
963
  msgstr ""
964
 
965
- #: Application/Backend/phtml/index.phtml:22
966
  msgid "Please Note!"
967
  msgstr ""
968
 
969
- #: Application/Backend/phtml/index.phtml:23
970
  msgid ""
971
  "AAM was thoroughly tested on the fresh installation of WordPress and in the "
972
  "latest versions of Chrome, Safari, IE and Firefox. If you have any issues, "
973
  "the most typical case is the conflict with other plugins or themes."
974
  msgstr ""
975
 
976
- #: Application/Backend/phtml/index.phtml:24
977
  #, php-format
978
  msgid ""
979
  "Check our %sHelp%s section to find some useful articles about AAM "
980
  "functionality or %scontact us%s directly."
981
  msgstr ""
982
 
983
- #: Application/Backend/phtml/index.phtml:38
984
  msgid "Notifications"
985
  msgstr ""
986
 
987
- #: Application/Backend/phtml/index.phtml:57
988
  msgid "AAM Multisite"
989
  msgstr ""
990
 
991
- #: Application/Backend/phtml/index.phtml:61
992
  msgid "Install AAM Multisite"
993
  msgstr ""
994
 
995
- #: Application/Backend/phtml/index.phtml:72
996
- msgid "Users/Roles Panel"
997
  msgstr ""
998
 
999
- #: Application/Backend/phtml/index.phtml:79
1000
- #: Application/Backend/phtml/index.phtml:210
1001
  msgid "Roles"
1002
  msgstr ""
1003
 
1004
- #: Application/Backend/phtml/index.phtml:85
1005
- #: Application/Backend/phtml/index.phtml:220
1006
  msgid "Visitor"
1007
  msgstr ""
1008
 
1009
- #: Application/Backend/phtml/index.phtml:88
1010
- #: Application/Backend/phtml/index.phtml:225
1011
  msgid "Default"
1012
  msgstr ""
1013
 
1014
- #: Application/Backend/phtml/index.phtml:100
1015
- #: Application/Backend/phtml/index.phtml:178
1016
  msgid "Action"
1017
  msgstr ""
1018
 
1019
- #: Application/Backend/phtml/index.phtml:112
1020
  msgid "Create Role"
1021
  msgstr ""
1022
 
1023
- #: Application/Backend/phtml/index.phtml:116
1024
- #: Application/Backend/phtml/index.phtml:138
1025
  msgid "Role Name"
1026
  msgstr ""
1027
 
1028
- #: Application/Backend/phtml/index.phtml:117
1029
- #: Application/Backend/phtml/index.phtml:139
1030
  msgid "Enter Role Name"
1031
  msgstr ""
1032
 
1033
- #: Application/Backend/phtml/index.phtml:134
 
 
 
 
 
 
 
 
 
 
1034
  msgid "Update Role"
1035
  msgstr ""
1036
 
1037
- #: Application/Backend/phtml/index.phtml:159
1038
  #, php-format
1039
  msgid "Are you sure that you want to delete the %s role?"
1040
  msgstr ""
1041
 
1042
- #: Application/Backend/phtml/index.phtml:189
1043
  msgid ""
1044
  "Manage access to your website for visitors (any user that is not "
1045
  "authenticated)"
1046
  msgstr ""
1047
 
1048
- #: Application/Backend/phtml/index.phtml:197
1049
  msgid ""
1050
  "Manage default access to your website resources for all users, roles and "
1051
  "visitor. This includes Administrator role and your user"
1052
  msgstr ""
1053
 
1054
- #: Application/Backend/phtml/index.phtml:211
1055
  msgid ""
1056
  "With Roles tab you can manage access for any defined role, edit role's name, "
1057
  "create new role or even delete existing (but only when there is no users "
1058
  "assigned to it). You are not allowed to delete Administrator role."
1059
  msgstr ""
1060
 
1061
- #: Application/Backend/phtml/index.phtml:216
1062
  msgid ""
1063
  "Manage access for any user. As a bonus feature, you can block user. It means "
1064
  "that user will be not able to login to your website anymore."
1065
  msgstr ""
1066
 
1067
- #: Application/Backend/phtml/index.phtml:221
1068
  msgid ""
1069
  "Visitor can be considered any user that is not authenticated to your website."
1070
  msgstr ""
1071
 
1072
- #: Application/Backend/phtml/index.phtml:226
1073
  msgid ""
1074
  "Manage default access settings to your website resources for all users, "
1075
  "roles and visitors."
1076
  msgstr ""
1077
 
1078
- #: Application/Backend/phtml/index.phtml:270
1079
- msgid "Subscribe to updates"
1080
  msgstr ""
1081
 
1082
- #: Application/Backend/phtml/index.phtml:270
1083
- msgid "Get once a month the email with the latest AAM features and promo-codes"
 
 
 
 
1084
  msgstr ""
1085
 
1086
- #: Application/Backend/phtml/index.phtml:274
1087
- msgid "Your Email Address"
 
 
 
 
1088
  msgstr ""
1089
 
1090
- #: Application/Backend/phtml/main-panel.phtml:26
1091
- msgid "You are not allowed to manage any of the existing features."
 
 
 
 
 
 
 
 
 
 
 
 
1092
  msgstr ""
1093
 
1094
- #: Application/Backend/phtml/object/capability.phtml:16
1095
  msgid "Filter"
1096
  msgstr ""
1097
 
1098
- #: Application/Backend/phtml/object/capability.phtml:23
1099
  msgid "All Capabilities"
1100
  msgstr ""
1101
 
1102
- #: Application/Backend/phtml/object/capability.phtml:33
1103
  msgid "Capabilities are customized"
1104
  msgstr ""
1105
 
1106
- #: Application/Backend/phtml/object/capability.phtml:44
1107
  msgid "Category"
1108
  msgstr ""
1109
 
1110
- #: Application/Backend/phtml/object/capability.phtml:45
1111
- #: Application/Backend/phtml/object/capability.phtml:61
1112
- #: Application/Backend/phtml/object/capability.phtml:82
1113
  msgid "Capability"
1114
  msgstr ""
1115
 
1116
- #: Application/Backend/phtml/object/capability.phtml:46
1117
- #: Application/Backend/phtml/object/post.phtml:52
1118
  msgid "Actions"
1119
  msgstr ""
1120
 
1121
- #: Application/Backend/phtml/object/capability.phtml:57
1122
  msgid "Create Capability"
1123
  msgstr ""
1124
 
1125
- #: Application/Backend/phtml/object/capability.phtml:62
1126
- #: Application/Backend/phtml/object/capability.phtml:83
1127
  msgid "Enter Capability"
1128
  msgstr ""
1129
 
1130
- #: Application/Backend/phtml/object/capability.phtml:103
1131
  #, php-format
1132
  msgid "Are you sure that you want to delete %s capability for all roles?"
1133
  msgstr ""
1134
 
1135
- #: Application/Backend/phtml/object/login-redirect.phtml:27
1136
- #: Application/Backend/phtml/object/logout-redirect.phtml:27
1137
  msgid "WordPress default behavior"
1138
  msgstr ""
1139
 
1140
- #: Application/Backend/phtml/object/menu.phtml:83
1141
  msgid "Dashboard Lockdown"
1142
  msgstr ""
1143
 
1144
- #: Application/Backend/phtml/object/menu.phtml:86
1145
  msgid "You cannot restrict access to Dashboard home page."
1146
  msgstr ""
1147
 
1148
- #: Application/Backend/phtml/object/menu.phtml:88
1149
- #, php-format
1150
- msgid ""
1151
- "Dashboard home page is the default page every user is redirected after "
1152
- "login. If you need to lockdown user from the entire website dashboard, "
1153
- "%splease check this article%s."
1154
- msgstr ""
1155
-
1156
- #: Application/Backend/phtml/object/menu.phtml:91
1157
  msgid "OK"
1158
  msgstr ""
1159
 
1160
- #: Application/Backend/phtml/object/metabox.phtml:4
1161
  msgid "Refresh"
1162
  msgstr ""
1163
 
1164
- #: Application/Backend/phtml/object/metabox.phtml:5
1165
  msgid "Init URL"
1166
  msgstr ""
1167
 
1168
- #: Application/Backend/phtml/object/metabox.phtml:37
1169
  msgid "Dashboard Widgets"
1170
  msgstr ""
1171
 
1172
- #: Application/Backend/phtml/object/metabox.phtml:41
1173
  msgid "Frontend Widgets"
1174
  msgstr ""
1175
 
1176
- #: Application/Backend/phtml/object/metabox.phtml:71
1177
  msgid "The list is not initialized. Click Refresh button above."
1178
  msgstr ""
1179
 
1180
- #: Application/Backend/phtml/object/metabox.phtml:81
1181
  msgid "Initialize URL"
1182
  msgstr ""
1183
 
1184
- #: Application/Backend/phtml/object/metabox.phtml:85
1185
  msgid ""
1186
- "Some metaboxes are conditional and appear on an edit screen when certain "
1187
- "conditions are met. For example metabox \"Comments\" appears only for "
1188
- "existing page and not for new page. That is why if you do not see a desired "
1189
- "metabox below, try to copy & paste full URL to an edit screen where that "
1190
- "metabox appears."
1191
  msgstr ""
1192
 
1193
- #: Application/Backend/phtml/object/metabox.phtml:88
1194
  msgid "Backend page URL"
1195
  msgstr ""
1196
 
1197
- #: Application/Backend/phtml/object/metabox.phtml:89
1198
  msgid "Insert valid URL"
1199
  msgstr ""
1200
 
1201
- #: Application/Backend/phtml/object/post.phtml:15
1202
  #, php-format
1203
  msgid ""
1204
  "Manage access to posts, pages and custom post types. For more information "
1205
- "about this functionality check %sWhat is a WordPress post%s article."
 
1206
  msgstr ""
1207
 
1208
- #: Application/Backend/phtml/object/post.phtml:25
1209
  msgid "Root"
1210
  msgstr ""
1211
 
1212
- #: Application/Backend/phtml/object/post.phtml:51
1213
  msgid "Title"
1214
  msgstr ""
1215
 
1216
- #: Application/Backend/phtml/object/post.phtml:60
1217
- #: Application/Backend/phtml/object/post.phtml:65
1218
- #: Application/Backend/phtml/object/post.phtml:120
 
 
 
1219
  msgid "Go Back"
1220
  msgstr ""
1221
 
1222
- #: Application/Backend/phtml/object/redirect.phtml:25
1223
  msgid "Frontend Redirect"
1224
  msgstr ""
1225
 
1226
- #: Application/Backend/phtml/object/redirect.phtml:26
1227
  msgid "Backend Redirect"
1228
  msgstr ""
1229
 
1230
- #: Application/Backend/phtml/object/redirect.phtml:62
1231
- #: Application/Backend/phtml/object/redirect.phtml:114
1232
  msgid "Customized Message"
1233
  msgstr ""
1234
 
1235
- #: Application/Backend/phtml/object/redirect.phtml:63
1236
- #: Application/Backend/phtml/object/redirect.phtml:115
1237
  msgid "Enter message..."
1238
  msgstr ""
1239
 
1240
- #: Application/Backend/phtml/object/teaser.phtml:25
1241
- msgid "Teaser Message"
1242
- msgstr ""
1243
-
1244
- #: Application/Backend/phtml/object/teaser.phtml:26
1245
- msgid "Enter teaser message..."
1246
  msgstr ""
1247
 
1248
- #: Application/Backend/phtml/object/teaser.phtml:31
1249
- msgid "Add excerpt before teaser message"
1250
  msgstr ""
1251
 
1252
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:7
1253
  msgid "Set Password"
1254
  msgstr ""
1255
 
1256
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:11
1257
- msgid "Password"
1258
- msgstr ""
1259
-
1260
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:12
1261
  msgid "Enter Password"
1262
  msgstr ""
1263
 
1264
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:28
1265
- msgid "Set Redirect"
1266
  msgstr ""
1267
 
1268
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:32
1269
- msgid "Valid URL, Page ID or PHP callback function"
1270
  msgstr ""
1271
 
1272
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:33
1273
- msgid "Enter Redirect"
1274
  msgstr ""
1275
 
1276
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:49
1277
  msgid "Set Expiration"
1278
  msgstr ""
1279
 
1280
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:59
1281
  msgid "Enter expiration critiria"
1282
  msgstr ""
1283
 
1284
- #: Application/Backend/phtml/partial/post-advanced-settings.phtml:60
1285
  msgid "Enter critiria"
1286
  msgstr ""
1287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1288
  #: Application/Backend/phtml/partial/role-inheritance.phtml:3
1289
  msgid "Inherit Capabilities From"
1290
  msgstr ""
1291
 
1292
- #: Application/Backend/phtml/security.phtml:30
1293
- msgid ""
1294
- "Improve your website security and keep your website error free with "
1295
- "CodePinch."
1296
  msgstr ""
1297
 
1298
- #: Application/Backend/phtml/utility.phtml:4
1299
- msgid "AAM Core"
1300
  msgstr ""
1301
 
1302
- #: Application/Backend/phtml/utility.phtml:5
1303
- msgid "Posts Access"
 
 
 
1304
  msgstr ""
1305
 
1306
- #: Application/Backend/phtml/utility.phtml:6
1307
- msgid "Tools"
 
 
 
 
1308
  msgstr ""
1309
 
1310
- #: Application/Backend/phtml/utility.phtml:54
1311
  msgid "Clear Cache"
1312
  msgstr ""
1313
 
1314
- #: Application/Backend/phtml/utility.phtml:56
1315
  msgid "Clear all AAM cache."
1316
  msgstr ""
1317
 
1318
- #: Application/Backend/phtml/utility.phtml:65
1319
  msgid "Clear All Settings"
1320
  msgstr ""
1321
 
1322
- #: Application/Backend/phtml/utility.phtml:67
1323
- msgid ""
1324
- "Remove all the settings related to AAM (including all extension licenses)."
1325
- msgstr ""
1326
-
1327
- #: Application/Backend/phtml/utility.phtml:97
1328
- msgid "No miscellaneous options found."
1329
  msgstr ""
1330
 
1331
- #: Application/Backend/phtml/utility.phtml:112
1332
  msgid "Clear all settings"
1333
  msgstr ""
1334
 
1335
- #: Application/Backend/phtml/utility.phtml:115
1336
  msgid "All AAM settings will be removed."
1337
  msgstr ""
1338
 
1339
- #: Application/Backend/phtml/utility.phtml:118
1340
- msgid "Clear"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1341
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: AAM\n"
5
+ "POT-Creation-Date: 2017-11-26 16:25-0500\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: WPAAM <support@wpaam.com>\n"
8
  "Language-Team: WP AAM <vasyl@vasyltech.com>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.4\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __\n"
17
  "X-Poedit-Basepath: ..\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
+ #: Application/Backend/Feature/Extension/Manager.php:106
21
+ msgid "Enter license key to update extension."
22
  msgstr ""
23
 
24
+ #: Application/Backend/Feature/Main/404Redirect.php:53
25
+ msgid "404 Redirect"
 
 
26
  msgstr ""
27
 
28
+ #: Application/Backend/Feature/Main/Capability.php:98
29
  msgid "Capability already exists"
30
  msgstr ""
31
 
32
+ #: Application/Backend/Feature/Main/Capability.php:127
33
  msgid "Can not remove the capability"
34
  msgstr ""
35
 
36
+ #: Application/Backend/Feature/Main/Capability.php:218
37
+ #: Application/Backend/Feature/Main/Capability.php:259
38
  msgid "System"
39
  msgstr ""
40
 
41
+ #: Application/Backend/Feature/Main/Capability.php:219
42
+ #: Application/Backend/Feature/Main/Capability.php:261
43
+ #: Application/Backend/Feature/Main/Post.php:549
44
  msgid "Posts & Pages"
45
  msgstr ""
46
 
47
+ #: Application/Backend/Feature/Main/Capability.php:220
48
+ #: Application/Backend/Feature/Main/Capability.php:263
49
+ #: Application/Backend/phtml/frame.phtml:145
50
+ #: Application/Backend/phtml/main/post.phtml:105
51
  msgid "Backend"
52
  msgstr ""
53
 
54
+ #: Application/Backend/Feature/Main/Capability.php:221
55
+ #: Application/Backend/Feature/Main/Capability.php:265
56
  msgid "AAM Interface"
57
  msgstr ""
58
 
59
+ #: Application/Backend/Feature/Main/Capability.php:222
60
+ #: Application/Backend/Feature/Main/Capability.php:267
 
61
  msgid "Miscellaneous"
62
  msgstr ""
63
 
64
+ #: Application/Backend/Feature/Main/Capability.php:299
65
  msgid "Capabilities"
66
  msgstr ""
67
 
68
+ #: Application/Backend/Feature/Main/LoginRedirect.php:73
69
+ msgid "Login Redirect"
70
  msgstr ""
71
 
72
+ #: Application/Backend/Feature/Main/LogoutRedirect.php:73
73
+ msgid "Logout Redirect"
74
  msgstr ""
75
 
76
+ #: Application/Backend/Feature/Main/Menu.php:195
77
+ msgid "Backend Menu"
78
  msgstr ""
79
 
80
+ #: Application/Backend/Feature/Main/Metabox.php:236
81
+ msgid "Metaboxes & Widgets"
82
  msgstr ""
83
 
84
+ #: Application/Backend/Feature/Main/Redirect.php:83
85
+ msgid "Access Denied Redirect"
86
  msgstr ""
87
 
88
+ #: Application/Backend/Feature/Settings/Content.php:32
89
+ msgid "Media Files Access Control"
90
  msgstr ""
91
 
92
+ #: Application/Backend/Feature/Settings/Content.php:37
93
+ msgid "Check Post Visibility"
94
  msgstr ""
95
 
96
+ #: Application/Backend/Feature/Settings/Content.php:38
97
+ msgid ""
98
+ "For performance reasons, keep this option uncheck if do not use LIST or LIST "
99
+ "TO OTHERS access options on Posts & Pages tab. When it is checked, AAM will "
100
+ "filter list of posts that are hidden for a user on both frontend and backend."
101
  msgstr ""
102
 
103
+ #: Application/Backend/Feature/Settings/Content.php:42
104
+ msgid "Manage Hidden Post Types"
105
  msgstr ""
106
 
107
+ #: Application/Backend/Feature/Settings/Content.php:43
108
+ msgid ""
109
+ "By default AAM allows you to manage access only to public post types on "
110
+ "Posts & Pages tab. By enabling this feature, you also will be able to manage "
111
+ "access to hidden post types like revisions, navigation menus or any other "
112
+ "custom post types that are not registered as public."
113
  msgstr ""
114
 
115
+ #: Application/Backend/Feature/Settings/Content.php:62
116
+ msgid "Content Settings"
117
  msgstr ""
118
 
119
+ #: Application/Backend/Feature/Settings/Core.php:32
120
+ msgid "Edit/Delete Capabilities"
121
  msgstr ""
122
 
123
+ #: Application/Backend/Feature/Settings/Core.php:37
124
+ msgid "Backend Access Control"
 
125
  msgstr ""
126
 
127
+ #: Application/Backend/Feature/Settings/Core.php:38
128
+ msgid ""
129
+ "Allow AAM to manage access to the backend. Keep this option disabled if "
130
+ "there is no needs to restrict backend features for other users. This option "
131
+ "may reduce your website backend performance."
132
  msgstr ""
133
 
134
+ #: Application/Backend/Feature/Settings/Core.php:42
135
+ msgid "Frontend Access Control"
136
  msgstr ""
137
 
138
+ #: Application/Backend/Feature/Settings/Core.php:43
139
+ msgid ""
140
+ "Allow AAM to manage access to frontend resources. If there is no need to "
141
+ "manage access to the website frontend then keep this option unchecked as it "
142
+ "may increase your webiste performance."
143
  msgstr ""
144
 
145
+ #: Application/Backend/Feature/Settings/Core.php:47
146
+ msgid "Render Access Manager Metabox"
147
+ msgstr ""
148
+
149
+ #: Application/Backend/Feature/Settings/Core.php:48
150
+ msgid ""
151
+ "Render Access Manager metabox on all post and category edit pages. Access "
152
+ "Manager metabox is the quick way to manage access to any post or category "
153
+ "without leaving an edit page."
154
+ msgstr ""
155
+
156
+ #: Application/Backend/Feature/Settings/Core.php:52
157
+ msgid "Render Access Link"
158
+ msgstr ""
159
+
160
+ #: Application/Backend/Feature/Settings/Core.php:53
161
+ msgid ""
162
+ "Render Access shortcut link under any post, page, custom post type, "
163
+ "category, custom taxonomy title or user name."
164
+ msgstr ""
165
+
166
+ #: Application/Backend/Feature/Settings/Core.php:57
167
+ msgid "Secure Login"
168
+ msgstr ""
169
+
170
+ #: Application/Backend/Feature/Settings/Core.php:58
171
+ msgid ""
172
+ "AAM comes with its own user login handler. With this feature you can add "
173
+ "AJAX login widget to your frontend page that significantly enhance your "
174
+ "website security."
175
+ msgstr ""
176
+
177
+ #: Application/Backend/Feature/Settings/Core.php:77
178
+ msgid "Core Settings"
179
+ msgstr ""
180
+
181
+ #: Application/Backend/Feature/Settings/Tools.php:102
182
+ msgid "Tools"
183
+ msgstr ""
184
+
185
+ #: Application/Backend/Manager.php:314
186
+ msgid "Access Manager"
187
+ msgstr ""
188
+
189
+ #: Application/Backend/Manager.php:401 Application/Backend/Manager.php:419
190
+ #: Application/Backend/Manager.php:442
191
+ msgid "Access"
192
+ msgstr ""
193
+
194
+ #: Application/Backend/Manager.php:592 Application/Backend/Manager.php:615
195
+ #: Application/Core/API.php:247
196
+ msgid "Access Denied"
197
+ msgstr ""
198
+
199
+ #: Application/Backend/View/Localization.php:26 media/js/aam.js:1140
200
  msgid "Search Capability"
201
  msgstr ""
202
 
203
+ #: Application/Backend/View/Localization.php:27 media/js/aam.js:1141
204
  msgid "_TOTAL_ capability(s)"
205
  msgstr ""
206
 
207
+ #: Application/Backend/View/Localization.php:28 media/js/aam.js:326
208
+ #: media/js/aam.js:387 media/js/aam.js:1243 media/js/aam.js:1287
209
+ #: media/js/aam.js:1805
 
210
  msgid "Saving..."
211
  msgstr ""
212
 
213
+ #: Application/Backend/View/Localization.php:29 media/js/aam.js:1251
214
  msgid "Failed to add new capability"
215
  msgstr ""
216
 
217
+ #: Application/Backend/View/Localization.php:30 media/js/aam.js:346
218
+ #: media/js/aam.js:399 media/js/aam.js:436 media/js/aam.js:530
219
+ #: media/js/aam.js:562 media/js/aam.js:958 media/js/aam.js:994
220
+ #: media/js/aam.js:1028 media/js/aam.js:1256 media/js/aam.js:1300
221
+ #: media/js/aam.js:1339 media/js/aam.js:1422 media/js/aam.js:1567
222
+ #: media/js/aam.js:2071 media/js/aam.js:2147 media/js/aam.js:2176
223
+ #: media/js/aam.js:2865 media/js/aam.js:2890
 
 
 
 
224
  msgid "Application error"
225
  msgstr ""
226
 
227
+ #: Application/Backend/View/Localization.php:31 media/js/aam.js:1259
228
  msgid "Add Capability"
229
  msgstr ""
230
 
231
+ #: Application/Backend/View/Localization.php:32 media/js/aam.js:872
232
+ #: Application/Backend/phtml/main/menu.phtml:67
233
  msgid "Show Menu"
234
  msgstr ""
235
 
236
+ #: Application/Backend/View/Localization.php:33 media/js/aam.js:882
237
+ #: Application/Backend/phtml/main/menu.phtml:71
238
  msgid "Restrict Menu"
239
  msgstr ""
240
 
241
+ #: Application/Backend/View/Localization.php:34 media/js/aam.js:989
242
  msgid "Failed to retrieve mataboxes"
243
  msgstr ""
244
 
245
+ #: Application/Backend/View/Localization.php:35 media/js/aam.js:1610
246
  msgid "Search"
247
  msgstr ""
248
 
249
+ #: Application/Backend/View/Localization.php:36 media/js/aam.js:1611
250
  msgid "_TOTAL_ object(s)"
251
  msgstr ""
252
 
253
+ #: Application/Backend/View/Localization.php:37
254
  msgid "Failed"
255
  msgstr ""
256
 
257
+ #: Application/Backend/View/Localization.php:38 media/js/aam.js:58
258
  msgid "Loading..."
259
  msgstr ""
260
 
261
+ #: Application/Backend/View/Localization.php:39 media/js/aam.js:63
262
+ msgid "No Role"
 
263
  msgstr ""
264
 
265
+ #: Application/Backend/View/Localization.php:40 media/js/aam.js:120
266
  msgid "Search Role"
267
  msgstr ""
268
 
269
+ #: Application/Backend/View/Localization.php:41 media/js/aam.js:121
270
  msgid "_TOTAL_ role(s)"
271
  msgstr ""
272
 
273
+ #: Application/Backend/View/Localization.php:42 media/js/aam.js:129
274
+ #: media/js/aam.js:602 Application/Backend/phtml/index.phtml:170
275
+ #: Application/Backend/phtml/main/capability.phtml:26
276
+ #: Application/Backend/phtml/main/capability.phtml:64
277
  msgid "Create"
278
  msgstr ""
279
 
280
+ #: Application/Backend/View/Localization.php:43 media/js/aam.js:153
281
+ #: Application/Backend/phtml/index.phtml:124
282
+ #: Application/Backend/phtml/index.phtml:267
283
  msgid "Users"
284
  msgstr ""
285
 
286
+ #: Application/Backend/View/Localization.php:44 media/js/aam.js:341
287
  msgid "Failed to add new role"
288
  msgstr ""
289
 
290
+ #: Application/Backend/View/Localization.php:45 media/js/aam.js:349
291
  msgid "Add Role"
292
  msgstr ""
293
 
294
+ #: Application/Backend/View/Localization.php:46 media/js/aam.js:394
295
  msgid "Failed to update role"
296
  msgstr ""
297
 
298
+ #: Application/Backend/View/Localization.php:47 media/js/aam.js:403
299
+ #: Application/Backend/phtml/extensions.phtml:51
300
+ #: Application/Backend/phtml/extensions.phtml:78
301
+ #: Application/Backend/phtml/index.phtml:196
302
+ #: Application/Backend/phtml/main/capability.phtml:86
303
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
304
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
305
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:59
306
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:86
307
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:130
308
  msgid "Update"
309
  msgstr ""
310
 
311
+ #: Application/Backend/View/Localization.php:48 media/js/aam.js:426
312
+ #: media/js/aam.js:1326
313
  msgid "Deleting..."
314
  msgstr ""
315
 
316
+ #: Application/Backend/View/Localization.php:49 media/js/aam.js:432
317
  msgid "Failed to delete role"
318
  msgstr ""
319
 
320
+ #: Application/Backend/View/Localization.php:50
321
+ #: Application/Backend/View/Localization.php:62 media/js/aam.js:251
322
+ #: media/js/aam.js:440 Application/Backend/phtml/index.phtml:208
323
  msgid "Delete Role"
324
  msgstr ""
325
 
326
+ #: Application/Backend/View/Localization.php:51 media/js/aam.js:526
327
  msgid "Failed to block user"
328
  msgstr ""
329
 
330
+ #: Application/Backend/View/Localization.php:52 media/js/aam.js:593
331
  msgid "Search User"
332
  msgstr ""
333
 
334
+ #: Application/Backend/View/Localization.php:53 media/js/aam.js:594
335
  msgid "_TOTAL_ user(s)"
336
  msgstr ""
337
 
338
+ #: Application/Backend/View/Localization.php:54 media/js/aam.js:619
339
  #: Application/Backend/phtml/frame.phtml:46
340
+ #: Application/Backend/phtml/index.phtml:141
341
  msgid "Role"
342
  msgstr ""
343
 
344
+ #: Application/Backend/View/Localization.php:55
345
+ #: Application/Core/Subject/Visitor.php:79 media/js/aam.js:758
346
+ msgid "Anonymous"
347
+ msgstr ""
348
+
349
+ #: Application/Backend/View/Localization.php:56
350
  msgid "Current user"
351
  msgstr ""
352
 
353
+ #: Application/Backend/View/Localization.php:57
354
  msgid "Current role"
355
  msgstr ""
356
 
357
+ #: Application/Backend/View/Localization.php:58 media/js/aam.js:1699
358
  msgid "Manage Access"
359
  msgstr ""
360
 
361
+ #: Application/Backend/View/Localization.php:59
362
+ #: Application/Backend/View/PostOptionList.php:91 media/js/aam.js:1711
 
363
  msgid "Edit"
364
  msgstr ""
365
 
366
+ #: Application/Backend/View/Localization.php:60 media/js/aam.js:192
367
  msgid "Manage Role"
368
  msgstr ""
369
 
370
+ #: Application/Backend/View/Localization.php:61 media/js/aam.js:214
371
+ msgid "Edit Role"
372
  msgstr ""
373
 
374
+ #: Application/Backend/View/Localization.php:63 media/js/aam.js:651
375
  msgid "Manage User"
376
  msgstr ""
377
 
378
+ #: Application/Backend/View/Localization.php:64 media/js/aam.js:665
379
  msgid "Edit User"
380
  msgstr ""
381
 
382
+ #: Application/Backend/View/Localization.php:65 media/js/aam.js:521
383
+ #: media/js/aam.js:522 media/js/aam.js:678
384
  msgid "Lock User"
385
  msgstr ""
386
 
387
+ #: Application/Backend/View/Localization.php:66 media/js/aam.js:515
388
+ #: media/js/aam.js:516 media/js/aam.js:691
389
  msgid "Unlock User"
390
  msgstr ""
391
 
392
+ #: Application/Backend/View/Localization.php:67
393
  msgid "Failed to grand capability - WordPress policy"
394
  msgstr ""
395
 
396
+ #: Application/Backend/View/PostOptionList.php:26
397
+ #: Application/Backend/View/PostOptionList.php:85
398
  msgid "List"
399
  msgstr ""
400
 
401
+ #: Application/Backend/View/PostOptionList.php:27
402
  #, php-format
403
  msgid ""
404
  "Hide %s however access with a direct URL will be still allowed. When there "
406
  "for performance reasons, AAM checks limited number of posts per request."
407
  msgstr ""
408
 
409
+ #: Application/Backend/View/PostOptionList.php:27
410
+ #: Application/Backend/View/PostOptionList.php:32
411
  #, php-format
412
  msgid " %sSee in action.%s"
413
  msgstr ""
414
 
415
+ #: Application/Backend/View/PostOptionList.php:31
416
+ msgid "Read"
 
417
  msgstr ""
418
 
419
+ #: Application/Backend/View/PostOptionList.php:32
420
  #, php-format
421
  msgid ""
422
+ "Restrict access to read the %s. Any attempts to read, view or open the %s "
423
+ "will be denied and redirected based on the Access Denied Redirect rule."
 
 
424
  msgstr ""
425
 
426
+ #: Application/Backend/View/PostOptionList.php:35
427
+ msgid "Limit"
428
  msgstr ""
429
 
430
+ #: Application/Backend/View/PostOptionList.php:36
431
+ msgid "Teaser message"
 
 
 
432
  msgstr ""
433
 
434
+ #: Application/Backend/View/PostOptionList.php:39
435
+ #, php-format
436
+ msgid "When checked, show defined teaser message instead of the %s content."
437
  msgstr ""
438
 
439
+ #: Application/Backend/View/PostOptionList.php:42
440
+ msgid "Read Counter"
 
 
 
 
441
  msgstr ""
442
 
443
+ #: Application/Backend/View/PostOptionList.php:43
444
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:11
445
+ msgid "Threshold"
446
  msgstr ""
447
 
448
+ #: Application/Backend/View/PostOptionList.php:47
449
  #, php-format
450
  msgid ""
451
+ "Define how many times the %s can be opened to read, view or download. After "
452
+ "number of time exceeds the defined threshold, the access will be denied to "
453
+ "the %s and redirected based on the Access Denied Redirect rule."
454
  msgstr ""
455
 
456
+ #: Application/Backend/View/PostOptionList.php:50
457
  msgid "Comment"
458
  msgstr ""
459
 
460
+ #: Application/Backend/View/PostOptionList.php:51
461
  #, php-format
462
  msgid "Restrict access to comment on %s when commenting feature is enabled."
463
  msgstr ""
464
 
465
+ #: Application/Backend/View/PostOptionList.php:54
466
  msgid "Redirect"
467
  msgstr ""
468
 
469
+ #: Application/Backend/View/PostOptionList.php:55
470
+ msgid "Redirect Rule"
 
 
 
 
 
 
 
471
  msgstr ""
472
 
473
+ #: Application/Backend/View/PostOptionList.php:58
474
  #, php-format
475
  msgid ""
476
+ "Redirect user based on the defined redirect rule when user tries to read the "
477
+ "%s. The REDIRECT option will be ignored if READ option checked. For more "
478
+ "information about this option please refer to the %sHelp Section%s."
479
  msgstr ""
480
 
481
+ #: Application/Backend/View/PostOptionList.php:61
482
  msgid "Password Protected"
483
  msgstr ""
484
 
485
+ #: Application/Backend/View/PostOptionList.php:62
486
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:32
487
+ msgid "Password"
488
  msgstr ""
489
 
490
+ #: Application/Backend/View/PostOptionList.php:65
491
  #, php-format
492
+ msgid "Password protect the %s. Available with WordPress 4.7.0 or higher."
 
 
493
  msgstr ""
494
 
495
+ #: Application/Backend/View/PostOptionList.php:68
496
  msgid "Access Expiration"
497
  msgstr ""
498
 
499
+ #: Application/Backend/View/PostOptionList.php:69
500
+ msgid "Expires:"
 
501
  msgstr ""
502
 
503
+ #: Application/Backend/View/PostOptionList.php:72
504
  #, php-format
505
+ msgid "Define when access expires for %s."
506
  msgstr ""
507
 
508
+ #: Application/Backend/View/PostOptionList.php:72
509
  #, php-format
510
  msgid ""
511
+ "After expiration, the access to %s will be denied and user will be "
512
+ "redirected based on the Access Denied Redirect rule. For more information "
513
+ "%scheck this article%s or "
514
  msgstr ""
515
 
516
+ #: Application/Backend/View/PostOptionList.php:72
517
  #, php-format
518
  msgid " %ssee in action.%s"
519
  msgstr ""
520
 
521
+ #: Application/Backend/View/PostOptionList.php:75
522
+ msgid "Monetized Access"
 
 
 
 
523
  msgstr ""
524
 
525
+ #: Application/Backend/View/PostOptionList.php:76
526
+ msgid "E-Product"
 
 
 
 
 
527
  msgstr ""
528
 
529
+ #: Application/Backend/View/PostOptionList.php:87
530
  #, php-format
531
  msgid ""
532
+ "Hide %s however access with a direct URL is still allowed. When there are "
533
+ "more than 500 posts, this option may not be applied immediately because, for "
534
+ "performance reasons, AAM checks limited number of posts per request."
 
 
 
535
  msgstr ""
536
 
537
+ #: Application/Backend/View/PostOptionList.php:93
538
  #, php-format
539
  msgid ""
540
+ "Restrict access to edit the %s. Any attempts to edit %s will result in "
 
541
  "redirecting user based on the Access Denied Redirect rule."
542
  msgstr ""
543
 
544
+ #: Application/Backend/View/PostOptionList.php:96
545
+ #: Application/Backend/phtml/index.phtml:214
546
+ #: Application/Backend/phtml/main/capability.phtml:104
547
  msgid "Delete"
548
  msgstr ""
549
 
550
+ #: Application/Backend/View/PostOptionList.php:98
551
  #, php-format
552
  msgid "Restrict access to trash or permanently delete %s."
553
  msgstr ""
554
 
555
+ #: Application/Backend/View/PostOptionList.php:101
 
 
 
 
 
 
 
 
 
 
 
556
  msgid "Publish"
557
  msgstr ""
558
 
559
+ #: Application/Backend/View/PostOptionList.php:103
560
  #, php-format
561
  msgid ""
562
+ "Restrict access to publish the %s. User will be allowed only submit the %s "
563
+ "for review."
564
  msgstr ""
565
 
566
+ #: Application/Backend/Widget/Login.php:19
567
+ msgid "AAM Secure Login Widget"
568
  msgstr ""
569
 
570
+ #: Application/Backend/Widget/Login.php:80
571
+ msgid "Login"
 
 
 
 
572
  msgstr ""
573
 
574
+ #: Application/Backend/Widget/Login.php:84
575
+ #: Application/Shortcode/Strategy/Login.php:55
576
+ msgid "Howdy, %username%"
577
  msgstr ""
578
 
579
+ #: Application/Core/Login.php:113
580
+ msgid "Access denied. Please login to get access."
 
 
 
581
  msgstr ""
582
 
583
+ #: Application/Core/Login.php:247
584
+ msgid "Username and password are required"
585
  msgstr ""
586
 
587
+ #: Application/Core/Subject/Default.php:78 media/js/aam.js:789
588
+ msgid "All Users, Roles and Visitor"
 
 
 
 
 
 
 
589
  msgstr ""
590
 
591
+ #: Application/Extension/Repository.php:128
592
  #, php-format
593
  msgid ""
594
+ "The [%s] file is missing. Update all your extensions to the latest version."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
595
  msgstr ""
596
 
597
+ #: Application/Extension/Repository.php:304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  #, php-format
599
  msgid "Failed to create %s"
600
  msgstr ""
601
 
602
+ #: Application/Extension/Repository.php:308
603
  #, php-format
604
  msgid "Directory %s is not writable"
605
  msgstr ""
606
 
607
+ #: Application/Frontend/Filter.php:301
608
+ msgid "[No teaser message provided]"
609
  msgstr ""
610
 
611
+ #: Application/Shortcode/Factory.php:52
612
+ msgid "No valid strategy found for the given context"
 
613
  msgstr ""
614
 
615
+ #: aam.php:173
616
+ msgid "PHP 5.2 or higher is required."
 
617
  msgstr ""
618
 
619
+ #: aam.php:175
620
+ msgid "WP 3.8 or higher is required."
 
621
  msgstr ""
622
 
623
+ #: media/js/aam.js:230
624
+ msgid "Clone Role"
 
625
  msgstr ""
626
 
627
+ #: media/js/aam.js:704
628
+ msgid "Switch To User"
629
  msgstr ""
630
 
631
+ #: media/js/aam.js:837 media/js/aam.js:2346 media/js/aam.js:2391
632
+ #: media/js/aam.js:2422 media/js/aam.js:2455 media/js/aam.js:2507
633
+ msgid "Application Error"
634
  msgstr ""
635
 
636
+ #: media/js/aam.js:906 Application/Backend/phtml/main/menu.phtml:54
637
+ msgid "Uncheck to allow"
638
  msgstr ""
639
 
640
+ #: media/js/aam.js:908 Application/Backend/phtml/main/menu.phtml:54
641
+ msgid "Check to restrict"
642
  msgstr ""
643
 
644
+ #: media/js/aam.js:1015
645
+ msgid "Processing"
646
  msgstr ""
647
 
648
+ #: media/js/aam.js:1023
649
+ msgid "Failed to initialize URL"
650
  msgstr ""
651
 
652
+ #: media/js/aam.js:1031 Application/Backend/phtml/main/metabox.phtml:102
653
+ msgid "Initialize"
654
  msgstr ""
655
 
656
+ #: media/js/aam.js:1055 Application/Backend/phtml/main/metabox.phtml:65
657
+ msgid "Uncheck to show"
658
  msgstr ""
659
 
660
+ #: media/js/aam.js:1057 Application/Backend/phtml/main/metabox.phtml:65
661
+ msgid "Check to hide"
 
662
  msgstr ""
663
 
664
+ #: media/js/aam.js:1103
665
+ msgid "WordPress core does not allow to grant this capability"
666
+ msgstr ""
667
+
668
+ #: media/js/aam.js:1143
669
  msgid "Nothing to show"
670
  msgstr ""
671
 
672
+ #: media/js/aam.js:1295
673
  msgid "Failed to update capability"
674
  msgstr ""
675
 
676
+ #: media/js/aam.js:1303 Application/Backend/phtml/main/capability.phtml:76
 
677
  msgid "Update Capability"
678
  msgstr ""
679
 
680
+ #: media/js/aam.js:1334
681
  msgid "Failed to delete capability"
682
  msgstr ""
683
 
684
+ #: media/js/aam.js:1342 Application/Backend/phtml/main/capability.phtml:98
 
685
  msgid "Delete Capability"
686
  msgstr ""
687
 
688
+ #: media/js/aam.js:1685
689
  msgid "Drill-Down"
690
  msgstr ""
691
 
692
+ #: media/js/aam.js:2169
693
+ msgid "Extension status was updated successfully"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  msgstr ""
695
 
696
+ #: media/js/aam.js:2381 media/js/aam.js:2412 media/js/aam.js:2443
697
+ #: media/js/aam.js:2496
698
+ msgid "Wait..."
 
 
 
699
  msgstr ""
700
 
701
+ #: media/js/aam.js:2385
702
+ msgid "All settings were cleared successfully"
 
 
 
 
703
  msgstr ""
704
 
705
+ #: media/js/aam.js:2395 media/js/aam.js:2426
706
+ #: Application/Backend/phtml/settings/tools.phtml:66
707
+ msgid "Clear"
 
 
 
708
  msgstr ""
709
 
710
+ #: media/js/aam.js:2416
711
+ msgid "The cache was cleared successfully"
 
 
 
 
712
  msgstr ""
713
 
714
+ #: media/js/aam.js:2503
715
+ msgid "Invalid data format"
 
716
  msgstr ""
717
 
718
+ #: Application/Backend/phtml/extensions.phtml:11
719
  msgid "Install/Update Extension"
720
  msgstr ""
721
 
722
+ #: Application/Backend/phtml/extensions.phtml:15
723
  msgid "License Key"
724
  msgstr ""
725
 
726
+ #: Application/Backend/phtml/extensions.phtml:19
 
727
  msgid "Submit"
728
  msgstr ""
729
 
730
+ #: Application/Backend/phtml/extensions.phtml:28
731
  msgid "Premium"
732
  msgstr ""
733
 
734
+ #: Application/Backend/phtml/extensions.phtml:29
735
+ #: Application/Backend/phtml/extensions.phtml:69
736
  msgid "Free"
737
  msgstr ""
738
 
739
+ #: Application/Backend/phtml/extensions.phtml:30
740
+ msgid "Check for Updates"
 
741
  msgstr ""
742
 
743
+ #: Application/Backend/phtml/extensions.phtml:49
744
+ #: Application/Backend/phtml/extensions.phtml:76
745
+ msgid "Deactivate"
746
  msgstr ""
747
 
748
+ #: Application/Backend/phtml/extensions.phtml:53
749
+ #: Application/Backend/phtml/extensions.phtml:80
750
+ msgid "Activate"
751
+ msgstr ""
752
+
753
+ #: Application/Backend/phtml/extensions.phtml:55
754
+ #: Application/Backend/phtml/index.phtml:89
755
  msgid "Read More"
756
  msgstr ""
757
 
758
+ #: Application/Backend/phtml/extensions.phtml:82
759
+ #: Application/Backend/phtml/extensions.phtml:117
760
  msgid "Download"
761
  msgstr ""
762
 
763
+ #: Application/Backend/phtml/extensions.phtml:97
764
+ #: Application/Backend/phtml/extensions.phtml:128
765
+ #: Application/Backend/phtml/extensions.phtml:139
766
+ #: Application/Backend/phtml/index.phtml:154
767
+ #: Application/Backend/phtml/index.phtml:171
768
+ #: Application/Backend/phtml/index.phtml:181
769
+ #: Application/Backend/phtml/index.phtml:197
770
+ #: Application/Backend/phtml/index.phtml:207
771
+ #: Application/Backend/phtml/index.phtml:215
772
+ #: Application/Backend/phtml/main/capability.phtml:54
773
+ #: Application/Backend/phtml/main/capability.phtml:65
774
+ #: Application/Backend/phtml/main/capability.phtml:75
775
+ #: Application/Backend/phtml/main/capability.phtml:87
776
+ #: Application/Backend/phtml/main/capability.phtml:97
777
+ #: Application/Backend/phtml/main/capability.phtml:105
778
+ #: Application/Backend/phtml/main/menu.phtml:86
779
+ #: Application/Backend/phtml/main/metabox.phtml:89
780
+ #: Application/Backend/phtml/main/metabox.phtml:103
781
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
782
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:17
783
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:27
784
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:38
785
  #: Application/Backend/phtml/partial/post-advanced-settings.phtml:48
786
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:60
787
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:70
788
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:87
789
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:97
790
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:108
791
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:118
792
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:131
793
+ #: Application/Backend/phtml/settings/tools.phtml:59
794
  msgid "Close"
795
  msgstr ""
796
 
797
+ #: Application/Backend/phtml/extensions.phtml:98
798
  msgid "Notification"
799
  msgstr ""
800
 
801
+ #: Application/Backend/phtml/extensions.phtml:102
802
  msgid ""
803
  "Extension requires manual installation. Please follow few simple steps below."
804
  msgstr ""
805
 
806
+ #: Application/Backend/phtml/extensions.phtml:118
807
+ #: Application/Backend/phtml/settings/tools.phtml:67
808
  msgid "Cancel"
809
  msgstr ""
810
 
811
+ #: Application/Backend/phtml/extensions.phtml:129
812
  msgid "Install Extension"
813
  msgstr ""
814
 
815
+ #: Application/Backend/phtml/extensions.phtml:133
816
  msgid ""
817
  "Insert license key that you recieved after the payment (find the email "
818
  "example below). It might take up to 2 hours to process the payment. Please "
820
  msgstr ""
821
 
822
  #: Application/Backend/phtml/frame.phtml:62
823
+ #: Application/Backend/phtml/index.phtml:229
824
  msgid "Username"
825
  msgstr ""
826
 
830
  msgstr ""
831
 
832
  #: Application/Backend/phtml/frame.phtml:75
833
+ #: Application/Backend/phtml/index.phtml:242
834
  msgid "Manage Visitors"
835
  msgstr ""
836
 
842
  msgstr ""
843
 
844
  #: Application/Backend/phtml/frame.phtml:84
845
+ #: Application/Backend/phtml/index.phtml:250
846
  msgid "Manage Default Access"
847
  msgstr ""
848
 
849
  #: Application/Backend/phtml/frame.phtml:100
850
+ #: Application/Backend/phtml/main/menu.phtml:13
851
+ #: Application/Backend/phtml/main/metabox.phtml:19
852
+ #: Application/Backend/phtml/main/post.phtml:35
853
  msgid "Settings are customized"
854
  msgstr ""
855
 
856
  #: Application/Backend/phtml/frame.phtml:101
857
+ #: Application/Backend/phtml/main/capability.phtml:33
858
+ #: Application/Backend/phtml/main/menu.phtml:14
859
+ #: Application/Backend/phtml/main/metabox.phtml:20
860
+ #: Application/Backend/phtml/main/post.phtml:36
861
  msgid "Reset To Default"
862
  msgstr ""
863
 
864
+ #: Application/Backend/phtml/frame.phtml:120
865
+ #: Application/Backend/phtml/main/post.phtml:80
866
  msgid "Frontend"
867
  msgstr ""
868
 
869
+ #: Application/Backend/phtml/frame.phtml:129
870
+ #: Application/Backend/phtml/frame.phtml:154
871
+ #: Application/Backend/phtml/main/post.phtml:89
872
+ #: Application/Backend/phtml/main/post.phtml:114
873
+ msgid "change"
874
+ msgstr ""
875
+
876
  #: Application/Backend/phtml/index.phtml:14
877
+ msgid "Main Panel"
878
  msgstr ""
879
 
880
+ #: Application/Backend/phtml/index.phtml:23
881
  msgid ""
882
  "Appreciate your interest in Advanced Access Manager (AAM). With strong "
883
  "knowledge and experience in WordPress, AAM becomes a very powerful tool to "
884
  "manage access to your frontend and backend."
885
  msgstr ""
886
 
887
+ #: Application/Backend/phtml/index.phtml:24
888
  msgid "Please Note!"
889
  msgstr ""
890
 
891
+ #: Application/Backend/phtml/index.phtml:25
892
  msgid ""
893
  "AAM was thoroughly tested on the fresh installation of WordPress and in the "
894
  "latest versions of Chrome, Safari, IE and Firefox. If you have any issues, "
895
  "the most typical case is the conflict with other plugins or themes."
896
  msgstr ""
897
 
898
+ #: Application/Backend/phtml/index.phtml:26
899
  #, php-format
900
  msgid ""
901
  "Check our %sHelp%s section to find some useful articles about AAM "
902
  "functionality or %scontact us%s directly."
903
  msgstr ""
904
 
905
+ #: Application/Backend/phtml/index.phtml:40
906
  msgid "Notifications"
907
  msgstr ""
908
 
909
+ #: Application/Backend/phtml/index.phtml:99
910
  msgid "AAM Multisite"
911
  msgstr ""
912
 
913
+ #: Application/Backend/phtml/index.phtml:103
914
  msgid "Install AAM Multisite"
915
  msgstr ""
916
 
917
+ #: Application/Backend/phtml/index.phtml:114
918
+ msgid "Users/Roles Manager"
919
  msgstr ""
920
 
921
+ #: Application/Backend/phtml/index.phtml:121
922
+ #: Application/Backend/phtml/index.phtml:262
923
  msgid "Roles"
924
  msgstr ""
925
 
926
+ #: Application/Backend/phtml/index.phtml:127
927
+ #: Application/Backend/phtml/index.phtml:272
928
  msgid "Visitor"
929
  msgstr ""
930
 
931
+ #: Application/Backend/phtml/index.phtml:130
932
+ #: Application/Backend/phtml/index.phtml:277
933
  msgid "Default"
934
  msgstr ""
935
 
936
+ #: Application/Backend/phtml/index.phtml:142
937
+ #: Application/Backend/phtml/index.phtml:230
938
  msgid "Action"
939
  msgstr ""
940
 
941
+ #: Application/Backend/phtml/index.phtml:155
942
  msgid "Create Role"
943
  msgstr ""
944
 
945
+ #: Application/Backend/phtml/index.phtml:159
946
+ #: Application/Backend/phtml/index.phtml:186
947
  msgid "Role Name"
948
  msgstr ""
949
 
950
+ #: Application/Backend/phtml/index.phtml:160
951
+ #: Application/Backend/phtml/index.phtml:187
952
  msgid "Enter Role Name"
953
  msgstr ""
954
 
955
+ #: Application/Backend/phtml/index.phtml:163
956
+ #: Application/Backend/phtml/index.phtml:190
957
+ msgid "Role Expiration"
958
+ msgstr ""
959
+
960
+ #: Application/Backend/phtml/index.phtml:164
961
+ #: Application/Backend/phtml/index.phtml:191
962
+ msgid "Enter Expiration Rule"
963
+ msgstr ""
964
+
965
+ #: Application/Backend/phtml/index.phtml:182
966
  msgid "Update Role"
967
  msgstr ""
968
 
969
+ #: Application/Backend/phtml/index.phtml:211
970
  #, php-format
971
  msgid "Are you sure that you want to delete the %s role?"
972
  msgstr ""
973
 
974
+ #: Application/Backend/phtml/index.phtml:241
975
  msgid ""
976
  "Manage access to your website for visitors (any user that is not "
977
  "authenticated)"
978
  msgstr ""
979
 
980
+ #: Application/Backend/phtml/index.phtml:249
981
  msgid ""
982
  "Manage default access to your website resources for all users, roles and "
983
  "visitor. This includes Administrator role and your user"
984
  msgstr ""
985
 
986
+ #: Application/Backend/phtml/index.phtml:263
987
  msgid ""
988
  "With Roles tab you can manage access for any defined role, edit role's name, "
989
  "create new role or even delete existing (but only when there is no users "
990
  "assigned to it). You are not allowed to delete Administrator role."
991
  msgstr ""
992
 
993
+ #: Application/Backend/phtml/index.phtml:268
994
  msgid ""
995
  "Manage access for any user. As a bonus feature, you can block user. It means "
996
  "that user will be not able to login to your website anymore."
997
  msgstr ""
998
 
999
+ #: Application/Backend/phtml/index.phtml:273
1000
  msgid ""
1001
  "Visitor can be considered any user that is not authenticated to your website."
1002
  msgstr ""
1003
 
1004
+ #: Application/Backend/phtml/index.phtml:278
1005
  msgid ""
1006
  "Manage default access settings to your website resources for all users, "
1007
  "roles and visitors."
1008
  msgstr ""
1009
 
1010
+ #: Application/Backend/phtml/main-panel.phtml:27
1011
+ msgid "You are not allowed to manage any of the existing features."
1012
  msgstr ""
1013
 
1014
+ #: Application/Backend/phtml/main/404redirect.phtml:36
1015
+ #: Application/Backend/phtml/main/login-redirect.phtml:43
1016
+ #: Application/Backend/phtml/main/logout-redirect.phtml:43
1017
+ #: Application/Backend/phtml/main/redirect.phtml:67
1018
+ #: Application/Backend/phtml/main/redirect.phtml:119
1019
+ msgid "Existing Page"
1020
  msgstr ""
1021
 
1022
+ #: Application/Backend/phtml/main/404redirect.phtml:45
1023
+ #: Application/Backend/phtml/main/login-redirect.phtml:52
1024
+ #: Application/Backend/phtml/main/logout-redirect.phtml:52
1025
+ #: Application/Backend/phtml/main/redirect.phtml:76
1026
+ #: Application/Backend/phtml/main/redirect.phtml:128
1027
+ msgid "-- Select Page --"
1028
  msgstr ""
1029
 
1030
+ #: Application/Backend/phtml/main/404redirect.phtml:51
1031
+ #: Application/Backend/phtml/main/login-redirect.phtml:58
1032
+ #: Application/Backend/phtml/main/logout-redirect.phtml:58
1033
+ #: Application/Backend/phtml/main/redirect.phtml:82
1034
+ #: Application/Backend/phtml/main/redirect.phtml:134
1035
+ msgid "The URL"
1036
+ msgstr ""
1037
+
1038
+ #: Application/Backend/phtml/main/404redirect.phtml:56
1039
+ #: Application/Backend/phtml/main/login-redirect.phtml:63
1040
+ #: Application/Backend/phtml/main/logout-redirect.phtml:63
1041
+ #: Application/Backend/phtml/main/redirect.phtml:87
1042
+ #: Application/Backend/phtml/main/redirect.phtml:139
1043
+ msgid "PHP Callback Function"
1044
  msgstr ""
1045
 
1046
+ #: Application/Backend/phtml/main/capability.phtml:16
1047
  msgid "Filter"
1048
  msgstr ""
1049
 
1050
+ #: Application/Backend/phtml/main/capability.phtml:23
1051
  msgid "All Capabilities"
1052
  msgstr ""
1053
 
1054
+ #: Application/Backend/phtml/main/capability.phtml:32
1055
  msgid "Capabilities are customized"
1056
  msgstr ""
1057
 
1058
+ #: Application/Backend/phtml/main/capability.phtml:42
1059
  msgid "Category"
1060
  msgstr ""
1061
 
1062
+ #: Application/Backend/phtml/main/capability.phtml:43
1063
+ #: Application/Backend/phtml/main/capability.phtml:59
1064
+ #: Application/Backend/phtml/main/capability.phtml:80
1065
  msgid "Capability"
1066
  msgstr ""
1067
 
1068
+ #: Application/Backend/phtml/main/capability.phtml:44
1069
+ #: Application/Backend/phtml/main/post.phtml:52
1070
  msgid "Actions"
1071
  msgstr ""
1072
 
1073
+ #: Application/Backend/phtml/main/capability.phtml:55
1074
  msgid "Create Capability"
1075
  msgstr ""
1076
 
1077
+ #: Application/Backend/phtml/main/capability.phtml:60
1078
+ #: Application/Backend/phtml/main/capability.phtml:81
1079
  msgid "Enter Capability"
1080
  msgstr ""
1081
 
1082
+ #: Application/Backend/phtml/main/capability.phtml:101
1083
  #, php-format
1084
  msgid "Are you sure that you want to delete %s capability for all roles?"
1085
  msgstr ""
1086
 
1087
+ #: Application/Backend/phtml/main/login-redirect.phtml:27
1088
+ #: Application/Backend/phtml/main/logout-redirect.phtml:27
1089
  msgid "WordPress default behavior"
1090
  msgstr ""
1091
 
1092
+ #: Application/Backend/phtml/main/menu.phtml:87
1093
  msgid "Dashboard Lockdown"
1094
  msgstr ""
1095
 
1096
+ #: Application/Backend/phtml/main/menu.phtml:91
1097
  msgid "You cannot restrict access to Dashboard home page."
1098
  msgstr ""
1099
 
1100
+ #: Application/Backend/phtml/main/menu.phtml:96
 
 
 
 
 
 
 
 
1101
  msgid "OK"
1102
  msgstr ""
1103
 
1104
+ #: Application/Backend/phtml/main/metabox.phtml:12
1105
  msgid "Refresh"
1106
  msgstr ""
1107
 
1108
+ #: Application/Backend/phtml/main/metabox.phtml:13
1109
  msgid "Init URL"
1110
  msgstr ""
1111
 
1112
+ #: Application/Backend/phtml/main/metabox.phtml:43
1113
  msgid "Dashboard Widgets"
1114
  msgstr ""
1115
 
1116
+ #: Application/Backend/phtml/main/metabox.phtml:47
1117
  msgid "Frontend Widgets"
1118
  msgstr ""
1119
 
1120
+ #: Application/Backend/phtml/main/metabox.phtml:78
1121
  msgid "The list is not initialized. Click Refresh button above."
1122
  msgstr ""
1123
 
1124
+ #: Application/Backend/phtml/main/metabox.phtml:90
1125
  msgid "Initialize URL"
1126
  msgstr ""
1127
 
1128
+ #: Application/Backend/phtml/main/metabox.phtml:94
1129
  msgid ""
1130
+ "Some metaboxes are \"conditional\" and appear on the Edit screen when "
1131
+ "certain conditions are met. For example metabox \"Comments\" appears only "
1132
+ "for existing page and not for new page. If you do not see a desired metabox, "
1133
+ "try to copy & paste the full URL to the backend page where that metabox "
1134
+ "appears."
1135
  msgstr ""
1136
 
1137
+ #: Application/Backend/phtml/main/metabox.phtml:97
1138
  msgid "Backend page URL"
1139
  msgstr ""
1140
 
1141
+ #: Application/Backend/phtml/main/metabox.phtml:98
1142
  msgid "Insert valid URL"
1143
  msgstr ""
1144
 
1145
+ #: Application/Backend/phtml/main/post.phtml:15
1146
  #, php-format
1147
  msgid ""
1148
  "Manage access to posts, pages and custom post types. For more information "
1149
+ "about this functionality check %sHow to manage access to the WordPress "
1150
+ "content%s article."
1151
  msgstr ""
1152
 
1153
+ #: Application/Backend/phtml/main/post.phtml:25
1154
  msgid "Root"
1155
  msgstr ""
1156
 
1157
+ #: Application/Backend/phtml/main/post.phtml:51
1158
  msgid "Title"
1159
  msgstr ""
1160
 
1161
+ #: Application/Backend/phtml/main/post.phtml:59
1162
+ #: Application/Backend/phtml/main/post.phtml:61
1163
+ #: Application/Backend/phtml/main/post.phtml:65
1164
+ #: Application/Backend/phtml/main/post.phtml:67
1165
+ #: Application/Backend/phtml/main/post.phtml:71
1166
+ #: Application/Backend/phtml/main/post.phtml:129
1167
  msgid "Go Back"
1168
  msgstr ""
1169
 
1170
+ #: Application/Backend/phtml/main/redirect.phtml:25
1171
  msgid "Frontend Redirect"
1172
  msgstr ""
1173
 
1174
+ #: Application/Backend/phtml/main/redirect.phtml:26
1175
  msgid "Backend Redirect"
1176
  msgstr ""
1177
 
1178
+ #: Application/Backend/phtml/main/redirect.phtml:62
1179
+ #: Application/Backend/phtml/main/redirect.phtml:114
1180
  msgid "Customized Message"
1181
  msgstr ""
1182
 
1183
+ #: Application/Backend/phtml/main/redirect.phtml:63
1184
+ #: Application/Backend/phtml/main/redirect.phtml:115
1185
  msgid "Enter message..."
1186
  msgstr ""
1187
 
1188
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:7
1189
+ msgid "Define Threshold"
 
 
 
 
1190
  msgstr ""
1191
 
1192
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:12
1193
+ msgid "Enter digital number"
1194
  msgstr ""
1195
 
1196
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:28
1197
  msgid "Set Password"
1198
  msgstr ""
1199
 
1200
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:33
 
 
 
 
1201
  msgid "Enter Password"
1202
  msgstr ""
1203
 
1204
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:49
1205
+ msgid "Define Redirect Rule"
1206
  msgstr ""
1207
 
1208
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:54
1209
+ msgid "Enter Redirect Rule"
1210
  msgstr ""
1211
 
1212
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:55
1213
+ msgid "Enter rule"
1214
  msgstr ""
1215
 
1216
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:71
1217
  msgid "Set Expiration"
1218
  msgstr ""
1219
 
1220
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:81
1221
  msgid "Enter expiration critiria"
1222
  msgstr ""
1223
 
1224
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:82
1225
  msgid "Enter critiria"
1226
  msgstr ""
1227
 
1228
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:98
1229
+ msgid "Teaser Message"
1230
+ msgstr ""
1231
+
1232
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:102
1233
+ msgid "Simple text or valid HTML"
1234
+ msgstr ""
1235
+
1236
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:103
1237
+ msgid "Enter your teaser"
1238
+ msgstr ""
1239
+
1240
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:107
1241
+ msgid "Save"
1242
+ msgstr ""
1243
+
1244
+ #: Application/Backend/phtml/partial/post-advanced-settings.phtml:119
1245
+ msgid "E-Commerce Setup"
1246
+ msgstr ""
1247
+
1248
  #: Application/Backend/phtml/partial/role-inheritance.phtml:3
1249
  msgid "Inherit Capabilities From"
1250
  msgstr ""
1251
 
1252
+ #: Application/Backend/phtml/partial/role-inheritance.phtml:5
1253
+ msgid "Select Role"
 
 
1254
  msgstr ""
1255
 
1256
+ #: Application/Backend/phtml/settings/tools.phtml:8
1257
+ msgid "Export AAM Settings"
1258
  msgstr ""
1259
 
1260
+ #: Application/Backend/phtml/settings/tools.phtml:10
1261
+ #, php-format
1262
+ msgid ""
1263
+ "Export selected AAM settings to the file. For more information about this "
1264
+ "feature check %sHow to export and import AAM settings%s article."
1265
  msgstr ""
1266
 
1267
+ #: Application/Backend/phtml/settings/tools.phtml:19
1268
+ msgid "Import AAM Settings"
1269
+ msgstr ""
1270
+
1271
+ #: Application/Backend/phtml/settings/tools.phtml:21
1272
+ msgid "Import AAM settings from the file."
1273
  msgstr ""
1274
 
1275
+ #: Application/Backend/phtml/settings/tools.phtml:31
1276
  msgid "Clear Cache"
1277
  msgstr ""
1278
 
1279
+ #: Application/Backend/phtml/settings/tools.phtml:33
1280
  msgid "Clear all AAM cache."
1281
  msgstr ""
1282
 
1283
+ #: Application/Backend/phtml/settings/tools.phtml:42
1284
  msgid "Clear All Settings"
1285
  msgstr ""
1286
 
1287
+ #: Application/Backend/phtml/settings/tools.phtml:44
1288
+ msgid "Remove all the settings related to AAM from the database."
 
 
 
 
 
1289
  msgstr ""
1290
 
1291
+ #: Application/Backend/phtml/settings/tools.phtml:60
1292
  msgid "Clear all settings"
1293
  msgstr ""
1294
 
1295
+ #: Application/Backend/phtml/settings/tools.phtml:63
1296
  msgid "All AAM settings will be removed."
1297
  msgstr ""
1298
 
1299
+ #: Application/Backend/phtml/widget/login-backend.phtml:3
1300
+ msgid "Login Title"
1301
+ msgstr ""
1302
+
1303
+ #: Application/Backend/phtml/widget/login-backend.phtml:8
1304
+ msgid "Logged In Title"
1305
+ msgstr ""
1306
+
1307
+ #: Application/Backend/phtml/widget/login-backend.phtml:14
1308
+ msgid "Login Timeout"
1309
+ msgstr ""
1310
+
1311
+ #: Application/Backend/phtml/widget/login-backend.phtml:20
1312
+ msgid "Brute Force Lockout"
1313
+ msgstr ""
1314
+
1315
+ #: Application/Backend/phtml/widget/login-backend.phtml:25
1316
+ #, php-format
1317
+ msgid ""
1318
+ "For more advanced setup like login/logout redirects or custom styling, "
1319
+ "please check %sthis article%s."
1320
+ msgstr ""
1321
+
1322
+ #: Application/Backend/phtml/widget/login-frontend.phtml:53
1323
+ #: Application/Frontend/phtml/login.phtml:40
1324
+ msgid "Dashboard"
1325
+ msgstr ""
1326
+
1327
+ #: Application/Backend/phtml/widget/login-frontend.phtml:54
1328
+ #: Application/Frontend/phtml/login.phtml:41
1329
+ msgid "Edit My Profile"
1330
+ msgstr ""
1331
+
1332
+ #: Application/Backend/phtml/widget/login-frontend.phtml:55
1333
+ #: Application/Frontend/phtml/login.phtml:42
1334
+ msgid "Log Out"
1335
  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: 4.9.5.2
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
@@ -47,17 +47,12 @@ class AAM {
47
  * @access protected
48
  */
49
  protected function __construct() {
50
- $uid = get_current_user_id();
51
-
52
- //initialize the user subject
53
- if ($uid) {
54
- $this->setUser(new AAM_Core_Subject_User($uid));
55
  } else {
56
  $this->setUser(new AAM_Core_Subject_Visitor(''));
57
  }
58
-
59
- //load AAM core config
60
- AAM_Core_Config::bootstrap();
61
  }
62
 
63
  /**
@@ -115,23 +110,15 @@ class AAM {
115
  );
116
  self::$_instance = new self;
117
 
 
 
 
118
  //load AAM cache
119
  AAM_Core_Cache::bootstrap();
120
 
121
  //load all installed extension
122
  AAM_Extension_Repository::getInstance()->load();
123
 
124
- //check if user is locked
125
- if (get_current_user_id() && AAM::getUser()->user_status == 1) {
126
- wp_logout();
127
- }
128
-
129
- //check if user's role expired
130
- $expire = get_user_option('aam-role-expires');
131
- if ($expire && ($expire <= time())) {
132
- AAM::getUser()->restoreRoles();
133
- }
134
-
135
  //bootstrap the correct interface
136
  if (is_admin()) {
137
  AAM_Backend_Manager::bootstrap();
@@ -143,7 +130,9 @@ class AAM {
143
  AAM_Core_Media::bootstrap();
144
 
145
  //login control
146
- AAM_Core_Login::bootstrap();
 
 
147
  }
148
 
149
  return self::$_instance;
@@ -160,6 +149,7 @@ class AAM {
160
  */
161
  public static function cron() {
162
  $extensions = AAM_Core_API::getOption('aam-extensions', null, 'site');
 
163
  if (!empty($extensions)) {
164
  //grab the server extension list
165
  AAM_Core_API::updateOption(
@@ -185,13 +175,6 @@ class AAM {
185
  exit(__('WP 3.8 or higher is required.', AAM_KEY));
186
  }
187
 
188
- //create an wp-content/aam folder if does not exist
189
- $dirname = WP_CONTENT_DIR . '/aam';
190
-
191
- if (file_exists($dirname) === false) {
192
- @mkdir($dirname, fileperms( ABSPATH ) & 0777 | 0755);
193
- }
194
-
195
  //register plugin
196
  AAM_Core_Server::register();
197
  }
@@ -229,7 +212,6 @@ if (defined('ABSPATH')) {
229
  );
230
  define('AAM_KEY', 'advanced-access-manager');
231
  define('AAM_EXTENSION_BASE', WP_CONTENT_DIR . '/aam/extension');
232
- define('AAM_CODEPINCH_AFFILIATE_CODE', 'H2K31P8H');
233
 
234
  //register autoloader
235
  require (dirname(__FILE__) . '/autoloader.php');
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: All you need to manage access to your WordPress website
6
+ Version: 5.0
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
47
  * @access protected
48
  */
49
  protected function __construct() {
50
+ //initialize current subject
51
+ if (is_user_logged_in()) {
52
+ $this->setUser(new AAM_Core_Subject_User(get_current_user_id()));
 
 
53
  } else {
54
  $this->setUser(new AAM_Core_Subject_Visitor(''));
55
  }
 
 
 
56
  }
57
 
58
  /**
110
  );
111
  self::$_instance = new self;
112
 
113
+ //load AAM core config
114
+ AAM_Core_Config::bootstrap();
115
+
116
  //load AAM cache
117
  AAM_Core_Cache::bootstrap();
118
 
119
  //load all installed extension
120
  AAM_Extension_Repository::getInstance()->load();
121
 
 
 
 
 
 
 
 
 
 
 
 
122
  //bootstrap the correct interface
123
  if (is_admin()) {
124
  AAM_Backend_Manager::bootstrap();
130
  AAM_Core_Media::bootstrap();
131
 
132
  //login control
133
+ if (AAM_Core_Config::get('secure-login', true)) {
134
+ AAM_Core_Login::bootstrap();
135
+ }
136
  }
137
 
138
  return self::$_instance;
149
  */
150
  public static function cron() {
151
  $extensions = AAM_Core_API::getOption('aam-extensions', null, 'site');
152
+
153
  if (!empty($extensions)) {
154
  //grab the server extension list
155
  AAM_Core_API::updateOption(
175
  exit(__('WP 3.8 or higher is required.', AAM_KEY));
176
  }
177
 
 
 
 
 
 
 
 
178
  //register plugin
179
  AAM_Core_Server::register();
180
  }
212
  );
213
  define('AAM_KEY', 'advanced-access-manager');
214
  define('AAM_EXTENSION_BASE', WP_CONTENT_DIR . '/aam/extension');
 
215
 
216
  //register autoloader
217
  require (dirname(__FILE__) . '/autoloader.php');
autoloader.php CHANGED
@@ -16,15 +16,23 @@
16
  class AAM_Autoloader {
17
 
18
  /**
19
- *
20
- * @var type
 
 
 
 
21
  */
22
  protected static $classmap = array();
23
 
24
  /**
 
25
  *
26
- * @param type $classname
27
- * @param type $filepath
 
 
 
28
  */
29
  public static function add($classname, $filepath) {
30
  self::$classmap[$classname] = $filepath;
16
  class AAM_Autoloader {
17
 
18
  /**
19
+ * Class map
20
+ *
21
+ * @var array
22
+ *
23
+ * @access protected
24
+ * @static
25
  */
26
  protected static $classmap = array();
27
 
28
  /**
29
+ * Add new index
30
  *
31
+ * @param string $classname
32
+ * @param string $filepath
33
+ *
34
+ * @access public
35
+ * @static
36
  */
37
  public static function add($classname, $filepath) {
38
  self::$classmap[$classname] = $filepath;
media/css/aam.css CHANGED
@@ -97,6 +97,10 @@
97
  .icon-circle-thin:before { content: '\f1db' !important; } /* '' */
98
  .icon-clone:before { content: '\f24d' !important; } /* '' */
99
  .icon-rss:before { content: '\f09e' !important; } /* '' */
 
 
 
 
100
 
101
  .animate-spin {
102
  -moz-animation: spin 2s infinite linear;
@@ -352,18 +356,6 @@ a.btn:focus, a.btn:active {
352
  border-radius: 0;
353
  }
354
 
355
- .btn-codepinch {
356
- background-color: #EC4F7C;
357
- border-color: #EC4F7C;
358
- color: #FFFFFF;
359
- }
360
-
361
- .btn-codepinch:hover, .btn-codepinch:focus {
362
- background-color: #f0ad4e;
363
- border-color: #eea236;
364
- color: #fff;
365
- }
366
-
367
  .btn-right {
368
  float: right;
369
  margin-bottom: 10px;
@@ -549,7 +541,7 @@ input[type=radio]:checked + label:before {
549
  left: 0;
550
  width: 100%;
551
  height: 100%;
552
- background-color: rgba(169, 68, 66, 0.2);
553
  z-index: 9999;
554
  }
555
 
@@ -703,6 +695,15 @@ input[type=radio]:checked + label:before {
703
  background-color: #5cb85c;
704
  }
705
 
 
 
 
 
 
 
 
 
 
706
  .aam-submenu-item .aam-menu-capability {
707
  display: block;
708
  margin-top: -4px;
@@ -711,6 +712,8 @@ input[type=radio]:checked + label:before {
711
  .aam-submenu-item label {
712
  display: inline-block;
713
  width: 80%;
 
 
714
  }
715
 
716
  .aam-feature {
@@ -769,38 +772,6 @@ input[type=radio]:checked + label:before {
769
  padding: 10px;
770
  }
771
 
772
- .aam-extension-installed {
773
- border: 1px solid transparent;
774
- display: inline-block;
775
- font-size: 12px;
776
- font-weight: 400;
777
- line-height: 1.42857;
778
- margin-bottom: 0;
779
- padding: 6px 12px;
780
- text-align: center;
781
- vertical-align: middle;
782
- white-space: nowrap;
783
- background-color: #666666;
784
- color: #FFFFFF;
785
- width: 100%;
786
- }
787
-
788
- .aam-extension-inactive {
789
- border: 1px solid transparent;
790
- display: inline-block;
791
- font-size: 12px;
792
- font-weight: 400;
793
- line-height: 1.42857;
794
- margin-bottom: 0;
795
- padding: 6px 12px;
796
- text-align: center;
797
- vertical-align: middle;
798
- white-space: nowrap;
799
- background-color: #D9534F;
800
- color: #FFFFFF;
801
- width: 100%;
802
- }
803
-
804
  .aam-update-check {
805
  float:right !important;
806
  }
@@ -814,9 +785,9 @@ input[type=radio]:checked + label:before {
814
  }
815
 
816
  .aam-setting-title, .aam-extension-title {
817
- font-size: 1.2em;
818
  line-height: 1em;
819
- font-weight: 700;
820
  display: block;
821
  }
822
 
@@ -832,10 +803,15 @@ input[type=radio]:checked + label:before {
832
  .aam-setting-description, .aam-extension-description {
833
  font-size: 0.9em;
834
  text-align: justify;
 
835
  line-height: 1.4;
836
  color: #666666;
837
  }
838
 
 
 
 
 
839
  .aam-help-menu.active {
840
  color: #a94442;
841
  }
@@ -949,10 +925,15 @@ input[type=radio]:checked + label:before {
949
  display: block;
950
  letter-spacing: 1px;
951
  font-weight: 700;
 
952
  text-transform: uppercase;
953
  text-align: center;
954
  }
955
 
 
 
 
 
956
  .aam-error-list {
957
  padding: 15px;
958
  list-style: disc;
@@ -1065,6 +1046,18 @@ input[type=radio]:checked + label:before {
1065
  .toggle.btn-xs{min-width:35px;min-height:22px}
1066
  .toggle-on.btn-xs{padding-right:12px}
1067
  .toggle-off.btn-xs{padding-left:12px}
 
 
 
 
 
 
 
 
 
 
 
 
1068
 
1069
  /* COVER KNOWN CSS ISSUES CASED BY OTHER PLUGINS OR THEMES */
1070
 
97
  .icon-circle-thin:before { content: '\f1db' !important; } /* '' */
98
  .icon-clone:before { content: '\f24d' !important; } /* '' */
99
  .icon-rss:before { content: '\f09e' !important; } /* '' */
100
+ .icon-dollar:before { content: '\f155' !important; } /* '' */
101
+ .icon-cubes:before { content: '\f1b3' !important; } /* '' */
102
+ .icon-cog-alt:before { content: '\e80d' !important; } /* '' */
103
+ .icon-wrench:before { content: '\e80e' !important; } /* '' */
104
 
105
  .animate-spin {
106
  -moz-animation: spin 2s infinite linear;
356
  border-radius: 0;
357
  }
358
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  .btn-right {
360
  float: right;
361
  margin-bottom: 10px;
541
  left: 0;
542
  width: 100%;
543
  height: 100%;
544
+ background-color: rgba(255, 255, 255, 0.4);
545
  z-index: 9999;
546
  }
547
 
695
  background-color: #5cb85c;
696
  }
697
 
698
+ .aam-divider {
699
+ width: 60%;
700
+ margin: 15px auto;
701
+ }
702
+
703
+ .aam-submenu-item {
704
+ padding: 2px 15px 0px 15px;
705
+ }
706
+
707
  .aam-submenu-item .aam-menu-capability {
708
  display: block;
709
  margin-top: -4px;
712
  .aam-submenu-item label {
713
  display: inline-block;
714
  width: 80%;
715
+ font-size: 0.9em;
716
+ font-weight: 500;
717
  }
718
 
719
  .aam-feature {
772
  padding: 10px;
773
  }
774
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
  .aam-update-check {
776
  float:right !important;
777
  }
785
  }
786
 
787
  .aam-setting-title, .aam-extension-title {
788
+ font-size: 1.4em;
789
  line-height: 1em;
790
+ font-weight: 500;
791
  display: block;
792
  }
793
 
803
  .aam-setting-description, .aam-extension-description {
804
  font-size: 0.9em;
805
  text-align: justify;
806
+ margin-top: 5px !important;
807
  line-height: 1.4;
808
  color: #666666;
809
  }
810
 
811
+ .aam-extension-description {
812
+ font-size: 1.1em;
813
+ }
814
+
815
  .aam-help-menu.active {
816
  color: #a94442;
817
  }
925
  display: block;
926
  letter-spacing: 1px;
927
  font-weight: 700;
928
+ margin-top: 7px;
929
  text-transform: uppercase;
930
  text-align: center;
931
  }
932
 
933
+ .extension-container {
934
+ padding: 10px 15px;
935
+ }
936
+
937
  .aam-error-list {
938
  padding: 15px;
939
  list-style: disc;
1046
  .toggle.btn-xs{min-width:35px;min-height:22px}
1047
  .toggle-on.btn-xs{padding-right:12px}
1048
  .toggle-off.btn-xs{padding-left:12px}
1049
+
1050
+ /* Autocomplete */
1051
+ .autocomplete-suggestions {
1052
+ text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
1053
+
1054
+ /* core styles should not be changed */
1055
+ position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box;
1056
+ }
1057
+ .autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; }
1058
+ .autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; }
1059
+ .autocomplete-suggestion.selected { background: #f0f0f0; }
1060
+
1061
 
1062
  /* COVER KNOWN CSS ISSUES CASED BY OTHER PLUGINS OR THEMES */
1063
 
media/font/fontello.eot CHANGED
Binary file
media/font/fontello.svg CHANGED
@@ -32,6 +32,10 @@
32
 
33
  <glyph glyph-name="basket" unicode="&#xe80c;" d="M357-7q0-29-21-50t-50-22-50 22-22 50 22 50 50 21 50-21 21-50z m500 0q0-29-21-50t-50-22-50 22-22 50 22 50 50 21 50-21 21-50z m72 607v-286q0-13-10-23t-22-12l-583-68q7-34 7-40 0-8-13-35h513q15 0 26-11t10-25-10-25-26-11h-571q-14 0-25 11t-11 25q0 6 5 18t9 20 12 22 8 17l-98 459h-114q-15 0-25 10t-11 25 11 26 25 10h143q9 0 16-3t10-9 8-14 4-14 3-17 3-14h670q14 0 25-11t11-25z" horiz-adv-x="928.6" />
34
 
 
 
 
 
35
  <glyph glyph-name="sort-down" unicode="&#xe810;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
36
 
37
  <glyph glyph-name="pencil" unicode="&#xe811;" d="M203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
@@ -94,6 +98,10 @@
94
 
95
  <glyph glyph-name="circle" unicode="&#xf111;" d="M857 350q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
96
 
 
 
 
 
97
  <glyph glyph-name="circle-thin" unicode="&#xf1db;" d="M429 707q-73 0-139-28t-114-76-76-114-29-139 29-139 76-113 114-77 139-28 138 28 114 77 76 113 29 139-29 139-76 114-114 76-138 28z m428-357q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
98
 
99
  <glyph glyph-name="clone" unicode="&#xf24d;" d="M929-61v607q0 8-6 13t-12 5h-607q-8 0-13-5t-5-13v-607q0-7 5-12t13-6h607q7 0 12 6t6 12z m71 607v-607q0-37-26-63t-63-26h-607q-37 0-63 26t-27 63v607q0 37 27 64t63 26h607q37 0 63-26t26-64z m-214 215v-90h-72v90q0 7-5 12t-13 6h-607q-7 0-12-6t-6-12v-607q0-8 6-13t12-5h90v-72h-90q-36 0-63 27t-26 63v607q0 37 26 63t63 26h607q37 0 64-26t26-63z" horiz-adv-x="1000" />
32
 
33
  <glyph glyph-name="basket" unicode="&#xe80c;" d="M357-7q0-29-21-50t-50-22-50 22-22 50 22 50 50 21 50-21 21-50z m500 0q0-29-21-50t-50-22-50 22-22 50 22 50 50 21 50-21 21-50z m72 607v-286q0-13-10-23t-22-12l-583-68q7-34 7-40 0-8-13-35h513q15 0 26-11t10-25-10-25-26-11h-571q-14 0-25 11t-11 25q0 6 5 18t9 20 12 22 8 17l-98 459h-114q-15 0-25 10t-11 25 11 26 25 10h143q9 0 16-3t10-9 8-14 4-14 3-17 3-14h670q14 0 25-11t11-25z" horiz-adv-x="928.6" />
34
 
35
+ <glyph glyph-name="cog-alt" unicode="&#xe80d;" d="M500 350q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m429-286q0 29-22 51t-50 21-50-21-21-51q0-29 21-50t50-21 51 21 21 50z m0 572q0 29-22 50t-50 21-50-21-21-50q0-30 21-51t50-21 51 21 21 51z m-215-235v-103q0-6-4-11t-8-6l-87-14q-6-19-18-42 19-27 50-64 4-6 4-11 0-7-4-11-12-17-46-50t-43-33q-7 0-12 4l-64 50q-21-11-43-17-6-60-13-87-4-13-17-13h-104q-6 0-11 4t-5 10l-13 85q-19 6-42 18l-66-50q-4-4-11-4-6 0-12 4-80 75-80 90 0 5 4 10 5 8 23 30t26 34q-13 24-20 46l-85 13q-5 1-9 5t-4 11v104q0 5 4 10t9 6l86 14q7 19 18 42-19 27-50 64-4 6-4 11 0 7 4 12 12 16 46 49t44 33q6 0 12-4l64-50q19 10 43 18 6 60 13 86 3 13 16 13h104q6 0 11-4t6-10l13-85q19-6 42-17l65 49q5 4 12 4 6 0 11-4 81-75 81-90 0-4-4-10-7-9-24-30t-25-34q13-27 19-46l85-12q6-2 9-6t4-11z m357-298v-78q0-9-83-17-6-15-16-29 28-63 28-77 0-2-2-4-68-40-69-40-5 0-26 27t-29 37q-11-1-17-1t-17 1q-7-11-29-37t-25-27q-1 0-69 40-3 2-3 4 0 14 29 77-10 14-17 29-83 8-83 17v78q0 9 83 18 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 1 17 1t17-1q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-9 83-18z m0 572v-78q0-9-83-18-6-15-16-29 28-63 28-77 0-2-2-4-68-39-69-39-5 0-26 26t-29 38q-11-1-17-1t-17 1q-7-12-29-38t-25-26q-1 0-69 39-3 2-3 4 0 14 29 77-10 14-17 29-83 9-83 18v78q0 9 83 17 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-37q12 1 17 1t17-1q28 39 51 62l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-8 83-17z" horiz-adv-x="1071.4" />
36
+
37
+ <glyph glyph-name="wrench" unicode="&#xe80e;" d="M214 29q0 14-10 25t-25 10-25-10-11-25 11-25 25-11 25 11 10 25z m360 234l-381-381q-21-20-50-20-29 0-51 20l-59 61q-21 20-21 50 0 29 21 51l380 380q22-55 64-97t97-64z m354 243q0-22-13-59-27-75-92-122t-144-46q-104 0-177 73t-73 177 73 176 177 74q32 0 67-10t60-26q9-6 9-15t-9-16l-163-94v-125l108-60q2 2 44 27t75 45 40 20q8 0 13-5t5-14z" horiz-adv-x="928.6" />
38
+
39
  <glyph glyph-name="sort-down" unicode="&#xe810;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
40
 
41
  <glyph glyph-name="pencil" unicode="&#xe811;" d="M203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
98
 
99
  <glyph glyph-name="circle" unicode="&#xf111;" d="M857 350q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
100
 
101
+ <glyph glyph-name="dollar" unicode="&#xf155;" d="M546 189q0-86-56-147t-144-77v-97q0-8-5-13t-13-5h-75q-7 0-13 5t-5 13v97q-37 5-71 18t-57 25-41 26-26 21-10 10q-9 12-1 23l58 76q3 5 12 6 9 1 14-5l1-1q63-55 135-70 21-4 42-4 45 0 79 24t35 68q0 16-9 30t-18 23-33 21-37 18-45 18q-21 9-34 14t-34 15-35 17-32 20-29 24-25 27-20 32-11 37-5 44q0 77 55 135t142 75v100q0 7 5 13t13 5h75q8 0 13-5t5-13v-98q32-3 62-13t48-19 36-20 21-17 9-7q9-11 3-22l-46-81q-4-9-12-9-8-2-15 4-2 2-9 7t-21 14-33 18-42 15-47 6q-53 0-87-24t-33-62q0-14 4-27t17-23 22-18 31-18 34-15 39-15q30-11 45-17t43-20 42-24 34-28 30-35 18-43 7-52z" horiz-adv-x="571.4" />
102
+
103
+ <glyph glyph-name="cubes" unicode="&#xf1b3;" d="M357-61l214 107v176l-214-92v-191z m-36 254l226 96-226 97-225-97z m608-254l214 107v176l-214-92v-191z m-36 254l225 96-225 97-226-97z m-250 163l214 92v149l-214-92v-149z m-36 212l246 105-246 106-246-106z m607-289v-233q0-20-10-37t-29-26l-250-125q-14-8-32-8t-32 8l-250 125q-2 1-4 2-1-1-4-2l-250-125q-14-8-32-8t-31 8l-250 125q-19 9-29 26t-11 37v233q0 21 12 39t32 26l242 104v223q0 22 12 40t31 26l250 107q13 6 28 6t28-6l250-107q20-9 32-26t12-40v-223l242-104q20-8 32-26t11-39z" horiz-adv-x="1285.7" />
104
+
105
  <glyph glyph-name="circle-thin" unicode="&#xf1db;" d="M429 707q-73 0-139-28t-114-76-76-114-29-139 29-139 76-113 114-77 139-28 138 28 114 77 76 113 29 139-29 139-76 114-114 76-138 28z m428-357q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
106
 
107
  <glyph glyph-name="clone" unicode="&#xf24d;" d="M929-61v607q0 8-6 13t-12 5h-607q-8 0-13-5t-5-13v-607q0-7 5-12t13-6h607q7 0 12 6t6 12z m71 607v-607q0-37-26-63t-63-26h-607q-37 0-63 26t-27 63v607q0 37 27 64t63 26h607q37 0 63-26t26-64z m-214 215v-90h-72v90q0 7-5 12t-13 6h-607q-7 0-12-6t-6-12v-607q0-8 6-13t12-5h90v-72h-90q-36 0-63 27t-26 63v607q0 37 26 63t63 26h607q37 0 64-26t26-63z" horiz-adv-x="1000" />
media/font/fontello.ttf CHANGED
Binary file
media/font/fontello.woff CHANGED
Binary file
media/font/fontello.woff2 CHANGED
Binary file
media/js/aam.js CHANGED
@@ -18,6 +18,7 @@
18
  * @returns {undefined}
19
  */
20
  function UI() {
 
21
  /**
22
  * Role List Interface
23
  *
@@ -48,7 +49,7 @@
48
  dataType: 'json',
49
  data: {
50
  action: 'aam',
51
- sub_action: 'Role.getList',
52
  _ajax_nonce: aamLocal.nonce,
53
  exclude: exclude
54
  },
@@ -77,6 +78,21 @@
77
  }
78
  });
79
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  //initialize the role list table
82
  $('#role-list').DataTable({
@@ -92,7 +108,7 @@
92
  dataType: 'json',
93
  data: {
94
  action: 'aam',
95
- sub_action: 'Role.getTable',
96
  _ajax_nonce: aamLocal.nonce
97
  }
98
  },
@@ -106,12 +122,13 @@
106
  infoFiltered: ''
107
  },
108
  initComplete: function () {
109
- if (!aam.isUI() && parseInt(aamLocal.caps.create_roles)) {
110
  var create = $('<a/>', {
111
  'href': '#',
112
  'class': 'btn btn-primary'
113
  }).html('<i class="icon-plus"></i> ' + aam.__('Create'))
114
  .bind('click', function () {
 
115
  $('#add-role-modal').modal('show');
116
  });
117
 
@@ -131,7 +148,11 @@
131
  var expire = (data[5] ? '; <i class="icon-clock"></i>' : '');
132
  $('td:eq(0)', row).append(
133
  $('<i/>', {'class': 'aam-row-subtitle'}).html(
134
- aam.__('Users') + ': <b>' + parseInt(data[1]) + '</b>; ID: <b>' + data[0] + '</b>' + expire
 
 
 
 
135
  )
136
  );
137
 
@@ -158,7 +179,7 @@
158
  $('i.icon-cog', container).attr(
159
  'class', 'aam-row-action icon-spin4 animate-spin'
160
  );
161
- aam.fetchContent();
162
  $('i.icon-spin4', container).attr(
163
  'class', 'aam-row-action icon-cog text-muted'
164
  );
@@ -177,13 +198,17 @@
177
  $(container).append($('<i/>', {
178
  'class': 'aam-row-action icon-pencil text-warning'
179
  }).bind('click', function () {
 
180
  $('#edit-role-btn').data('role', data[0]);
181
  $('#edit-role-name').val(data[2]);
182
  $('#edit-role-expiration').val(data[5]);
183
  $('#edit-role-modal').modal('show');
184
  fetchRoleList(data[0]);
 
185
  //TODO - Rerwite JavaScript to support $.aam
186
  $.aamEditRole = data;
 
 
187
  }).attr({
188
  'data-toggle': "tooltip",
189
  'title': aam.__('Edit Role')
@@ -278,15 +303,17 @@
278
 
279
  var data = {
280
  action: 'aam',
281
- sub_action: 'Role.add',
282
  _ajax_nonce: aamLocal.nonce
283
  };
284
 
285
  $('input,select', '#add-role-modal .modal-body').each(function() {
286
- if ($(this).attr('type') === 'checkbox') {
287
- data[$(this).attr('name')] = $(this).prop('checked') ? 1 : 0;
288
- } else {
289
- data[$(this).attr('name')] = $.trim($(this).val());
 
 
290
  }
291
  });
292
 
@@ -307,7 +334,7 @@
307
  response.role.name,
308
  response.role.level
309
  );
310
- aam.fetchContent();
311
  $('#add-role-modal').modal('hide');
312
  } else {
313
  aam.notification(
@@ -323,7 +350,7 @@
323
  }
324
  });
325
  } else {
326
- $('input,select', '#add-role-modal .modal-body').focus().parent().addClass('has-error');
327
  }
328
  });
329
 
@@ -335,14 +362,20 @@
335
 
336
  var data = {
337
  action: 'aam',
338
- sub_action: 'Role.edit',
339
  _ajax_nonce: aamLocal.nonce,
340
  subject: 'role',
341
  subjectId: $(_this).data('role')
342
  };
343
 
344
  $('input,select', '#edit-role-modal .modal-body').each(function() {
345
- data[$(this).attr('name')] = $.trim($(this).val());
 
 
 
 
 
 
346
  });
347
 
348
  if (data.name) {
@@ -384,7 +417,7 @@
384
  dataType: 'json',
385
  data: {
386
  action: 'aam',
387
- sub_action: 'Role.delete',
388
  _ajax_nonce: aamLocal.nonce,
389
  subject: 'role',
390
  subjectId: $(_this).data('role')
@@ -466,7 +499,7 @@
466
  dataType: 'json',
467
  data: {
468
  action: 'aam',
469
- sub_action: 'User.block',
470
  _ajax_nonce: aamLocal.nonce,
471
  subject: 'user',
472
  subjectId: id
@@ -548,7 +581,7 @@
548
  dataType: 'json',
549
  data: {
550
  action: 'aam',
551
- sub_action: 'User.getTable',
552
  _ajax_nonce: aamLocal.nonce
553
  }
554
  },
@@ -562,7 +595,7 @@
562
  infoFiltered: ''
563
  },
564
  initComplete: function () {
565
- if (!aam.isUI() && parseInt(aamLocal.caps.create_users)) {
566
  var create = $('<a/>', {
567
  'href': '#',
568
  'class': 'btn btn-primary'
@@ -607,7 +640,7 @@
607
 
608
  if (!aam.isUI()) {
609
  $('i.icon-cog', container).attr('class', 'aam-row-action icon-spin4 animate-spin');
610
- aam.fetchContent();
611
  $('i.icon-spin4', container).attr('class', 'aam-row-action icon-cog text-muted');
612
  } else {
613
  $.aam.loadAccessForm($('#load-post-object-type').val(), $('#load-post-object').val(), $(this));
@@ -726,7 +759,7 @@
726
  $('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
727
 
728
  if (!aam.isUI()) {
729
- aam.fetchContent();
730
  $('i.icon-spin4', $(this)).attr('class', 'icon-cog');
731
  } else {
732
  $.aam.loadAccessForm($('#load-post-object-type').val(), $('#load-post-object').val(), null, function () {
@@ -756,7 +789,7 @@
756
  aam.setSubject('default', null, aam.__('All Users, Roles and Visitor'), 0);
757
  $('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
758
  if (!aam.isUI()) {
759
- aam.fetchContent();
760
  $('i.icon-spin4', $(this)).attr('class', 'icon-cog');
761
  } else {
762
  $.aam.loadAccessForm($('#load-post-object-type').val(), $('#load-post-object').val(), null, function () {
@@ -790,7 +823,7 @@
790
  dataType: 'json',
791
  data: {
792
  action: 'aam',
793
- sub_action: 'Menu.save',
794
  subject: aam.getSubject().type,
795
  subjectId: aam.getSubject().id,
796
  _ajax_nonce: aamLocal.nonce,
@@ -859,14 +892,21 @@
859
 
860
  $('input[type="checkbox"]', '#admin-menu').each(function () {
861
  $(this).bind('click', function () {
 
 
862
  aam.save(
863
- $(this).data('menu-id'),
864
- $(this).attr('checked') ? 1 : 0,
865
  'menu',
866
  null,
867
  function(result) {
868
  if (result.status === 'success') {
869
  $('#aam-menu-overwrite').show();
 
 
 
 
 
870
  }
871
  }
872
  );
@@ -904,7 +944,7 @@
904
  dataType: 'html',
905
  data: {
906
  action: 'aam',
907
- sub_action: 'Metabox.getContent',
908
  _ajax_nonce: aamLocal.nonce,
909
  subject: aam.getSubject().type,
910
  subjectId: aam.getSubject().id
@@ -933,21 +973,21 @@
933
  dataType: 'json',
934
  data: {
935
  action: 'aam',
936
- sub_action: 'Metabox.refreshList',
937
  _ajax_nonce: aamLocal.nonce
938
  },
939
  beforeSend: function () {
940
  $('i', '#refresh-metabox-list').attr(
941
- 'class', 'icon-spin4 animate-spin'
942
- );
943
  },
944
  success: function (response) {
945
  if (response.status === 'success') {
946
  getContent();
947
  } else {
948
  aam.notification(
949
- 'danger', aam.__('Failed to retrieve mataboxes')
950
- );
951
  }
952
  },
953
  error: function () {
@@ -967,7 +1007,7 @@
967
  dataType: 'json',
968
  data: {
969
  action: 'aam',
970
- sub_action: 'Metabox.initURL',
971
  _ajax_nonce: aamLocal.nonce,
972
  url: $('#init-url').val()
973
  },
@@ -1001,6 +1041,7 @@
1001
 
1002
  $('input[type="checkbox"]', '#metabox-list').each(function () {
1003
  $(this).bind('click', function () {
 
1004
  aam.save(
1005
  $(this).data('metabox'),
1006
  $(this).attr('checked') ? 1 : 0,
@@ -1009,6 +1050,12 @@
1009
  function(result) {
1010
  if (result.status === 'success') {
1011
  $('#aam-metabox-overwrite').show();
 
 
 
 
 
 
1012
  }
1013
  }
1014
  );
@@ -1079,7 +1126,7 @@
1079
  type: 'POST',
1080
  data: {
1081
  action: 'aam',
1082
- sub_action: 'Capability.getTable',
1083
  _ajax_nonce: aamLocal.nonce,
1084
  subject: aam.getSubject().type,
1085
  subjectId: aam.getSubject().id
@@ -1186,7 +1233,7 @@
1186
  dataType: 'json',
1187
  data: {
1188
  action: 'aam',
1189
- sub_action: 'Capability.add',
1190
  _ajax_nonce: aamLocal.nonce,
1191
  capability: capability,
1192
  subject: aam.getSubject().type,
@@ -1231,7 +1278,7 @@
1231
  dataType: 'json',
1232
  data: {
1233
  action: 'aam',
1234
- sub_action: 'Capability.update',
1235
  _ajax_nonce: aamLocal.nonce,
1236
  capability: $(this).attr('data-cap'),
1237
  updated: cap
@@ -1269,7 +1316,7 @@
1269
  dataType: 'json',
1270
  data: {
1271
  action: 'aam',
1272
- sub_action: 'Capability.delete',
1273
  _ajax_nonce: aamLocal.nonce,
1274
  subject: aam.getSubject().type,
1275
  subjectId: aam.getSubject().id,
@@ -1328,6 +1375,12 @@
1328
  var filter = {
1329
  type: null
1330
  };
 
 
 
 
 
 
1331
 
1332
  /**
1333
  *
@@ -1343,7 +1396,7 @@
1343
  dataType: 'json',
1344
  data: {
1345
  action: 'aam',
1346
- sub_action: 'Post.save',
1347
  _ajax_nonce: aamLocal.nonce,
1348
  subject: aam.getSubject().type,
1349
  subjectId: aam.getSubject().id,
@@ -1404,7 +1457,7 @@
1404
  $('.aam-overlay', container).show();
1405
 
1406
  //reset data preview elements
1407
- $('[data-preview]', container).text('');
1408
 
1409
  $('.aam-row-action', container).each(function () {
1410
  $(this).attr({
@@ -1439,7 +1492,6 @@
1439
  }
1440
  );
1441
  });
1442
-
1443
  });
1444
 
1445
  $.ajax(aamLocal.ajaxurl, {
@@ -1447,7 +1499,7 @@
1447
  dataType: 'json',
1448
  data: {
1449
  action: 'aam',
1450
- sub_action: 'Post.getAccess',
1451
  _ajax_nonce: aamLocal.nonce,
1452
  type: object,
1453
  id: id,
@@ -1459,19 +1511,20 @@
1459
  $(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
1460
  },
1461
  success: function (response) {
 
 
1462
  //iterate through each property
1463
  for (var property in response.access) {
1464
- var checked = (parseInt(response.access[property]) ? 'text-danger icon-check' : 'text-muted icon-check-empty');
1465
  var checkbox = $('[data-property="' + property + '"]', container);
1466
-
1467
  if (checkbox.length) {
 
1468
  checkbox.attr({
1469
- 'class': 'aam-row-action ' + checked
1470
  });
1471
  } else {
1472
- $('[data-preview="' + property + '"]', container).prop('data-original-value', response.access[property]);
1473
- $('[data-preview="' + property + '"]', container).html(
1474
- preparePreview(response.access[property])
1475
  );
1476
  }
1477
  }
@@ -1521,23 +1574,6 @@
1521
  });
1522
  };
1523
 
1524
- /**
1525
- *
1526
- * @param {type} text
1527
- * @returns {String}
1528
- */
1529
- function preparePreview(preview) {
1530
- if (typeof preview === 'string') {
1531
- preview = preview.replace(/<\/?[^>]+(>|$)/g, "");
1532
-
1533
- if (preview.length > 25) {
1534
- preview = preview.substring(0, 22) + '...';
1535
- }
1536
- }
1537
-
1538
- return preview;
1539
- }
1540
-
1541
  /**
1542
  *
1543
  * @returns {undefined}
@@ -1559,7 +1595,7 @@
1559
  type: 'POST',
1560
  data: function (data) {
1561
  data.action = 'aam';
1562
- data.sub_action = 'Post.getTable';
1563
  data._ajax_nonce = aamLocal.nonce;
1564
  data.subject = aam.getSubject().type;
1565
  data.subjectId = aam.getSubject().id;
@@ -1709,7 +1745,7 @@
1709
  dataType: 'json',
1710
  data: {
1711
  action: 'aam',
1712
- sub_action: 'Post.reset',
1713
  _ajax_nonce: aamLocal.nonce,
1714
  type: type,
1715
  id: id,
@@ -1742,186 +1778,53 @@
1742
  $('#load-post-object').val()
1743
  );
1744
  }
1745
-
1746
- $('.change-password').each(function() {
1747
- $(this).bind('click', function() {
1748
- var password = $('#' + $(this).attr('data-preview-id')).text();
1749
-
1750
- if (password !== '') {
1751
- $('#password-value').val(password);
1752
- } else {
1753
- $('#password-value').val('');
1754
- }
1755
-
1756
- $('#change-password-btn').attr({
1757
- 'data-ref': $(this).attr('data-ref'),
1758
- 'data-preview-id': $(this).attr('data-preview-id')
1759
- });
1760
-
1761
- $('#password-modal').modal('show');
1762
- });
1763
- });
1764
-
1765
- $('#change-password-btn').bind('click', function() {
1766
- var _this = $(this);
1767
- _this.text(aam.__('Saving...'));
1768
-
1769
- var password = $('#password-value').val();
1770
- save(
1771
- _this.attr('data-ref'),
1772
- password,
1773
- _this.attr('data-type'),
1774
- _this.attr('data-id'),
1775
- function(response) {
1776
- if (response.status === 'success') {
1777
- var preview = $('#' + _this.attr('data-preview-id'));
1778
- var action = $('.aam-row-action', preview.parent().parent().parent());
1779
-
1780
- preview.html(password ? password : '');
1781
-
1782
- if ($(action).hasClass('icon-check-empty')) {
1783
- action.trigger('click');
1784
- }
1785
- }
1786
- $('#password-modal').modal('hide');
1787
-
1788
- _this.text(aam.__('Set'));
1789
- }
1790
- );
1791
  });
1792
-
1793
- $('.change-location').each(function() {
1794
  $(this).bind('click', function() {
1795
- var location = $('#' + $(this).attr('data-preview-id')).text();
1796
-
1797
- if (location !== '') {
1798
- $('#location-value').val(location);
1799
- } else {
1800
- $('#location-value').val('');
1801
- }
1802
-
1803
- $('#change-location-btn').attr({
1804
- 'data-ref': $(this).attr('data-ref'),
1805
- 'data-preview-id': $(this).attr('data-preview-id')
1806
- });
1807
-
1808
- $('#location-modal').modal('show');
1809
- });
1810
- });
1811
-
1812
- $('#change-location-btn').bind('click', function() {
1813
- var _this = $(this);
1814
- _this.text(aam.__('Saving...'));
1815
-
1816
- var redirect = $('#location-value').val();
1817
- save(
1818
- _this.attr('data-ref'),
1819
- redirect,
1820
- _this.attr('data-type'),
1821
- _this.attr('data-id'),
1822
- function(response) {
1823
- if (response.status === 'success') {
1824
- var preview = $('#' + _this.attr('data-preview-id'));
1825
- var action = $('.aam-row-action', preview.parent().parent().parent());
1826
-
1827
- preview.html(redirect ? redirect : '');
1828
-
1829
- if ($(action).hasClass('icon-check-empty')) {
1830
- action.trigger('click');
1831
  }
1832
- }
1833
- $('#location-modal').modal('hide');
1834
- _this.text(aam.__('Set'));
1835
- }
1836
- );
1837
- });
1838
-
1839
- $('.change-expiration').each(function() {
1840
- $(this).bind('click', function() {
1841
- var expiration = $('#' + $(this).attr('data-preview-id')).text();
1842
-
1843
- if (expiration !== '') {
1844
- $('#expiration-value').val(expiration);
1845
- } else {
1846
- $('#expiration-value').val('');
1847
- }
1848
-
1849
- $('#change-expiration-btn').attr({
1850
- 'data-ref': $(this).attr('data-ref'),
1851
- 'data-preview-id': $(this).attr('data-preview-id')
1852
- });
1853
-
1854
- $('#expiration-modal').modal('show');
1855
- });
1856
- });
1857
-
1858
- $('#change-expiration-btn').bind('click', function() {
1859
- var _this = $(this);
1860
- _this.text(aam.__('Saving...'));
1861
-
1862
- var expires = $('#expiration-value').val();
1863
- save(
1864
- _this.attr('data-ref'),
1865
- expires,
1866
- _this.attr('data-type'),
1867
- _this.attr('data-id'),
1868
- function(response) {
1869
- if (response.status === 'success') {
1870
- var preview = $('#' + _this.attr('data-preview-id'));
1871
- var action = $('.aam-row-action', preview.parent().parent().parent());
1872
- preview.html(response.value);
1873
 
1874
- if ($(action).hasClass('icon-check-empty')) {
1875
- action.trigger('click');
1876
- }
1877
  }
1878
- $('#expiration-modal').modal('hide');
1879
- _this.text(aam.__('Set'));
1880
- }
1881
- );
1882
- });
1883
-
1884
- $('.change-teaser').each(function() {
1885
- $(this).bind('click', function() {
1886
- var teaser = $('#' + $(this).attr('data-preview-id')).prop('data-original-value');
1887
- $('#teaser-value').val(teaser);
1888
-
1889
- $('#change-teaser-btn').attr({
1890
- 'data-ref': $(this).attr('data-ref'),
1891
- 'data-preview-id': $(this).attr('data-preview-id')
1892
- });
1893
-
1894
- $('#teaser-modal').modal('show');
1895
  });
1896
  });
1897
-
1898
- $('#change-teaser-btn').bind('click', function() {
1899
- var _this = $(this);
1900
- _this.text(aam.__('Saving...'));
1901
-
1902
- var teaser = $('#teaser-value').val();
1903
- save(
1904
- _this.attr('data-ref'),
1905
- teaser,
1906
- _this.attr('data-type'),
1907
- _this.attr('data-id'),
1908
- function(response) {
1909
- if (response.status === 'success') {
1910
- var preview = $('#' + _this.attr('data-preview-id'));
1911
- var action = $('.aam-row-action', preview.parent().parent().parent());
1912
-
1913
- preview.prop('data-original-value', teaser);
1914
- preview.html(preparePreview(teaser));
1915
-
1916
- if ($(action).hasClass('icon-check-empty')) {
1917
- action.trigger('click');
1918
- }
1919
- }
1920
- $('#teaser-modal').modal('hide');
1921
- _this.text(aam.__('Save'));
1922
- }
1923
- );
1924
- });
1925
  }
1926
  }
1927
 
@@ -2058,7 +1961,7 @@
2058
  );
2059
  });
2060
  });
2061
-
2062
  $('#login-redirect-reset').bind('click', function () {
2063
  aam.reset('loginRedirect');
2064
  });
@@ -2125,7 +2028,7 @@
2125
  );
2126
  });
2127
  });
2128
-
2129
  $('#logout-redirect-reset').bind('click', function () {
2130
  aam.reset('logoutRedirect');
2131
  });
@@ -2136,55 +2039,6 @@
2136
 
2137
  })(jQuery);
2138
 
2139
- /**
2140
- * Teaser Interface
2141
- *
2142
- * @param {jQuery} $
2143
- *
2144
- * @returns {void}
2145
- */
2146
- (function ($) {
2147
-
2148
- /**
2149
- *
2150
- * @returns {undefined}
2151
- */
2152
- function initialize() {
2153
- var container = '#teaser-content';
2154
-
2155
- if ($(container).length) {
2156
- $('input, textarea', container).each(function () {
2157
- $(this).bind('change', function () {
2158
- if ($(this).is('input[type="checkbox"]')) {
2159
- var val = $(this).prop('checked') ? $(this).val() : 0;
2160
- } else {
2161
- val = $.trim($(this).val());
2162
- }
2163
- //save redirect type
2164
- aam.save(
2165
- $(this).attr('name'),
2166
- val,
2167
- 'teaser',
2168
- null,
2169
- function(result) {
2170
- if (result.status === 'success') {
2171
- $('#aam-teaser-overwrite').show();
2172
- }
2173
- }
2174
- );
2175
- });
2176
- });
2177
-
2178
- $('#teaser-reset').bind('click', function () {
2179
- aam.reset('teaser');
2180
- });
2181
- }
2182
- }
2183
-
2184
- aam.addHook('init', initialize);
2185
-
2186
- })(jQuery);
2187
-
2188
  /**
2189
  * 404 Redirect Interface
2190
  *
@@ -2206,7 +2060,7 @@
2206
  dataType: 'json',
2207
  data: {
2208
  action: 'aam',
2209
- sub_action: '404Redirect.save',
2210
  _ajax_nonce: aamLocal.nonce,
2211
  subject: aam.getSubject().type,
2212
  subjectId: aam.getSubject().id,
@@ -2266,10 +2120,11 @@
2266
 
2267
  /**
2268
  *
2269
- * @param {*} data
2270
- * @param {*} completeCallback
 
2271
  */
2272
- function downloadExtension(data, completeCallback) {
2273
  $.ajax(aamLocal.ajaxurl, {
2274
  type: 'POST',
2275
  dataType: 'json',
@@ -2277,7 +2132,7 @@
2277
  success: function (response) {
2278
  if (response.status === 'success') {
2279
  setTimeout(function () {
2280
- location.reload();
2281
  }, 500);
2282
  } else {
2283
  aam.notification('danger', aam.__(response.error));
@@ -2292,7 +2147,36 @@
2292
  aam.notification('danger', aam.__('Application error'));
2293
  },
2294
  complete: function() {
2295
- completeCallback();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2296
  }
2297
  });
2298
  }
@@ -2310,14 +2194,14 @@
2310
  dataType: 'json',
2311
  data: {
2312
  action: 'aam',
2313
- sub_action: 'Extension.check',
2314
  _ajax_nonce: aamLocal.nonce,
2315
  },
2316
  beforeSend: function () {
2317
  $('#aam-update-check i').attr('class', 'icon-spin4 animate-spin');
2318
  },
2319
  complete: function () {
2320
- location.reload();
2321
  }
2322
  });
2323
  });
@@ -2338,7 +2222,7 @@
2338
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
2339
  downloadExtension({
2340
  action: 'aam',
2341
- sub_action: 'Extension.install',
2342
  _ajax_nonce: aamLocal.nonce,
2343
  license: $('#extension-key').val()
2344
  }, function() {
@@ -2354,7 +2238,7 @@
2354
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
2355
  downloadExtension({
2356
  action: 'aam',
2357
- sub_action: 'Extension.update',
2358
  _ajax_nonce: aamLocal.nonce,
2359
  extension: _this.data('product')
2360
  }, function() {
@@ -2362,6 +2246,36 @@
2362
  });
2363
  });
2364
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2365
 
2366
  //download extension
2367
  $('.aam-download-extension').each(function () {
@@ -2371,7 +2285,7 @@
2371
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
2372
  downloadExtension({
2373
  action: 'aam',
2374
- sub_action: 'Extension.install',
2375
  _ajax_nonce: aamLocal.nonce,
2376
  license: _this.data('license')
2377
  }, function() {
@@ -2414,6 +2328,7 @@
2414
  *
2415
  * @param {type} param
2416
  * @param {type} value
 
2417
  * @returns {undefined}
2418
  */
2419
  function save(param, value) {
@@ -2422,7 +2337,7 @@
2422
  dataType: 'json',
2423
  data: {
2424
  action: 'aam',
2425
- sub_action: 'Utility.save',
2426
  _ajax_nonce: aamLocal.nonce,
2427
  param: param,
2428
  value: value
@@ -2438,14 +2353,17 @@
2438
  * @returns {undefined}
2439
  */
2440
  function initialize() {
2441
- if ($('#utilities-content').length) {
2442
  $('[data-toggle="toggle"]').bootstrapToggle();
2443
 
2444
- $('input[type="checkbox"]', '#utilities-content').bind('change', function () {
2445
- save($(this).attr('name'), ($(this).prop('checked') ? 1 : 0));
 
 
 
2446
  });
2447
 
2448
- $('input[type="text"]', '#utilities-content').bind('change', function() {
2449
  save($(this).attr('name'), $(this).val());
2450
  });
2451
 
@@ -2455,15 +2373,18 @@
2455
  dataType: 'json',
2456
  data: {
2457
  action: 'aam',
2458
- sub_action: 'Utility.clear',
2459
  _ajax_nonce: aamLocal.nonce
2460
  },
2461
  beforeSend: function() {
2462
  $('#clear-settings').prop('disabled', true);
 
2463
  },
2464
- success: function (response) {
2465
  if (response.status === 'success') {
2466
- location.reload();
 
 
2467
  }
2468
  },
2469
  error: function () {
@@ -2471,6 +2392,8 @@
2471
  },
2472
  complete: function() {
2473
  $('#clear-settings').prop('disabled', false);
 
 
2474
  }
2475
  });
2476
  });
@@ -2481,15 +2404,18 @@
2481
  dataType: 'json',
2482
  data: {
2483
  action: 'aam',
2484
- sub_action: 'Utility.clearCache',
2485
  _ajax_nonce: aamLocal.nonce
2486
  },
2487
  beforeSend: function() {
2488
  $('#clear-cache').prop('disabled', true);
 
2489
  },
2490
- success: function (response) {
2491
  if (response.status === 'success') {
2492
- location.reload();
 
 
2493
  }
2494
  },
2495
  error: function () {
@@ -2497,6 +2423,7 @@
2497
  },
2498
  complete: function() {
2499
  $('#clear-cache').prop('disabled', false);
 
2500
  }
2501
  });
2502
  });
@@ -2507,12 +2434,13 @@
2507
  dataType: 'json',
2508
  data: {
2509
  action: 'aam',
2510
- sub_action: 'Utility.export',
2511
  _ajax_nonce: aamLocal.nonce
2512
  },
2513
  beforeSend: function () {
 
2514
  $('#export-aam').attr('data-lable', $('#export-aam').text());
2515
- $('#export-aam').html('<i class="icon-spin4 animate-spin"></i>');
2516
  },
2517
  success: function(response) {
2518
  if (response.status === 'success') {
@@ -2527,7 +2455,8 @@
2527
  aam.notification('danger', aam.__('Application Error'));
2528
  },
2529
  complete: function () {
2530
- $('#export-aam').html($('#export-aam').attr('data-lable'));
 
2531
  }
2532
  });
2533
  });
@@ -2557,17 +2486,18 @@
2557
  dataType: 'json',
2558
  data: {
2559
  action: 'aam',
2560
- sub_action: 'Utility.import',
2561
  _ajax_nonce: aamLocal.nonce,
2562
  json: json
2563
  },
2564
  beforeSend: function () {
 
2565
  $('#import-aam').attr('data-lable', $('#import-aam').text());
2566
- $('#import-aam').html('<i class="icon-spin4 animate-spin"></i>');
2567
  },
2568
  success: function(response) {
2569
  if (response.status === 'success') {
2570
- aam.notification('success', 'Data Imported Successfully');
2571
  // location.reload();
2572
  } else {
2573
  aam.notification('danger', aam.__('Invalid data format'));
@@ -2577,6 +2507,7 @@
2577
  aam.notification('danger', aam.__('Application Error'));
2578
  },
2579
  complete: function () {
 
2580
  $('#import-aam').html($('#import-aam').attr('data-lable'));
2581
  }
2582
  });
@@ -2596,9 +2527,8 @@
2596
  aam.addHook('init', initialize);
2597
 
2598
  })(jQuery);
2599
-
2600
 
2601
- aam.fetchContent(); //fetch default AAM content
2602
  }
2603
 
2604
  /**
@@ -2616,6 +2546,11 @@
2616
  * Different UI hooks
2617
  */
2618
  this.hooks = {};
 
 
 
 
 
2619
  }
2620
 
2621
  /**
@@ -2645,7 +2580,7 @@
2645
  *
2646
  * @returns {undefined}
2647
  */
2648
- AAM.prototype.fetchContent = function () {
2649
  var _this = this;
2650
 
2651
  //referred object ID like post, page or any custom post type
@@ -2658,6 +2593,7 @@
2658
  data: {
2659
  action: 'aamc',
2660
  _ajax_nonce: aamLocal.nonce,
 
2661
  subject: this.getSubject().type,
2662
  subjectId: this.getSubject().id,
2663
  oid: object ? object[1] : null,
@@ -2688,6 +2624,16 @@
2688
  }
2689
 
2690
  item.trigger('click');
 
 
 
 
 
 
 
 
 
 
2691
  }
2692
  });
2693
  };
@@ -2724,6 +2670,40 @@
2724
  }
2725
  };
2726
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2727
  /**
2728
  * Initialize the AAM
2729
  *
@@ -2769,6 +2749,14 @@
2769
  });
2770
  $(this).tooltip('show');
2771
  });
 
 
 
 
 
 
 
 
2772
 
2773
  // preventDefault for all links with # href
2774
  $('#aam-container').delegate('a[href="#"]', 'click', function(event) {
@@ -2896,7 +2884,7 @@
2896
  object: object
2897
  },
2898
  success: function () {
2899
- aam.fetchContent();
2900
  },
2901
  error: function () {
2902
  aam.notification('danger', aam.__('Application error'));
18
  * @returns {undefined}
19
  */
20
  function UI() {
21
+
22
  /**
23
  * Role List Interface
24
  *
49
  dataType: 'json',
50
  data: {
51
  action: 'aam',
52
+ sub_action: 'Subject_Role.getList',
53
  _ajax_nonce: aamLocal.nonce,
54
  exclude: exclude
55
  },
78
  }
79
  });
80
  }
81
+
82
+ /**
83
+ *
84
+ * @param {type} container
85
+ * @returns {undefined}
86
+ */
87
+ function resetForm(container) {
88
+ $('input,select', container).each(function() {
89
+ if ($(this).attr('type') === 'checkbox') {
90
+ $(this).prop('checked', false);
91
+ } else {
92
+ $(this).val('');
93
+ }
94
+ });
95
+ }
96
 
97
  //initialize the role list table
98
  $('#role-list').DataTable({
108
  dataType: 'json',
109
  data: {
110
  action: 'aam',
111
+ sub_action: 'Subject_Role.getTable',
112
  _ajax_nonce: aamLocal.nonce
113
  }
114
  },
122
  infoFiltered: ''
123
  },
124
  initComplete: function () {
125
+ if (!aam.isUI() && aamLocal.caps.create_roles) {
126
  var create = $('<a/>', {
127
  'href': '#',
128
  'class': 'btn btn-primary'
129
  }).html('<i class="icon-plus"></i> ' + aam.__('Create'))
130
  .bind('click', function () {
131
+ resetForm('#add-role-modal .modal-body');
132
  $('#add-role-modal').modal('show');
133
  });
134
 
148
  var expire = (data[5] ? '; <i class="icon-clock"></i>' : '');
149
  $('td:eq(0)', row).append(
150
  $('<i/>', {'class': 'aam-row-subtitle'}).html(
151
+ aam.applyFilters(
152
+ 'role-subtitle',
153
+ aam.__('Users') + ': <b>' + parseInt(data[1]) + '</b>; ID: <b>' + data[0] + '</b>' + expire,
154
+ data
155
+ )
156
  )
157
  );
158
 
179
  $('i.icon-cog', container).attr(
180
  'class', 'aam-row-action icon-spin4 animate-spin'
181
  );
182
+ aam.fetchContent('main');
183
  $('i.icon-spin4', container).attr(
184
  'class', 'aam-row-action icon-cog text-muted'
185
  );
198
  $(container).append($('<i/>', {
199
  'class': 'aam-row-action icon-pencil text-warning'
200
  }).bind('click', function () {
201
+ resetForm('#edit-role-modal .modal-body');
202
  $('#edit-role-btn').data('role', data[0]);
203
  $('#edit-role-name').val(data[2]);
204
  $('#edit-role-expiration').val(data[5]);
205
  $('#edit-role-modal').modal('show');
206
  fetchRoleList(data[0]);
207
+
208
  //TODO - Rerwite JavaScript to support $.aam
209
  $.aamEditRole = data;
210
+
211
+ aam.triggerHook('edit-role-modal', data);
212
  }).attr({
213
  'data-toggle': "tooltip",
214
  'title': aam.__('Edit Role')
303
 
304
  var data = {
305
  action: 'aam',
306
+ sub_action: 'Subject_Role.add',
307
  _ajax_nonce: aamLocal.nonce
308
  };
309
 
310
  $('input,select', '#add-role-modal .modal-body').each(function() {
311
+ if ($(this).attr('name')) {
312
+ if ($(this).attr('type') === 'checkbox') {
313
+ data[$(this).attr('name')] = $(this).prop('checked') ? 1 : 0;
314
+ } else {
315
+ data[$(this).attr('name')] = $.trim($(this).val());
316
+ }
317
  }
318
  });
319
 
334
  response.role.name,
335
  response.role.level
336
  );
337
+ aam.fetchContent('main');
338
  $('#add-role-modal').modal('hide');
339
  } else {
340
  aam.notification(
350
  }
351
  });
352
  } else {
353
+ $('input[name="name"]', '#add-role-modal').focus().parent().addClass('has-error');
354
  }
355
  });
356
 
362
 
363
  var data = {
364
  action: 'aam',
365
+ sub_action: 'Subject_Role.edit',
366
  _ajax_nonce: aamLocal.nonce,
367
  subject: 'role',
368
  subjectId: $(_this).data('role')
369
  };
370
 
371
  $('input,select', '#edit-role-modal .modal-body').each(function() {
372
+ if ($(this).attr('name')) {
373
+ if ($(this).attr('type') === 'checkbox') {
374
+ data[$(this).attr('name')] = $(this).prop('checked') ? 1 : 0;
375
+ } else {
376
+ data[$(this).attr('name')] = $.trim($(this).val());
377
+ }
378
+ }
379
  });
380
 
381
  if (data.name) {
417
  dataType: 'json',
418
  data: {
419
  action: 'aam',
420
+ sub_action: 'Subject_Role.delete',
421
  _ajax_nonce: aamLocal.nonce,
422
  subject: 'role',
423
  subjectId: $(_this).data('role')
499
  dataType: 'json',
500
  data: {
501
  action: 'aam',
502
+ sub_action: 'Subject_User.block',
503
  _ajax_nonce: aamLocal.nonce,
504
  subject: 'user',
505
  subjectId: id
581
  dataType: 'json',
582
  data: {
583
  action: 'aam',
584
+ sub_action: 'Subject_User.getTable',
585
  _ajax_nonce: aamLocal.nonce
586
  }
587
  },
595
  infoFiltered: ''
596
  },
597
  initComplete: function () {
598
+ if (!aam.isUI() && aamLocal.caps.create_users) {
599
  var create = $('<a/>', {
600
  'href': '#',
601
  'class': 'btn btn-primary'
640
 
641
  if (!aam.isUI()) {
642
  $('i.icon-cog', container).attr('class', 'aam-row-action icon-spin4 animate-spin');
643
+ aam.fetchContent('main');
644
  $('i.icon-spin4', container).attr('class', 'aam-row-action icon-cog text-muted');
645
  } else {
646
  $.aam.loadAccessForm($('#load-post-object-type').val(), $('#load-post-object').val(), $(this));
759
  $('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
760
 
761
  if (!aam.isUI()) {
762
+ aam.fetchContent('main');
763
  $('i.icon-spin4', $(this)).attr('class', 'icon-cog');
764
  } else {
765
  $.aam.loadAccessForm($('#load-post-object-type').val(), $('#load-post-object').val(), null, function () {
789
  aam.setSubject('default', null, aam.__('All Users, Roles and Visitor'), 0);
790
  $('i.icon-cog', $(this)).attr('class', 'icon-spin4 animate-spin');
791
  if (!aam.isUI()) {
792
+ aam.fetchContent('main');
793
  $('i.icon-spin4', $(this)).attr('class', 'icon-cog');
794
  } else {
795
  $.aam.loadAccessForm($('#load-post-object-type').val(), $('#load-post-object').val(), null, function () {
823
  dataType: 'json',
824
  data: {
825
  action: 'aam',
826
+ sub_action: 'Main_Menu.save',
827
  subject: aam.getSubject().type,
828
  subjectId: aam.getSubject().id,
829
  _ajax_nonce: aamLocal.nonce,
892
 
893
  $('input[type="checkbox"]', '#admin-menu').each(function () {
894
  $(this).bind('click', function () {
895
+ var _this = $(this);
896
+
897
  aam.save(
898
+ _this.data('menu-id'),
899
+ _this.attr('checked') ? 1 : 0,
900
  'menu',
901
  null,
902
  function(result) {
903
  if (result.status === 'success') {
904
  $('#aam-menu-overwrite').show();
905
+ if (_this.attr('checked')) {
906
+ _this.next().attr('data-original-title', aam.__('Uncheck to allow'));
907
+ } else {
908
+ _this.next().attr('data-original-title', aam.__('Check to restrict'));
909
+ }
910
  }
911
  }
912
  );
944
  dataType: 'html',
945
  data: {
946
  action: 'aam',
947
+ sub_action: 'Main_Metabox.getContent',
948
  _ajax_nonce: aamLocal.nonce,
949
  subject: aam.getSubject().type,
950
  subjectId: aam.getSubject().id
973
  dataType: 'json',
974
  data: {
975
  action: 'aam',
976
+ sub_action: 'Main_Metabox.refreshList',
977
  _ajax_nonce: aamLocal.nonce
978
  },
979
  beforeSend: function () {
980
  $('i', '#refresh-metabox-list').attr(
981
+ 'class', 'icon-spin4 animate-spin'
982
+ );
983
  },
984
  success: function (response) {
985
  if (response.status === 'success') {
986
  getContent();
987
  } else {
988
  aam.notification(
989
+ 'danger', aam.__('Failed to retrieve mataboxes')
990
+ );
991
  }
992
  },
993
  error: function () {
1007
  dataType: 'json',
1008
  data: {
1009
  action: 'aam',
1010
+ sub_action: 'Main_Metabox.initURL',
1011
  _ajax_nonce: aamLocal.nonce,
1012
  url: $('#init-url').val()
1013
  },
1041
 
1042
  $('input[type="checkbox"]', '#metabox-list').each(function () {
1043
  $(this).bind('click', function () {
1044
+ var _this = $(this);
1045
  aam.save(
1046
  $(this).data('metabox'),
1047
  $(this).attr('checked') ? 1 : 0,
1050
  function(result) {
1051
  if (result.status === 'success') {
1052
  $('#aam-metabox-overwrite').show();
1053
+
1054
+ if (_this.attr('checked')) {
1055
+ _this.next().attr('data-original-title', aam.__('Uncheck to show'));
1056
+ } else {
1057
+ _this.next().attr('data-original-title', aam.__('Check to hide'));
1058
+ }
1059
  }
1060
  }
1061
  );
1126
  type: 'POST',
1127
  data: {
1128
  action: 'aam',
1129
+ sub_action: 'Main_Capability.getTable',
1130
  _ajax_nonce: aamLocal.nonce,
1131
  subject: aam.getSubject().type,
1132
  subjectId: aam.getSubject().id
1233
  dataType: 'json',
1234
  data: {
1235
  action: 'aam',
1236
+ sub_action: 'Main_Capability.add',
1237
  _ajax_nonce: aamLocal.nonce,
1238
  capability: capability,
1239
  subject: aam.getSubject().type,
1278
  dataType: 'json',
1279
  data: {
1280
  action: 'aam',
1281
+ sub_action: 'Main_Capability.update',
1282
  _ajax_nonce: aamLocal.nonce,
1283
  capability: $(this).attr('data-cap'),
1284
  updated: cap
1316
  dataType: 'json',
1317
  data: {
1318
  action: 'aam',
1319
+ sub_action: 'Main_Capability.delete',
1320
  _ajax_nonce: aamLocal.nonce,
1321
  subject: aam.getSubject().type,
1322
  subjectId: aam.getSubject().id,
1375
  var filter = {
1376
  type: null
1377
  };
1378
+
1379
+ /**
1380
+ *
1381
+ * @type type
1382
+ */
1383
+ var objectAccess = {};
1384
 
1385
  /**
1386
  *
1396
  dataType: 'json',
1397
  data: {
1398
  action: 'aam',
1399
+ sub_action: 'Main_Post.save',
1400
  _ajax_nonce: aamLocal.nonce,
1401
  subject: aam.getSubject().type,
1402
  subjectId: aam.getSubject().id,
1457
  $('.aam-overlay', container).show();
1458
 
1459
  //reset data preview elements
1460
+ $('.option-preview', container).text('');
1461
 
1462
  $('.aam-row-action', container).each(function () {
1463
  $(this).attr({
1492
  }
1493
  );
1494
  });
 
1495
  });
1496
 
1497
  $.ajax(aamLocal.ajaxurl, {
1499
  dataType: 'json',
1500
  data: {
1501
  action: 'aam',
1502
+ sub_action: 'Main_Post.getAccess',
1503
  _ajax_nonce: aamLocal.nonce,
1504
  type: object,
1505
  id: id,
1511
  $(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
1512
  },
1513
  success: function (response) {
1514
+ objectAccess = response;
1515
+
1516
  //iterate through each property
1517
  for (var property in response.access) {
 
1518
  var checkbox = $('[data-property="' + property + '"]', container);
1519
+
1520
  if (checkbox.length) {
1521
+ var cname = (parseInt(response.access[property]) ? 'text-danger icon-check' : 'text-muted icon-check-empty');
1522
  checkbox.attr({
1523
+ 'class': 'aam-row-action ' + cname
1524
  });
1525
  } else {
1526
+ $('.option-preview[data-ref="' + property + '"]').html(
1527
+ response.preview[property]
 
1528
  );
1529
  }
1530
  }
1574
  });
1575
  };
1576
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1577
  /**
1578
  *
1579
  * @returns {undefined}
1595
  type: 'POST',
1596
  data: function (data) {
1597
  data.action = 'aam';
1598
+ data.sub_action = 'Main_Post.getTable';
1599
  data._ajax_nonce = aamLocal.nonce;
1600
  data.subject = aam.getSubject().type;
1601
  data.subjectId = aam.getSubject().id;
1745
  dataType: 'json',
1746
  data: {
1747
  action: 'aam',
1748
+ sub_action: 'Main_Post.reset',
1749
  _ajax_nonce: aamLocal.nonce,
1750
  type: type,
1751
  id: id,
1778
  $('#load-post-object').val()
1779
  );
1780
  }
1781
+
1782
+ $('.advanced-post-option').each(function() {
1783
+ $(this).bind('click', function() {
1784
+ var container = $(this).attr('href');
1785
+ var option = objectAccess.access[$(this).data('ref')];
1786
+ var field = $($('.extended-post-access-btn', container).data('field'));
1787
+
1788
+ //add attributes to the .extended-post-access-btn
1789
+ $('.extended-post-access-btn', container).attr({
1790
+ 'data-ref': $(this).data('ref'),
1791
+ 'data-preview': $(this).data('preview')
1792
+ });
1793
+
1794
+ //set field value
1795
+ field.val(option);
1796
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1797
  });
1798
+
1799
+ $('.extended-post-access-btn').each(function() {
1800
  $(this).bind('click', function() {
1801
+ var _this = $(this);
1802
+ var label = _this.text();
1803
+ var value = $(_this.data('field')).val();
1804
+
1805
+ _this.text(aam.__('Saving...'));
1806
+
1807
+ save(
1808
+ _this.attr('data-ref'),
1809
+ value,
1810
+ _this.attr('data-type'),
1811
+ _this.attr('data-id'),
1812
+ function(response) {
1813
+ if (response.status === 'success') {
1814
+ objectAccess.access[_this.attr('data-ref')] = value;
1815
+ $(_this.attr('data-preview')).html(response.preview);
1816
+ var tr = $(_this.attr('data-preview')).parent().parent().parent();
1817
+ if ($('.aam-row-action', tr).hasClass('icon-check-empty')) {
1818
+ $('.aam-row-action', tr).trigger('click');
1819
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1820
  }
1821
+ $(_this.data('modal')).modal('hide');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1822
 
1823
+ _this.text(label);
 
 
1824
  }
1825
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1826
  });
1827
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1828
  }
1829
  }
1830
 
1961
  );
1962
  });
1963
  });
1964
+
1965
  $('#login-redirect-reset').bind('click', function () {
1966
  aam.reset('loginRedirect');
1967
  });
2028
  );
2029
  });
2030
  });
2031
+
2032
  $('#logout-redirect-reset').bind('click', function () {
2033
  aam.reset('logoutRedirect');
2034
  });
2039
 
2040
  })(jQuery);
2041
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2042
  /**
2043
  * 404 Redirect Interface
2044
  *
2060
  dataType: 'json',
2061
  data: {
2062
  action: 'aam',
2063
+ sub_action: 'Main_404Redirect.save',
2064
  _ajax_nonce: aamLocal.nonce,
2065
  subject: aam.getSubject().type,
2066
  subjectId: aam.getSubject().id,
2120
 
2121
  /**
2122
  *
2123
+ * @param {type} data
2124
+ * @param {type} cb
2125
+ * @returns {undefined}
2126
  */
2127
+ function downloadExtension(data, cb) {
2128
  $.ajax(aamLocal.ajaxurl, {
2129
  type: 'POST',
2130
  dataType: 'json',
2132
  success: function (response) {
2133
  if (response.status === 'success') {
2134
  setTimeout(function () {
2135
+ aam.fetchContent('extensions');
2136
  }, 500);
2137
  } else {
2138
  aam.notification('danger', aam.__(response.error));
2147
  aam.notification('danger', aam.__('Application error'));
2148
  },
2149
  complete: function() {
2150
+ cb();
2151
+ }
2152
+ });
2153
+ }
2154
+
2155
+ /**
2156
+ *
2157
+ * @param {type} data
2158
+ * @returns {undefined}
2159
+ */
2160
+ function updateStatus(data) {
2161
+ $.ajax(aamLocal.ajaxurl, {
2162
+ type: 'POST',
2163
+ dataType: 'json',
2164
+ data: data,
2165
+ success: function (response) {
2166
+ if (response.status === 'success') {
2167
+ aam.notification(
2168
+ 'success',
2169
+ aam.__('Extension status was updated successfully')
2170
+ );
2171
+ } else {
2172
+ aam.notification('danger', aam.__(response.error));
2173
+ }
2174
+ },
2175
+ error: function () {
2176
+ aam.notification('danger', aam.__('Application error'));
2177
+ },
2178
+ complete: function () {
2179
+ aam.fetchContent('extensions');
2180
  }
2181
  });
2182
  }
2194
  dataType: 'json',
2195
  data: {
2196
  action: 'aam',
2197
+ sub_action: 'Extension_Manager.check',
2198
  _ajax_nonce: aamLocal.nonce,
2199
  },
2200
  beforeSend: function () {
2201
  $('#aam-update-check i').attr('class', 'icon-spin4 animate-spin');
2202
  },
2203
  complete: function () {
2204
+ aam.fetchContent('extensions');
2205
  }
2206
  });
2207
  });
2222
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
2223
  downloadExtension({
2224
  action: 'aam',
2225
+ sub_action: 'Extension_Manager.install',
2226
  _ajax_nonce: aamLocal.nonce,
2227
  license: $('#extension-key').val()
2228
  }, function() {
2238
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
2239
  downloadExtension({
2240
  action: 'aam',
2241
+ sub_action: 'Extension_Manager.update',
2242
  _ajax_nonce: aamLocal.nonce,
2243
  extension: _this.data('product')
2244
  }, function() {
2246
  });
2247
  });
2248
  });
2249
+
2250
+ //deactivate extension
2251
+ $('.aam-deactivate-extension').each(function() {
2252
+ $(this).bind('click', function () {
2253
+ var _this = $(this);
2254
+
2255
+ $('i', _this).attr('class', 'icon-spin4 animate-spin');
2256
+ updateStatus({
2257
+ action: 'aam',
2258
+ sub_action: 'Extension_Manager.deactivate',
2259
+ _ajax_nonce: aamLocal.nonce,
2260
+ extension: _this.data('product')
2261
+ });
2262
+ });
2263
+ });
2264
+
2265
+ //activet extension
2266
+ $('.aam-activate-extension').each(function() {
2267
+ $(this).bind('click', function () {
2268
+ var _this = $(this);
2269
+
2270
+ $('i', _this).attr('class', 'icon-spin4 animate-spin');
2271
+ updateStatus({
2272
+ action: 'aam',
2273
+ sub_action: 'Extension_Manager.activate',
2274
+ _ajax_nonce: aamLocal.nonce,
2275
+ extension: _this.data('product')
2276
+ });
2277
+ });
2278
+ });
2279
 
2280
  //download extension
2281
  $('.aam-download-extension').each(function () {
2285
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
2286
  downloadExtension({
2287
  action: 'aam',
2288
+ sub_action: 'Extension_Manager.install',
2289
  _ajax_nonce: aamLocal.nonce,
2290
  license: _this.data('license')
2291
  }, function() {
2328
  *
2329
  * @param {type} param
2330
  * @param {type} value
2331
+ * @param {type} reload
2332
  * @returns {undefined}
2333
  */
2334
  function save(param, value) {
2337
  dataType: 'json',
2338
  data: {
2339
  action: 'aam',
2340
+ sub_action: 'Settings_Manager.save',
2341
  _ajax_nonce: aamLocal.nonce,
2342
  param: param,
2343
  value: value
2353
  * @returns {undefined}
2354
  */
2355
  function initialize() {
2356
+ if ($('.aam-feature.settings').length) {
2357
  $('[data-toggle="toggle"]').bootstrapToggle();
2358
 
2359
+ $('input[type="checkbox"]', '.aam-feature.settings').bind('change', function () {
2360
+ save(
2361
+ $(this).attr('name'),
2362
+ ($(this).prop('checked') ? 1 : 0)
2363
+ );
2364
  });
2365
 
2366
+ $('input[type="text"]', '.aam-feature.settings').bind('change', function() {
2367
  save($(this).attr('name'), $(this).val());
2368
  });
2369
 
2373
  dataType: 'json',
2374
  data: {
2375
  action: 'aam',
2376
+ sub_action: 'Settings_Tools.clear',
2377
  _ajax_nonce: aamLocal.nonce
2378
  },
2379
  beforeSend: function() {
2380
  $('#clear-settings').prop('disabled', true);
2381
+ $('#clear-settings').text(aam.__('Wait...'));
2382
  },
2383
+ success: function(response) {
2384
  if (response.status === 'success') {
2385
+ aam.notification('success', aam.__('All settings were cleared successfully'));
2386
+ } else {
2387
+ aam.notification('danger', response.reason);
2388
  }
2389
  },
2390
  error: function () {
2392
  },
2393
  complete: function() {
2394
  $('#clear-settings').prop('disabled', false);
2395
+ $('#clear-settings').text(aam.__('Clear'));
2396
+ $('#clear-settings-modal').modal('hide');
2397
  }
2398
  });
2399
  });
2404
  dataType: 'json',
2405
  data: {
2406
  action: 'aam',
2407
+ sub_action: 'Settings_Tools.clearCache',
2408
  _ajax_nonce: aamLocal.nonce
2409
  },
2410
  beforeSend: function() {
2411
  $('#clear-cache').prop('disabled', true);
2412
+ $('#clear-cache').text(aam.__('Wait...'));
2413
  },
2414
+ success: function(response) {
2415
  if (response.status === 'success') {
2416
+ aam.notification('success', aam.__('The cache was cleared successfully'));
2417
+ } else {
2418
+ aam.notification('danger', response.reason);
2419
  }
2420
  },
2421
  error: function () {
2423
  },
2424
  complete: function() {
2425
  $('#clear-cache').prop('disabled', false);
2426
+ $('#clear-cache').text(aam.__('Clear'));
2427
  }
2428
  });
2429
  });
2434
  dataType: 'json',
2435
  data: {
2436
  action: 'aam',
2437
+ sub_action: 'Settings_Tools.export',
2438
  _ajax_nonce: aamLocal.nonce
2439
  },
2440
  beforeSend: function () {
2441
+ $('#export-aam').prop('disabled', true);
2442
  $('#export-aam').attr('data-lable', $('#export-aam').text());
2443
+ $('#export-aam').text(aam.__('Wait...'));
2444
  },
2445
  success: function(response) {
2446
  if (response.status === 'success') {
2455
  aam.notification('danger', aam.__('Application Error'));
2456
  },
2457
  complete: function () {
2458
+ $('#export-aam').prop('disabled', false);
2459
+ $('#export-aam').text($('#export-aam').attr('data-lable'));
2460
  }
2461
  });
2462
  });
2486
  dataType: 'json',
2487
  data: {
2488
  action: 'aam',
2489
+ sub_action: 'Settings_Tools.import',
2490
  _ajax_nonce: aamLocal.nonce,
2491
  json: json
2492
  },
2493
  beforeSend: function () {
2494
+ $('#import-aam').prop('disabled', true);
2495
  $('#import-aam').attr('data-lable', $('#import-aam').text());
2496
+ $('#import-aam').text(aam.__('Wait...'));
2497
  },
2498
  success: function(response) {
2499
  if (response.status === 'success') {
2500
+ aam.notification('success', 'All settings were imported successfully');
2501
  // location.reload();
2502
  } else {
2503
  aam.notification('danger', aam.__('Invalid data format'));
2507
  aam.notification('danger', aam.__('Application Error'));
2508
  },
2509
  complete: function () {
2510
+ $('#import-aam').prop('disabled', false);
2511
  $('#import-aam').html($('#import-aam').attr('data-lable'));
2512
  }
2513
  });
2527
  aam.addHook('init', initialize);
2528
 
2529
  })(jQuery);
 
2530
 
2531
+ aam.fetchContent('main'); //fetch default AAM content
2532
  }
2533
 
2534
  /**
2546
  * Different UI hooks
2547
  */
2548
  this.hooks = {};
2549
+
2550
+ /**
2551
+ * Content filters
2552
+ */
2553
+ this.filters = {};
2554
  }
2555
 
2556
  /**
2580
  *
2581
  * @returns {undefined}
2582
  */
2583
+ AAM.prototype.fetchContent = function (uiType) {
2584
  var _this = this;
2585
 
2586
  //referred object ID like post, page or any custom post type
2593
  data: {
2594
  action: 'aamc',
2595
  _ajax_nonce: aamLocal.nonce,
2596
+ uiType: uiType,
2597
  subject: this.getSubject().type,
2598
  subjectId: this.getSubject().id,
2599
  oid: object ? object[1] : null,
2624
  }
2625
 
2626
  item.trigger('click');
2627
+
2628
+ $('.aam-sidebar .metabox-holder').hide();
2629
+ $('.aam-sidebar .shared-metabox').show();
2630
+ $('.aam-sidebar .' + uiType + '-metabox').show();
2631
+
2632
+ if (uiType !== 'main') { //hide subject and user/role manager
2633
+ $('#aam-subject-banner').hide();
2634
+ } else {
2635
+ $('#aam-subject-banner').show();
2636
+ }
2637
  }
2638
  });
2639
  };
2670
  }
2671
  };
2672
 
2673
+ /**
2674
+ * Add UI filter
2675
+ *
2676
+ * @param {String} name
2677
+ * @param {Function} callback
2678
+ *
2679
+ * @returns {void}
2680
+ */
2681
+ AAM.prototype.addFilter = function (name, callback) {
2682
+ if (typeof this.filters[name] === 'undefined') {
2683
+ this.filters[name] = new Array();
2684
+ }
2685
+
2686
+ this.filters[name].push(callback);
2687
+ };
2688
+
2689
+ /**
2690
+ * Apply UI filters
2691
+ *
2692
+ * @param {String} name
2693
+ * @param {Object} params
2694
+ *
2695
+ * @returns {void}
2696
+ */
2697
+ AAM.prototype.applyFilters = function (name, result, params) {
2698
+ if (typeof this.filters[name] !== 'undefined') {
2699
+ for (var i in this.filters[name]) {
2700
+ result = this.filters[name][i].call(this, result, params);
2701
+ }
2702
+ }
2703
+
2704
+ return result;
2705
+ };
2706
+
2707
  /**
2708
  * Initialize the AAM
2709
  *
2749
  });
2750
  $(this).tooltip('show');
2751
  });
2752
+
2753
+ $('.aam-area').each(function() {
2754
+ $(this).bind('click', function() {
2755
+ $('.aam-area').removeClass('text-danger');
2756
+ $(this).addClass('text-danger');
2757
+ aam.fetchContent($(this).data('type'));
2758
+ });
2759
+ });
2760
 
2761
  // preventDefault for all links with # href
2762
  $('#aam-container').delegate('a[href="#"]', 'click', function(event) {
2884
  object: object
2885
  },
2886
  success: function () {
2887
+ aam.fetchContent('main');
2888
  },
2889
  error: function () {
2890
  aam.notification('danger', aam.__('Application error'));
media/js/vendor.js CHANGED
@@ -226,4 +226,8 @@ o(jQuery,jQuery.fn.dataTable)})(window,document);
226
  * Licensed under MIT
227
  * ======================================================================== */
228
  +function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.toggle"),f="object"==typeof b&&b;e||d.data("bs.toggle",e=new c(this,f)),"string"==typeof b&&e[b]&&e[b]()})}var c=function(b,c){this.$element=a(b),this.options=a.extend({},this.defaults(),c),this.render()};c.VERSION="2.2.0",c.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},c.prototype.defaults=function(){return{on:this.$element.attr("data-on")||c.DEFAULTS.on,off:this.$element.attr("data-off")||c.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||c.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||c.DEFAULTS.offstyle,size:this.$element.attr("data-size")||c.DEFAULTS.size,style:this.$element.attr("data-style")||c.DEFAULTS.style,width:this.$element.attr("data-width")||c.DEFAULTS.width,height:this.$element.attr("data-height")||c.DEFAULTS.height}},c.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var b="large"===this.options.size?"btn-lg":"small"===this.options.size?"btn-sm":"mini"===this.options.size?"btn-xs":"",c=a('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+b),d=a('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+b+" active"),e=a('<span class="toggle-handle btn btn-default">').addClass(b),f=a('<div class="toggle-group">').append(c,d,e),g=a('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.outerWidth(),d.outerWidth())+e.outerWidth()/2,i=this.options.height||Math.max(c.outerHeight(),d.outerHeight());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery);
229
- //# sourceMappingURL=bootstrap-toggle.min.js.map
 
 
 
 
226
  * Licensed under MIT
227
  * ======================================================================== */
228
  +function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.toggle"),f="object"==typeof b&&b;e||d.data("bs.toggle",e=new c(this,f)),"string"==typeof b&&e[b]&&e[b]()})}var c=function(b,c){this.$element=a(b),this.options=a.extend({},this.defaults(),c),this.render()};c.VERSION="2.2.0",c.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},c.prototype.defaults=function(){return{on:this.$element.attr("data-on")||c.DEFAULTS.on,off:this.$element.attr("data-off")||c.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||c.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||c.DEFAULTS.offstyle,size:this.$element.attr("data-size")||c.DEFAULTS.size,style:this.$element.attr("data-style")||c.DEFAULTS.style,width:this.$element.attr("data-width")||c.DEFAULTS.width,height:this.$element.attr("data-height")||c.DEFAULTS.height}},c.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var b="large"===this.options.size?"btn-lg":"small"===this.options.size?"btn-sm":"mini"===this.options.size?"btn-xs":"",c=a('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+b),d=a('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+b+" active"),e=a('<span class="toggle-handle btn btn-default">').addClass(b),f=a('<div class="toggle-group">').append(c,d,e),g=a('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.outerWidth(),d.outerWidth())+e.outerWidth()/2,i=this.options.height||Math.max(c.outerHeight(),d.outerHeight());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery);
229
+ //# sourceMappingURL=bootstrap-toggle.min.js.map
230
+
231
+ // jQuery autoComplete v1.0.7
232
+ // https://github.com/Pixabay/jQuery-autoComplete
233
+ !function(e){e.fn.autoComplete=function(t){var o=e.extend({},e.fn.autoComplete.defaults,t);return"string"==typeof t?(this.each(function(){var o=e(this);"destroy"==t&&(e(window).off("resize.autocomplete",o.updateSC),o.off("blur.autocomplete focus.autocomplete keydown.autocomplete keyup.autocomplete"),o.data("autocomplete")?o.attr("autocomplete",o.data("autocomplete")):o.removeAttr("autocomplete"),e(o.data("sc")).remove(),o.removeData("sc").removeData("autocomplete"))}),this):this.each(function(){function t(e){var t=s.val();if(s.cache[t]=e,e.length&&t.length>=o.minChars){for(var a="",c=0;c<e.length;c++)a+=o.renderItem(e[c],t);s.sc.html(a),s.updateSC(0)}else s.sc.hide()}var s=e(this);s.sc=e('<div class="autocomplete-suggestions '+o.menuClass+'"></div>'),s.data("sc",s.sc).data("autocomplete",s.attr("autocomplete")),s.attr("autocomplete","off"),s.cache={},s.last_val="",s.updateSC=function(t,o){if(s.sc.css({top:s.offset().top+s.outerHeight(),left:s.offset().left,width:s.outerWidth()}),!t&&(s.sc.show(),s.sc.maxHeight||(s.sc.maxHeight=parseInt(s.sc.css("max-height"))),s.sc.suggestionHeight||(s.sc.suggestionHeight=e(".autocomplete-suggestion",s.sc).first().outerHeight()),s.sc.suggestionHeight))if(o){var a=s.sc.scrollTop(),c=o.offset().top-s.sc.offset().top;c+s.sc.suggestionHeight-s.sc.maxHeight>0?s.sc.scrollTop(c+s.sc.suggestionHeight+a-s.sc.maxHeight):0>c&&s.sc.scrollTop(c+a)}else s.sc.scrollTop(0)},e(window).on("resize.autocomplete",s.updateSC),s.sc.appendTo("body"),s.sc.on("mouseleave",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected")}),s.sc.on("mouseenter",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected"),e(this).addClass("selected")}),s.sc.on("mousedown click",".autocomplete-suggestion",function(t){var a=e(this),c=a.data("val");return(c||a.hasClass("autocomplete-suggestion"))&&(s.val(c),o.onSelect(t,c,a),s.sc.hide()),!1}),s.on("blur.autocomplete",function(){try{over_sb=e(".autocomplete-suggestions:hover").length}catch(t){over_sb=0}over_sb?s.is(":focus")||setTimeout(function(){s.focus()},20):(s.last_val=s.val(),s.sc.hide(),setTimeout(function(){s.sc.hide()},350))}),o.minChars||s.on("focus.autocomplete",function(){s.last_val="\n",s.trigger("keyup.autocomplete")}),s.on("keydown.autocomplete",function(t){if((40==t.which||38==t.which)&&s.sc.html()){var a,c=e(".autocomplete-suggestion.selected",s.sc);return c.length?(a=40==t.which?c.next(".autocomplete-suggestion"):c.prev(".autocomplete-suggestion"),a.length?(c.removeClass("selected"),s.val(a.addClass("selected").data("val"))):(c.removeClass("selected"),s.val(s.last_val),a=0)):(a=40==t.which?e(".autocomplete-suggestion",s.sc).first():e(".autocomplete-suggestion",s.sc).last(),s.val(a.addClass("selected").data("val"))),s.updateSC(0,a),!1}if(27==t.which)s.val(s.last_val).sc.hide();else if(13==t.which||9==t.which){var c=e(".autocomplete-suggestion.selected",s.sc);c.length&&s.sc.is(":visible")&&(o.onSelect(t,c.data("val"),c),setTimeout(function(){s.sc.hide()},20))}}),s.on("keyup.autocomplete",function(a){if(!~e.inArray(a.which,[13,27,35,36,37,38,39,40])){var c=s.val();if(c.length>=o.minChars){if(c!=s.last_val){if(s.last_val=c,clearTimeout(s.timer),o.cache){if(c in s.cache)return void t(s.cache[c]);for(var l=1;l<c.length-o.minChars;l++){var i=c.slice(0,c.length-l);if(i in s.cache&&!s.cache[i].length)return void t([])}}s.timer=setTimeout(function(){o.source(c,t)},o.delay)}}else s.last_val=c,s.sc.hide()}})})},e.fn.autoComplete.defaults={source:0,minChars:3,delay:150,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(e,t,o){}}}(jQuery);
readme.txt CHANGED
@@ -3,83 +3,40 @@ Contributors: vasyltech
3
  Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
4
  Requires at least: 3.8
5
  Tested up to: 4.9
6
- Stable tag: 4.9.5.2
7
 
8
- Manage access to your website for any user, role or visitors for both frontend and backend.
9
 
10
  == Description ==
11
 
12
  > Advanced Access Manager (aka AAM) is all you need to manage access to your website frontend and backend for any user, role or visitors.
13
- > Please Note! Some features are limited or not included in the basic plugin installation. Upon activation go to the Extensions tab to learn more about free and premium extensions that are available for download.
14
 
15
  https://www.youtube.com/watch?v=yiOhjaacNJc
16
 
17
- = Backend Lockdown =
18
- Restrict access to your website backend side for any user or role. For more information about this feature refer to the [How to lockdown WordPress backend](https://aamplugin.com/help/how-to-lockdown-wordpress-backend)
19
-
20
- = Secure Login Widget & Shortcode =
21
- Use custom AJAX login widget or drop login form anywhere on your website with AAM shortcode. For more information check [How does AAM Secure Login works](https://aamplugin.com/help/how-does-aam-secure-login-works)
22
-
23
- = Manage Posts & Categories =
24
- Manage access to unlimited number of post, page or custom post type. With premium AAM Plus Package extension also manage access to categories, custom hierarchical taxonomies or setup the default access to all posts and categories. Refer to [How to manage WordPress post and category access](https://aamplugin.com/help/how-to-manage-wordpress-post-and-category-access) to learn more about this feature.
25
-
26
- = Track Any User Activities =
27
- Track any user or visitor activities on your website with AAM User Activity extension. For more information about this feature refer to the [How to track any WordPress user activity](https://aamplugin.com/help/how-to-track-any-wordpress-user-activity)
28
-
29
- = 404 Redirect =
30
- Redirect all users and visitors to specific page, URL or custom callback function when page does not exist.
31
-
32
- = Login/Logout Redirect =
33
- Define custom login and logout redirect for any user or group of users.
34
-
35
- = Manage Backend Menu =
36
- Manage access to the backend menu for any user or group or users (roles).
37
-
38
- = Manage Capabilities =
39
- Create, edit or delete capabilities for any role or even user.
40
-
41
- = Manage Access Based On Geo Location And IP =
42
- Manage access to your website for all visitors based on referred host, IP address or geographical location. For more information about this feature check [How to manage access to WordPress website based on location](https://aamplugin.com/help/how-to-manage-access-to-wordpress-website-based-on-location) article
43
-
44
- = Manage Redirects =
45
- Define custom access denied or login redirects for any user or group of users. Redirect user to any existing page, URL or specify your own PHP callback function to handle it.
46
-
47
- = Manage Metaboxes and Widgets =
48
- Filter list of metaboxes and widgets on both frontend and backend for any user, group of users or visitors.
49
-
50
- = Content Teaser =
51
- Create your own content teaser for any limited post, page or custom post type.
52
-
53
- = Content Filter =
54
- Filter or replace blocks of your content with [aam] shortcodes. For more information about this feature refer to the [How to filter WordPress post content](https://aamplugin.com/help/how-to-filter-wordpress-post-content) article
55
-
56
- = Payments API =
57
- Start selling access to your website content or even user levels with premium AAM Payment extension. For
58
- more information refer to the [AAM Payment extension](https://aamplugin.com/help/aam-payment-extension)
59
-
60
- = Manage Roles =
61
- Create, edit, clone, delete any role. Set expiration time to any role. With AAM Role Hierarchy extension define complex role hierarchy tree.
62
-
63
- = Multisite Support =
64
- AAM supports multisite network and allows you to sync access settings across your network or even restrict none-members from accessing one of your sites. For more information check [AAM and WordPress Multisite support](https://aamplugin.com/help/aam-and-wordpress-multisite-support).
65
-
66
- = Single point API =
67
- Easy to use programmatic interface that is used to develop your own custom
68
- functionality.
69
-
70
- `//Get AAM_Core_Subject. This object allows you to work with access control
71
- //for current logged-in user or visitor
72
- $user = AAM::getUser();
73
-
74
- //Example 1. Get Post with ID 10 and check if current user has access to read it
75
- //on the frontend side of the website. If true then access denied to read this post.
76
- $user->getObject('post', 10)->has('frontend.read');
77
-
78
- //Example 2. Get Admin Menu object and check if user has access to Media menu.
79
- //If true then access denied to this menu
80
- $user->getObject('menu')->has('upload.php');`
81
-
82
- Check our [help page](https://aamplugin.com/help) to find out more about AAM.
83
 
84
  == Installation ==
85
 
@@ -102,6 +59,20 @@ Check our [help page](https://aamplugin.com/help) to find out more about AAM.
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  = 4.9.5.2 =
106
  * Fixed compatibility with PHP 5.3 or lower
107
 
3
  Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
4
  Requires at least: 3.8
5
  Tested up to: 4.9
6
+ Stable tag: 5.0
7
 
8
+ The most powerful access management plugin for WordPress websites.
9
 
10
  == Description ==
11
 
12
  > Advanced Access Manager (aka AAM) is all you need to manage access to your website frontend and backend for any user, role or visitors.
 
13
 
14
  https://www.youtube.com/watch?v=yiOhjaacNJc
15
 
16
+ = Few Quick Facts =
17
+
18
+ * Bullet-proven plugin with over a 1 million downloads where all features are well-tested and [documented](https://aamplugin.com/help). Very low amount of support tickets in comparison to similar plugins;
19
+ * AAM contains the most powerful and flexible set of features to manage access to your WordPress website;
20
+ * No ads or other promotional crap. The UI is clean and well crafted so you can focus only on what is important;
21
+ * Some features are limited or available only with [premium extensions](https://aamplugin.com/store). AAM functionality is transparent and you will absolute know when you need to purchase our premium features;
22
+ * No need to be a "paid" customer to get help. Request support via email or start chat with Google Hangout;
23
+
24
+ = The most popular features =
25
+
26
+ * [free] Backend Lockdown. Restrict access to your website backend side for any user or role. Find out more from [How to lockdown WordPress backend](https://aamplugin.com/help/how-to-lockdown-wordpress-backend) article;
27
+ * [free] Secure Login Widget & Shortcode. Drop AJAX login widget or shortcode anywhere on your website. Find out more from [How does AAM Secure Login works](https://aamplugin.com/help/how-does-aam-secure-login-works) article;
28
+ * [limited] Content Access. Very granular access to unlimited number of post, page or custom post type ([19 different options](https://aamplugin.com/help#posts-and-pages)). With premium [Plus Package](https://aamplugin.com/extension/plus-package) extension also manage access to hierarchical taxonomies or setup the default access to all post types and taxonomies. Find out more from [How to manage access to the WordPress content](https://aamplugin.com/help/how-to-manage-access-to-the-wordpress-content) article;
29
+ * [free] Content Filter. Filter or replace parts of your content with AAM shortcodes. Find out more from [How to filter WordPress post content](https://aamplugin.com/help/how-to-filter-wordpress-post-content) article;
30
+ * [free] Login/Logout Redirects. Define custom login and logout redirect for any user or role;
31
+ * [free] 404 Redirect. Redefine where user should be redirected when page does not exist. Find out more from [How to redirect on WordPress 404 error](https://aamplugin.com/help/how-to-redirect-on-wordpress-404-error);
32
+ * [free] Access Denied Redirect. Define custom redirect for any role, user or visitors when access is denied for restricted area on your website;
33
+ * [free] Manage Roles & Capabilities. Manage all your WordPress role and capabilities.
34
+ * [free] Manage Backend Menu. Manage access to the backend menu for any user or role. Find out more from [How to manage WordPress backend menu](https://aamplugin.com/help/how-to-manage-wordpress-backend-menu) article;
35
+ * [free] Manage Metaboxes and Widgets. Filter out restricted or unnecessary metaboxes and widgets on both frontend and backend for any user, role or visitors. Find out more from [How to hide WordPress metaboxes & widgets](https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets) article;
36
+ * [paid] Manage Access Based On Geo Location or IP. Manage access to your website for all visitors based on referred host, IP address or geographical location. Find out more from [How to manage access to WordPress website based on location](https://aamplugin.com/help/how-to-manage-access-to-wordpress-website-based-on-location) article;
37
+ * [paid] Monetize Access To You Content. Start selling access to your website content with premium [E-Commerce](https://aamplugin.com/extension/ecommerce) extension. Find out more from [How to monetize access to the WordPress content](https://aamplugin.com/help/how-to-monetize-access-to-the-wordpress-content) article;
38
+ * [free] Multisite Support. Sync access settings across your network or even restrict none-members from accessing one of your sites. Find out more from [AAM and WordPress Multisite support](https://aamplugin.com/help/aam-and-wordpress-multisite-support);
39
+ * [and even more...] Check our [help page](https://aamplugin.com/help) to learn more about AAM
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  == Installation ==
42
 
59
 
60
  == Changelog ==
61
 
62
+ = 5.0 =
63
+ * Added ACCESS COUNTER option to Posts & Pages
64
+ * Added premium MONETIZE option to Posts & Pages
65
+ * Added ability to turn off "Secure Login" feature
66
+ * Added ability to toggle extension status (active/inactive)
67
+ * Added ability for AAM to filter out Admin Top Bar based on restricted admin menus
68
+ * Deprecated AAM Role Filter extension and merged it to the AAM core
69
+ * Deprecated AAM Payment extension and merged it with AAM E-Commerce extension
70
+ * Deprecated ConfigPress options that manage access to AAM UI. All is based on capabilities from now.
71
+ * Split UI to three areas: Access, Settings and Extensions
72
+ * Fixed over 25+ reported bugs and discovered during internal refactoring
73
+ * Removed deprecated "Security" feature. Replaced with Secure Login Widget
74
+ * Removed deprecated "Teaser" feature. Replaced with Teaser Message per post base
75
+
76
  = 4.9.5.2 =
77
  * Fixed compatibility with PHP 5.3 or lower
78