Advanced Access Manager - Version 6.2.0

Version Description

  • Fixed Bug: Access policy was not applied to visitors
  • Fixed Bug: Bug fixing that is related to unwanted PHP notices https://forum.aamplugin.com/d/456-notice-undefined-index-expire
  • Fixed Bug: Failing to delete multiple Access URI rules without reloading the page
  • Added New: Ability to generate Access Policy from user's or role's settings https://forum.aamplugin.com/d/446-announcement-about-upcoming-features/2
  • Added New: More granular control over the HIDDEN access option https://forum.aamplugin.com/d/446-announcement-about-upcoming-features
  • Added New: Export/Import AAM settings https://aamplugin.com/article/how-to-export-and-import-aam-settings
  • Added New: Ability to send support request from the AAM UI
  • Added New: Multisite Settings Sync service that allows to sync access settings changes across all sites
  • Added New: New hook aam_updated_access_settings that is triggered when access settings are stored
  • Added New: New data type casting (*date) for Access Policy https://aamplugin.com/reference/policy#markers
  • Added New: New POLICY_PARAM access policy token https://aamplugin.com/reference/policy#policy_param
  • Added New: New WP_SITE access policy token https://aamplugin.com/reference/policy#wp_site
  • Change: DATETIME access policy token returns time in UTC timezone
  • Change: Enhanced security over AAM UI
  • Change: Multiple internal simplifications and refactoring
Download this release

Release Info

Developer vasyltech
Plugin Icon 128x128 Advanced Access Manager
Version 6.2.0
Comparing to
See all releases

Code changes from version 6.1.1 to 6.2.0

Files changed (37) hide show
  1. aam.php +2 -2
  2. application/Addon/Repository.php +13 -7
  3. application/Backend/Feature/Main/Policy.php +189 -21
  4. application/Backend/Feature/Main/Post.php +88 -6
  5. application/Backend/Feature/Settings/Manager.php +147 -3
  6. application/Backend/Manager.php +8 -3
  7. application/Backend/Subject.php +22 -7
  8. application/Backend/View/Localization.php +10 -4
  9. application/Backend/View/PostOptionList.php +10 -4
  10. application/Backend/tmpl/metabox/main-iframe.php +95 -4
  11. application/Backend/tmpl/metabox/policy-metabox.php +3 -2
  12. application/Backend/tmpl/page/addon-panel.php +3 -2
  13. application/Backend/tmpl/page/current-subject.php +13 -1
  14. application/Backend/tmpl/page/subject-panel.php +9 -2
  15. application/Backend/tmpl/partial/post-access-form.php +74 -13
  16. application/Backend/tmpl/service/policy.php +68 -1
  17. application/Core/AccessSettings.php +13 -5
  18. application/Core/Policy/Condition.php +23 -4
  19. application/Core/Policy/Generator.php +505 -0
  20. application/Core/Policy/Manager.php +24 -10
  21. application/Core/Policy/Token.php +75 -6
  22. application/Core/Policy/Validator.php +63 -25
  23. application/Migration/2019_06_30-base.php +13 -5
  24. application/Migration/2019_12_01-base.php +9 -5
  25. application/Migration/{2019_12_16-base.php → 2019_12_19-base.php} +4 -4
  26. application/Service/AccessPolicy.php +29 -5
  27. application/Service/Content.php +65 -15
  28. application/Service/Multisite.php +191 -0
  29. lang/advanced-access-manager-en_US.po +577 -333
  30. media/css/aam.css +39 -3
  31. media/font/fontello.eot +0 -0
  32. media/font/fontello.svg +6 -2
  33. media/font/fontello.ttf +0 -0
  34. media/font/fontello.woff +0 -0
  35. media/font/fontello.woff2 +0 -0
  36. media/js/aam.js +534 -102
  37. readme.txt +19 -2
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
- * Version: 6.1.1
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
@@ -264,7 +264,7 @@ if (defined('ABSPATH')) {
264
  //define few common constants
265
  define('AAM_MEDIA', plugins_url('/media', __FILE__));
266
  define('AAM_KEY', 'advanced-access-manager');
267
- define('AAM_VERSION', '6.1.1');
268
  define('AAM_BASEDIR', __DIR__);
269
 
270
  //load vendor
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
+ * Version: 6.2.0
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
264
  //define few common constants
265
  define('AAM_MEDIA', plugins_url('/media', __FILE__));
266
  define('AAM_KEY', 'advanced-access-manager');
267
+ define('AAM_VERSION', '6.2.0');
268
  define('AAM_BASEDIR', __DIR__);
269
 
270
  //load vendor
application/Addon/Repository.php CHANGED
@@ -10,12 +10,13 @@
10
  /**
11
  * Addon repository
12
  *
 
13
  * @since 6.0.5 Refactored the license managements. Fixed couple bugs with license
14
  * information displaying
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
- * @version 6.0.5
19
  */
20
  class AAM_Addon_Repository
21
  {
@@ -276,17 +277,19 @@ class AAM_Addon_Repository
276
  *
277
  * @return string|null
278
  *
 
 
279
  * @since 6.0.5 Fixed typo in the property name
280
  * @since 6.0.0 Initial implementation of the method
281
  *
282
  * @access protected
283
- * @version 6.0.5
284
  */
285
  protected function getExpirationDate($plugin)
286
  {
287
- $registry = $this->getRegistry();
288
 
289
- return (isset($registry[$plugin]) ? $registry[$plugin]['expire'] : null);
290
  }
291
 
292
  /**
@@ -296,14 +299,17 @@ class AAM_Addon_Repository
296
  *
297
  * @return string|null
298
  *
 
 
 
299
  * @access protected
300
- * @version 6.0.0
301
  */
302
  protected function getPluginLicense($plugin)
303
  {
304
- $registry = $this->getRegistry();
305
 
306
- return (isset($registry[$plugin]) ? $registry[$plugin]['license'] : null);
307
  }
308
 
309
  }
10
  /**
11
  * Addon repository
12
  *
13
+ * @since 6.2.0 Bug fixing that is related to unwanted PHP notices
14
  * @since 6.0.5 Refactored the license managements. Fixed couple bugs with license
15
  * information displaying
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
+ * @version 6.2.0
20
  */
21
  class AAM_Addon_Repository
22
  {
277
  *
278
  * @return string|null
279
  *
280
+ * @since 6.2.0 Fixed bug with PHP notice when `expire` is not defined
281
+ * @since 6.0.0 Initial implementation of the method
282
  * @since 6.0.5 Fixed typo in the property name
283
  * @since 6.0.0 Initial implementation of the method
284
  *
285
  * @access protected
286
+ * @version 6.2.0
287
  */
288
  protected function getExpirationDate($plugin)
289
  {
290
+ $r = $this->getRegistry();
291
 
292
+ return (isset($r[$plugin]['expire']) ? $r[$plugin]['expire'] : null);
293
  }
294
 
295
  /**
299
  *
300
  * @return string|null
301
  *
302
+ * @since 6.2.0 Fixed bug with PHP notice when `license` is not defined
303
+ * @since 6.0.0 Initial implementation of the method
304
+ *
305
  * @access protected
306
+ * @version 6.2.0
307
  */
308
  protected function getPluginLicense($plugin)
309
  {
310
+ $r = $this->getRegistry();
311
 
312
+ return (isset($r[$plugin]['license']) ? $r[$plugin]['license'] : null);
313
  }
314
 
315
  }
application/Backend/Feature/Main/Policy.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Access Policy UI manager
12
  *
 
13
  * @since 6.1.0 Fixed bug with "Attach to Default" button
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Backend_Feature_Main_Policy
20
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
@@ -48,12 +49,13 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
48
  *
49
  * @return void
50
  *
 
51
  * @since 6.1.0 Fixed the bug where "Attach to Default" button was not showing at
52
  * all
53
  * @since 6.0.0 Initial implementation of the method
54
  *
55
  * @access public
56
- * @version 6.1.0
57
  */
58
  public function __construct()
59
  {
@@ -82,6 +84,19 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
82
 
83
  return $content;
84
  }, 10, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  /**
@@ -161,16 +176,15 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
161
  *
162
  * @return string
163
  *
 
 
 
164
  * @access public
165
- * @version 6.0.0
166
  */
167
  public function getTable()
168
  {
169
- $list = get_posts(array(
170
- 'post_type' => AAM_Service_AccessPolicy::POLICY_CPT,
171
- 'numberposts' => -1,
172
- 'post_status' => 'publish'
173
- ));
174
 
175
  $response = array(
176
  'recordsTotal' => count($list),
@@ -187,7 +201,8 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
187
  $record->ID,
188
  $this->preparePolicyTitle($record),
189
  $this->preparePolicyActionList($record),
190
- get_edit_post_link($record->ID, 'link')
 
191
  );
192
  }
193
  }
@@ -202,15 +217,26 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
202
  *
203
  * @return string
204
  *
 
 
 
205
  * @access protected
206
- * @version 6.0.0
207
  */
208
  protected function preparePolicyTitle($record)
209
  {
 
 
 
 
 
 
 
 
210
  if (!empty($record->post_title)) {
211
- $title = $record->post_title;
212
  } else {
213
- $title = __('(no title)', AAM_KEY);
214
  }
215
 
216
  $title .= '<br/>';
@@ -229,8 +255,11 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
229
  *
230
  * @return string
231
  *
 
 
 
232
  * @access protected
233
- * @version 6.0.0
234
  */
235
  protected function preparePolicyActionList($record)
236
  {
@@ -241,7 +270,8 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
241
 
242
  $actions = array(
243
  $policy->has($record->ID) ? "detach" : "attach",
244
- $post->isAllowedTo('edit') ? 'edit' : 'no-edit'
 
245
  );
246
 
247
  return implode(',', $actions);
@@ -252,8 +282,11 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
252
  *
253
  * @return string
254
  *
 
 
 
255
  * @access public
256
- * @version 6.0.0
257
  */
258
  public function save()
259
  {
@@ -262,19 +295,154 @@ extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAwar
262
  $id = $this->getFromPost('id');
263
  $effect = $this->getFromPost('effect', FILTER_VALIDATE_BOOLEAN);
264
 
265
- // Verify that current user can perform following action
266
- if (current_user_can('read_post', $id)) {
267
- $object = $subject->getObject(self::OBJECT_TYPE, null, true);
268
- $result = $object->updateOptionItem($id, $effect)->save();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  } else {
270
- $result = false;
271
  }
272
 
273
  return wp_json_encode(array(
274
- 'status' => ($result ? 'success' : 'failure')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  ));
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  /**
279
  * Get default Access Policy
280
  *
10
  /**
11
  * Access Policy UI manager
12
  *
13
+ * @since 6.2.0 Added ability to generate Access Policy
14
  * @since 6.1.0 Fixed bug with "Attach to Default" button
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.2.0
19
  */
20
  class AAM_Backend_Feature_Main_Policy
21
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
49
  *
50
  * @return void
51
  *
52
+ * @since 6.2.0 Registering a new action to allow the Access Policy generation
53
  * @since 6.1.0 Fixed the bug where "Attach to Default" button was not showing at
54
  * all
55
  * @since 6.0.0 Initial implementation of the method
56
  *
57
  * @access public
58
+ * @version 6.2.0
59
  */
60
  public function __construct()
61
  {
84
 
85
  return $content;
86
  }, 10, 2);
87
+
88
+ // Hook into Users/Roles Manager and add new action
89
+ if (current_user_can(AAM_Backend_Feature_Main_Policy::ACCESS_CAPABILITY)) {
90
+ add_filter('aam_top_subject_actions_filter', function($actions) {
91
+ $actions[] = array(
92
+ 'icon' => 'icon-file-code',
93
+ 'id' => 'generate-access-policy',
94
+ 'tooltip' => __('Generate Access Policy', AAM_KEY)
95
+ );
96
+
97
+ return $actions;
98
+ });
99
+ }
100
  }
101
 
102
  /**
176
  *
177
  * @return string
178
  *
179
+ * @since 6.2.0 Changed the way, all the policies are fetched
180
+ * @since 6.0.0 Initial implementation of the method
181
+ *
182
  * @access public
183
+ * @version 6.2.0
184
  */
185
  public function getTable()
186
  {
187
+ $list = AAM::api()->getAccessPolicyManager()->fetchPolicies();
 
 
 
 
188
 
189
  $response = array(
190
  'recordsTotal' => count($list),
201
  $record->ID,
202
  $this->preparePolicyTitle($record),
203
  $this->preparePolicyActionList($record),
204
+ get_edit_post_link($record->ID, 'link'),
205
+ (!empty($record->post_title) ? $record->post_title : $record->ID)
206
  );
207
  }
208
  }
217
  *
218
  * @return string
219
  *
220
+ * @since 6.2.0 Added new "icon-attention" if policy has error/warning
221
+ * @since 6.0.0 Initial implementation of the method
222
+ *
223
  * @access protected
224
+ * @version 6.2.0
225
  */
226
  protected function preparePolicyTitle($record)
227
  {
228
+ $errors = (new AAM_Core_Policy_Validator($record->post_content))->validate();
229
+
230
+ if (!empty($errors)) {
231
+ $title = '<i class="icon-attention text-danger"></i>&nbsp;';
232
+ } else {
233
+ $title = '';
234
+ }
235
+
236
  if (!empty($record->post_title)) {
237
+ $title .= $record->post_title;
238
  } else {
239
+ $title .= __('(no title)', AAM_KEY);
240
  }
241
 
242
  $title .= '<br/>';
255
  *
256
  * @return string
257
  *
258
+ * @since 6.2.0 Added "delete" action
259
+ * @since 6.0.0 Initial implementation of the method
260
+ *
261
  * @access protected
262
+ * @version 6.2.0
263
  */
264
  protected function preparePolicyActionList($record)
265
  {
270
 
271
  $actions = array(
272
  $policy->has($record->ID) ? "detach" : "attach",
273
+ $post->isAllowedTo('edit') ? 'edit' : 'no-edit',
274
+ $post->isAllowedTo('delete') ? 'delete' : 'no-delete'
275
  );
276
 
277
  return implode(',', $actions);
282
  *
283
  * @return string
284
  *
285
+ * @since 6.2.0 Simplified implementation
286
+ * @since 6.0.0 Initial implementation of the method
287
+ *
288
  * @access public
289
+ * @version 6.2.0
290
  */
291
  public function save()
292
  {
295
  $id = $this->getFromPost('id');
296
  $effect = $this->getFromPost('effect', FILTER_VALIDATE_BOOLEAN);
297
 
298
+ $object = $subject->getObject(self::OBJECT_TYPE, null, true);
299
+ $result = $object->updateOptionItem($id, $effect)->save();
300
+
301
+ return wp_json_encode(array(
302
+ 'status' => ($result ? 'success' : 'failure')
303
+ ));
304
+ }
305
+
306
+ /**
307
+ * Delete policy
308
+ *
309
+ * @return string
310
+ *
311
+ * @access public
312
+ * @version 6.2.0
313
+ */
314
+ public function delete()
315
+ {
316
+ $id = $this->getFromPost('id');
317
+ $result = wp_delete_post($id);
318
+
319
+ return wp_json_encode(array(
320
+ 'status' => (is_a($result, 'WP_Post') ? 'success' : 'failure')
321
+ ));
322
+ }
323
+
324
+ /**
325
+ * Generate Access Policy from AAM settings
326
+ *
327
+ * @return string
328
+ *
329
+ * @access public
330
+ * @version 6.2.0
331
+ */
332
+ public function generate()
333
+ {
334
+ $subject = AAM_Backend_Subject::getInstance()->getSubject();
335
+ $generator = new AAM_Core_Policy_Generator($subject);
336
+
337
+ // Prepare the policy name
338
+ if ($subject::UID === AAM_Core_Subject_User::UID) {
339
+ $title = sprintf('Policy for %s user', $subject->display_name);
340
+ } elseif ($subject::UID === AAM_Core_Subject_Role::UID) {
341
+ $title = sprintf('Policy for %s role', $subject->getId());
342
+ } elseif ($subject::UID === AAM_Core_Subject_Visitor::UID) {
343
+ $title = 'Policy for all visitors';
344
  } else {
345
+ $title = 'Policy for everybody';
346
  }
347
 
348
  return wp_json_encode(array(
349
+ 'title' => $title,
350
+ 'policy' => base64_encode($generator->generate())
351
+ ));
352
+ }
353
+
354
+ /**
355
+ * Install access policy from the official hub
356
+ *
357
+ * @return string
358
+ *
359
+ * @access public
360
+ * @version 6.2.0
361
+ */
362
+ public function install()
363
+ {
364
+ $metadata = json_decode($this->getFromPost('metadata'));
365
+
366
+ // Do some basic validation & normalization
367
+ $title = esc_js($metadata->title);
368
+ $excerpt = esc_js($metadata->description);
369
+ $assignee = $metadata->assignee;
370
+ $override = $metadata->override;
371
+ $policy = $this->getFromPost('aam-policy');
372
+
373
+ $id = wp_insert_post(array(
374
+ 'post_type' => AAM_Service_AccessPolicy::POLICY_CPT,
375
+ 'post_content' => $policy,
376
+ 'post_title' => $title,
377
+ 'post_excerpt' => $excerpt,
378
+ 'post_status' => 'publish'
379
+ ));
380
+
381
+ $errors = array();
382
+
383
+ if (!is_wp_error($id)) { // Assign & override
384
+ foreach($assignee as $s) {
385
+ $error = $this->applyToSubject($s, $id, true);
386
+ if ($error) {
387
+ $errors[] = $error;
388
+ }
389
+ }
390
+
391
+ foreach($override as $s) {
392
+ $error = $this->applyToSubject($s, $id, false);
393
+ if ($error) {
394
+ $errors[] = $error;
395
+ }
396
+ }
397
+ } else {
398
+ $errors[] = $id->get_error_message();
399
+ }
400
+
401
+ return wp_json_encode(array(
402
+ 'status' => (empty($errors) ? 'success' : 'failure'),
403
+ 'errors' => implode('; ', $errors)
404
  ));
405
  }
406
 
407
+ /**
408
+ * Apply policy to provided subject
409
+ *
410
+ * @param string $s
411
+ * @param int $policyId
412
+ * @param boolean $effect
413
+ *
414
+ * @return string|null
415
+ *
416
+ * @access protected
417
+ * @version 6.2.0
418
+ */
419
+ protected function applyToSubject($s, $policyId, $effect = true)
420
+ {
421
+ $error = null;
422
+
423
+ if ($s === 'visitor') {
424
+ $subject = AAM::api()->getVisitor();
425
+ } elseif ($s === 'default') {
426
+ $subject = AAM::api()->getDefault();
427
+ } elseif (strpos($s, 'role:') === 0) {
428
+ $subject = AAM::api()->getRole(substr($s, 5));
429
+ } elseif (strpos($s, 'user:') === 0) {
430
+ $uid = substr($s, 5);
431
+ $subject = AAM::api()->getUser(($uid === 'current') ? null : $uid);
432
+ } else {
433
+ $error = sprintf(__('Failed applying to %s', AAM_KEY), $s);
434
+ $subject = null;
435
+ }
436
+
437
+ if ($subject !== null) {
438
+ $subject->getObject(
439
+ AAM_Core_Object_Policy::OBJECT_TYPE, null, true
440
+ )->updateOptionItem($policyId, $effect)->save();
441
+ }
442
+
443
+ return $error;
444
+ }
445
+
446
  /**
447
  * Get default Access Policy
448
  *
application/Backend/Feature/Main/Post.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Backend posts & terms service UI
12
  *
 
13
  * @since 6.0.3 Allowed to manage access to ALL registered post types
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.0.3
18
  */
19
  class AAM_Backend_Feature_Main_Post
20
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
@@ -44,6 +45,35 @@ class AAM_Backend_Feature_Main_Post
44
  */
45
  const TEMPLATE = 'service/post.php';
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Get posts & terms list
49
  *
@@ -185,13 +215,19 @@ class AAM_Backend_Feature_Main_Post
185
  *
186
  * @return array
187
  *
 
 
 
 
188
  * @access protected
189
- * @version 6.0.0
190
  */
191
  protected function getAccessOptionList()
192
  {
193
  $list = apply_filters(
194
- 'aam_post_access_options_filter', AAM_Backend_View_PostOptionList::get()
 
 
195
  );
196
 
197
  return array_filter($list, function ($opt) {
@@ -226,12 +262,19 @@ class AAM_Backend_Feature_Main_Post
226
  *
227
  * @return string
228
  *
 
 
 
229
  * @access protected
230
- * @version 6.0.0
231
  */
232
  protected function getPreviewValue($option, $value)
233
  {
234
  switch ($option) {
 
 
 
 
235
  case 'teaser':
236
  $preview = $this->prepareTeaserPreview($value);
237
  break;
@@ -265,6 +308,42 @@ class AAM_Backend_Feature_Main_Post
265
  return $preview;
266
  }
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  /**
269
  * Prepare teaser message preview
270
  *
@@ -450,8 +529,11 @@ class AAM_Backend_Feature_Main_Post
450
  *
451
  * @return mixed
452
  *
 
 
 
453
  * @access protected
454
- * @version 6.0.0
455
  */
456
  protected function sanitizeOption($option, $value)
457
  {
@@ -461,7 +543,7 @@ class AAM_Backend_Feature_Main_Post
461
  $value = filter_var($value, FILTER_VALIDATE_BOOLEAN);
462
  }
463
 
464
- return $value;
465
  }
466
 
467
  /**
10
  /**
11
  * Backend posts & terms service UI
12
  *
13
+ * @since 6.2.0 Added more granular control over the HIDDEN access option
14
  * @since 6.0.3 Allowed to manage access to ALL registered post types
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.2.0
19
  */
20
  class AAM_Backend_Feature_Main_Post
21
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
45
  */
46
  const TEMPLATE = 'service/post.php';
47
 
48
+ /**
49
+ * Constructor
50
+ *
51
+ * @return void
52
+ *
53
+ * @access public
54
+ * @since 6.2.0
55
+ */
56
+ public function __construct()
57
+ {
58
+ add_filter('aam_sanitize_post_value_filter', function($value, $option) {
59
+ if ($option === 'hidden') {
60
+ $value['frontend'] = isset($value['frontend']) && filter_var(
61
+ $value['frontend'], FILTER_VALIDATE_BOOLEAN
62
+ );
63
+
64
+ $value['backend'] = isset($value['backend']) && filter_var(
65
+ $value['backend'], FILTER_VALIDATE_BOOLEAN
66
+ );
67
+
68
+ $value['api'] = isset($value['api']) && filter_var(
69
+ $value['api'], FILTER_VALIDATE_BOOLEAN
70
+ );
71
+ }
72
+
73
+ return $value;
74
+ }, 10, 2);
75
+ }
76
+
77
  /**
78
  * Get posts & terms list
79
  *
215
  *
216
  * @return array
217
  *
218
+ * @since 6.2.0 Added additional argument "current subject" to the
219
+ * `aam_post_access_options_filter` filter
220
+ * @since 6.0.0 Initial implementation of the method
221
+ *
222
  * @access protected
223
+ * @version 6.2.0
224
  */
225
  protected function getAccessOptionList()
226
  {
227
  $list = apply_filters(
228
+ 'aam_post_access_options_filter',
229
+ AAM_Backend_View_PostOptionList::get(),
230
+ $this->getSubject()
231
  );
232
 
233
  return array_filter($list, function ($opt) {
262
  *
263
  * @return string
264
  *
265
+ * @since 6.2.0 Added HIDDEN preview value
266
+ * @since 6.0.0 Initial implementation of the method
267
+ *
268
  * @access protected
269
+ * @version 6.2.0
270
  */
271
  protected function getPreviewValue($option, $value)
272
  {
273
  switch ($option) {
274
+ case 'hidden':
275
+ $preview = $this->prepareHiddenPreview($value);
276
+ break;
277
+
278
  case 'teaser':
279
  $preview = $this->prepareTeaserPreview($value);
280
  break;
308
  return $preview;
309
  }
310
 
311
+ /**
312
+ * Prepare preview value for the HIDDEN option
313
+ *
314
+ * @param array|boolean $hidden
315
+ *
316
+ * @return string
317
+ *
318
+ * @access protected
319
+ * @version 6.2.0
320
+ */
321
+ protected function prepareHiddenPreview($hidden)
322
+ {
323
+ $preview = null;
324
+
325
+ if (is_array($hidden)) {
326
+ if ($hidden['enabled'] === true) {
327
+ $areas = array();
328
+ if (!empty($hidden['frontend'])) {
329
+ $areas[] = __('Frontend', AAM_KEY);
330
+ }
331
+ if (!empty($hidden['backend'])) {
332
+ $areas[] = __('Backend', AAM_KEY);
333
+ }
334
+ if (!empty($hidden['api'])) {
335
+ $areas[] = __('RESTful API', AAM_KEY);
336
+ }
337
+
338
+ $preview = implode(', ', $areas);
339
+ }
340
+ } elseif (!empty($hidden)) {
341
+ $preview = __('All Areas', AAM_KEY);
342
+ }
343
+
344
+ return $preview;
345
+ }
346
+
347
  /**
348
  * Prepare teaser message preview
349
  *
529
  *
530
  * @return mixed
531
  *
532
+ * @since 6.2.0 Added support for the new filter `aam_sanitize_post_value_filter`
533
+ * @since 6.0.0 Initial implementation of the method
534
+ *
535
  * @access protected
536
+ * @version 6.2.0
537
  */
538
  protected function sanitizeOption($option, $value)
539
  {
543
  $value = filter_var($value, FILTER_VALIDATE_BOOLEAN);
544
  }
545
 
546
+ return apply_filters('aam_sanitize_post_value_filter', $value, $option);
547
  }
548
 
549
  /**
application/Backend/Feature/Settings/Manager.php CHANGED
@@ -5,15 +5,16 @@
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
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Backend Settings area abstract manager
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract
19
  {
@@ -60,6 +61,149 @@ class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract
60
  return wp_json_encode(array('status' => 'success'));
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Register settings UI manager
65
  *
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 Settings area abstract manager
12
  *
13
+ * @since 6.2.0 Added Import/Export functionality
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.2.0
18
  */
19
  class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract
20
  {
61
  return wp_json_encode(array('status' => 'success'));
62
  }
63
 
64
+ /**
65
+ * Aggregate support request metadata
66
+ *
67
+ * @return string
68
+ *
69
+ * @access public
70
+ * @version 6.2.0
71
+ */
72
+ public function getSupportMetadata()
73
+ {
74
+ global $wp_version;
75
+
76
+ return wp_json_encode(array(
77
+ 'phpVersion' => PHP_VERSION,
78
+ 'wpVersion' => $wp_version,
79
+ 'aamVersion' => AAM_VERSION,
80
+ 'settings' => AAM_Core_API::getOption(
81
+ AAM_Core_AccessSettings::DB_OPTION, array()
82
+ ),
83
+ 'config' => AAM_Core_API::getOption(
84
+ AAM_Core_Config::DB_OPTION, array()
85
+ ),
86
+ 'configpress' => AAM_Core_API::getOption(
87
+ AAM_Core_ConfigPress::DB_OPTION, array()
88
+ ),
89
+ 'roles' => AAM_Core_API::getOption(
90
+ AAM_Core_API::getRoles()->role_key, array()
91
+ ),
92
+ 'addons' => AAM_Addon_Repository::getInstance()->getRegistry(),
93
+ 'plugins' => get_plugins()
94
+ ));
95
+ }
96
+
97
+ /**
98
+ * Export AAM settings as JSON
99
+ *
100
+ * @return string
101
+ *
102
+ * @access public
103
+ * @version 6.2.0
104
+ */
105
+ public function exportSettings()
106
+ {
107
+ $data = array(
108
+ 'version' => AAM_VERSION,
109
+ 'plugin' => AAM_KEY,
110
+ 'timestamp' => (new DateTime('now', new DateTimeZone('UTC')))->format('U'),
111
+ 'dataset' => array()
112
+ );
113
+
114
+ $groups = AAM::api()->getConfig(
115
+ 'core.export.groups', array('settings', 'config', 'roles')
116
+ );
117
+
118
+ if (is_string($groups)) {
119
+ $groups = array_map('trim', explode(',', $groups));
120
+ }
121
+
122
+ foreach($groups as $group) {
123
+ switch($group) {
124
+ case 'settings':
125
+ $data['dataset']['settings'] = AAM_Core_API::getOption(
126
+ AAM_Core_AccessSettings::DB_OPTION, array()
127
+ );
128
+ break;
129
+
130
+ case 'config':
131
+ $data['dataset']['config'] = AAM_Core_API::getOption(
132
+ AAM_Core_Config::DB_OPTION, array()
133
+ );
134
+ $data['dataset']['configpress'] = AAM_Core_API::getOption(
135
+ AAM_Core_ConfigPress::DB_OPTION, array()
136
+ );
137
+ break;
138
+
139
+ case 'roles':
140
+ $data['dataset']['roles'] = AAM_Core_API::getOption(
141
+ AAM_Core_API::getRoles()->role_key, array()
142
+ );
143
+ break;
144
+
145
+ default:
146
+ break;
147
+ }
148
+ }
149
+
150
+ return wp_json_encode(array(
151
+ 'result' => base64_encode(wp_json_encode($data))
152
+ ));
153
+ }
154
+
155
+ /**
156
+ * Import AAM settings
157
+ *
158
+ * @return string
159
+ *
160
+ * @access public
161
+ * @version 6.2.0
162
+ */
163
+ public function importSettings()
164
+ {
165
+ $error = __('Invalid data', AAM_KEY);
166
+ $data = json_decode($this->getFromPost('payload'), true);
167
+
168
+ if ($data) {
169
+ if (isset($data['dataset']) && is_array($data['dataset'])) {
170
+ foreach($data['dataset'] as $group => $settings) {
171
+ switch($group) {
172
+ case 'settings':
173
+ AAM_Core_API::updateOption(
174
+ AAM_Core_AccessSettings::DB_OPTION, $settings
175
+ );
176
+ break;
177
+
178
+ case 'config':
179
+ AAM_Core_API::updateOption(
180
+ AAM_Core_Config::DB_OPTION, $settings
181
+ );
182
+ break;
183
+
184
+ case 'roles':
185
+ AAM_Core_API::updateOption(
186
+ AAM_Core_API::getRoles()->role_key, $settings
187
+ );
188
+ break;
189
+
190
+ default:
191
+ break;
192
+ }
193
+ }
194
+ $error = null;
195
+ }
196
+ }
197
+
198
+ if ($error !== null) {
199
+ $response = array('status' => 'failure', 'reason' => $error);
200
+ } else {
201
+ $response = array('status' => 'success');
202
+ }
203
+
204
+ return wp_json_encode($response);
205
+ }
206
+
207
  /**
208
  * Register settings UI manager
209
  *
application/Backend/Manager.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Backend manager
12
  *
 
13
  * @since 6.1.0 Fixed bug with HTML compression
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Backend_Manager
20
  {
@@ -124,8 +125,11 @@ class AAM_Backend_Manager
124
  *
125
  * @return void
126
  *
 
 
 
127
  * @access public
128
- * @version 6.0.0
129
  */
130
  public function printFooterJavascript()
131
  {
@@ -155,7 +159,8 @@ class AAM_Backend_Manager
155
  'caps' => array(
156
  'create_roles' => current_user_can('aam_create_roles'),
157
  'create_users' => current_user_can('create_users')
158
- )
 
159
  ));
160
 
161
  echo '<script type="text/javascript">';
10
  /**
11
  * Backend manager
12
  *
13
+ * @since 6.2.0 Added new property to the JS localization `blog_id`
14
  * @since 6.1.0 Fixed bug with HTML compression
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.2.0
19
  */
20
  class AAM_Backend_Manager
21
  {
125
  *
126
  * @return void
127
  *
128
+ * @since 6.2.0 Added `blog_id` to the localized array of properties
129
+ * @since 6.0.0 Initial implementation of the method
130
+ *
131
  * @access public
132
+ * @version 6.2.0
133
  */
134
  public function printFooterJavascript()
135
  {
159
  'caps' => array(
160
  'create_roles' => current_user_can('aam_create_roles'),
161
  'create_users' => current_user_can('create_users')
162
+ ),
163
+ 'blog_id' => get_current_blog_id()
164
  ));
165
 
166
  echo '<script type="text/javascript">';
application/Backend/Subject.php CHANGED
@@ -13,11 +13,12 @@
13
  * Currently managed subject. Based on the HTTP request data, define what subject
14
  * is currently managed with AAM UI.
15
  *
 
16
  * @since 6.1.1 Improved safety by using a last role as default
17
  * @since 6.0.0 Initial implementation of the class
18
  *
19
  * @package AAM
20
- * @version 6.1.1
21
  */
22
  class AAM_Backend_Subject
23
  {
@@ -40,12 +41,15 @@ class AAM_Backend_Subject
40
  *
41
  * @return void
42
  *
 
 
 
43
  * @access protected
44
- * @version 6.0.0
45
  */
46
  protected function __construct()
47
  {
48
- $subject = $this->getFromPost('subject');
49
 
50
  if ($subject) {
51
  $this->initRequestedSubject($subject, $this->getFromPost('subjectId'));
@@ -129,18 +133,29 @@ class AAM_Backend_Subject
129
  *
130
  * @return AAM_Core_Subject
131
  *
 
 
 
132
  * @access protected
133
- * @version 6.0.0
134
  */
135
  protected function initRequestedSubject($type, $id)
136
  {
137
  if ($type === AAM_Core_Subject_User::UID) {
138
  $subject = AAM::api()->getUser(intval($id));
139
  } elseif ($type === AAM_Core_Subject_Default::UID) {
140
- $subject = AAM_Core_Subject_Default::getInstance();
 
 
141
  } else {
142
- $class_name = 'AAM_Core_Subject_' . ucfirst($type);
143
- $subject = new $class_name(stripslashes($id));
 
 
 
 
 
 
144
  }
145
 
146
  $this->setSubject($subject);
13
  * Currently managed subject. Based on the HTTP request data, define what subject
14
  * is currently managed with AAM UI.
15
  *
16
+ * @since 6.2.0 Enhanced security & improved general functionality
17
  * @since 6.1.1 Improved safety by using a last role as default
18
  * @since 6.0.0 Initial implementation of the class
19
  *
20
  * @package AAM
21
+ * @version 6.2.0
22
  */
23
  class AAM_Backend_Subject
24
  {
41
  *
42
  * @return void
43
  *
44
+ * @since 6.2.0 Enhanced security. Making sure that subject type is normalized
45
+ * @since 6.0.0 Initial implementation of the method
46
+ *
47
  * @access protected
48
+ * @version 6.2.0
49
  */
50
  protected function __construct()
51
  {
52
+ $subject = strtolower($this->getFromPost('subject'));
53
 
54
  if ($subject) {
55
  $this->initRequestedSubject($subject, $this->getFromPost('subjectId'));
133
  *
134
  * @return AAM_Core_Subject
135
  *
136
+ * @since 6.2.0 Refactored to use AAM API to retrieve subject
137
+ * @since 6.0.0 Initial implementation of the method
138
+ *
139
  * @access protected
140
+ * @version 6.2.0
141
  */
142
  protected function initRequestedSubject($type, $id)
143
  {
144
  if ($type === AAM_Core_Subject_User::UID) {
145
  $subject = AAM::api()->getUser(intval($id));
146
  } elseif ($type === AAM_Core_Subject_Default::UID) {
147
+ $subject = AAM::api()->getDefault();
148
+ } elseif ($type === AAM_Core_Subject_Visitor::UID) {
149
+ $subject = AAM::api()->getVisitor();
150
  } else {
151
+ // Covering scenario when changing between sites and they have mismatched
152
+ // list of roles
153
+ if (AAM_Core_API::getRoles()->is_role($id)) {
154
+ $subject = AAM::api()->getRole($id);
155
+ } else {
156
+ $roles = array_keys(get_editable_roles());
157
+ $subject = AAM::api()->getRole(array_pop($roles));
158
+ }
159
  }
160
 
161
  $this->setSubject($subject);
application/Backend/View/Localization.php CHANGED
@@ -5,15 +5,16 @@
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
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * JS localization for AAM backend UI
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Backend_View_Localization
19
  {
@@ -23,8 +24,11 @@ class AAM_Backend_View_Localization
23
  *
24
  * @return array
25
  *
 
 
 
26
  * @access public
27
- * @version 6.0.0
28
  */
29
  public static function get()
30
  {
@@ -65,6 +69,8 @@ class AAM_Backend_View_Localization
65
  '_TOTAL_ user(s)' => __('_TOTAL_ user(s)', AAM_KEY),
66
  'Create New User' => __('Create New User', AAM_KEY),
67
  'Role' => __('Role', AAM_KEY),
 
 
68
  'All Users, Roles and Visitor' => __('All Users, Roles and Visitor', AAM_KEY),
69
  'Failed to apply policy changes' => __('Failed to apply policy changes', AAM_KEY),
70
  'Attach Policy To Visitors' => __('Attach Policy To Visitors', AAM_KEY),
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
  * JS localization for AAM backend UI
12
  *
13
+ * @since 6.2.0 Added couple new labels
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.2.0
18
  */
19
  class AAM_Backend_View_Localization
20
  {
24
  *
25
  * @return array
26
  *
27
+ * @since 6.2.0 Added couple new labels
28
+ * @since 6.0.0 Initial implementation of the method
29
+ *
30
  * @access public
31
+ * @version 6.2.0
32
  */
33
  public static function get()
34
  {
69
  '_TOTAL_ user(s)' => __('_TOTAL_ user(s)', AAM_KEY),
70
  'Create New User' => __('Create New User', AAM_KEY),
71
  'Role' => __('Role', AAM_KEY),
72
+ 'Message has been sent' => __('Message has been sent', AAM_KEY),
73
+ 'Download Exported Settings' => __('Download Exported Settings', AAM_KEY),
74
  'All Users, Roles and Visitor' => __('All Users, Roles and Visitor', AAM_KEY),
75
  'Failed to apply policy changes' => __('Failed to apply policy changes', AAM_KEY),
76
  'Attach Policy To Visitors' => __('Attach Policy To Visitors', AAM_KEY),
application/Backend/View/PostOptionList.php CHANGED
@@ -5,15 +5,16 @@
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
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Post & Term option list for the Post object
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Backend_View_PostOptionList
19
  {
@@ -23,14 +24,19 @@ class AAM_Backend_View_PostOptionList
23
  *
24
  * @return array
25
  *
 
 
 
26
  * @access public
27
- * @version 6.0.0
28
  */
29
  public static function get()
30
  {
31
  return array(
32
  'hidden' => array(
33
  'title' => __('Hidden', AAM_KEY),
 
 
34
  'description' => __('Completely hide the post however, still allow direct access with the valid URL.', AAM_KEY),
35
  ),
36
  'restricted' => array(
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
  * Post & Term option list for the Post object
12
  *
13
+ * @since 6.2.0 Enhanced HIDDEN option with more granular access controls
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.2.0
18
  */
19
  class AAM_Backend_View_PostOptionList
20
  {
24
  *
25
  * @return array
26
  *
27
+ * @since 6.2.0 Enhanced HIDDEN option with more granular access controls
28
+ * @since 6.0.0 Initial implementation of the method
29
+ *
30
  * @access public
31
+ * @version 6.2.0
32
  */
33
  public static function get()
34
  {
35
  return array(
36
  'hidden' => array(
37
  'title' => __('Hidden', AAM_KEY),
38
+ 'sub' => __('Hidden Areas', AAM_KEY),
39
+ 'modal' => 'modal-hidden',
40
  'description' => __('Completely hide the post however, still allow direct access with the valid URL.', AAM_KEY),
41
  ),
42
  'restricted' => array(
application/Backend/tmpl/metabox/main-iframe.php CHANGED
@@ -1,4 +1,11 @@
1
- <?php /** @version 6.0.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <?php echo static::loadTemplate(__DIR__ . '/iframe-header.php'); ?>
@@ -61,8 +68,8 @@
61
  </a>
62
  <?php } ?>
63
  <?php if (current_user_can('aam_view_help_btn')) { ?>
64
- <a href="https://aamplugin.com/support" title="Help" target="_blank">
65
- <i class="icon-help-circled"></i>
66
  <span><?php echo __('Help', AAM_KEY); ?></span>
67
  </a>
68
  <?php } ?>
@@ -71,18 +78,102 @@
71
  </div>
72
  </div>
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  <?php if (current_user_can('aam_manage_settings')) { ?>
75
  <div class="metabox-holder settings-metabox" style="display:none;">
76
  <div class="postbox">
77
  <div class="inside">
78
  <div class="row">
79
- <div class="col-xs-12 col-md-12">
 
 
 
 
 
80
  <a href="#clear-settings-modal" data-toggle="modal" class="btn btn-danger btn-block"><?php echo __('Reset AAM Settings', AAM_KEY); ?></a>
81
  </div>
82
  </div>
83
  </div>
84
  </div>
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  <div class="modal fade" id="clear-settings-modal" tabindex="-1" role="dialog">
87
  <div class="modal-dialog modal-sm" role="document">
88
  <div class="modal-content">
1
+ <?php
2
+ /**
3
+ * @since 6.2.0 Added support & import/export modals
4
+ * @since 6.0.0 Initial implementation of the template
5
+ *
6
+ * @version 6.2.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <?php echo static::loadTemplate(__DIR__ . '/iframe-header.php'); ?>
68
  </a>
69
  <?php } ?>
70
  <?php if (current_user_can('aam_view_help_btn')) { ?>
71
+ <a href="#modal-support" data-toggle="modal" title="Ask For Help">
72
+ <i class="icon-chat"></i>
73
  <span><?php echo __('Help', AAM_KEY); ?></span>
74
  </a>
75
  <?php } ?>
78
  </div>
79
  </div>
80
 
81
+ <?php if (current_user_can('aam_view_help_btn')) { ?>
82
+ <div class="modal fade" id="modal-support" tabindex="-1" role="dialog">
83
+ <div class="modal-dialog" role="document">
84
+ <div class="modal-content">
85
+ <div class="modal-header">
86
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
87
+ <h4 class="modal-title text-left"><?php echo __('Ask For Help', AAM_KEY); ?></h4>
88
+ </div>
89
+ <div class="modal-body">
90
+ <p class="alert alert-warning"><?php echo sprintf(__('Before submitting a support request, please get familiar with %show AAM support works%s so you can set the right expectations. Especially pay attention to how do we prioritize support.', AAM_KEY), '<a href="https://aamplugin.com/support" target="_blank">', '</a>'); ?></p>
91
+
92
+ <div class="form-group aam-outer-top-xxs">
93
+ <label><?php echo __('Name', AAM_KEY); ?></label>
94
+ <input type="text" class="form-control" placeholder="<?php echo __('How should we call you', AAM_KEY); ?>" id="support-name" />
95
+ </div>
96
+
97
+ <div class="form-group">
98
+ <label><?php echo __('Email', AAM_KEY); ?> <sup class="text-danger">*</sup></label>
99
+ <input type="email" class="form-control" placeholder="<?php echo __('Enter your email', AAM_KEY); ?>" id="support-email" />
100
+ <span class="hint text-muted"><?php echo __('The rest of the conversation will be conducted via provided email', AAM_KEY); ?></span>
101
+ </div>
102
+
103
+ <div class="form-group">
104
+ <label><?php echo __('Message', AAM_KEY); ?> <sup class="text-danger">*</sup></label>
105
+ <textarea class="form-control" placeholder="<?php echo __('Enter your message here...', AAM_KEY); ?>" rows="5" id="support-message"></textarea>
106
+ <span class="hint text-muted"><?php echo AAM_Backend_View_Helper::preparePhrase('Please be [kind], [specific] and [patient], and let us do the rest', 'strong', 'strong', 'strong'); ?></span>
107
+ </div>
108
+
109
+ <div class="checkbox">
110
+ <label>
111
+ <input type="checkbox" checked id="support-details" /> <?php echo sprintf(__('Attach system details (%slearn more here%s)', AAM_KEY), '<a href="https://forum.aamplugin.com/d/454-support-request-with-attached-system-details" target="_blank">', '</a>'); ?>
112
+ </label>
113
+ </div>
114
+ </div>
115
+ <div class="modal-footer">
116
+ <button type="button" class="btn btn-success" id="submit-support"><?php echo __('Request Support', AAM_KEY); ?></button>
117
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ <?php } ?>
123
+
124
  <?php if (current_user_can('aam_manage_settings')) { ?>
125
  <div class="metabox-holder settings-metabox" style="display:none;">
126
  <div class="postbox">
127
  <div class="inside">
128
  <div class="row">
129
+ <div class="col-xs-12">
130
+ <a href="#transfer-settings-modal" data-toggle="modal" class="btn btn-warning btn-block"><?php echo __('Export/Import AAM Settings', AAM_KEY); ?></a>
131
+ </div>
132
+ </div>
133
+ <div class="row aam-outer-top-xxs">
134
+ <div class="col-xs-12">
135
  <a href="#clear-settings-modal" data-toggle="modal" class="btn btn-danger btn-block"><?php echo __('Reset AAM Settings', AAM_KEY); ?></a>
136
  </div>
137
  </div>
138
  </div>
139
  </div>
140
 
141
+ <div class="modal fade" id="transfer-settings-modal" tabindex="-1" role="dialog">
142
+ <div class="modal-dialog" role="document">
143
+ <div class="modal-content">
144
+ <div class="modal-body">
145
+ <p class="alert alert-danger" id="file-api-error"><?php echo __('Your browser does not support modern way to work with files. The Export/Import feature will not work properly. Consider to use the latest Chrome, Firefox or Safari browser instead.', AAM_KEY); ?></p>
146
+
147
+ <div id="import-export-container">
148
+ <ul class="nav nav-tabs" role="tablist">
149
+ <li role="presentation" class="active"><a href="#export-tab" aria-controls="export-tab" role="tab" data-toggle="tab"><?php echo __('Export', AAM_KEY); ?></a></li>
150
+ <li role="presentation"><a href="#import-tab" aria-controls="import-tab" role="tab" data-toggle="tab"><?php echo __('Import', AAM_KEY); ?></a></li>
151
+ </ul>
152
+
153
+ <div class="tab-content">
154
+ <div role="tabpanel" class="tab-pane active" id="export-tab">
155
+ <p class="alert alert-info"><?php echo __('Export AAM settings so they can be imported to a different location. To learn more about customizing exported data, refer to the "How Import/Export feature works" article.', AAM_KEY); ?></p>
156
+ <div class="form-group aam-bordered aam-outer-top-xxs text-center">
157
+ <a href="#" id="export-settings" class="btn btn-primary"><?php echo __('Download Exported Settings', AAM_KEY); ?></a>
158
+ </div>
159
+ </div>
160
+
161
+ <div role="tabpanel" class="tab-pane" id="import-tab">
162
+ <p class="alert alert-warning"><?php echo __('Select a *.json file with valid AAM settings. All the current AAM settings will be lost and replaced with imported settings.', AAM_KEY); ?></p>
163
+ <div class="form-group aam-bordered aam-outer-top-xxs">
164
+ <input type="file" id="aam-settings" name="aam-settings" />
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ </div>
170
+ <div class="modal-footer">
171
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ </div>
176
+
177
  <div class="modal fade" id="clear-settings-modal" tabindex="-1" role="dialog">
178
  <div class="modal-dialog modal-sm" role="document">
179
  <div class="modal-content">
application/Backend/tmpl/metabox/policy-metabox.php CHANGED
@@ -1,9 +1,10 @@
1
  <?php
2
  /**
 
3
  * @since 6.1.1 Removing the backslashes before displaying the policy
4
  * @since 6.0.0 Initial implementation of the template
5
  *
6
- * @version 6.1.1
7
  */
8
  ?>
9
  <?php if (defined('AAM_KEY')) { ?>
@@ -44,7 +45,7 @@
44
 
45
  $(document).ready(function() {
46
  $('form[name="post"]').bind('submit', function(event) {
47
- var json = editor.getValue();
48
 
49
  $('#policy-parsing-error').addClass('hidden');
50
 
1
  <?php
2
  /**
3
+ * @since 6.2.0 Escaping backslashes to avoid issue with JSON validation
4
  * @since 6.1.1 Removing the backslashes before displaying the policy
5
  * @since 6.0.0 Initial implementation of the template
6
  *
7
+ * @version 6.2.0
8
  */
9
  ?>
10
  <?php if (defined('AAM_KEY')) { ?>
45
 
46
  $(document).ready(function() {
47
  $('form[name="post"]').bind('submit', function(event) {
48
+ var json = editor.getValue().replace(/\\/g, '\\\\');
49
 
50
  $('#policy-parsing-error').addClass('hidden');
51
 
application/Backend/tmpl/page/addon-panel.php CHANGED
@@ -1,9 +1,10 @@
1
  <?php
2
  /**
 
3
  * @since 6.0.5 Fixed typo in the license expiration property. Enriched plugin' status display
4
  * @since 6.0.0 Initial implementation of the template
5
  *
6
- * @version 6.0.5
7
  * */
8
  ?>
9
 
@@ -46,7 +47,7 @@
46
  <td width="80%">
47
  <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['tag']) ? '<sup><span class="badge sup">' . $product['tag'] . '</span></sup>' : ''), (!empty($product['version']) ? ' <small class="text-muted">' . $product['version'] . '</small>' : ''); ?></span>
48
  <?php if (!empty($product['license'])) { ?>
49
- <small class="aam-license-key"><b><?php echo __('License', AAM_KEY); ?>:</b> <a href="https://aamplugin.com/license/<?php echo $product['license']; ?>" target="_blank"><?php echo $product['license']; ?></a> <?php echo (!empty($product['expires']) ? sprintf('(expires on %s)', $product['expires']) : ''); ?></small>
50
  <?php } elseif (!empty($product['version'])) { ?>
51
  <small class="aam-license-key"><b><?php echo __('License', AAM_KEY); ?>:</b> <span class="text-danger"><?php echo __('unregistered version', AAM_KEY); ?></span></small>
52
  <?php } ?>
1
  <?php
2
  /**
3
+ * @since 6.2.0 Removed expiration date for license to avoid confusion
4
  * @since 6.0.5 Fixed typo in the license expiration property. Enriched plugin' status display
5
  * @since 6.0.0 Initial implementation of the template
6
  *
7
+ * @version 6.2.0
8
  * */
9
  ?>
10
 
47
  <td width="80%">
48
  <span class='aam-setting-title'><?php echo $product['title'], (!empty($product['tag']) ? '<sup><span class="badge sup">' . $product['tag'] . '</span></sup>' : ''), (!empty($product['version']) ? ' <small class="text-muted">' . $product['version'] . '</small>' : ''); ?></span>
49
  <?php if (!empty($product['license'])) { ?>
50
+ <small class="aam-license-key"><b><?php echo __('License', AAM_KEY); ?>:</b> <a href="https://aamplugin.com/license/<?php echo $product['license']; ?>" target="_blank"><?php echo $product['license']; ?></a></small>
51
  <?php } elseif (!empty($product['version'])) { ?>
52
  <small class="aam-license-key"><b><?php echo __('License', AAM_KEY); ?>:</b> <span class="text-danger"><?php echo __('unregistered version', AAM_KEY); ?></span></small>
53
  <?php } ?>
application/Backend/tmpl/page/current-subject.php CHANGED
@@ -1,9 +1,21 @@
1
- <?php /** @version 6.0.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <div class="row" id="aam-subject-banner">
5
  <div class="col-xs-12 col-md-8">
6
  <div class="aam-current-subject"></div>
 
 
 
 
 
7
  </div>
8
  </div>
9
  <?php }
1
+ <?php
2
+ /**
3
+ * @since 6.2.0 Added `aam_top_subject_actions_filter` hook
4
+ * @since 6.0.0 Initial implementation of the template
5
+ *
6
+ * @version 6.2.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <div class="row" id="aam-subject-banner">
12
  <div class="col-xs-12 col-md-8">
13
  <div class="aam-current-subject"></div>
14
+ <div class="subject-top-actions">
15
+ <?php foreach(apply_filters('aam_top_subject_actions_filter', array()) as $action) { ?>
16
+ <a href="#" id="<?php echo $action['id']; ?>" data-toggle="tooltip" title="<?php echo $action['tooltip']; ?>"><i class="<?php echo $action['icon']; ?>"></i></a>
17
+ <?php } ?>
18
+ </div>
19
  </div>
20
  </div>
21
  <?php }
application/Backend/tmpl/page/subject-panel.php CHANGED
@@ -1,4 +1,11 @@
1
- <?php /** @version 6.0.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <div class="metabox-holder main-metabox">
@@ -35,7 +42,7 @@
35
  <tr>
36
  <th>ID</th>
37
  <th>Users</th>
38
- <th width="65%"><?php echo __('Role', AAM_KEY); ?></th>
39
  <th><?php echo __('Action', AAM_KEY); ?></th>
40
  <th>Level</th>
41
  </tr>
1
+ <?php
2
+ /**
3
+ * @since 6.2.0 Changed the size of the "Role Name" column to 60%
4
+ * @since 6.0.0 Initial implementation of the template
5
+ *
6
+ * @version 6.2.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <div class="metabox-holder main-metabox">
42
  <tr>
43
  <th>ID</th>
44
  <th>Users</th>
45
+ <th width="60%"><?php echo __('Role', AAM_KEY); ?></th>
46
  <th><?php echo __('Action', AAM_KEY); ?></th>
47
  <th>Level</th>
48
  </tr>
application/Backend/tmpl/partial/post-access-form.php CHANGED
@@ -1,4 +1,11 @@
1
- <?php /** @version 6.0.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <div class="aam-overwrite<?php echo $params->object->isOverwritten() ? '' : ' hidden'; ?>" id="post-term-overwritten">
@@ -32,10 +39,10 @@
32
  <?php } ?>
33
  <p class="aam-hint">
34
  <?php echo str_replace(
35
- array('{postType}'),
36
- array(get_post_type_labels($params->postType)->singular_name),
37
- $data['description']
38
- ); ?>
39
  </p>
40
  </td>
41
  <td>
@@ -48,6 +55,60 @@
48
  </tbody>
49
  </table>
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  <div class="modal fade" id="modal-teaser" tabindex="-1" role="dialog">
52
  <div class="modal-dialog" role="document">
53
  <div class="modal-content">
@@ -133,14 +194,14 @@
133
  <div class="form-group post-redirect-value" id="post-redirect-page-value-container" style="display: <?php echo ($type === 'page' ? 'block' : 'none'); ?>;">
134
  <label><?php echo __('Existing Page', AAM_KEY); ?></label>
135
  <?php
136
- wp_dropdown_pages(array(
137
- 'depth' => 99,
138
- 'echo' => 1,
139
- 'selected' => ($type === 'page' ? $params->object->get('redirected.destination') : null),
140
- 'id' => 'post-redirect-page-value',
141
- 'class' => 'form-control',
142
- 'show_option_none' => __('-- Select Page --', AAM_KEY)
143
- ));
144
  ?>
145
  </div>
146
 
1
+ <?php
2
+ /**
3
+ * @since 6.2.0 Added "Hidden" modal for more granular access controls
4
+ * @since 6.0.0 Initial implementation of the template
5
+ *
6
+ * @version 6.2.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <div class="aam-overwrite<?php echo $params->object->isOverwritten() ? '' : ' hidden'; ?>" id="post-term-overwritten">
39
  <?php } ?>
40
  <p class="aam-hint">
41
  <?php echo str_replace(
42
+ array('{postType}'),
43
+ array(get_post_type_labels($params->postType)->singular_name),
44
+ $data['description']
45
+ ); ?>
46
  </p>
47
  </td>
48
  <td>
55
  </tbody>
56
  </table>
57
 
58
+ <div class="modal fade" id="modal-hidden" tabindex="-1" role="dialog">
59
+ <div class="modal-dialog" role="document">
60
+ <div class="modal-content">
61
+ <div class="modal-header">
62
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
63
+ <h4 class="modal-title"><?php echo __('Hidden Areas', AAM_KEY); ?></h4>
64
+ </div>
65
+ <div class="modal-body">
66
+ <table class="table table-striped table-bordered">
67
+ <tbody>
68
+ <tr>
69
+ <td>
70
+ <span class='aam-setting-title'><?php echo __('Frontend', AAM_KEY); ?></span>
71
+ <p class="aam-setting-description">
72
+ <?php echo __('Hide post on the frontend site of the website'); ?>
73
+ </p>
74
+ </td>
75
+ <td class="text-center">
76
+ <input data-toggle="toggle" name="hidden.frontend" id="hidden-frontend" type="checkbox" <?php echo ($params->object->get('hidden.frontend') ? 'checked' : ''); ?> data-on="<?php echo __('Hidden', AAM_KEY); ?>" data-off="<?php echo __('Visible', AAM_KEY); ?>" data-size="small" data-onstyle="danger" data-offstyle="success" />
77
+ </td>
78
+ </tr>
79
+ <tr>
80
+ <td>
81
+ <span class='aam-setting-title'><?php echo __('Backend', AAM_KEY); ?></span>
82
+ <p class="aam-setting-description">
83
+ <?php echo __('Hide post on the backend site of the website'); ?>
84
+ </p>
85
+ </td>
86
+ <td class="text-center">
87
+ <input data-toggle="toggle" name="hidden.backend" id="hidden-backend" type="checkbox" <?php echo ($params->object->get('hidden.backend') ? 'checked' : ''); ?> data-on="<?php echo __('Hidden', AAM_KEY); ?>" data-off="<?php echo __('Visible', AAM_KEY); ?>" data-size="small" data-onstyle="danger" data-offstyle="success" />
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <td>
92
+ <span class='aam-setting-title'><?php echo __('RESTful API', AAM_KEY); ?></span>
93
+ <p class="aam-setting-description">
94
+ <?php echo __('Hide post in the RESTful API response'); ?>
95
+ </p>
96
+ </td>
97
+ <td class="text-center">
98
+ <input data-toggle="toggle" name="hidden.api" id="hidden-api" type="checkbox" <?php echo ($params->object->get('hidden.api') ? 'checked' : ''); ?> data-on="<?php echo __('Hidden', AAM_KEY); ?>" data-off="<?php echo __('Visible', AAM_KEY); ?>" data-size="small" data-onstyle="danger" data-offstyle="success" />
99
+ </td>
100
+ </tr>
101
+ </tbody>
102
+ </table>
103
+ </div>
104
+ <div class="modal-footer">
105
+ <button type="button" class="btn btn-success btn-save" id="save-hidden-btn"><?php echo __('Save', AAM_KEY); ?></button>
106
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
  <div class="modal fade" id="modal-teaser" tabindex="-1" role="dialog">
113
  <div class="modal-dialog" role="document">
114
  <div class="modal-content">
194
  <div class="form-group post-redirect-value" id="post-redirect-page-value-container" style="display: <?php echo ($type === 'page' ? 'block' : 'none'); ?>;">
195
  <label><?php echo __('Existing Page', AAM_KEY); ?></label>
196
  <?php
197
+ wp_dropdown_pages(array(
198
+ 'depth' => 99,
199
+ 'echo' => 1,
200
+ 'selected' => ($type === 'page' ? $params->object->get('redirected.destination') : null),
201
+ 'id' => 'post-redirect-page-value',
202
+ 'class' => 'form-control',
203
+ 'show_option_none' => __('-- Select Page --', AAM_KEY)
204
+ ));
205
  ?>
206
  </div>
207
 
application/Backend/tmpl/service/policy.php CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="aam-feature" id="policy-content">
3
  <?php if (defined('AAM_PLUS_PACKAGE') || !AAM_Backend_Subject::getInstance()->isDefault()) { ?>
@@ -27,12 +35,71 @@
27
  <th width="80%"><?php echo __('Policy', AAM_KEY); ?></th>
28
  <th><?php echo __('Actions', AAM_KEY); ?></th>
29
  <th>Edit Link</th>
 
30
  </tr>
31
  </thead>
32
  <tbody></tbody>
33
  </table>
34
  </div>
35
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  <?php } else { ?>
37
  <div class="row">
38
  <div class="col-xs-12">
@@ -43,4 +110,4 @@
43
  </div>
44
  <?php } ?>
45
  </div>
46
- <?php }
1
+ <?php
2
+ /**
3
+ * @since 6.2.0 Enhanced the table with new functionality
4
+ * @since 6.0.0 Initial implementation of the template
5
+ *
6
+ * @version 6.2.0
7
+ * */
8
+ ?>
9
  <?php if (defined('AAM_KEY')) { ?>
10
  <div class="aam-feature" id="policy-content">
11
  <?php if (defined('AAM_PLUS_PACKAGE') || !AAM_Backend_Subject::getInstance()->isDefault()) { ?>
35
  <th width="80%"><?php echo __('Policy', AAM_KEY); ?></th>
36
  <th><?php echo __('Actions', AAM_KEY); ?></th>
37
  <th>Edit Link</th>
38
+ <th>Just Title</th>
39
  </tr>
40
  </thead>
41
  <tbody></tbody>
42
  </table>
43
  </div>
44
  </div>
45
+
46
+ <div class="modal fade" id="delete-policy-modal" tabindex="-1" role="dialog">
47
+ <div class="modal-dialog" role="document">
48
+ <div class="modal-content">
49
+ <div class="modal-header">
50
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
51
+ <h4 class="modal-title"><?php echo __('Delete Policy', AAM_KEY); ?></h4>
52
+ </div>
53
+ <div class="modal-body">
54
+ <p class="text-center aam-confirm-message alert alert-danger" data-message="<?php echo __('You are about to delete the %s policy. Please confirm.', AAM_KEY); ?>"></p>
55
+ </div>
56
+ <div class="modal-footer">
57
+ <button type="button" class="btn btn-danger" id="delete-policy-btn"><?php echo __('Delete Policy', AAM_KEY); ?></button>
58
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="modal fade" id="modal-install-policy" tabindex="-1" role="dialog">
65
+ <div class="modal-dialog" role="document">
66
+ <div class="modal-content">
67
+ <div class="modal-header">
68
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
69
+ <h4 class="modal-title text-left"><?php echo __('Install Access Policy', AAM_KEY); ?></h4>
70
+ </div>
71
+ <div class="modal-body">
72
+ <p class="alert alert-info"><?php echo sprintf(__('Install an access policy from the official %sAAM Access Policy Hub%s. Insert the policy ID and it will be automatically downloaded and applied to proper assignees.', AAM_KEY), '<a href="https://aamplugin.com/access-policy-hub" target="_blank">', '</a>'); ?></p>
73
+
74
+ <div class="input-group aam-outer-top-xs">
75
+ <input type="text" class="form-control" placeholder="<?php echo __('Insert Policy ID', AAM_KEY); ?>" id="policy-id" aria-describedby="basic-addon2" />
76
+ <span class="input-group-addon" id="basic-addon2"><?php echo __('Fetch', AAM_KEY); ?></span>
77
+ </div>
78
+
79
+ <table class="table table-striped table-bordered aam-ghost aam-outer-top-xxs" id="policy-details">
80
+ <tbody>
81
+ <tr>
82
+ <th width="30" class="text-muted"><?php echo __('Title', AAM_KEY); ?></th>
83
+ <td id="policy-title"></td>
84
+ </tr>
85
+ <tr>
86
+ <th width="30" class="text-muted"><?php echo __('Description', AAM_KEY); ?></th>
87
+ <td id="policy-description"></td>
88
+ </tr>
89
+ <tr>
90
+ <th width="30" class="text-muted"><?php echo __('Assignee(s)', AAM_KEY); ?></th>
91
+ <td id="policy-subjects"></td>
92
+ </tr>
93
+ </tbody>
94
+ </table>
95
+ </div>
96
+ <div class="modal-footer">
97
+ <button type="button" class="btn btn-success" disabled id="install-policy"><?php echo __('Install', AAM_KEY); ?></button>
98
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
103
  <?php } else { ?>
104
  <div class="row">
105
  <div class="col-xs-12">
110
  </div>
111
  <?php } ?>
112
  </div>
113
+ <?php }
application/Core/AccessSettings.php CHANGED
@@ -5,15 +5,16 @@
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
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * AAM Access Settings repository
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Core_AccessSettings
19
  {
@@ -137,12 +138,19 @@ class AAM_Core_AccessSettings
137
  *
138
  * @return boolean
139
  *
 
 
 
140
  * @access public
141
- * @version 6.0.0
142
  */
143
  public function save()
144
  {
145
- return AAM_Core_API::updateOption(self::DB_OPTION, $this->_settings);
 
 
 
 
146
  }
147
 
148
  /**
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 Access Settings repository
12
  *
13
+ * @since 6.2.0 Added new hook `aam_updated_access_settings`
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.2.0
18
  */
19
  class AAM_Core_AccessSettings
20
  {
138
  *
139
  * @return boolean
140
  *
141
+ * @since 6.2.0 Added `aam_updated_access_settings` hook
142
+ * @since 6.0.0 Initial implementation of the method
143
+ *
144
  * @access public
145
+ * @version 6.2.0
146
  */
147
  public function save()
148
  {
149
+ $result = AAM_Core_API::updateOption(self::DB_OPTION, $this->_settings);
150
+
151
+ do_action('aam_updated_access_settings', $this->_settings);
152
+
153
+ return $result;
154
  }
155
 
156
  /**
application/Core/Policy/Condition.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * AAM core policy condition evaluator
12
  *
 
13
  * @since 6.1.0 Improved type casting functionality
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Core_Policy_Condition
20
  {
@@ -383,11 +384,12 @@ class AAM_Core_Policy_Condition
383
  *
384
  * @return mixed Prepared part of the condition or false on failure
385
  *
 
386
  * @since 6.1.0 Improved type casing functionality
387
  * @since 6.0.0 Initial implementation of the method
388
  *
389
  * @access protected
390
- * @version 6.1.0
391
  */
392
  public function parseExpression($exp, $args)
393
  {
@@ -396,7 +398,7 @@ class AAM_Core_Policy_Condition
396
  $exp = AAM_Core_Policy_Token::evaluate($exp, $match[1], $args);
397
  }
398
 
399
- $types = 'string|ip|int|boolean|bool|array|null';
400
 
401
  // Note! It make no sense to have multiple type casting for one expression
402
  // due to the fact that they all would have to be concatenated as a string
@@ -424,12 +426,13 @@ class AAM_Core_Policy_Condition
424
  *
425
  * @return mixed
426
  *
 
427
  * @version 6.1.0 Renamed the method from `castValue` to `_typecast`. Added new
428
  * filter `aam_token_typecast_filter`
429
  * @version 6.0.0 Initial implementation of the method
430
  *
431
  * @access protected
432
- * @version 6.1.0
433
  */
434
  private function _typecast($value, $type)
435
  {
@@ -459,6 +462,22 @@ class AAM_Core_Policy_Condition
459
  $value = ($value === '' ? null : $value);
460
  break;
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  default:
463
  $value = apply_filters('aam_token_typecast_filter', $value, $type);
464
  break;
10
  /**
11
  * AAM core policy condition evaluator
12
  *
13
+ * @since 6.2.0 Added support for the (*date) type casting
14
  * @since 6.1.0 Improved type casting functionality
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.2.0
19
  */
20
  class AAM_Core_Policy_Condition
21
  {
384
  *
385
  * @return mixed Prepared part of the condition or false on failure
386
  *
387
+ * @since 6.2.0 Added support for new `date` type
388
  * @since 6.1.0 Improved type casing functionality
389
  * @since 6.0.0 Initial implementation of the method
390
  *
391
  * @access protected
392
+ * @version 6.2.0
393
  */
394
  public function parseExpression($exp, $args)
395
  {
398
  $exp = AAM_Core_Policy_Token::evaluate($exp, $match[1], $args);
399
  }
400
 
401
+ $types = 'string|ip|int|boolean|bool|array|null|date';
402
 
403
  // Note! It make no sense to have multiple type casting for one expression
404
  // due to the fact that they all would have to be concatenated as a string
426
  *
427
  * @return mixed
428
  *
429
+ * @version 6.2.0 Added support for the `date` type
430
  * @version 6.1.0 Renamed the method from `castValue` to `_typecast`. Added new
431
  * filter `aam_token_typecast_filter`
432
  * @version 6.0.0 Initial implementation of the method
433
  *
434
  * @access protected
435
+ * @version 6.2.0
436
  */
437
  private function _typecast($value, $type)
438
  {
462
  $value = ($value === '' ? null : $value);
463
  break;
464
 
465
+ case 'date':
466
+ try {
467
+ $value = new DateTime(
468
+ $value,
469
+ new DateTimeZone('UTC')
470
+ );
471
+ } catch(Exception $e) {
472
+ _doing_it_wrong(
473
+ __CLASS__ . '::' . __METHOD__,
474
+ 'Cannot typecast value to DateTime',
475
+ AAM_VERSION
476
+ );
477
+ $value = null;
478
+ }
479
+ break;
480
+
481
  default:
482
  $value = apply_filters('aam_token_typecast_filter', $value, $type);
483
  break;
application/Core/Policy/Generator.php ADDED
@@ -0,0 +1,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 core policy generator
12
+ *
13
+ * @package AAM
14
+ * @version 6.2.0
15
+ */
16
+ class AAM_Core_Policy_Generator
17
+ {
18
+ /**
19
+ * Current subject
20
+ *
21
+ * Who should we use to get access settings from?
22
+ *
23
+ * @var AAM_Core_Subject
24
+ *
25
+ * @access protected
26
+ * @version 6.2.0
27
+ */
28
+ protected $subject;
29
+
30
+ /**
31
+ * Access settings
32
+ *
33
+ * @var array
34
+ *
35
+ * @access protected
36
+ * @version 6.2.0
37
+ */
38
+ protected $settings;
39
+
40
+ /**
41
+ * Constructor
42
+ *
43
+ * @param AAM_Core_Subject $subject
44
+ *
45
+ * @access public
46
+ * @version 6.2.0
47
+ */
48
+ public function __construct(AAM_Core_Subject $subject)
49
+ {
50
+ $this->subject = $subject;
51
+
52
+ // Read all direct access settings for provided subject
53
+ $xpath = $subject::UID;
54
+ $xpath .= ($subject->getId() ? '.' . $subject->getId() : '');
55
+
56
+ $this->settings = AAM_Core_AccessSettings::getInstance()->get($xpath);
57
+
58
+ // Share post access settings conversion with add-ons and other third-party
59
+ // solutions
60
+ add_filter('aam_post_policy_generator_filter', function($list, $res, $opts) {
61
+ return array_merge(
62
+ $list, $this->_convertToPostStatements($res, $opts)
63
+ );
64
+ }, 10, 3);
65
+ }
66
+
67
+ /**
68
+ * Generate Access Policy and return it as JSON string
69
+ *
70
+ * @return string
71
+ *
72
+ * @access public
73
+ * @version 6.2.0
74
+ */
75
+ public function generate()
76
+ {
77
+ $generated = array(
78
+ 'Statement' => array(),
79
+ 'Param' => array()
80
+ );
81
+
82
+ foreach($this->settings as $res_type => $data) {
83
+ switch($res_type) {
84
+ case AAM_Core_Object_Menu::OBJECT_TYPE:
85
+ $generated['Statement'] = array_merge(
86
+ $generated['Statement'],
87
+ $this->generateBackendMenuStatements($data)
88
+ );
89
+ break;
90
+
91
+ case AAM_Core_Object_Toolbar::OBJECT_TYPE:
92
+ $generated['Statement'] = array_merge(
93
+ $generated['Statement'],
94
+ $this->generateToolbarStatements($data)
95
+ );
96
+ break;
97
+
98
+ case AAM_Core_Object_Metabox::OBJECT_TYPE:
99
+ $generated['Statement'] = array_merge(
100
+ $generated['Statement'],
101
+ $this->generateMetaboxStatements($data)
102
+ );
103
+ break;
104
+
105
+ case AAM_Core_Object_Post::OBJECT_TYPE:
106
+ $generated['Statement'] = array_merge(
107
+ $generated['Statement'],
108
+ $this->generatePostStatements($data)
109
+ );
110
+ break;
111
+
112
+ case AAM_Core_Object_Uri::OBJECT_TYPE:
113
+ $generated['Statement'] = array_merge(
114
+ $generated['Statement'],
115
+ $this->generateUriStatements($data)
116
+ );
117
+ break;
118
+
119
+ case AAM_Core_Object_Route::OBJECT_TYPE:
120
+ $generated['Statement'] = array_merge(
121
+ $generated['Statement'],
122
+ $this->generateRouteStatements($data)
123
+ );
124
+ break;
125
+
126
+ default:
127
+ $generated = apply_filters(
128
+ 'aam_generated_policy_filter',
129
+ $generated,
130
+ $res_type,
131
+ $data,
132
+ $this->subject
133
+ );
134
+ break;
135
+ }
136
+ }
137
+
138
+ // If subject is User, then also include combined list of capabilities that
139
+ // are assigned to him
140
+ if (is_a($this->subject, 'AAM_Core_Subject_User')) {
141
+ $allowed = $denied = array();
142
+
143
+ foreach($this->subject->allcaps as $cap => $effect) {
144
+ if (!empty($effect)) {
145
+ $allowed[] = 'Capability:' . $cap;
146
+ } else {
147
+ $denied[] = 'Capability:' . $cap;
148
+ }
149
+ }
150
+
151
+ if (!empty($allowed)) {
152
+ $generated['Statement'][] = array(
153
+ 'Effect' => 'allow',
154
+ 'Resource' => $allowed
155
+ );
156
+ }
157
+
158
+ if (!empty($denied)) {
159
+ $generated['Statement'][] = array(
160
+ 'Effect' => 'deny',
161
+ 'Enforce' => true,
162
+ 'Resource' => $denied
163
+ );
164
+ }
165
+ }
166
+
167
+ $policy = json_decode(
168
+ AAM_Backend_Feature_Main_Policy::getDefaultPolicy(), true
169
+ );
170
+
171
+ return wp_json_encode(array_merge($policy, $generated));
172
+ }
173
+
174
+ /**
175
+ * Generate Backend Menu statements
176
+ *
177
+ * @param array $menus
178
+ *
179
+ * @return array
180
+ *
181
+ * @access protected
182
+ * @version 6.2.0
183
+ */
184
+ protected function generateBackendMenuStatements($menus)
185
+ {
186
+ return $this->_generateBasicStatements($menus, 'BackendMenu');
187
+ }
188
+
189
+ /**
190
+ * Generate Toolbar statements
191
+ *
192
+ * @param array $toolbar
193
+ *
194
+ * @return array
195
+ *
196
+ * @access protected
197
+ * @version 6.2.0
198
+ */
199
+ protected function generateToolbarStatements($toolbar)
200
+ {
201
+ return $this->_generateBasicStatements($toolbar, 'Toolbar');
202
+ }
203
+
204
+ /**
205
+ * Generate URI statements
206
+ *
207
+ * @param array $uris
208
+ *
209
+ * @return array
210
+ *
211
+ * @access protected
212
+ * @version 6.2.0
213
+ */
214
+ protected function generateUriStatements($uris)
215
+ {
216
+ return $this->_generateBasicStatements($uris, 'URI');
217
+ }
218
+
219
+ /**
220
+ * Generate API Route statements
221
+ *
222
+ * @param array $routes
223
+ *
224
+ * @return array
225
+ *
226
+ * @access protected
227
+ * @version 6.2.0
228
+ */
229
+ protected function generateRouteStatements($routes)
230
+ {
231
+ $normalized = array();
232
+
233
+ foreach($routes as $id => $effect) {
234
+ $normalized[str_replace('|', ':', $id)] = $effect;
235
+ }
236
+
237
+ return $this->_generateBasicStatements($normalized, 'Route');
238
+ }
239
+
240
+ /**
241
+ * Generate Metabox & Widget statements
242
+ *
243
+ * @param array $list
244
+ *
245
+ * @return array
246
+ *
247
+ * @access protected
248
+ * @version 6.2.0
249
+ */
250
+ protected function generateMetaboxStatements($list)
251
+ {
252
+ $metaboxes = $widgets = array();
253
+
254
+ foreach($list as $id => $effect) {
255
+ $parts = explode('|', $id);
256
+
257
+ if (in_array($parts[0], array('dashboard', 'widget'), true)) {
258
+ $widgets[$id] = $effect;
259
+ } else {
260
+ $metaboxes[$id] = $effect;
261
+ }
262
+ }
263
+
264
+ return array_merge(
265
+ $this->_generateBasicStatements($widgets, 'Widget'),
266
+ $this->_generateBasicStatements($metaboxes, 'Metabox')
267
+ );
268
+ }
269
+
270
+ /**
271
+ * Generate Post statements
272
+ *
273
+ * @param array $posts
274
+ *
275
+ * @return array
276
+ *
277
+ * @access protected
278
+ * @version 6.2.0
279
+ */
280
+ protected function generatePostStatements($posts)
281
+ {
282
+ $statements = array();
283
+
284
+ foreach($posts as $id => $options) {
285
+ $parts = explode('|', $id);
286
+ $resource = "Post:{$parts[1]}:{$parts[0]}";
287
+
288
+ $statements = array_merge(
289
+ $statements, $this->_convertToPostStatements($resource, $options)
290
+ );
291
+ }
292
+
293
+ return $statements;
294
+ }
295
+
296
+ /**
297
+ * Convert post settings to policy format
298
+ *
299
+ * @param string $resource
300
+ * @param array $options
301
+ *
302
+ * @return array
303
+ *
304
+ * @access private
305
+ * @version 6.2.0
306
+ */
307
+ private function _convertToPostStatements($resource, $options)
308
+ {
309
+ $allowed = $denied = $statements = array();
310
+
311
+ foreach($options as $option => $settings) {
312
+ // Compute Effect property
313
+ if (is_bool($settings)) {
314
+ $effect = ($settings === true ? 'denied' : 'allowed');
315
+ } else {
316
+ $effect = (!empty($settings['enabled']) ? 'denied' : 'allowed');
317
+ }
318
+
319
+ $action = null;
320
+
321
+ switch($option) {
322
+ case 'restricted':
323
+ $action = 'Read';
324
+ break;
325
+
326
+ case 'comment':
327
+ case 'edit':
328
+ case 'delete':
329
+ case 'publish':
330
+ case 'create':
331
+ $action = ucfirst($option);
332
+ break;
333
+
334
+ case 'hidden':
335
+ $item = array(
336
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
337
+ 'Action' => 'List',
338
+ 'Resource' => $resource
339
+ );
340
+
341
+ $conditions = array();
342
+
343
+ if (is_array($settings)) {
344
+ if (!empty($settings['frontend'])) {
345
+ $conditions['(*boolean)${CALLBACK.is_admin}'] = false;
346
+ }
347
+ if (!empty($settings['backend'])) {
348
+ $conditions['(*boolean)${CALLBACK.is_admin}'] = true;
349
+ }
350
+ if (!empty($settings['api'])) {
351
+ $conditions['(*boolean)${CONST.REST_REQUEST}'] = true;
352
+ }
353
+ }
354
+
355
+ if (!empty($conditions)) {
356
+ $item['Condition']['Equals'] = $conditions;
357
+ }
358
+
359
+ $statements[] = $item;
360
+ break;
361
+
362
+ case 'teaser':
363
+ $statements[] = array(
364
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
365
+ 'Action' => 'Read',
366
+ 'Resource' => $resource,
367
+ 'Metadata' => array(
368
+ 'Teaser' => array(
369
+ 'Value' => $settings['message']
370
+ )
371
+ )
372
+ );
373
+ break;
374
+
375
+ case 'limited':
376
+ $statements[] = array(
377
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
378
+ 'Action' => 'Read',
379
+ 'Resource' => $resource,
380
+ 'Metadata' => array(
381
+ 'Limited' => array(
382
+ 'Threshold' => intval($settings['threshold'])
383
+ )
384
+ )
385
+ );
386
+ break;
387
+
388
+ case 'redirected':
389
+ $metadata = array(
390
+ 'Type' => $settings['type'],
391
+ 'Code' => intval(isset($settings['httpCode']) ? $settings['httpCode'] : 307)
392
+ );
393
+
394
+ if ($settings['type'] === 'page') {
395
+ $metadata['Id'] = intval($settings['destination']);
396
+ } elseif ($settings['type'] === 'url') {
397
+ $metadata['URL'] = trim($settings['destination']);
398
+ } elseif ($settings['type'] === 'callback') {
399
+ $metadata['Callback'] = trim($settings['destination']);
400
+ }
401
+
402
+ $statements[] = array(
403
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
404
+ 'Action' => 'Read',
405
+ 'Resource' => $resource,
406
+ 'Metadata' => array(
407
+ 'Redirect' => $metadata
408
+ )
409
+ );
410
+ break;
411
+
412
+ case 'protected':
413
+ $statements[] = array(
414
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
415
+ 'Action' => 'Read',
416
+ 'Resource' => $resource,
417
+ 'Metadata' => array(
418
+ 'Password' => array(
419
+ 'Value' => $settings['password']
420
+ )
421
+ )
422
+ );
423
+ break;
424
+
425
+ case 'ceased':
426
+ $statements[] = array(
427
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
428
+ 'Action' => 'Read',
429
+ 'Resource' => $resource,
430
+ 'Condition' => array(
431
+ 'Greater' => array(
432
+ '(*int)${DATETIME.U}' => intval($settings['after'])
433
+ )
434
+ )
435
+ );
436
+ break;
437
+
438
+ default:
439
+ break;
440
+ }
441
+
442
+ if ($action !== null) {
443
+ $$effect[] = $resource . ':' . $action;
444
+ }
445
+ }
446
+
447
+ // Finally prepare the statements
448
+ if (!empty($denied)) {
449
+ $statements[] = array(
450
+ 'Effect' => 'deny',
451
+ 'Resource' => $denied
452
+ );
453
+ }
454
+
455
+ if (!empty($allowed)) {
456
+ $statements[] = array(
457
+ 'Effect' => 'allow',
458
+ 'Resource' => $allowed
459
+ );
460
+ }
461
+
462
+ return $statements;
463
+ }
464
+
465
+ /**
466
+ * Generate basic access policy statement
467
+ *
468
+ * @param array $options
469
+ * @param string $resource
470
+ *
471
+ * @return array
472
+ *
473
+ * @access private
474
+ * @version 6.2.0
475
+ */
476
+ private function _generateBasicStatements($options, $resource)
477
+ {
478
+ $denied = $allowed = $statements = array();
479
+
480
+ foreach($options as $id => $effect) {
481
+ if ($effect === true) {
482
+ $denied[] = "{$resource}:{$id}";
483
+ } else {
484
+ $allowed[] = "{$resource}:{$id}";
485
+ }
486
+ }
487
+
488
+ if (!empty($denied)) {
489
+ $statements[] = array(
490
+ 'Effect' => 'deny',
491
+ 'Resource' => $denied
492
+ );
493
+ }
494
+
495
+ if (!empty($allowed)) {
496
+ $statements[] = array(
497
+ 'Effect' => 'allow',
498
+ 'Resource' => $allowed
499
+ );
500
+ }
501
+
502
+ return $statements;
503
+ }
504
+
505
+ }
application/Core/Policy/Manager.php CHANGED
@@ -10,12 +10,13 @@
10
  /**
11
  * AAM policy manager for a specific subject
12
  *
 
13
  * @since 6.1.0 Implemented `=>` operator. Improved inheritance mechanism
14
  * @since 6.0.4 Potential bug fix with improperly merged Param option:* values
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
- * @version 6.1.0
19
  */
20
  class AAM_Core_Policy_Manager
21
  {
@@ -278,8 +279,11 @@ class AAM_Core_Policy_Manager
278
  *
279
  * @return void
280
  *
 
 
 
281
  * @access public
282
- * @version 6.0.0
283
  */
284
  public function initialize()
285
  {
@@ -291,7 +295,7 @@ class AAM_Core_Policy_Manager
291
  // If there is at least one policy attached and it is published, then
292
  // parse into the tree
293
  if (count($ids)) {
294
- $policies = $this->fetchPolicies(array_keys($ids));
295
 
296
  foreach ($policies as $policy) {
297
  $this->updatePolicyTree($this->tree, $this->parsePolicy($policy));
@@ -308,17 +312,27 @@ class AAM_Core_Policy_Manager
308
  *
309
  * @return array
310
  *
 
 
 
 
311
  * @access protected
312
- * @version 6.0.0
313
  */
314
- protected function fetchPolicies($ids)
315
  {
316
- return get_posts(array(
317
- 'include' => $ids,
318
- 'post_status' => 'publish',
 
319
  'suppress_filters' => true,
320
- 'post_type' => AAM_Service_AccessPolicy::POLICY_CPT
321
- ));
 
 
 
 
 
322
  }
323
 
324
  /**
10
  /**
11
  * AAM policy manager for a specific subject
12
  *
13
+ * @since 6.2.0 Fetched the way access policies are fetched
14
  * @since 6.1.0 Implemented `=>` operator. Improved inheritance mechanism
15
  * @since 6.0.4 Potential bug fix with improperly merged Param option:* values
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
+ * @version 6.2.0
20
  */
21
  class AAM_Core_Policy_Manager
22
  {
279
  *
280
  * @return void
281
  *
282
+ * @since 6.2.0 Changed the way access policies are fetched
283
+ * @since 6.0.0 Initial implementation of the method
284
+ *
285
  * @access public
286
+ * @version 6.2.0
287
  */
288
  public function initialize()
289
  {
295
  // If there is at least one policy attached and it is published, then
296
  // parse into the tree
297
  if (count($ids)) {
298
+ $policies = $this->fetchPolicies(array('include' => array_keys($ids)));
299
 
300
  foreach ($policies as $policy) {
301
  $this->updatePolicyTree($this->tree, $this->parsePolicy($policy));
312
  *
313
  * @return array
314
  *
315
+ * @since 6.2.0 Changed the way access policies are fetched to support multisite
316
+ * network setup
317
+ * @since 6.0.0 Initial implementation of the method
318
+ *
319
  * @access protected
320
+ * @version 6.2.0
321
  */
322
+ public function fetchPolicies($args = array())
323
  {
324
+ do_action('aam_pre_policy_fetch_action');
325
+
326
+ $posts = get_posts(wp_parse_args($args, array(
327
+ 'post_status' => array('publish', 'draft', 'pending'),
328
  'suppress_filters' => true,
329
+ 'post_type' => AAM_Service_AccessPolicy::POLICY_CPT,
330
+ 'nopaging' => true
331
+ )));
332
+
333
+ do_action('aam_post_policy_fetch_action');
334
+
335
+ return $posts;
336
  }
337
 
338
  /**
application/Core/Policy/Token.php CHANGED
@@ -5,18 +5,18 @@
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
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * AAM core policy token evaluator
14
  *
 
 
15
  * @since 6.1.0 Added support for the new token `AAM_CONFIG`
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
- * @version 6.1.0
20
  */
21
  class AAM_Core_Policy_Token
22
  {
@@ -26,17 +26,19 @@ class AAM_Core_Policy_Token
26
  *
27
  * @var array
28
  *
 
 
29
  * @since 6.1.0 Added `AAM_CONFIG` token
30
  * @since 6.0.0 Initial implementation of the property
31
  *
32
  * @access protected
33
- * @version 6.1.0
34
  */
35
  protected static $map = array(
36
  'USER' => 'AAM_Core_Policy_Token::getUserValue',
37
  'USER_OPTION' => 'AAM_Core_Policy_Token::getUserOptionValue',
38
  'USER_META' => 'AAM_Core_Policy_Token::getUserMetaValue',
39
- 'DATETIME' => 'date',
40
  'HTTP_GET' => 'AAM_Core_Request::get',
41
  'HTTP_QUERY' => 'AAM_Core_Request::get',
42
  'HTTP_POST' => 'AAM_Core_Request::post',
@@ -47,7 +49,9 @@ class AAM_Core_Policy_Token
47
  'CONST' => 'AAM_Core_Policy_Token::getConstant',
48
  'WP_OPTION' => 'AAM_Core_API::getOption',
49
  'JWT' => 'AAM_Core_Policy_Token::getJwtClaim',
50
- 'AAM_CONFIG' => 'AAM_Core_Policy_Token::getConfig'
 
 
51
  );
52
 
53
  /**
@@ -266,4 +270,69 @@ class AAM_Core_Policy_Token
266
  return AAM::api()->getConfig($config);
267
  }
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  }
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 core policy token evaluator
12
  *
13
+ * @since 6.2.0 Enhanced access policy with more tokens. DATETIME now returns time in
14
+ * UTC timezone
15
  * @since 6.1.0 Added support for the new token `AAM_CONFIG`
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
+ * @version 6.2.0
20
  */
21
  class AAM_Core_Policy_Token
22
  {
26
  *
27
  * @var array
28
  *
29
+ * @since 6.2.0 Added `POLICY_PARAM`, `WP_SITE` token & changed the
30
+ * DATETIME callback
31
  * @since 6.1.0 Added `AAM_CONFIG` token
32
  * @since 6.0.0 Initial implementation of the property
33
  *
34
  * @access protected
35
+ * @version 6.2.0
36
  */
37
  protected static $map = array(
38
  'USER' => 'AAM_Core_Policy_Token::getUserValue',
39
  'USER_OPTION' => 'AAM_Core_Policy_Token::getUserOptionValue',
40
  'USER_META' => 'AAM_Core_Policy_Token::getUserMetaValue',
41
+ 'DATETIME' => 'AAM_Core_Policy_Token::getDatetime',
42
  'HTTP_GET' => 'AAM_Core_Request::get',
43
  'HTTP_QUERY' => 'AAM_Core_Request::get',
44
  'HTTP_POST' => 'AAM_Core_Request::post',
49
  'CONST' => 'AAM_Core_Policy_Token::getConstant',
50
  'WP_OPTION' => 'AAM_Core_API::getOption',
51
  'JWT' => 'AAM_Core_Policy_Token::getJwtClaim',
52
+ 'AAM_CONFIG' => 'AAM_Core_Policy_Token::getConfig',
53
+ 'POLICY_PARAM' => 'AAM_Core_Policy_Token::getParam',
54
+ 'WP_SITE' => 'AAM_Core_Policy_Token::getSiteParam'
55
  );
56
 
57
  /**
270
  return AAM::api()->getConfig($config);
271
  }
272
 
273
+ /**
274
+ * Get access policy param
275
+ *
276
+ * @param string $param
277
+ *
278
+ * @return mixed
279
+ *
280
+ * @access protected
281
+ * @version 6.2.0
282
+ */
283
+ protected static function getParam($param)
284
+ {
285
+ return AAM::api()->getAccessPolicyManager()->getParam($param);
286
+ }
287
+
288
+ /**
289
+ * Get current datetime
290
+ *
291
+ * @param string $format
292
+ *
293
+ * @return string
294
+ *
295
+ * @access protected
296
+ * @version 6.2.0
297
+ */
298
+ protected static function getDatetime($format)
299
+ {
300
+ $result = null;
301
+
302
+ try {
303
+ $result = (new DateTime('now', new DateTimeZone('UTC')))->format($format);
304
+ } catch (Exception $e) {
305
+ _doing_it_wrong(
306
+ __CLASS__ . '::' . __METHOD__,
307
+ 'Invalid date/time format: ' . $e->getMessage(),
308
+ AAM_VERSION
309
+ );
310
+ }
311
+
312
+ return $result;
313
+ }
314
+
315
+ /**
316
+ * Get current blog details
317
+ *
318
+ * @param string $param
319
+ *
320
+ * @return mixed
321
+ *
322
+ * @access protected
323
+ * @version 6.2.0
324
+ */
325
+ protected static function getSiteParam($param)
326
+ {
327
+ $result = null;
328
+
329
+ if (is_multisite()) {
330
+ $result = get_blog_details()->{$param};
331
+ } elseif ($param === 'blog_id') {
332
+ $result = get_current_blog_id();
333
+ }
334
+
335
+ return $result;
336
+ }
337
+
338
  }
application/Core/Policy/Validator.php CHANGED
@@ -5,8 +5,6 @@
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
- * @version 6.0.0
10
  */
11
 
12
  use Composer\Semver\Semver;
@@ -14,12 +12,30 @@ use Composer\Semver\Semver;
14
  /**
15
  * AAM access policy validator
16
  *
 
 
 
 
17
  * @package AAM
18
- * @version 6.0.0
19
  */
20
  class AAM_Core_Policy_Validator
21
  {
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  /**
24
  * Raw policy text
25
  *
@@ -136,29 +152,51 @@ class AAM_Core_Policy_Validator
136
  *
137
  * @return void
138
  *
 
 
 
139
  * @access protected
140
- * @version 6.0.0
141
  */
142
  protected function isValidDependency()
143
  {
144
  if (!empty($this->json['Dependency'])) {
145
- foreach ($this->json['Dependency'] as $app => $constraints) {
146
  try {
147
- $satisfies = Semver::satisfies(
148
- $this->getAppVersion($app),
149
- $constraints
150
- );
151
-
152
- if ($satisfies === false) {
153
- throw new Exception(
154
- AAM_Backend_View_Helper::preparePhrase(
155
- "The dependency [{$app}] does not satisfy version requirement by the policy",
156
- 'b'
157
- )
158
- );
159
  }
160
  } catch (Exception $e) {
161
- $this->errors[] = $e->getMessage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
  }
164
  }
@@ -171,8 +209,11 @@ class AAM_Core_Policy_Validator
171
  *
172
  * @return void
173
  *
 
 
 
174
  * @access protected
175
- * @version 6.0.0
176
  */
177
  protected function getAppVersion($app)
178
  {
@@ -182,6 +223,8 @@ class AAM_Core_Policy_Validator
182
 
183
  if ($slug === 'wordpress') {
184
  $version = $wp_version;
 
 
185
  } else {
186
  $version = $this->getPluginVersion($slug);
187
  }
@@ -221,12 +264,7 @@ class AAM_Core_Policy_Validator
221
  }
222
 
223
  if (is_null($version)) {
224
- throw new Exception(
225
- AAM_Backend_View_Helper::preparePhrase(
226
- "The plugin [{$slug}] is required by the policy",
227
- 'b'
228
- )
229
- );
230
  }
231
 
232
  return $version;
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
  use Composer\Semver\Semver;
12
  /**
13
  * AAM access policy validator
14
  *
15
+ * @since 6.2.0 Allowing to define token in the dependencies array as well as
16
+ * enhanced with additional attributes
17
+ * @since 6.0.0 Initial implementation of the class
18
+ *
19
  * @package AAM
20
+ * @version 6.2.0
21
  */
22
  class AAM_Core_Policy_Validator
23
  {
24
 
25
+ /**
26
+ * Policy dependency exists however version is not satisfied
27
+ *
28
+ * @version 6.2.0
29
+ */
30
+ const INVALID_DEPENDENCY_VERSION = 10;
31
+
32
+ /**
33
+ * Policy dependency does not exist
34
+ *
35
+ * @version 6.2.0
36
+ */
37
+ const MISSING_DEPENDENCY = 20;
38
+
39
  /**
40
  * Raw policy text
41
  *
152
  *
153
  * @return void
154
  *
155
+ * @since 6.2.0 Enhanced dependency with more attributes
156
+ * @since 6.0.0 Initial implementation of the method
157
+ *
158
  * @access protected
159
+ * @version 6.2.0
160
  */
161
  protected function isValidDependency()
162
  {
163
  if (!empty($this->json['Dependency'])) {
164
+ foreach ($this->json['Dependency'] as $slug => $info) {
165
  try {
166
+ $v = (is_array($info) ? $info['Version'] : $info);
167
+ $valid = Semver::satisfies($this->getAppVersion($slug), $v);
168
+
169
+ if ($valid === false) {
170
+ throw new Exception('', self::INVALID_DEPENDENCY_VERSION);
 
 
 
 
 
 
 
171
  }
172
  } catch (Exception $e) {
173
+ // Build the error message
174
+ if (is_array($info)) {
175
+ $name = (isset($info['Name']) ? $info['Name'] : $slug);
176
+ $url = (isset($info['URL']) ? $info['URL'] : null);
177
+ } else {
178
+ $name = $slug;
179
+ $url = null;
180
+ }
181
+
182
+ // Prepare $app marker
183
+ if (!empty($url) && filter_var($url, FILTER_VALIDATE_URL)) {
184
+ $app = sprintf(
185
+ '<a href="%s" target="_blank">' . $name . '</a>', $url
186
+ );
187
+ } else {
188
+ $app = $name;
189
+ }
190
+
191
+ if ($e->getCode() === self::INVALID_DEPENDENCY_VERSION) {
192
+ $message = __('The {$app} does not satisfy minimum required version', AAM_KEY);
193
+ } elseif ($e->getCode() === self::MISSING_DEPENDENCY) {
194
+ $message = __('The {$app} is required', AAM_KEY);
195
+ } else {
196
+ $message = $e->getMessage();
197
+ }
198
+
199
+ $this->errors[] = str_replace('{$app}', $app, $message);
200
  }
201
  }
202
  }
209
  *
210
  * @return void
211
  *
212
+ * @since 6.2.0 Allowing token to be a slug
213
+ * @since 6.0.0 Initial implementation of the method
214
+ *
215
  * @access protected
216
+ * @version 6.2.0
217
  */
218
  protected function getAppVersion($app)
219
  {
223
 
224
  if ($slug === 'wordpress') {
225
  $version = $wp_version;
226
+ } elseif (strpos($slug, '${') === 0) {
227
+ $version = AAM_Core_Policy_Token::getTokenValue($app);
228
  } else {
229
  $version = $this->getPluginVersion($slug);
230
  }
264
  }
265
 
266
  if (is_null($version)) {
267
+ throw new Exception('', self::MISSING_DEPENDENCY);
 
 
 
 
 
268
  }
269
 
270
  return $version;
application/Migration/2019_06_30-base.php CHANGED
@@ -782,6 +782,8 @@ class Migration600 implements AAM_Core_Contract_MigrationInterface
782
  *
783
  * @return array
784
  *
 
 
785
  * @since 6.0.2 Fixed another fatal error with "Expire" setting
786
  * @since 6.0.1 Improved code formating. Fixed the error when unexpected datetime
787
  * is set for "Expire" option (Uncaught Error: Call to a member
@@ -789,7 +791,7 @@ class Migration600 implements AAM_Core_Contract_MigrationInterface
789
  * @since 6.0.0 Initialize implementation of the method
790
  *
791
  * @access private
792
- * @version 6.0.2
793
  */
794
  private function _convertPostObject($options, $ns = '')
795
  {
@@ -799,14 +801,20 @@ class Migration600 implements AAM_Core_Contract_MigrationInterface
799
  foreach($prepped as $key => $val) {
800
  switch($key) {
801
  case 'list':
802
- $converted[$ns . 'hidden'] = filter_var(
803
- $val, FILTER_VALIDATE_BOOLEAN
 
 
 
804
  );
805
  break;
806
 
807
  case 'list_others':
808
- $converted[$ns . 'hidden_others'] = filter_var(
809
- $val, FILTER_VALIDATE_BOOLEAN
 
 
 
810
  );
811
  break;
812
 
782
  *
783
  * @return array
784
  *
785
+ * @since 6.2.0 Changed the way the LIST option is converted to allow more
786
+ * granular access over visibility
787
  * @since 6.0.2 Fixed another fatal error with "Expire" setting
788
  * @since 6.0.1 Improved code formating. Fixed the error when unexpected datetime
789
  * is set for "Expire" option (Uncaught Error: Call to a member
791
  * @since 6.0.0 Initialize implementation of the method
792
  *
793
  * @access private
794
+ * @version 6.2.0
795
  */
796
  private function _convertPostObject($options, $ns = '')
797
  {
801
  foreach($prepped as $key => $val) {
802
  switch($key) {
803
  case 'list':
804
+ $converted[$ns . 'hidden'] = array(
805
+ 'enabled' => true,
806
+ 'frontend' => !empty($options['frontend.list']),
807
+ 'backend' => !empty($options['backend.list']),
808
+ 'api' => !empty($options['api.list'])
809
  );
810
  break;
811
 
812
  case 'list_others':
813
+ $converted[$ns . 'hidden_others'] = array(
814
+ 'enabled' => true,
815
+ 'frontend' => !empty($options['frontend.list_others']),
816
+ 'backend' => !empty($options['backend.list_others']),
817
+ 'api' => !empty($options['api.list_others'])
818
  );
819
  break;
820
 
application/Migration/2019_12_01-base.php CHANGED
@@ -17,8 +17,11 @@ use AAM_Core_API,
17
  /**
18
  * This migration class that converts add-ons registry
19
  *
 
 
 
20
  * @package AAM
21
- * @version 6.1.0
22
  */
23
  class Migration610 implements AAM_Core_Contract_MigrationInterface
24
  {
@@ -26,13 +29,14 @@ class Migration610 implements AAM_Core_Contract_MigrationInterface
26
  /**
27
  * @inheritdoc
28
  *
29
- * @version 6.1.0
 
 
 
 
30
  */
31
  public function run()
32
  {
33
- // Reset failure log
34
- AAM_Core_Migration::resetFailureLog();
35
-
36
  $list = AAM_Core_API::getOption(
37
  AAM_Addon_Repository::DB_OPTION, array(), 'site'
38
  );
17
  /**
18
  * This migration class that converts add-ons registry
19
  *
20
+ * @since 6.2.0 Simplified script
21
+ * @since 6.1.0 Initial implementation of the class
22
+ *
23
  * @package AAM
24
+ * @version 6.2.0
25
  */
26
  class Migration610 implements AAM_Core_Contract_MigrationInterface
27
  {
29
  /**
30
  * @inheritdoc
31
  *
32
+ * @since 6.2.0 Removed failure log clean-up. Delegating this to the latest
33
+ * migration script
34
+ * @since 6.1.0 Initial implementation of the method
35
+ *
36
+ * @version 6.2.0
37
  */
38
  public function run()
39
  {
 
 
 
40
  $list = AAM_Core_API::getOption(
41
  AAM_Addon_Repository::DB_OPTION, array(), 'site'
42
  );
application/Migration/{2019_12_16-base.php → 2019_12_19-base.php} RENAMED
@@ -16,15 +16,15 @@ use AAM_Core_Migration,
16
  * This migration class that just clears all the errors
17
  *
18
  * @package AAM
19
- * @version 6.1.1
20
  */
21
- class Migration611 implements AAM_Core_Contract_MigrationInterface
22
  {
23
 
24
  /**
25
  * @inheritdoc
26
  *
27
- * @version 6.1.1
28
  */
29
  public function run()
30
  {
@@ -37,5 +37,5 @@ class Migration611 implements AAM_Core_Contract_MigrationInterface
37
  }
38
 
39
  if (defined('AAM_KEY')) {
40
- return (new Migration611())->run();
41
  }
16
  * This migration class that just clears all the errors
17
  *
18
  * @package AAM
19
+ * @version 6.2.0
20
  */
21
+ class Migration620 implements AAM_Core_Contract_MigrationInterface
22
  {
23
 
24
  /**
25
  * @inheritdoc
26
  *
27
+ * @version 6.2.0
28
  */
29
  public function run()
30
  {
37
  }
38
 
39
  if (defined('AAM_KEY')) {
40
+ return (new Migration620())->run();
41
  }
application/Service/AccessPolicy.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Access Policy service
12
  *
 
13
  * @since 6.1.0 Changed the way access policy manager is obtained
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Service_AccessPolicy
20
  {
@@ -157,11 +158,12 @@ class AAM_Service_AccessPolicy
157
  *
158
  * @return void
159
  *
 
160
  * @since 6.1.1 Refactored the way access policy is applied to object
161
  * @since 6.0.0 Initial implementation of the method
162
  *
163
  * @access protected
164
- * @version 6.1.1
165
  */
166
  protected function initializeHooks()
167
  {
@@ -222,6 +224,13 @@ class AAM_Service_AccessPolicy
222
  // Manage access to the Plugin list and individual plugins
223
  add_filter('aam_allowed_plugin_action_filter', array($this, 'isPluginActionAllowed'), 10, 3);
224
  add_filter('all_plugins', array($this, 'filterPlugins'));
 
 
 
 
 
 
 
225
  }
226
 
227
  /**
@@ -232,14 +241,21 @@ class AAM_Service_AccessPolicy
232
  *
233
  * @return array
234
  *
 
 
 
 
235
  * @access public
236
- * @version 6.1.1
237
  */
238
  public function applyAccessPolicyToObject($options, AAM_Core_Object $object)
239
  {
240
- $subject = $object->getSubject();
 
 
 
241
 
242
- if ($subject::UID === AAM_Core_Subject_User::UID) {
243
  switch($object::OBJECT_TYPE) {
244
  case AAM_Core_Object_Menu::OBJECT_TYPE:
245
  $options = $this->initializeMenu($options, $object);
@@ -717,6 +733,14 @@ class AAM_Service_AccessPolicy
717
  $redirect['enabled'] = $effect;
718
  $options[$ns . 'redirected'] = $redirect;
719
  }
 
 
 
 
 
 
 
 
720
  } else { // Simply restrict access to read a post
721
  $options[$ns . 'restricted'] = $effect;
722
  }
10
  /**
11
  * Access Policy service
12
  *
13
+ * @since 6.2.0 Bug fixing and enhancements for the multisite support
14
  * @since 6.1.0 Changed the way access policy manager is obtained
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.2.0
19
  */
20
  class AAM_Service_AccessPolicy
21
  {
158
  *
159
  * @return void
160
  *
161
+ * @since 6.2.0 Added new hook into Multisite service through `aam_allowed_site_filter`
162
  * @since 6.1.1 Refactored the way access policy is applied to object
163
  * @since 6.0.0 Initial implementation of the method
164
  *
165
  * @access protected
166
+ * @version 6.2.0
167
  */
168
  protected function initializeHooks()
169
  {
224
  // Manage access to the Plugin list and individual plugins
225
  add_filter('aam_allowed_plugin_action_filter', array($this, 'isPluginActionAllowed'), 10, 3);
226
  add_filter('all_plugins', array($this, 'filterPlugins'));
227
+
228
+ // Multisite support
229
+ add_filter('aam_allowed_site_filter', function() {
230
+ $manager = AAM::api()->getAccessPolicyManager();
231
+
232
+ return $manager->isAllowed('SITE:' . get_current_blog_id()) !== false;
233
+ });
234
  }
235
 
236
  /**
241
  *
242
  * @return array
243
  *
244
+ * @since 6.2.0 Fixed bug when access policy was not applied to visitors
245
+ * @since 6.1.1 Optimized policy implementation
246
+ * @since 6.0.0 Initial implementation of the method
247
+ *
248
  * @access public
249
+ * @version 6.2.0
250
  */
251
  public function applyAccessPolicyToObject($options, AAM_Core_Object $object)
252
  {
253
+ $subject = $object->getSubject();
254
+ $lowest_level = array(
255
+ AAM_Core_Subject_User::UID, AAM_Core_Subject_Visitor::UID
256
+ );
257
 
258
+ if (in_array($subject::UID, $lowest_level, true)) {
259
  switch($object::OBJECT_TYPE) {
260
  case AAM_Core_Object_Menu::OBJECT_TYPE:
261
  $options = $this->initializeMenu($options, $object);
733
  $redirect['enabled'] = $effect;
734
  $options[$ns . 'redirected'] = $redirect;
735
  }
736
+
737
+ // Limited option
738
+ if(array_key_exists('Limited', $metadata)) {
739
+ $options[$ns . 'limited'] = array(
740
+ 'enabled' => $effect,
741
+ 'threshold' => $metadata['Limited']['Threshold']
742
+ );
743
+ }
744
  } else { // Simply restrict access to read a post
745
  $options[$ns . 'restricted'] = $effect;
746
  }
application/Service/Content.php CHANGED
@@ -10,6 +10,7 @@
10
  /**
11
  * Posts & Terms service
12
  *
 
13
  * @since 6.1.0 Multiple bug fixed
14
  * @since 6.0.4 Fixed incompatibility with some quite aggressive plugins
15
  * @since 6.0.2 Refactored the way access to posts is managed. No more pseudo caps
@@ -18,7 +19,7 @@
18
  * @since 6.0.0 Initial implementation of the class
19
  *
20
  * @package AAM
21
- * @version 6.1.0
22
  */
23
  class AAM_Service_Content
24
  {
@@ -375,8 +376,11 @@ class AAM_Service_Content
375
  *
376
  * @return array
377
  *
 
 
 
378
  * @access public
379
- * @version 6.0.0
380
  */
381
  public function getNavigationMenu($pages)
382
  {
@@ -384,7 +388,7 @@ class AAM_Service_Content
384
  foreach ($pages as $i => $page) {
385
  if (in_array($page->type, array('post_type', 'custom'), true)) {
386
  $object = AAM::getUser()->getObject('post', $page->object_id);
387
- if ($object->is('hidden')) {
388
  unset($pages[$i]);
389
  }
390
  }
@@ -433,8 +437,11 @@ class AAM_Service_Content
433
  *
434
  * @return array
435
  *
 
 
 
436
  * @access public
437
- * @version 6.0.0
438
  */
439
  public function filterPages($pages)
440
  {
@@ -447,7 +454,7 @@ class AAM_Service_Content
447
  }
448
 
449
  $object = AAM::getUser()->getObject('post', $post->ID);
450
- if ($object->is('hidden')) {
451
  unset($pages[$i]);
452
  }
453
  }
@@ -504,28 +511,30 @@ class AAM_Service_Content
504
  *
505
  * @return string
506
  *
 
 
 
507
  * @access protected
508
  * @global WPDB $wpdb
509
- * @version 6.0.0
510
  */
511
  protected function preparePostQuery($visibility, $wpQuery)
512
  {
513
  global $wpdb;
514
 
515
  $postTypes = $this->getQueryingPostType($wpQuery);
516
-
517
- $not = array();
518
 
519
  foreach ($visibility as $id => $access) {
520
  $chunks = explode('|', $id);
521
 
522
- if (in_array($chunks[1], $postTypes, true) && !empty($access['hidden'])) {
523
- $not[] = $chunks[0];
524
  }
525
  }
526
 
527
- if (!empty($not)) {
528
- $query = " AND {$wpdb->posts}.ID NOT IN (" . implode(',', $not) . ")";
529
  } else {
530
  $query = '';
531
  }
@@ -533,6 +542,44 @@ class AAM_Service_Content
533
  return $query;
534
  }
535
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
536
  /**
537
  * Get querying post type
538
  *
@@ -1015,19 +1062,22 @@ class AAM_Service_Content
1015
  *
1016
  * @return boolean|WP_Error
1017
  *
 
 
 
1018
  * @access public
1019
  * @version 6.0.0
1020
  */
1021
  public function checkPostLimitCounter(AAM_Core_Object_Post $post)
1022
  {
1023
  $result = true;
1024
- $user = get_current_user_id();
1025
 
1026
  // Check current access counter only for authenticated users
1027
- if ($user && $post->is('limited')) {
1028
  $limited = $post->get('limited');
 
1029
  $option = sprintf(self::POST_COUNTER_DB_OPTION, $post->ID);
1030
- $counter = intval(get_user_option($option, $user));
1031
 
1032
  if ($counter >= $limited['threshold']) {
1033
  $result = new WP_Error(
10
  /**
11
  * Posts & Terms service
12
  *
13
+ * @since 6.2.0 Enhanced HIDDEN option with more granular access controls
14
  * @since 6.1.0 Multiple bug fixed
15
  * @since 6.0.4 Fixed incompatibility with some quite aggressive plugins
16
  * @since 6.0.2 Refactored the way access to posts is managed. No more pseudo caps
19
  * @since 6.0.0 Initial implementation of the class
20
  *
21
  * @package AAM
22
+ * @version 6.2.0
23
  */
24
  class AAM_Service_Content
25
  {
376
  *
377
  * @return array
378
  *
379
+ * @since 6.2.0 Enhanced HIDDEN option to be more granular
380
+ * @since 6.0.0 Initial implementation of the method
381
+ *
382
  * @access public
383
+ * @version 6.2.0
384
  */
385
  public function getNavigationMenu($pages)
386
  {
388
  foreach ($pages as $i => $page) {
389
  if (in_array($page->type, array('post_type', 'custom'), true)) {
390
  $object = AAM::getUser()->getObject('post', $page->object_id);
391
+ if ($this->_isHidden($object->getOption())) {
392
  unset($pages[$i]);
393
  }
394
  }
437
  *
438
  * @return array
439
  *
440
+ * @since 6.2.0 Enhanced HIDDEN option to be more granular
441
+ * @since 6.0.0 Initial implementation of the method
442
+ *
443
  * @access public
444
+ * @version 6.2.0
445
  */
446
  public function filterPages($pages)
447
  {
454
  }
455
 
456
  $object = AAM::getUser()->getObject('post', $post->ID);
457
+ if ($this->_isHidden($object->getOption())) {
458
  unset($pages[$i]);
459
  }
460
  }
511
  *
512
  * @return string
513
  *
514
+ * @since 6.2.0 Enhanced HIDDEN option to be more granular
515
+ * @since 6.0.0 Initial implementation of the method
516
+ *
517
  * @access protected
518
  * @global WPDB $wpdb
519
+ * @version 6.2.0
520
  */
521
  protected function preparePostQuery($visibility, $wpQuery)
522
  {
523
  global $wpdb;
524
 
525
  $postTypes = $this->getQueryingPostType($wpQuery);
526
+ $excluded = array();
 
527
 
528
  foreach ($visibility as $id => $access) {
529
  $chunks = explode('|', $id);
530
 
531
+ if (in_array($chunks[1], $postTypes, true) && $this->_isHidden($access)) {
532
+ $excluded[] = $chunks[0];
533
  }
534
  }
535
 
536
+ if (!empty($excluded)) {
537
+ $query = " AND {$wpdb->posts}.ID NOT IN (" . implode(',', $excluded) . ")";
538
  } else {
539
  $query = '';
540
  }
542
  return $query;
543
  }
544
 
545
+ /**
546
+ * Determine if object is hidden based on access settings
547
+ *
548
+ * @param array $options
549
+ *
550
+ * @return boolean
551
+ *
552
+ * @access private
553
+ * @version 6.2.0
554
+ */
555
+ private function _isHidden($options)
556
+ {
557
+ $hidden = false;
558
+
559
+ // Determine current area
560
+ if (is_admin()) {
561
+ $area = 'backend';
562
+ } elseif (defined('REST_REQUEST') && REST_REQUEST) {
563
+ $area = 'api';
564
+ } else {
565
+ $area = 'frontend';
566
+ }
567
+
568
+ if (isset($options['hidden'])) {
569
+ if (
570
+ is_array($options['hidden'])
571
+ && !empty($options['hidden']['enabled'])
572
+ && !empty($options['hidden'][$area])
573
+ ) {
574
+ $hidden = true;
575
+ } elseif (is_bool($options['hidden']) && ($options['hidden'] === true)) {
576
+ $hidden = true;
577
+ }
578
+ }
579
+
580
+ return $hidden;
581
+ }
582
+
583
  /**
584
  * Get querying post type
585
  *
1062
  *
1063
  * @return boolean|WP_Error
1064
  *
1065
+ * @since 6.2.0 Simplified implementation
1066
+ * @since 6.0.0 Initial implementation of the method
1067
+ *
1068
  * @access public
1069
  * @version 6.0.0
1070
  */
1071
  public function checkPostLimitCounter(AAM_Core_Object_Post $post)
1072
  {
1073
  $result = true;
 
1074
 
1075
  // Check current access counter only for authenticated users
1076
+ if (is_user_logged_in() && $post->is('limited')) {
1077
  $limited = $post->get('limited');
1078
+
1079
  $option = sprintf(self::POST_COUNTER_DB_OPTION, $post->ID);
1080
+ $counter = intval(get_user_option($option, get_current_user_id()));
1081
 
1082
  if ($counter >= $limited['threshold']) {
1083
  $result = new WP_Error(
application/Service/Multisite.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Multisite service
12
+ *
13
+ * @package AAM
14
+ * @version 6.2.0
15
+ */
16
+ class AAM_Service_Multisite
17
+ {
18
+ use AAM_Core_Contract_RequestTrait,
19
+ AAM_Core_Contract_ServiceTrait;
20
+
21
+ /**
22
+ * AAM configuration setting that is associated with the feature
23
+ *
24
+ * @version 6.2.0
25
+ */
26
+ const FEATURE_FLAG = 'core.service.multisite.enabled';
27
+
28
+ /**
29
+ * Previously used blog ID
30
+ *
31
+ * When multisite setup, AAM stores all the policies in the main blog so they
32
+ * can be applied to the entire network.
33
+ *
34
+ * @var int
35
+ *
36
+ * @access protected
37
+ * @version 6.2.0
38
+ */
39
+ protected $switch_back_blog_id = null;
40
+
41
+ /**
42
+ * Constructor
43
+ *
44
+ * @return void
45
+ *
46
+ * @access protected
47
+ * @version 6.2.0
48
+ */
49
+ protected function __construct()
50
+ {
51
+ if (is_admin()) {
52
+ // Hook that returns the detailed information about the nature of the
53
+ // service. This is used to display information about service on the
54
+ // Settings->Services tab
55
+ add_filter('aam_service_list_filter', function ($services) {
56
+ $services[] = array(
57
+ 'title' => __('Multisite Settings Sync', AAM_KEY),
58
+ 'description' => __('Automatically synchronize changes to the list of roles and capabilities as well as all access settings (if configured accordingly).', AAM_KEY),
59
+ 'setting' => self::FEATURE_FLAG
60
+ );
61
+
62
+ return $services;
63
+ }, 20);
64
+ }
65
+
66
+ if (AAM_Core_Config::get(self::FEATURE_FLAG, true) && is_multisite()) {
67
+ $this->initializeHooks();
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Initialize multisite sync hooks
73
+ *
74
+ * @return void
75
+ *
76
+ * @access protected
77
+ * @version 6.2.0
78
+ */
79
+ protected function initializeHooks()
80
+ {
81
+ $roles = AAM_Core_API::getRoles();
82
+
83
+ // Any changes to the user_roles option should be replicated
84
+ add_action('update_option_' . $roles->role_key, function($old_value, $value) {
85
+ $this->syncOption('%suser_roles', $value);
86
+ }, 10, 2);
87
+
88
+ // Sync changes to config
89
+ add_action('update_option_' . AAM_Core_Config::DB_OPTION, function($o, $n) {
90
+ $this->syncOption(AAM_Core_Config::DB_OPTION, $n);
91
+ });
92
+
93
+ // Sync changes to ConfigPress
94
+ add_action('update_option_' . AAM_Core_ConfigPress::DB_OPTION, function($o, $n) {
95
+ $this->syncOption(AAM_Core_ConfigPress::DB_OPTION, $n);
96
+ });
97
+
98
+ add_action('aam_updated_access_settings', function($settings) {
99
+ $this->syncOption(AAM_Core_AccessSettings::DB_OPTION, $settings);
100
+ });
101
+
102
+ add_filter('wp_insert_post_data', function($data) {
103
+ if (
104
+ isset($data['post_type'])
105
+ && ($data['post_type'] === AAM_Service_AccessPolicy::POLICY_CPT)
106
+ ) {
107
+ switch_to_blog(get_main_site_id());
108
+ }
109
+
110
+ return $data;
111
+ });
112
+
113
+ add_action('aam_pre_policy_fetch_action', function() {
114
+ $this->switch_back_blog_id = get_current_blog_id();
115
+ switch_to_blog(get_main_site_id());
116
+ });
117
+
118
+ add_action('aam_post_policy_fetch_action', function() {
119
+ switch_to_blog($this->switch_back_blog_id);
120
+ });
121
+
122
+ add_action('wp', function() {
123
+ if (apply_filters('aam_allowed_site_filter', true) === false) {
124
+ wp_die('Access Denied', 'aam_access_denied');
125
+ }
126
+ }, 999);
127
+ }
128
+
129
+ /**
130
+ * Sync option across all sites
131
+ *
132
+ * @param string $option
133
+ * @param mixed $value
134
+ *
135
+ * @return void
136
+ *
137
+ * @access protected
138
+ * @global WPDB $wpdb
139
+ * @version 6.2.0
140
+ */
141
+ protected function syncOption($option, $value)
142
+ {
143
+ global $wpdb;
144
+
145
+ $sites = get_sites(array(
146
+ 'number' => PHP_INT_MAX,
147
+ 'offset' => 0,
148
+ 'orderby' => 'id',
149
+ 'site__not_in' => array_merge(
150
+ $this->getExcludedBlogs(), array(get_current_blog_id())
151
+ )
152
+ ));
153
+
154
+ foreach($sites as $site) {
155
+ AAM_Core_API::updateOption(
156
+ str_replace('%s', $wpdb->get_blog_prefix($site->blog_id), $option),
157
+ $value,
158
+ $site->blog_id
159
+ );
160
+ }
161
+ }
162
+
163
+ /**
164
+ * Get the list of excluded blogs from sync process
165
+ *
166
+ * @return array
167
+ *
168
+ * @access protected
169
+ * @version 6.2.0
170
+ */
171
+ protected function getExcludedBlogs()
172
+ {
173
+ $excluded = array();
174
+ $config = AAM::api()->getConfig('multisite.sync.exclude.blogs', array());
175
+
176
+ if (is_string($config)) {
177
+ $excluded = explode(',', $config);
178
+ } elseif (is_array($config)) {
179
+ $excluded = array_filter($config, function($site) {
180
+ return is_numeric($site);
181
+ });
182
+ }
183
+
184
+ return $excluded;
185
+ }
186
+
187
+ }
188
+
189
+ if (defined('AAM_KEY')) {
190
+ AAM_Service_Multisite::bootstrap();
191
+ }
lang/advanced-access-manager-en_US.po CHANGED
@@ -1,7 +1,7 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Advanced Access Manager\n"
4
- "POT-Creation-Date: 2019-12-11 16:44-0500\n"
5
  "PO-Revision-Date: \n"
6
  "Last-Translator: \n"
7
  "Language-Team: AAMPlugin <support@aamplugin.com>\n"
@@ -24,7 +24,7 @@ msgstr ""
24
  msgid "WP 4.7.0 or higher is required."
25
  msgstr ""
26
 
27
- #: application/Addon/Repository.php:126
28
  msgid ""
29
  "Manage access to your WordPress website posts, pages, media, custom post "
30
  "types, categories, tags and custom taxonomies for any role, individual user, "
@@ -32,21 +32,21 @@ msgid ""
32
  "for frontend, backend or API levels."
33
  msgstr ""
34
 
35
- #: application/Addon/Repository.php:131
36
  msgid ""
37
  "Manage access to your WordPress website by users IP address or referred host "
38
  "and completely lock down the entire website if necessary. Define the "
39
  "unlimited number of whitelisted or blacklisted IPs or hosts."
40
  msgstr ""
41
 
42
- #: application/Addon/Repository.php:136
43
  msgid ""
44
  "Define and manage complex WordPress role hierarchy where all the access "
45
  "settings are propagated down the tree with the ability to override any "
46
  "settings for any specific role."
47
  msgstr ""
48
 
49
- #: application/Addon/Repository.php:151
50
  msgid ""
51
  "Get the complete list of all premium AAM addons in one package and all "
52
  "future premium addons will be included for now additional cost."
@@ -77,6 +77,8 @@ msgstr ""
77
 
78
  #: application/Backend/Feature/Main/Capability.php:337
79
  #: application/Backend/Feature/Main/Capability.php:360
 
 
80
  msgid "Backend"
81
  msgstr ""
82
 
@@ -130,51 +132,74 @@ msgstr ""
130
  msgid "Metaboxes & Widgets"
131
  msgstr ""
132
 
133
- #: application/Backend/Feature/Main/Policy.php:213
 
 
 
 
134
  msgid "(no title)"
135
  msgstr ""
136
 
137
- #: application/Backend/Feature/Main/Policy.php:306
138
- #: application/Service/AccessPolicy.php:67
139
- #: application/Service/AccessPolicy.php:170
 
 
 
 
 
140
  msgid "Access Policies"
141
  msgstr ""
142
 
143
- #: application/Backend/Feature/Main/Post.php:215
144
  msgid "307 - Temporary Redirect (Default)"
145
  msgstr ""
146
 
147
- #: application/Backend/Feature/Main/Post.php:216
148
  #: application/Backend/tmpl/service/uri.php:95
149
  msgid "301 - Moved Permanently"
150
  msgstr ""
151
 
152
- #: application/Backend/Feature/Main/Post.php:217
153
  #: application/Backend/tmpl/service/uri.php:97
154
  msgid "303 - See Other"
155
  msgstr ""
156
 
157
- #: application/Backend/Feature/Main/Post.php:312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  #, php-format
159
  msgid "%d times"
160
  msgstr ""
161
 
162
- #: application/Backend/Feature/Main/Post.php:334
163
  #, php-format
164
  msgid "\"%s\" page"
165
  msgstr ""
166
 
167
- #: application/Backend/Feature/Main/Post.php:340
168
  #, php-format
169
  msgid "%s URL"
170
  msgstr ""
171
 
172
- #: application/Backend/Feature/Main/Post.php:344
173
  msgid "Login page"
174
  msgstr ""
175
 
176
- #: application/Backend/Feature/Main/Post.php:1025
177
- #: application/Service/Content.php:93
178
  msgid "Posts & Terms"
179
  msgstr ""
180
 
@@ -244,6 +269,10 @@ msgstr ""
244
  msgid "Core Settings"
245
  msgstr ""
246
 
 
 
 
 
247
  #: application/Backend/Feature/Settings/Security.php:47
248
  msgid "One Session Per User"
249
  msgstr ""
@@ -295,11 +324,11 @@ msgstr ""
295
 
296
  #: application/Backend/Feature/Subject/User.php:225
297
  #: application/Backend/Feature/Subject/User.php:250
298
- #: application/Backend/View/Localization.php:142 media/js/aam.js:4720
299
  msgid "Unexpected application error"
300
  msgstr ""
301
 
302
- #: application/Backend/Manager.php:115
303
  #, php-format
304
  msgid ""
305
  "There was at least one error detected with the automated migration script. "
@@ -307,629 +336,651 @@ msgid ""
307
  "%ssupport@aamplugin.com%s for further assistance."
308
  msgstr ""
309
 
310
- #: application/Backend/Manager.php:255
311
  msgid "[Help us] to be more noticeable and submit your review"
312
  msgstr ""
313
 
314
- #: application/Backend/Subject.php:177
315
  msgid "You are not allowed to manage any AAM subject"
316
  msgstr ""
317
 
318
- #: application/Backend/View/Localization.php:32 media/js/aam.js:1989
319
  msgid "Search Capability"
320
  msgstr ""
321
 
322
- #: application/Backend/View/Localization.php:33 media/js/aam.js:1990
323
  msgid "_TOTAL_ capability(s)"
324
  msgstr ""
325
 
326
- #: application/Backend/View/Localization.php:34 media/js/aam.js:406
327
- #: media/js/aam.js:467 media/js/aam.js:1026 media/js/aam.js:2137
328
- #: media/js/aam.js:2179 media/js/aam.js:2378 media/js/aam.js:2397
329
- #: media/js/aam.js:2467 media/js/aam.js:2489 media/js/aam.js:2508
330
- #: media/js/aam.js:3463
331
  msgid "Saving..."
332
  msgstr ""
333
 
334
- #: application/Backend/View/Localization.php:35
335
  msgid "Execute Migration"
336
  msgstr ""
337
 
338
- #: application/Backend/View/Localization.php:36 media/js/aam.js:2145
339
  msgid "Failed to add new capability"
340
  msgstr ""
341
 
342
- #: application/Backend/View/Localization.php:37
343
  msgid "Application error"
344
  msgstr ""
345
 
346
- #: application/Backend/View/Localization.php:38 media/js/aam.js:2153
347
  msgid "Add Capability"
348
  msgstr ""
349
 
350
- #: application/Backend/View/Localization.php:39
351
- #: application/Backend/tmpl/service/capability.php:76 media/js/aam.js:2195
352
  msgid "Update Capability"
353
  msgstr ""
354
 
355
- #: application/Backend/View/Localization.php:40
356
  #: application/Backend/tmpl/service/menu.php:93
357
- #: application/Backend/tmpl/service/toolbar.php:70 media/js/aam.js:1473
358
- #: media/js/aam.js:1604
359
  msgid "Show Menu"
360
  msgstr ""
361
 
362
- #: application/Backend/View/Localization.php:41
363
  #: application/Backend/tmpl/service/menu.php:97
364
- #: application/Backend/tmpl/service/toolbar.php:74 media/js/aam.js:1483
365
- #: media/js/aam.js:1614
366
  msgid "Restrict Menu"
367
  msgstr ""
368
 
369
- #: application/Backend/View/Localization.php:42 media/js/aam.js:1784
370
  msgid "Failed to retrieve mataboxes"
371
  msgstr ""
372
 
373
- #: application/Backend/View/Localization.php:43 media/js/aam.js:2645
374
- #: media/js/aam.js:3350 media/js/aam.js:3542 media/js/aam.js:3769
375
  msgid "Search"
376
  msgstr ""
377
 
378
- #: application/Backend/View/Localization.php:44 media/js/aam.js:2646
379
  msgid "_TOTAL_ object(s)"
380
  msgstr ""
381
 
382
- #: application/Backend/View/Localization.php:45
383
  msgid "Failed"
384
  msgstr ""
385
 
386
- #: application/Backend/View/Localization.php:46 media/js/aam.js:60
387
- #: media/js/aam.js:4354
388
  msgid "Loading..."
389
  msgstr ""
390
 
391
- #: application/Backend/View/Localization.php:47 media/js/aam.js:65
392
  msgid "No role"
393
  msgstr ""
394
 
395
- #: application/Backend/View/Localization.php:48 media/js/aam.js:145
396
  msgid "Create New Role"
397
  msgstr ""
398
 
399
- #: application/Backend/View/Localization.php:49
400
  msgid "Search Role"
401
  msgstr ""
402
 
403
- #: application/Backend/View/Localization.php:50 media/js/aam.js:129
404
  msgid "_TOTAL_ role(s)"
405
  msgstr ""
406
 
407
- #: application/Backend/View/Localization.php:51
408
  #: application/Backend/tmpl/page/subject-panel-advanced.php:19
409
  #: application/Backend/tmpl/service/capability.php:30
410
  #: application/Backend/tmpl/service/capability.php:64
411
- #: application/Backend/tmpl/service/jwt.php:84 media/js/aam.js:1316
412
- #: media/js/aam.js:3553 media/js/aam.js:3784 media/js/aam.js:3868
413
  msgid "Create"
414
  msgstr ""
415
 
416
- #: application/Backend/View/Localization.php:52
417
- #: application/Backend/tmpl/page/subject-panel.php:17 media/js/aam.js:167
418
  msgid "Users"
419
  msgstr ""
420
 
421
- #: application/Backend/View/Localization.php:53
422
  msgid "Failed to add new role"
423
  msgstr ""
424
 
425
- #: application/Backend/View/Localization.php:54
426
  msgid "Add Role"
427
  msgstr ""
428
 
429
- #: application/Backend/View/Localization.php:55 media/js/aam.js:474
430
  msgid "Failed to update role"
431
  msgstr ""
432
 
433
- #: application/Backend/View/Localization.php:56
434
  #: application/Backend/tmpl/page/subject-panel-advanced.php:41
435
  #: application/Backend/tmpl/service/capability.php:90 media/js/aam.js:483
436
  msgid "Update"
437
  msgstr ""
438
 
439
- #: application/Backend/View/Localization.php:57
440
  #: application/Backend/tmpl/page/subject-panel-advanced.php:110
441
- #: application/Backend/tmpl/partial/post-access-form.php:95
442
- #: media/js/aam.js:1073 media/js/aam.js:2451
443
  msgid "Reset"
444
  msgstr ""
445
 
446
- #: application/Backend/View/Localization.php:58
447
  msgid "Update..."
448
  msgstr ""
449
 
450
- #: application/Backend/View/Localization.php:59 media/js/aam.js:506
451
- #: media/js/aam.js:1938 media/js/aam.js:3501 media/js/aam.js:3886
 
452
  msgid "Deleting..."
453
  msgstr ""
454
 
455
- #: application/Backend/View/Localization.php:60 media/js/aam.js:512
456
  msgid "Failed to delete role"
457
  msgstr ""
458
 
459
- #: application/Backend/View/Localization.php:61
460
  #: application/Backend/tmpl/page/subject-panel-advanced.php:53
461
  msgid "Delete Role"
462
  msgstr ""
463
 
464
- #: application/Backend/View/Localization.php:62 media/js/aam.js:606
465
  msgid "Failed to lock user"
466
  msgstr ""
467
 
468
- #: application/Backend/View/Localization.php:63 media/js/aam.js:698
469
  msgid "Search user"
470
  msgstr ""
471
 
472
- #: application/Backend/View/Localization.php:64 media/js/aam.js:2440
473
  msgid "Counter was reset successfully"
474
  msgstr ""
475
 
476
- #: application/Backend/View/Localization.php:65 media/js/aam.js:699
477
  msgid "_TOTAL_ user(s)"
478
  msgstr ""
479
 
480
- #: application/Backend/View/Localization.php:66 media/js/aam.js:714
481
  msgid "Create New User"
482
  msgstr ""
483
 
484
- #: application/Backend/View/Localization.php:67
485
- #: application/Backend/tmpl/page/subject-panel.php:38 media/js/aam.js:762
 
486
  msgid "Role"
487
  msgstr ""
488
 
489
- #: application/Backend/View/Localization.php:68
 
 
 
 
 
 
 
 
 
490
  #: application/Core/Subject/Default.php:36 media/js/aam.js:1186
491
  msgid "All Users, Roles and Visitor"
492
  msgstr ""
493
 
494
- #: application/Backend/View/Localization.php:69 media/js/aam.js:1157
495
- #: media/js/aam.js:1232 media/js/aam.js:4323
496
  msgid "Failed to apply policy changes"
497
  msgstr ""
498
 
499
- #: application/Backend/View/Localization.php:70
500
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:25
501
  #: media/js/aam.js:1151 media/js/aam.js:1160
502
  msgid "Attach Policy To Visitors"
503
  msgstr ""
504
 
505
- #: application/Backend/View/Localization.php:71
506
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:23
507
  #: media/js/aam.js:1149 media/js/aam.js:1162
508
  msgid "Detach Policy From Visitors"
509
  msgstr ""
510
 
511
- #: application/Backend/View/Localization.php:72 media/js/aam.js:645
512
- #: media/js/aam.js:3677
513
  msgid "Generating URL..."
514
  msgstr ""
515
 
516
- #: application/Backend/View/Localization.php:73
517
  #: application/Core/Subject/Visitor.php:43 media/js/aam.js:1112
518
  msgid "Anonymous"
519
  msgstr ""
520
 
521
- #: application/Backend/View/Localization.php:74 media/js/aam.js:1138
522
- #: media/js/aam.js:1213 media/js/aam.js:1804 media/js/aam.js:4169
 
523
  msgid "Processing..."
524
  msgstr ""
525
 
526
- #: application/Backend/View/Localization.php:75 media/js/aam.js:723
527
  msgid "Loading roles..."
528
  msgstr ""
529
 
530
- #: application/Backend/View/Localization.php:76 media/js/aam.js:655
531
- #: media/js/aam.js:3688
532
  msgid "Failed to generate JWT token"
533
  msgstr ""
534
 
535
- #: application/Backend/View/Localization.php:77 media/js/aam.js:1906
536
  msgid "Failed to process request"
537
  msgstr ""
538
 
539
- #: application/Backend/View/Localization.php:78
540
  msgid "Current user"
541
  msgstr ""
542
 
543
- #: application/Backend/View/Localization.php:79
544
  msgid "Current role"
545
  msgstr ""
546
 
547
- #: application/Backend/View/Localization.php:80 media/js/aam.js:2827
548
  msgid "Manage Access"
549
  msgstr ""
550
 
551
- #: application/Backend/View/Localization.php:81 media/js/aam.js:740
552
  msgid "Filter by role"
553
  msgstr ""
554
 
555
- #: application/Backend/View/Localization.php:82
556
- #: application/Backend/View/PostOptionList.php:76 media/js/aam.js:2839
557
  msgid "Edit"
558
  msgstr ""
559
 
560
- #: application/Backend/View/Localization.php:83
561
  #: application/Backend/tmpl/page/subject-panel-advanced.php:111
562
- #: application/Backend/tmpl/partial/post-access-form.php:66
563
- #: application/Backend/tmpl/partial/post-access-form.php:96
564
- #: application/Backend/tmpl/partial/post-access-form.php:169
565
- #: application/Backend/tmpl/partial/post-access-form.php:190
566
- #: application/Backend/tmpl/partial/post-access-form.php:212
 
567
  #: application/Backend/tmpl/service/uri.php:108 media/js/aam.js:1040
568
- #: media/js/aam.js:3480
569
  msgid "Save"
570
  msgstr ""
571
 
572
- #: application/Backend/View/Localization.php:84 media/js/aam.js:213
573
  msgid "Manage role"
574
  msgstr ""
575
 
576
- #: application/Backend/View/Localization.php:85 media/js/aam.js:234
577
  msgid "Edit role"
578
  msgstr ""
579
 
580
- #: application/Backend/View/Localization.php:86 media/js/aam.js:287
581
  #: media/js/aam.js:520
582
  msgid "Delete role"
583
  msgstr ""
584
 
585
- #: application/Backend/View/Localization.php:87 media/js/aam.js:258
586
  msgid "Clone role"
587
  msgstr ""
588
 
589
- #: application/Backend/View/Localization.php:88 media/js/aam.js:801
590
  msgid "Manage user"
591
  msgstr ""
592
 
593
- #: application/Backend/View/Localization.php:89 media/js/aam.js:850
594
  msgid "Edit user"
595
  msgstr ""
596
 
597
- #: application/Backend/View/Localization.php:90 media/js/aam.js:601
598
  #: media/js/aam.js:602 media/js/aam.js:871 media/js/aam.js:882
599
  msgid "Lock user"
600
  msgstr ""
601
 
602
- #: application/Backend/View/Localization.php:91 media/js/aam.js:595
603
  #: media/js/aam.js:596 media/js/aam.js:895 media/js/aam.js:906
604
  msgid "Unlock user"
605
  msgstr ""
606
 
607
- #: application/Backend/View/Localization.php:92 media/js/aam.js:1900
608
  msgid "WordPress core does not allow to grant this capability"
609
  msgstr ""
610
 
611
- #: application/Backend/View/Localization.php:93 media/js/aam.js:1224
612
  #: media/js/aam.js:1237
613
  msgid "Detach Policy From Everybody"
614
  msgstr ""
615
 
616
- #: application/Backend/View/Localization.php:94 media/js/aam.js:1226
617
  #: media/js/aam.js:1235
618
  msgid "Attach Policy To Everybody"
619
  msgstr ""
620
 
621
- #: application/Backend/View/Localization.php:95 media/js/aam.js:1305
622
  msgid "Search Policy"
623
  msgstr ""
624
 
625
- #: application/Backend/View/Localization.php:96 media/js/aam.js:1306
626
  msgid "_TOTAL_ Policies"
627
  msgstr ""
628
 
629
- #: application/Backend/View/Localization.php:97 media/js/aam.js:1339
630
  msgid "Apply Policy"
631
  msgstr ""
632
 
633
- #: application/Backend/View/Localization.php:98 media/js/aam.js:1359
634
  msgid "Revoke Policy"
635
  msgstr ""
636
 
637
- #: application/Backend/View/Localization.php:99
638
- #: application/Service/AccessPolicy.php:171 media/js/aam.js:1376
639
  msgid "Edit Policy"
640
  msgstr ""
641
 
642
- #: application/Backend/View/Localization.php:100
643
  #: application/Backend/tmpl/service/menu.php:79
644
- #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1513
645
  msgid "Uncheck to allow"
646
  msgstr ""
647
 
648
- #: application/Backend/View/Localization.php:101
649
  #: application/Backend/tmpl/service/menu.php:79
650
- #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1515
651
  msgid "Check to restrict"
652
  msgstr ""
653
 
654
- #: application/Backend/View/Localization.php:102
655
- #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1649
656
- #: media/js/aam.js:1838
657
  msgid "Uncheck to show"
658
  msgstr ""
659
 
660
- #: application/Backend/View/Localization.php:103
661
- #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1651
662
- #: media/js/aam.js:1840
663
  msgid "Check to hide"
664
  msgstr ""
665
 
666
- #: application/Backend/View/Localization.php:104
667
- #: application/Backend/tmpl/service/metabox.php:114 media/js/aam.js:1807
668
  msgid "Initialize"
669
  msgstr ""
670
 
671
- #: application/Backend/View/Localization.php:105 media/js/aam.js:1992
672
  msgid "No capabilities"
673
  msgstr ""
674
 
675
- #: application/Backend/View/Localization.php:106 media/js/aam.js:2667
676
  msgid "Post Type"
677
  msgstr ""
678
 
679
- #: application/Backend/View/Localization.php:107 media/js/aam.js:2672
680
  msgid "Hierarchical Taxonomy"
681
  msgstr ""
682
 
683
- #: application/Backend/View/Localization.php:108 media/js/aam.js:2677
684
  msgid "Hierarchical Term"
685
  msgstr ""
686
 
687
- #: application/Backend/View/Localization.php:109 media/js/aam.js:2682
688
  msgid "Tag Taxonomy"
689
  msgstr ""
690
 
691
- #: application/Backend/View/Localization.php:110 media/js/aam.js:2687
692
  msgid "Tag"
693
  msgstr ""
694
 
695
- #: application/Backend/View/Localization.php:111 media/js/aam.js:2698
696
  msgid "Customized Settings"
697
  msgstr ""
698
 
699
- #: application/Backend/View/Localization.php:112 media/js/aam.js:2768
700
- #: media/js/aam.js:2790
701
  msgid "Parent"
702
  msgstr ""
703
 
704
- #: application/Backend/View/Localization.php:113 media/js/aam.js:2813
705
  msgid "Drill-Down"
706
  msgstr ""
707
 
708
- #: application/Backend/View/Localization.php:114 media/js/aam.js:3351
709
  msgid "_TOTAL_ route(s)"
710
  msgstr ""
711
 
712
- #: application/Backend/View/Localization.php:115 media/js/aam.js:3353
713
  msgid "No API endpoints found. You might have APIs disabled."
714
  msgstr ""
715
 
716
- #: application/Backend/View/Localization.php:116 media/js/aam.js:3354
717
- #: media/js/aam.js:3773 media/js/aam.js:4123
718
  msgid "Nothing to show"
719
  msgstr ""
720
 
721
- #: application/Backend/View/Localization.php:117 media/js/aam.js:3471
722
  msgid "Failed to save URI rule"
723
  msgstr ""
724
 
725
- #: application/Backend/View/Localization.php:118 media/js/aam.js:3507
726
  msgid "Failed to delete URI rule"
727
  msgstr ""
728
 
729
- #: application/Backend/View/Localization.php:119 media/js/aam.js:3543
730
  msgid "_TOTAL_ URI(s)"
731
  msgstr ""
732
 
733
- #: application/Backend/View/Localization.php:120 media/js/aam.js:3582
734
  msgid "Edit Rule"
735
  msgstr ""
736
 
737
- #: application/Backend/View/Localization.php:121 media/js/aam.js:3594
738
  msgid "Delete Rule"
739
  msgstr ""
740
 
741
- #: application/Backend/View/Localization.php:122 media/js/aam.js:3609
742
  msgid "Denied"
743
  msgstr ""
744
 
745
- #: application/Backend/View/Localization.php:123 media/js/aam.js:3616
746
  msgid "Redirected"
747
  msgstr ""
748
 
749
- #: application/Backend/View/Localization.php:124 media/js/aam.js:3621
750
  msgid "Callback"
751
  msgstr ""
752
 
753
- #: application/Backend/View/Localization.php:125 media/js/aam.js:3626
754
  msgid "Allowed"
755
  msgstr ""
756
 
757
- #: application/Backend/View/Localization.php:126 media/js/aam.js:3673
758
  msgid "Generating token..."
759
  msgstr ""
760
 
761
- #: application/Backend/View/Localization.php:127 media/js/aam.js:3770
762
  msgid "_TOTAL_ token(s)"
763
  msgstr ""
764
 
765
- #: application/Backend/View/Localization.php:128 media/js/aam.js:3772
766
  msgid "No JWT tokens have been generated."
767
  msgstr ""
768
 
769
- #: application/Backend/View/Localization.php:129 media/js/aam.js:3816
770
  msgid "Delete Token"
771
  msgstr ""
772
 
773
- #: application/Backend/View/Localization.php:130 media/js/aam.js:3829
774
  msgid "View Token"
775
  msgstr ""
776
 
777
- #: application/Backend/View/Localization.php:131 media/js/aam.js:3854
778
  msgid "Creating..."
779
  msgstr ""
780
 
781
- #: application/Backend/View/Localization.php:132 media/js/aam.js:4120
782
  msgid "Search Service"
783
  msgstr ""
784
 
785
- #: application/Backend/View/Localization.php:133 media/js/aam.js:4121
786
  msgid "_TOTAL_ service(s)"
787
  msgstr ""
788
 
789
- #: application/Backend/View/Localization.php:134
790
  #: application/Backend/tmpl/settings/content.php:19
791
  #: application/Backend/tmpl/settings/core.php:16
792
- #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4133
793
  msgid "Enabled"
794
  msgstr ""
795
 
796
- #: application/Backend/View/Localization.php:135
797
  #: application/Backend/tmpl/settings/content.php:19
798
  #: application/Backend/tmpl/settings/core.php:16
799
- #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4133
800
  msgid "Disabled"
801
  msgstr ""
802
 
803
- #: application/Backend/View/Localization.php:136 media/js/aam.js:4175
804
  msgid "All settings has been cleared successfully"
805
  msgstr ""
806
 
807
- #: application/Backend/View/Localization.php:137
808
- #: application/Backend/tmpl/metabox/main-iframe.php:97 media/js/aam.js:4187
809
  msgid "Clear"
810
  msgstr ""
811
 
812
- #: application/Backend/View/Localization.php:138
813
  #: application/Backend/tmpl/page/subject-panel-advanced.php:102
814
- #: application/Backend/tmpl/partial/role-inheritance.php:7 media/js/aam.js:4359
815
  msgid "Select Role"
816
  msgstr ""
817
 
818
- #: application/Backend/View/Localization.php:139 media/js/aam.js:4644
819
  msgid "Data has been saved to clipboard"
820
  msgstr ""
821
 
822
- #: application/Backend/View/Localization.php:140 media/js/aam.js:4648
823
  msgid "Failed to save data to clipboard"
824
  msgstr ""
825
 
826
- #: application/Backend/View/Localization.php:141 media/js/aam.js:4716
827
  msgid "Operation completed successfully"
828
  msgstr ""
829
 
830
- #: application/Backend/View/PostOptionList.php:33
 
 
 
831
  msgid "Hidden"
832
  msgstr ""
833
 
834
- #: application/Backend/View/PostOptionList.php:34
 
 
 
 
 
835
  msgid ""
836
  "Completely hide the post however, still allow direct access with the valid "
837
  "URL."
838
  msgstr ""
839
 
840
- #: application/Backend/View/PostOptionList.php:37
841
  msgid "Restricted"
842
  msgstr ""
843
 
844
- #: application/Backend/View/PostOptionList.php:38
845
  msgid ""
846
  "Restrict direct access to the post. Any attempt to access the post will be "
847
  "denied and redirected based on the Access Denied Redirect rule."
848
  msgstr ""
849
 
850
- #: application/Backend/View/PostOptionList.php:41
851
- #: application/Backend/tmpl/partial/post-access-form.php:56
852
  msgid "Teaser Message"
853
  msgstr ""
854
 
855
- #: application/Backend/View/PostOptionList.php:42
 
856
  msgid "Message"
857
  msgstr ""
858
 
859
- #: application/Backend/View/PostOptionList.php:44
860
  msgid ""
861
  "Dynamically replace the post content with defined plain text or HTML teaser "
862
  "message."
863
  msgstr ""
864
 
865
- #: application/Backend/View/PostOptionList.php:47
866
  msgid "Limited"
867
  msgstr ""
868
 
869
- #: application/Backend/View/PostOptionList.php:48
870
  msgid "Access Limit"
871
  msgstr ""
872
 
873
- #: application/Backend/View/PostOptionList.php:51
874
  msgid ""
875
  "Define how many times the post can be accessed. When the number of times "
876
  "exceeds the defined threshold, access will be denied and redirected based on "
877
  "the Access Denied Redirect rule."
878
  msgstr ""
879
 
880
- #: application/Backend/View/PostOptionList.php:54
881
  msgid "Leave Comments"
882
  msgstr ""
883
 
884
- #: application/Backend/View/PostOptionList.php:55
885
  msgid "Restrict access to leave comments for the post."
886
  msgstr ""
887
 
888
- #: application/Backend/View/PostOptionList.php:58
889
  msgid "Redirect"
890
  msgstr ""
891
 
892
- #: application/Backend/View/PostOptionList.php:59
893
  msgid "Destination"
894
  msgstr ""
895
 
896
- #: application/Backend/View/PostOptionList.php:61
897
  msgid ""
898
  "Redirect user based on the defined redirect rule when user tries to access "
899
  "the post. The REDIRECT option has lower precedence and will be ignored if "
900
  "RESTRICTED option is checked."
901
  msgstr ""
902
 
903
- #: application/Backend/View/PostOptionList.php:64
904
- #: application/Backend/tmpl/partial/post-access-form.php:181
905
  msgid "Password Protected"
906
  msgstr ""
907
 
908
- #: application/Backend/View/PostOptionList.php:65
909
- #: application/Backend/tmpl/partial/post-access-form.php:185
910
  #: application/Backend/tmpl/widget/login-frontend.php:29
911
  msgid "Password"
912
  msgstr ""
913
 
914
- #: application/Backend/View/PostOptionList.php:67
915
  msgid ""
916
  "Protect access to the post with a password. Available with WordPress 4.7.0 "
917
  "or higher."
918
  msgstr ""
919
 
920
- #: application/Backend/View/PostOptionList.php:70
921
  msgid "Access Expires"
922
  msgstr ""
923
 
924
- #: application/Backend/View/PostOptionList.php:71
925
  msgid "After"
926
  msgstr ""
927
 
928
- #: application/Backend/View/PostOptionList.php:73
929
  msgid "Define when access will expire to the post."
930
  msgstr ""
931
 
932
- #: application/Backend/View/PostOptionList.php:73
933
  #, php-format
934
  msgid ""
935
  "After expiration, the access to the post will be denied and redirected based "
@@ -937,27 +988,27 @@ msgid ""
937
  "%s or "
938
  msgstr ""
939
 
940
- #: application/Backend/View/PostOptionList.php:78
941
  msgid "Restrict access to edit the post."
942
  msgstr ""
943
 
944
- #: application/Backend/View/PostOptionList.php:81
945
  #: application/Backend/tmpl/page/subject-panel-advanced.php:59
946
  #: application/Backend/tmpl/service/jwt.php:136
947
- #: application/Backend/tmpl/service/uri.php:130 media/js/aam.js:3515
948
- #: media/js/aam.js:3900
949
  msgid "Delete"
950
  msgstr ""
951
 
952
- #: application/Backend/View/PostOptionList.php:83
953
  msgid "Restrict access to trash or permanently delete the post."
954
  msgstr ""
955
 
956
- #: application/Backend/View/PostOptionList.php:86
957
  msgid "Publish"
958
  msgstr ""
959
 
960
- #: application/Backend/View/PostOptionList.php:88
961
  msgid ""
962
  "Restrict the ability to publish the post. User will be allowed only to "
963
  "submit the post for review."
@@ -979,35 +1030,34 @@ msgstr ""
979
  msgid "Howdy, %username%"
980
  msgstr ""
981
 
982
- #: application/Backend/tmpl/metabox/main-iframe.php:27
983
  msgid "Notifications"
984
  msgstr ""
985
 
986
- #: application/Backend/tmpl/metabox/main-iframe.php:49
987
  msgid "Access"
988
  msgstr ""
989
 
990
- #: application/Backend/tmpl/metabox/main-iframe.php:54
991
  msgid "Settings"
992
  msgstr ""
993
 
994
- #: application/Backend/tmpl/metabox/main-iframe.php:60
995
  msgid "Add-Ons"
996
  msgstr ""
997
 
998
- #: application/Backend/tmpl/metabox/main-iframe.php:66
999
  msgid "Help"
1000
  msgstr ""
1001
 
1002
- #: application/Backend/tmpl/metabox/main-iframe.php:80
1003
- msgid "Reset AAM Settings"
1004
- msgstr ""
1005
-
1006
- #: application/Backend/tmpl/metabox/main-iframe.php:90
1007
- #: application/Backend/tmpl/page/addon-panel.php:80
1008
- #: application/Backend/tmpl/page/addon-panel.php:91
1009
- #: application/Backend/tmpl/page/addon-panel.php:101
1010
- #: application/Backend/tmpl/page/addon-panel.php:114
1011
  #: application/Backend/tmpl/page/subject-panel-advanced.php:8
1012
  #: application/Backend/tmpl/page/subject-panel-advanced.php:20
1013
  #: application/Backend/tmpl/page/subject-panel-advanced.php:30
@@ -1016,16 +1066,18 @@ msgstr ""
1016
  #: application/Backend/tmpl/page/subject-panel-advanced.php:60
1017
  #: application/Backend/tmpl/page/subject-panel-advanced.php:70
1018
  #: application/Backend/tmpl/page/subject-panel-advanced.php:112
1019
- #: application/Backend/tmpl/partial/post-access-form.php:55
1020
- #: application/Backend/tmpl/partial/post-access-form.php:67
1021
- #: application/Backend/tmpl/partial/post-access-form.php:77
1022
- #: application/Backend/tmpl/partial/post-access-form.php:97
1023
- #: application/Backend/tmpl/partial/post-access-form.php:107
1024
- #: application/Backend/tmpl/partial/post-access-form.php:170
1025
- #: application/Backend/tmpl/partial/post-access-form.php:180
1026
- #: application/Backend/tmpl/partial/post-access-form.php:191
1027
- #: application/Backend/tmpl/partial/post-access-form.php:201
1028
- #: application/Backend/tmpl/partial/post-access-form.php:213
 
 
1029
  #: application/Backend/tmpl/service/capability.php:49
1030
  #: application/Backend/tmpl/service/capability.php:65
1031
  #: application/Backend/tmpl/service/capability.php:75
@@ -1045,6 +1097,10 @@ msgstr ""
1045
  #: application/Backend/tmpl/service/metabox.php:115
1046
  #: application/Backend/tmpl/service/metabox.php:125
1047
  #: application/Backend/tmpl/service/metabox.php:147
 
 
 
 
1048
  #: application/Backend/tmpl/service/toolbar.php:86
1049
  #: application/Backend/tmpl/service/toolbar.php:108
1050
  #: application/Backend/tmpl/service/uri.php:26
@@ -1054,41 +1110,128 @@ msgstr ""
1054
  msgid "Close"
1055
  msgstr ""
1056
 
1057
- #: application/Backend/tmpl/metabox/main-iframe.php:91
1058
- msgid "Clear all settings"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1059
  msgstr ""
1060
 
1061
  #: application/Backend/tmpl/metabox/main-iframe.php:94
1062
- msgid "All AAM settings will be removed."
1063
  msgstr ""
1064
 
1065
  #: application/Backend/tmpl/metabox/main-iframe.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
  msgid "Cancel"
1067
  msgstr ""
1068
 
1069
- #: application/Backend/tmpl/metabox/main-iframe.php:110
1070
  msgid ""
1071
  "With the [Enterprise Package] get dedicated support channel and all the "
1072
  "premium add-ons for a [bulk number of live websites]"
1073
  msgstr ""
1074
 
1075
- #: application/Backend/tmpl/metabox/main-iframe.php:111
1076
- #: application/Backend/tmpl/page/addon-panel.php:65
1077
  msgid "Read More"
1078
  msgstr ""
1079
 
1080
- #: application/Backend/tmpl/metabox/policy-metabox.php:23
1081
  #, php-format
1082
  msgid ""
1083
  "To learn more about Access &amp; Security policy document, please check "
1084
  "[%sAccess &amp; Security Policy%s] page."
1085
  msgstr ""
1086
 
1087
- #: application/Backend/tmpl/metabox/policy-metabox.php:51
1088
  msgid "Syntax Error"
1089
  msgstr ""
1090
 
1091
- #: application/Backend/tmpl/page/addon-panel.php:15
1092
  msgid ""
1093
  "By purchasing any of the premium addon(s) below, you obtain the license that "
1094
  "allows you to install and use AAM software for one physical WordPress "
@@ -1099,66 +1242,66 @@ msgid ""
1099
  "guaranteed] within 30 day from the time of purchase."
1100
  msgstr ""
1101
 
1102
- #: application/Backend/tmpl/page/addon-panel.php:20
1103
  msgid "Download Addon"
1104
  msgstr ""
1105
 
1106
- #: application/Backend/tmpl/page/addon-panel.php:24
1107
  msgid "Enter The License Key"
1108
  msgstr ""
1109
 
1110
- #: application/Backend/tmpl/page/addon-panel.php:28
1111
  msgid "Download"
1112
  msgstr ""
1113
 
1114
- #: application/Backend/tmpl/page/addon-panel.php:36
1115
  msgid "Premium"
1116
  msgstr ""
1117
 
1118
- #: application/Backend/tmpl/page/addon-panel.php:37
1119
  msgid "Check For Updates"
1120
  msgstr ""
1121
 
1122
- #: application/Backend/tmpl/page/addon-panel.php:49
1123
- #: application/Backend/tmpl/page/addon-panel.php:51
1124
  msgid "License"
1125
  msgstr ""
1126
 
1127
- #: application/Backend/tmpl/page/addon-panel.php:51
1128
  msgid "unregistered version"
1129
  msgstr ""
1130
 
1131
- #: application/Backend/tmpl/page/addon-panel.php:59
1132
  msgid "Update Available"
1133
  msgstr ""
1134
 
1135
- #: application/Backend/tmpl/page/addon-panel.php:61
1136
  msgid "Active"
1137
  msgstr ""
1138
 
1139
- #: application/Backend/tmpl/page/addon-panel.php:63
1140
  msgid "Inactive"
1141
  msgstr ""
1142
 
1143
- #: application/Backend/tmpl/page/addon-panel.php:81
1144
  msgid "License Key Info"
1145
  msgstr ""
1146
 
1147
- #: application/Backend/tmpl/page/addon-panel.php:85
1148
  msgid ""
1149
  "Insert license key that you received after the payment (find the email "
1150
  "example below). It might take up to 2 hours to process the payment."
1151
  msgstr ""
1152
 
1153
- #: application/Backend/tmpl/page/addon-panel.php:102
1154
  msgid "Plugin Installation"
1155
  msgstr ""
1156
 
1157
- #: application/Backend/tmpl/page/addon-panel.php:106
1158
  msgid "The plugin has been successfully downloaded from our server."
1159
  msgstr ""
1160
 
1161
- #: application/Backend/tmpl/page/addon-panel.php:110
1162
  #, php-format
1163
  msgid ""
1164
  "With AAM v6.0.0 or higher, all premium addons are [regular WordPress "
@@ -1227,36 +1370,36 @@ msgstr ""
1227
  msgid "Change To Role"
1228
  msgstr ""
1229
 
1230
- #: application/Backend/tmpl/page/subject-panel.php:7
1231
  msgid "Users/Roles Manager"
1232
  msgstr ""
1233
 
1234
- #: application/Backend/tmpl/page/subject-panel.php:14
1235
  msgid "Roles"
1236
  msgstr ""
1237
 
1238
- #: application/Backend/tmpl/page/subject-panel.php:20
1239
  msgid "Visitor"
1240
  msgstr ""
1241
 
1242
- #: application/Backend/tmpl/page/subject-panel.php:23
1243
  msgid "Default"
1244
  msgstr ""
1245
 
1246
- #: application/Backend/tmpl/page/subject-panel.php:26
1247
  msgid "None"
1248
  msgstr ""
1249
 
1250
- #: application/Backend/tmpl/page/subject-panel.php:39
1251
- #: application/Backend/tmpl/page/subject-panel.php:55
1252
  msgid "Action"
1253
  msgstr ""
1254
 
1255
- #: application/Backend/tmpl/page/subject-panel.php:54
1256
  msgid "Username"
1257
  msgstr ""
1258
 
1259
- #: application/Backend/tmpl/page/subject-panel.php:76
1260
  msgid ""
1261
  "You are not allowed to manage any of the existing users, roles, visitors or "
1262
  "default access settings."
@@ -1312,7 +1455,7 @@ msgid ""
1312
  "WordPress theme to find out what causes the issue."
1313
  msgstr ""
1314
 
1315
- #: application/Backend/tmpl/partial/post-access-form.php:5
1316
  #: application/Backend/tmpl/service/login-redirect.php:17
1317
  #: application/Backend/tmpl/service/logout-redirect.php:17
1318
  #: application/Backend/tmpl/service/menu.php:17
@@ -1323,7 +1466,7 @@ msgstr ""
1323
  msgid "Settings are customized"
1324
  msgstr ""
1325
 
1326
- #: application/Backend/tmpl/partial/post-access-form.php:6
1327
  #: application/Backend/tmpl/service/login-redirect.php:18
1328
  #: application/Backend/tmpl/service/logout-redirect.php:18
1329
  #: application/Backend/tmpl/service/menu.php:18
@@ -1335,60 +1478,78 @@ msgstr ""
1335
  msgid "Reset to default"
1336
  msgstr ""
1337
 
1338
- #: application/Backend/tmpl/partial/post-access-form.php:14
1339
  #, php-format
1340
  msgid ""
1341
  "To fully protect your media library files, please refer to the %sHow to "
1342
  "manage access to WordPress media library%s article."
1343
  msgstr ""
1344
 
1345
- #: application/Backend/tmpl/partial/post-access-form.php:29
1346
  msgid "change"
1347
  msgstr ""
1348
 
1349
- #: application/Backend/tmpl/partial/post-access-form.php:60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1350
  msgid "Plain text or valid HTML"
1351
  msgstr ""
1352
 
1353
- #: application/Backend/tmpl/partial/post-access-form.php:61
1354
  msgid "Enter your teaser message..."
1355
  msgstr ""
1356
 
1357
- #: application/Backend/tmpl/partial/post-access-form.php:62
1358
  msgid ""
1359
  "Use [&#91;excerpt&#93;] shortcode to insert post excerpt to the teaser "
1360
  "message."
1361
  msgstr ""
1362
 
1363
- #: application/Backend/tmpl/partial/post-access-form.php:78
1364
  msgid "Define Access Limit"
1365
  msgstr ""
1366
 
1367
- #: application/Backend/tmpl/partial/post-access-form.php:82
1368
  msgid "Access Limit Threshold"
1369
  msgstr ""
1370
 
1371
- #: application/Backend/tmpl/partial/post-access-form.php:83
1372
  msgid "Enter digital number"
1373
  msgstr ""
1374
 
1375
- #: application/Backend/tmpl/partial/post-access-form.php:90
1376
  #, php-format
1377
  msgid "The user can access content [%d] times."
1378
  msgstr ""
1379
 
1380
- #: application/Backend/tmpl/partial/post-access-form.php:108
1381
  msgid "Access Redirect"
1382
  msgstr ""
1383
 
1384
- #: application/Backend/tmpl/partial/post-access-form.php:111
1385
  msgid ""
1386
  "Use REDIRECT option only if you want to redirect user to a different "
1387
  "location either temporary or permanently. Do not use it as a way to protect "
1388
  "access to avoid inconsistent user experience."
1389
  msgstr ""
1390
 
1391
- #: application/Backend/tmpl/partial/post-access-form.php:116
1392
  #: application/Backend/tmpl/service/404redirect.php:26
1393
  #: application/Backend/tmpl/service/login-redirect.php:33
1394
  #: application/Backend/tmpl/service/logout-redirect.php:33
@@ -1397,12 +1558,12 @@ msgstr ""
1397
  msgid "Redirected to existing page [(select from the drop-down)]"
1398
  msgstr ""
1399
 
1400
- #: application/Backend/tmpl/partial/post-access-form.php:120
1401
  #: application/Backend/tmpl/service/logout-redirect.php:37
1402
  msgid "Redirected to the URL [(enter full URL starting from http or https)]"
1403
  msgstr ""
1404
 
1405
- #: application/Backend/tmpl/partial/post-access-form.php:125
1406
  #: application/Backend/tmpl/service/redirect.php:49
1407
  #: application/Backend/tmpl/service/uri.php:52
1408
  msgid ""
@@ -1410,7 +1571,7 @@ msgid ""
1410
  "the restricted page)]"
1411
  msgstr ""
1412
 
1413
- #: application/Backend/tmpl/partial/post-access-form.php:130
1414
  #: application/Backend/tmpl/service/404redirect.php:34
1415
  #: application/Backend/tmpl/service/login-redirect.php:41
1416
  #: application/Backend/tmpl/service/logout-redirect.php:41
@@ -1421,7 +1582,7 @@ msgstr ""
1421
  msgid "Trigger PHP callback function [(valid %sPHP callback%s is required)]"
1422
  msgstr ""
1423
 
1424
- #: application/Backend/tmpl/partial/post-access-form.php:134
1425
  #: application/Backend/tmpl/service/404redirect.php:38
1426
  #: application/Backend/tmpl/service/login-redirect.php:45
1427
  #: application/Backend/tmpl/service/logout-redirect.php:45
@@ -1431,7 +1592,7 @@ msgstr ""
1431
  msgid "Existing Page"
1432
  msgstr ""
1433
 
1434
- #: application/Backend/tmpl/partial/post-access-form.php:142
1435
  #: application/Backend/tmpl/service/404redirect.php:47
1436
  #: application/Backend/tmpl/service/login-redirect.php:54
1437
  #: application/Backend/tmpl/service/logout-redirect.php:54
@@ -1441,7 +1602,7 @@ msgstr ""
1441
  msgid "-- Select Page --"
1442
  msgstr ""
1443
 
1444
- #: application/Backend/tmpl/partial/post-access-form.php:148
1445
  #: application/Backend/tmpl/service/404redirect.php:53
1446
  #: application/Backend/tmpl/service/login-redirect.php:60
1447
  #: application/Backend/tmpl/service/logout-redirect.php:60
@@ -1450,7 +1611,7 @@ msgstr ""
1450
  msgid "The URL"
1451
  msgstr ""
1452
 
1453
- #: application/Backend/tmpl/partial/post-access-form.php:153
1454
  #: application/Backend/tmpl/service/404redirect.php:58
1455
  #: application/Backend/tmpl/service/login-redirect.php:65
1456
  #: application/Backend/tmpl/service/logout-redirect.php:65
@@ -1460,22 +1621,22 @@ msgstr ""
1460
  msgid "PHP Callback Function"
1461
  msgstr ""
1462
 
1463
- #: application/Backend/tmpl/partial/post-access-form.php:154
1464
  #: application/Backend/tmpl/service/redirect.php:92
1465
  #: application/Backend/tmpl/service/redirect.php:144
1466
  msgid "Enter valid callback"
1467
  msgstr ""
1468
 
1469
- #: application/Backend/tmpl/partial/post-access-form.php:158
1470
  #: application/Backend/tmpl/service/uri.php:92
1471
  msgid "HTTP Redirect Code"
1472
  msgstr ""
1473
 
1474
- #: application/Backend/tmpl/partial/post-access-form.php:186
1475
  msgid "Enter Password"
1476
  msgstr ""
1477
 
1478
- #: application/Backend/tmpl/partial/post-access-form.php:202
1479
  msgid "Expiration Date/Time"
1480
  msgstr ""
1481
 
@@ -1599,7 +1760,7 @@ msgstr ""
1599
 
1600
  #: application/Backend/tmpl/service/capability.php:39
1601
  #: application/Backend/tmpl/service/jwt.php:24
1602
- #: application/Backend/tmpl/service/policy.php:28
1603
  #: application/Backend/tmpl/service/post.php:22
1604
  #: application/Backend/tmpl/service/uri.php:146
1605
  msgid "Actions"
@@ -1796,11 +1957,6 @@ msgstr ""
1796
  msgid "Menu Details"
1797
  msgstr ""
1798
 
1799
- #: application/Backend/tmpl/service/menu.php:151
1800
- #: application/Backend/tmpl/service/toolbar.php:93
1801
- msgid "Name"
1802
- msgstr ""
1803
-
1804
  #: application/Backend/tmpl/service/menu.php:159
1805
  #: application/Backend/tmpl/service/toolbar.php:97
1806
  #: application/Backend/tmpl/service/uri.php:142
@@ -1866,6 +2022,7 @@ msgid "Metabox/Widget Details"
1866
  msgstr ""
1867
 
1868
  #: application/Backend/tmpl/service/metabox.php:132
 
1869
  #: application/Backend/tmpl/service/post.php:21
1870
  msgid "Title"
1871
  msgstr ""
@@ -1878,27 +2035,70 @@ msgstr ""
1878
  msgid "Internal ID"
1879
  msgstr ""
1880
 
1881
- #: application/Backend/tmpl/service/policy.php:7
1882
  #, php-format
1883
  msgid ""
1884
  "Manage access and security policies for [%s]. For more information check "
1885
  "%sAccess &amp; Security Policy%s page."
1886
  msgstr ""
1887
 
1888
- #: application/Backend/tmpl/service/policy.php:15
1889
  msgid "Policies are customized"
1890
  msgstr ""
1891
 
1892
- #: application/Backend/tmpl/service/policy.php:16
1893
  msgid "Reset To Default"
1894
  msgstr ""
1895
 
1896
- #: application/Backend/tmpl/service/policy.php:27
1897
- #: application/Service/AccessPolicy.php:172
1898
  msgid "Policy"
1899
  msgstr ""
1900
 
1901
- #: application/Backend/tmpl/service/policy.php:40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1902
  #, php-format
1903
  msgid ""
1904
  "%s[AAM Plus Package]%s extension is required in order to apply Access &amp; "
@@ -2183,50 +2383,58 @@ msgstr ""
2183
  msgid "Token has been revoked"
2184
  msgstr ""
2185
 
2186
- #: application/Core/Policy/Validator.php:107
2187
  #: tests/Service/AccessPolicy/PolicyValidationTest.php:54
2188
  msgid "The policy is not valid JSON object"
2189
  msgstr ""
2190
 
2191
- #: application/Core/Policy/Validator.php:126
2192
  #: tests/Service/AccessPolicy/PolicyValidationTest.php:37
2193
  msgid "The policy document is empty"
2194
  msgstr ""
2195
 
 
 
 
 
 
 
 
 
2196
  #: application/Core/Redirect.php:77
2197
- #: application/Service/ExtendedCapabilities.php:106
2198
  #: application/Service/Route.php:171
2199
  msgid "Access Denied"
2200
  msgstr ""
2201
 
2202
- #: application/Service/AccessPolicy.php:68
2203
  msgid ""
2204
  "Manage access to the website with well documented JSON access policies for "
2205
  "any user, role or visitors. Keep the paper-trail of all the access changes "
2206
  "with policy revisions."
2207
  msgstr ""
2208
 
2209
- #: application/Service/AccessPolicy.php:98
2210
  msgid "Access Policy Document"
2211
  msgstr ""
2212
 
2213
- #: application/Service/AccessPolicy.php:109
2214
  msgid "Access Policy Assignee"
2215
  msgstr ""
2216
 
2217
- #: application/Service/AccessPolicy.php:168
2218
  msgid "Access Policy"
2219
  msgstr ""
2220
 
2221
- #: application/Service/AccessPolicy.php:173
2222
  msgid "Add New Policy"
2223
  msgstr ""
2224
 
2225
- #: application/Service/AccessPolicy.php:174
2226
  msgid "New Policy"
2227
  msgstr ""
2228
 
2229
- #: application/Service/AccessPolicy.php:176
2230
  msgid "Access and security policy"
2231
  msgstr ""
2232
 
@@ -2253,22 +2461,22 @@ msgid ""
2253
  "user/role access management."
2254
  msgstr ""
2255
 
2256
- #: application/Service/Content.php:94
2257
  msgid ""
2258
  "Manage access to your website content for any user, role or visitor. This "
2259
  "include access to posts, pages, media attachment, custom post types, "
2260
  "categories, tags, custom taxonomies and terms."
2261
  msgstr ""
2262
 
2263
- #: application/Service/Content.php:139
2264
  msgid "Access Manager"
2265
  msgstr ""
2266
 
2267
- #: application/Service/Content.php:219
2268
  msgid "You are not allowed to publish this content"
2269
  msgstr ""
2270
 
2271
- #: application/Service/Content.php:590
2272
  msgid "[No teaser message provided]"
2273
  msgstr ""
2274
 
@@ -2334,6 +2542,16 @@ msgid ""
2334
  "data spoofing."
2335
  msgstr ""
2336
 
 
 
 
 
 
 
 
 
 
 
2337
  #: application/Service/NotFoundRedirect.php:53
2338
  msgid ""
2339
  "Manage frontend 404 (Not Found) redirect for any group of users or "
@@ -2458,28 +2676,64 @@ msgstr ""
2458
  msgid "Add role"
2459
  msgstr ""
2460
 
2461
- #: media/js/aam.js:1059 media/js/aam.js:2360 media/js/aam.js:2431
2462
- #: media/js/aam.js:4756
2463
  msgid "Resetting..."
2464
  msgstr ""
2465
 
2466
- #: media/js/aam.js:2662
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2467
  msgid "Post"
2468
  msgstr ""
2469
 
2470
- #: media/js/aam.js:2728
2471
  msgid "post type"
2472
  msgstr ""
2473
 
2474
- #: media/js/aam.js:2733 media/js/aam.js:2759 media/js/aam.js:2772
2475
- #: media/js/aam.js:2781 media/js/aam.js:2794
2476
  msgid "ID:"
2477
  msgstr ""
2478
 
2479
- #: media/js/aam.js:2755
2480
  msgid "taxonomy"
2481
  msgstr ""
2482
 
 
 
 
 
 
 
 
 
 
 
 
 
2483
  #: media/js/vendor.js:597
2484
  msgid ": "
2485
  msgstr ""
@@ -2492,16 +2746,6 @@ msgstr ""
2492
  msgid "Just for testing purposes"
2493
  msgstr ""
2494
 
2495
- #: tests/Service/AccessPolicy/PolicyValidationTest.php:76
2496
- msgid "The plugin [advanced-access-manager-x] is required by the policy"
2497
- msgstr ""
2498
-
2499
- #: tests/Service/AccessPolicy/PolicyValidationTest.php:100
2500
- msgid ""
2501
- "The dependency [advanced-access-manager] does not satisfy version "
2502
- "requirement by the policy"
2503
- msgstr ""
2504
-
2505
  #: tests/Service/Core/CoreServiceTest.php:37
2506
  msgid "<script>alert(1);</script>"
2507
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Advanced Access Manager\n"
4
+ "POT-Creation-Date: 2019-12-30 22:05-0500\n"
5
  "PO-Revision-Date: \n"
6
  "Last-Translator: \n"
7
  "Language-Team: AAMPlugin <support@aamplugin.com>\n"
24
  msgid "WP 4.7.0 or higher is required."
25
  msgstr ""
26
 
27
+ #: application/Addon/Repository.php:127
28
  msgid ""
29
  "Manage access to your WordPress website posts, pages, media, custom post "
30
  "types, categories, tags and custom taxonomies for any role, individual user, "
32
  "for frontend, backend or API levels."
33
  msgstr ""
34
 
35
+ #: application/Addon/Repository.php:132
36
  msgid ""
37
  "Manage access to your WordPress website by users IP address or referred host "
38
  "and completely lock down the entire website if necessary. Define the "
39
  "unlimited number of whitelisted or blacklisted IPs or hosts."
40
  msgstr ""
41
 
42
+ #: application/Addon/Repository.php:137
43
  msgid ""
44
  "Define and manage complex WordPress role hierarchy where all the access "
45
  "settings are propagated down the tree with the ability to override any "
46
  "settings for any specific role."
47
  msgstr ""
48
 
49
+ #: application/Addon/Repository.php:152
50
  msgid ""
51
  "Get the complete list of all premium AAM addons in one package and all "
52
  "future premium addons will be included for now additional cost."
77
 
78
  #: application/Backend/Feature/Main/Capability.php:337
79
  #: application/Backend/Feature/Main/Capability.php:360
80
+ #: application/Backend/Feature/Main/Post.php:332
81
+ #: application/Backend/tmpl/partial/post-access-form.php:81
82
  msgid "Backend"
83
  msgstr ""
84
 
132
  msgid "Metaboxes & Widgets"
133
  msgstr ""
134
 
135
+ #: application/Backend/Feature/Main/Policy.php:94
136
+ msgid "Generate Access Policy"
137
+ msgstr ""
138
+
139
+ #: application/Backend/Feature/Main/Policy.php:239
140
  msgid "(no title)"
141
  msgstr ""
142
 
143
+ #: application/Backend/Feature/Main/Policy.php:433
144
+ #, php-format
145
+ msgid "Failed applying to %s"
146
+ msgstr ""
147
+
148
+ #: application/Backend/Feature/Main/Policy.php:474
149
+ #: application/Service/AccessPolicy.php:68
150
+ #: application/Service/AccessPolicy.php:175
151
  msgid "Access Policies"
152
  msgstr ""
153
 
154
+ #: application/Backend/Feature/Main/Post.php:251
155
  msgid "307 - Temporary Redirect (Default)"
156
  msgstr ""
157
 
158
+ #: application/Backend/Feature/Main/Post.php:252
159
  #: application/Backend/tmpl/service/uri.php:95
160
  msgid "301 - Moved Permanently"
161
  msgstr ""
162
 
163
+ #: application/Backend/Feature/Main/Post.php:253
164
  #: application/Backend/tmpl/service/uri.php:97
165
  msgid "303 - See Other"
166
  msgstr ""
167
 
168
+ #: application/Backend/Feature/Main/Post.php:329
169
+ #: application/Backend/tmpl/partial/post-access-form.php:70
170
+ msgid "Frontend"
171
+ msgstr ""
172
+
173
+ #: application/Backend/Feature/Main/Post.php:335
174
+ #: application/Backend/tmpl/partial/post-access-form.php:92
175
+ msgid "RESTful API"
176
+ msgstr ""
177
+
178
+ #: application/Backend/Feature/Main/Post.php:341
179
+ msgid "All Areas"
180
+ msgstr ""
181
+
182
+ #: application/Backend/Feature/Main/Post.php:391
183
  #, php-format
184
  msgid "%d times"
185
  msgstr ""
186
 
187
+ #: application/Backend/Feature/Main/Post.php:413
188
  #, php-format
189
  msgid "\"%s\" page"
190
  msgstr ""
191
 
192
+ #: application/Backend/Feature/Main/Post.php:419
193
  #, php-format
194
  msgid "%s URL"
195
  msgstr ""
196
 
197
+ #: application/Backend/Feature/Main/Post.php:423
198
  msgid "Login page"
199
  msgstr ""
200
 
201
+ #: application/Backend/Feature/Main/Post.php:1107
202
+ #: application/Service/Content.php:94
203
  msgid "Posts & Terms"
204
  msgstr ""
205
 
269
  msgid "Core Settings"
270
  msgstr ""
271
 
272
+ #: application/Backend/Feature/Settings/Manager.php:165
273
+ msgid "Invalid data"
274
+ msgstr ""
275
+
276
  #: application/Backend/Feature/Settings/Security.php:47
277
  msgid "One Session Per User"
278
  msgstr ""
324
 
325
  #: application/Backend/Feature/Subject/User.php:225
326
  #: application/Backend/Feature/Subject/User.php:250
327
+ #: application/Backend/View/Localization.php:148 media/js/aam.js:5163
328
  msgid "Unexpected application error"
329
  msgstr ""
330
 
331
+ #: application/Backend/Manager.php:116
332
  #, php-format
333
  msgid ""
334
  "There was at least one error detected with the automated migration script. "
336
  "%ssupport@aamplugin.com%s for further assistance."
337
  msgstr ""
338
 
339
+ #: application/Backend/Manager.php:260
340
  msgid "[Help us] to be more noticeable and submit your review"
341
  msgstr ""
342
 
343
+ #: application/Backend/Subject.php:196
344
  msgid "You are not allowed to manage any AAM subject"
345
  msgstr ""
346
 
347
+ #: application/Backend/View/Localization.php:36 media/js/aam.js:2187
348
  msgid "Search Capability"
349
  msgstr ""
350
 
351
+ #: application/Backend/View/Localization.php:37 media/js/aam.js:2188
352
  msgid "_TOTAL_ capability(s)"
353
  msgstr ""
354
 
355
+ #: application/Backend/View/Localization.php:38 media/js/aam.js:406
356
+ #: media/js/aam.js:467 media/js/aam.js:1026 media/js/aam.js:2335
357
+ #: media/js/aam.js:2377 media/js/aam.js:2640 media/js/aam.js:2661
358
+ #: media/js/aam.js:2680 media/js/aam.js:2750 media/js/aam.js:2772
359
+ #: media/js/aam.js:2791 media/js/aam.js:3691
360
  msgid "Saving..."
361
  msgstr ""
362
 
363
+ #: application/Backend/View/Localization.php:39
364
  msgid "Execute Migration"
365
  msgstr ""
366
 
367
+ #: application/Backend/View/Localization.php:40 media/js/aam.js:2343
368
  msgid "Failed to add new capability"
369
  msgstr ""
370
 
371
+ #: application/Backend/View/Localization.php:41
372
  msgid "Application error"
373
  msgstr ""
374
 
375
+ #: application/Backend/View/Localization.php:42 media/js/aam.js:2351
376
  msgid "Add Capability"
377
  msgstr ""
378
 
379
+ #: application/Backend/View/Localization.php:43
380
+ #: application/Backend/tmpl/service/capability.php:76 media/js/aam.js:2393
381
  msgid "Update Capability"
382
  msgstr ""
383
 
384
+ #: application/Backend/View/Localization.php:44
385
  #: application/Backend/tmpl/service/menu.php:93
386
+ #: application/Backend/tmpl/service/toolbar.php:70 media/js/aam.js:1671
387
+ #: media/js/aam.js:1802
388
  msgid "Show Menu"
389
  msgstr ""
390
 
391
+ #: application/Backend/View/Localization.php:45
392
  #: application/Backend/tmpl/service/menu.php:97
393
+ #: application/Backend/tmpl/service/toolbar.php:74 media/js/aam.js:1681
394
+ #: media/js/aam.js:1812
395
  msgid "Restrict Menu"
396
  msgstr ""
397
 
398
+ #: application/Backend/View/Localization.php:46 media/js/aam.js:1982
399
  msgid "Failed to retrieve mataboxes"
400
  msgstr ""
401
 
402
+ #: application/Backend/View/Localization.php:47 media/js/aam.js:2873
403
+ #: media/js/aam.js:3578 media/js/aam.js:3770 media/js/aam.js:3996
404
  msgid "Search"
405
  msgstr ""
406
 
407
+ #: application/Backend/View/Localization.php:48 media/js/aam.js:2874
408
  msgid "_TOTAL_ object(s)"
409
  msgstr ""
410
 
411
+ #: application/Backend/View/Localization.php:49
412
  msgid "Failed"
413
  msgstr ""
414
 
415
+ #: application/Backend/View/Localization.php:50 media/js/aam.js:60
416
+ #: media/js/aam.js:4785
417
  msgid "Loading..."
418
  msgstr ""
419
 
420
+ #: application/Backend/View/Localization.php:51 media/js/aam.js:65
421
  msgid "No role"
422
  msgstr ""
423
 
424
+ #: application/Backend/View/Localization.php:52 media/js/aam.js:145
425
  msgid "Create New Role"
426
  msgstr ""
427
 
428
+ #: application/Backend/View/Localization.php:53
429
  msgid "Search Role"
430
  msgstr ""
431
 
432
+ #: application/Backend/View/Localization.php:54 media/js/aam.js:129
433
  msgid "_TOTAL_ role(s)"
434
  msgstr ""
435
 
436
+ #: application/Backend/View/Localization.php:55
437
  #: application/Backend/tmpl/page/subject-panel-advanced.php:19
438
  #: application/Backend/tmpl/service/capability.php:30
439
  #: application/Backend/tmpl/service/capability.php:64
440
+ #: application/Backend/tmpl/service/jwt.php:84 media/js/aam.js:1360
441
+ #: media/js/aam.js:3781 media/js/aam.js:4011 media/js/aam.js:4095
442
  msgid "Create"
443
  msgstr ""
444
 
445
+ #: application/Backend/View/Localization.php:56
446
+ #: application/Backend/tmpl/page/subject-panel.php:24 media/js/aam.js:167
447
  msgid "Users"
448
  msgstr ""
449
 
450
+ #: application/Backend/View/Localization.php:57
451
  msgid "Failed to add new role"
452
  msgstr ""
453
 
454
+ #: application/Backend/View/Localization.php:58
455
  msgid "Add Role"
456
  msgstr ""
457
 
458
+ #: application/Backend/View/Localization.php:59 media/js/aam.js:474
459
  msgid "Failed to update role"
460
  msgstr ""
461
 
462
+ #: application/Backend/View/Localization.php:60
463
  #: application/Backend/tmpl/page/subject-panel-advanced.php:41
464
  #: application/Backend/tmpl/service/capability.php:90 media/js/aam.js:483
465
  msgid "Update"
466
  msgstr ""
467
 
468
+ #: application/Backend/View/Localization.php:61
469
  #: application/Backend/tmpl/page/subject-panel-advanced.php:110
470
+ #: application/Backend/tmpl/partial/post-access-form.php:156
471
+ #: media/js/aam.js:1073 media/js/aam.js:2734
472
  msgid "Reset"
473
  msgstr ""
474
 
475
+ #: application/Backend/View/Localization.php:62
476
  msgid "Update..."
477
  msgstr ""
478
 
479
+ #: application/Backend/View/Localization.php:63 media/js/aam.js:506
480
+ #: media/js/aam.js:1287 media/js/aam.js:2136 media/js/aam.js:3729
481
+ #: media/js/aam.js:4113
482
  msgid "Deleting..."
483
  msgstr ""
484
 
485
+ #: application/Backend/View/Localization.php:64 media/js/aam.js:512
486
  msgid "Failed to delete role"
487
  msgstr ""
488
 
489
+ #: application/Backend/View/Localization.php:65
490
  #: application/Backend/tmpl/page/subject-panel-advanced.php:53
491
  msgid "Delete Role"
492
  msgstr ""
493
 
494
+ #: application/Backend/View/Localization.php:66 media/js/aam.js:606
495
  msgid "Failed to lock user"
496
  msgstr ""
497
 
498
+ #: application/Backend/View/Localization.php:67 media/js/aam.js:698
499
  msgid "Search user"
500
  msgstr ""
501
 
502
+ #: application/Backend/View/Localization.php:68 media/js/aam.js:2723
503
  msgid "Counter was reset successfully"
504
  msgstr ""
505
 
506
+ #: application/Backend/View/Localization.php:69 media/js/aam.js:699
507
  msgid "_TOTAL_ user(s)"
508
  msgstr ""
509
 
510
+ #: application/Backend/View/Localization.php:70 media/js/aam.js:714
511
  msgid "Create New User"
512
  msgstr ""
513
 
514
+ #: application/Backend/View/Localization.php:71
515
+ #: application/Backend/tmpl/page/subject-panel.php:45 media/js/aam.js:762
516
+ #: media/js/aam.js:1491
517
  msgid "Role"
518
  msgstr ""
519
 
520
+ #: application/Backend/View/Localization.php:72 media/js/aam.js:4568
521
+ msgid "Message has been sent"
522
+ msgstr ""
523
+
524
+ #: application/Backend/View/Localization.php:73
525
+ #: application/Backend/tmpl/metabox/main-iframe.php:157 media/js/aam.js:4485
526
+ msgid "Download Exported Settings"
527
+ msgstr ""
528
+
529
+ #: application/Backend/View/Localization.php:74
530
  #: application/Core/Subject/Default.php:36 media/js/aam.js:1186
531
  msgid "All Users, Roles and Visitor"
532
  msgstr ""
533
 
534
+ #: application/Backend/View/Localization.php:75 media/js/aam.js:1157
535
+ #: media/js/aam.js:1232 media/js/aam.js:4754
536
  msgid "Failed to apply policy changes"
537
  msgstr ""
538
 
539
+ #: application/Backend/View/Localization.php:76
540
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:25
541
  #: media/js/aam.js:1151 media/js/aam.js:1160
542
  msgid "Attach Policy To Visitors"
543
  msgstr ""
544
 
545
+ #: application/Backend/View/Localization.php:77
546
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:23
547
  #: media/js/aam.js:1149 media/js/aam.js:1162
548
  msgid "Detach Policy From Visitors"
549
  msgstr ""
550
 
551
+ #: application/Backend/View/Localization.php:78 media/js/aam.js:645
552
+ #: media/js/aam.js:3904
553
  msgid "Generating URL..."
554
  msgstr ""
555
 
556
+ #: application/Backend/View/Localization.php:79
557
  #: application/Core/Subject/Visitor.php:43 media/js/aam.js:1112
558
  msgid "Anonymous"
559
  msgstr ""
560
 
561
+ #: application/Backend/View/Localization.php:80 media/js/aam.js:1138
562
+ #: media/js/aam.js:1213 media/js/aam.js:2002 media/js/aam.js:4397
563
+ #: media/js/aam.js:4467
564
  msgid "Processing..."
565
  msgstr ""
566
 
567
+ #: application/Backend/View/Localization.php:81 media/js/aam.js:723
568
  msgid "Loading roles..."
569
  msgstr ""
570
 
571
+ #: application/Backend/View/Localization.php:82 media/js/aam.js:655
572
+ #: media/js/aam.js:3915
573
  msgid "Failed to generate JWT token"
574
  msgstr ""
575
 
576
+ #: application/Backend/View/Localization.php:83 media/js/aam.js:2104
577
  msgid "Failed to process request"
578
  msgstr ""
579
 
580
+ #: application/Backend/View/Localization.php:84
581
  msgid "Current user"
582
  msgstr ""
583
 
584
+ #: application/Backend/View/Localization.php:85
585
  msgid "Current role"
586
  msgstr ""
587
 
588
+ #: application/Backend/View/Localization.php:86 media/js/aam.js:3055
589
  msgid "Manage Access"
590
  msgstr ""
591
 
592
+ #: application/Backend/View/Localization.php:87 media/js/aam.js:740
593
  msgid "Filter by role"
594
  msgstr ""
595
 
596
+ #: application/Backend/View/Localization.php:88
597
+ #: application/Backend/View/PostOptionList.php:82 media/js/aam.js:3067
598
  msgid "Edit"
599
  msgstr ""
600
 
601
+ #: application/Backend/View/Localization.php:89
602
  #: application/Backend/tmpl/page/subject-panel-advanced.php:111
603
+ #: application/Backend/tmpl/partial/post-access-form.php:105
604
+ #: application/Backend/tmpl/partial/post-access-form.php:127
605
+ #: application/Backend/tmpl/partial/post-access-form.php:157
606
+ #: application/Backend/tmpl/partial/post-access-form.php:230
607
+ #: application/Backend/tmpl/partial/post-access-form.php:251
608
+ #: application/Backend/tmpl/partial/post-access-form.php:273
609
  #: application/Backend/tmpl/service/uri.php:108 media/js/aam.js:1040
610
+ #: media/js/aam.js:3708
611
  msgid "Save"
612
  msgstr ""
613
 
614
+ #: application/Backend/View/Localization.php:90 media/js/aam.js:213
615
  msgid "Manage role"
616
  msgstr ""
617
 
618
+ #: application/Backend/View/Localization.php:91 media/js/aam.js:234
619
  msgid "Edit role"
620
  msgstr ""
621
 
622
+ #: application/Backend/View/Localization.php:92 media/js/aam.js:287
623
  #: media/js/aam.js:520
624
  msgid "Delete role"
625
  msgstr ""
626
 
627
+ #: application/Backend/View/Localization.php:93 media/js/aam.js:258
628
  msgid "Clone role"
629
  msgstr ""
630
 
631
+ #: application/Backend/View/Localization.php:94 media/js/aam.js:801
632
  msgid "Manage user"
633
  msgstr ""
634
 
635
+ #: application/Backend/View/Localization.php:95 media/js/aam.js:850
636
  msgid "Edit user"
637
  msgstr ""
638
 
639
+ #: application/Backend/View/Localization.php:96 media/js/aam.js:601
640
  #: media/js/aam.js:602 media/js/aam.js:871 media/js/aam.js:882
641
  msgid "Lock user"
642
  msgstr ""
643
 
644
+ #: application/Backend/View/Localization.php:97 media/js/aam.js:595
645
  #: media/js/aam.js:596 media/js/aam.js:895 media/js/aam.js:906
646
  msgid "Unlock user"
647
  msgstr ""
648
 
649
+ #: application/Backend/View/Localization.php:98 media/js/aam.js:2098
650
  msgid "WordPress core does not allow to grant this capability"
651
  msgstr ""
652
 
653
+ #: application/Backend/View/Localization.php:99 media/js/aam.js:1224
654
  #: media/js/aam.js:1237
655
  msgid "Detach Policy From Everybody"
656
  msgstr ""
657
 
658
+ #: application/Backend/View/Localization.php:100 media/js/aam.js:1226
659
  #: media/js/aam.js:1235
660
  msgid "Attach Policy To Everybody"
661
  msgstr ""
662
 
663
+ #: application/Backend/View/Localization.php:101 media/js/aam.js:1349
664
  msgid "Search Policy"
665
  msgstr ""
666
 
667
+ #: application/Backend/View/Localization.php:102 media/js/aam.js:1350
668
  msgid "_TOTAL_ Policies"
669
  msgstr ""
670
 
671
+ #: application/Backend/View/Localization.php:103 media/js/aam.js:1390
672
  msgid "Apply Policy"
673
  msgstr ""
674
 
675
+ #: application/Backend/View/Localization.php:104 media/js/aam.js:1410
676
  msgid "Revoke Policy"
677
  msgstr ""
678
 
679
+ #: application/Backend/View/Localization.php:105
680
+ #: application/Service/AccessPolicy.php:176 media/js/aam.js:1427
681
  msgid "Edit Policy"
682
  msgstr ""
683
 
684
+ #: application/Backend/View/Localization.php:106
685
  #: application/Backend/tmpl/service/menu.php:79
686
+ #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1711
687
  msgid "Uncheck to allow"
688
  msgstr ""
689
 
690
+ #: application/Backend/View/Localization.php:107
691
  #: application/Backend/tmpl/service/menu.php:79
692
+ #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1713
693
  msgid "Check to restrict"
694
  msgstr ""
695
 
696
+ #: application/Backend/View/Localization.php:108
697
+ #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1847
698
+ #: media/js/aam.js:2036
699
  msgid "Uncheck to show"
700
  msgstr ""
701
 
702
+ #: application/Backend/View/Localization.php:109
703
+ #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1849
704
+ #: media/js/aam.js:2038
705
  msgid "Check to hide"
706
  msgstr ""
707
 
708
+ #: application/Backend/View/Localization.php:110
709
+ #: application/Backend/tmpl/service/metabox.php:114 media/js/aam.js:2005
710
  msgid "Initialize"
711
  msgstr ""
712
 
713
+ #: application/Backend/View/Localization.php:111 media/js/aam.js:2190
714
  msgid "No capabilities"
715
  msgstr ""
716
 
717
+ #: application/Backend/View/Localization.php:112 media/js/aam.js:2895
718
  msgid "Post Type"
719
  msgstr ""
720
 
721
+ #: application/Backend/View/Localization.php:113 media/js/aam.js:2900
722
  msgid "Hierarchical Taxonomy"
723
  msgstr ""
724
 
725
+ #: application/Backend/View/Localization.php:114 media/js/aam.js:2905
726
  msgid "Hierarchical Term"
727
  msgstr ""
728
 
729
+ #: application/Backend/View/Localization.php:115 media/js/aam.js:2910
730
  msgid "Tag Taxonomy"
731
  msgstr ""
732
 
733
+ #: application/Backend/View/Localization.php:116 media/js/aam.js:2915
734
  msgid "Tag"
735
  msgstr ""
736
 
737
+ #: application/Backend/View/Localization.php:117 media/js/aam.js:2926
738
  msgid "Customized Settings"
739
  msgstr ""
740
 
741
+ #: application/Backend/View/Localization.php:118 media/js/aam.js:2996
742
+ #: media/js/aam.js:3018
743
  msgid "Parent"
744
  msgstr ""
745
 
746
+ #: application/Backend/View/Localization.php:119 media/js/aam.js:3041
747
  msgid "Drill-Down"
748
  msgstr ""
749
 
750
+ #: application/Backend/View/Localization.php:120 media/js/aam.js:3579
751
  msgid "_TOTAL_ route(s)"
752
  msgstr ""
753
 
754
+ #: application/Backend/View/Localization.php:121 media/js/aam.js:3581
755
  msgid "No API endpoints found. You might have APIs disabled."
756
  msgstr ""
757
 
758
+ #: application/Backend/View/Localization.php:122 media/js/aam.js:3582
759
+ #: media/js/aam.js:4000 media/js/aam.js:4351
760
  msgid "Nothing to show"
761
  msgstr ""
762
 
763
+ #: application/Backend/View/Localization.php:123 media/js/aam.js:3699
764
  msgid "Failed to save URI rule"
765
  msgstr ""
766
 
767
+ #: application/Backend/View/Localization.php:124 media/js/aam.js:3735
768
  msgid "Failed to delete URI rule"
769
  msgstr ""
770
 
771
+ #: application/Backend/View/Localization.php:125 media/js/aam.js:3771
772
  msgid "_TOTAL_ URI(s)"
773
  msgstr ""
774
 
775
+ #: application/Backend/View/Localization.php:126 media/js/aam.js:3810
776
  msgid "Edit Rule"
777
  msgstr ""
778
 
779
+ #: application/Backend/View/Localization.php:127 media/js/aam.js:3822
780
  msgid "Delete Rule"
781
  msgstr ""
782
 
783
+ #: application/Backend/View/Localization.php:128 media/js/aam.js:3837
784
  msgid "Denied"
785
  msgstr ""
786
 
787
+ #: application/Backend/View/Localization.php:129 media/js/aam.js:3844
788
  msgid "Redirected"
789
  msgstr ""
790
 
791
+ #: application/Backend/View/Localization.php:130 media/js/aam.js:3849
792
  msgid "Callback"
793
  msgstr ""
794
 
795
+ #: application/Backend/View/Localization.php:131 media/js/aam.js:3854
796
  msgid "Allowed"
797
  msgstr ""
798
 
799
+ #: application/Backend/View/Localization.php:132 media/js/aam.js:3900
800
  msgid "Generating token..."
801
  msgstr ""
802
 
803
+ #: application/Backend/View/Localization.php:133 media/js/aam.js:3997
804
  msgid "_TOTAL_ token(s)"
805
  msgstr ""
806
 
807
+ #: application/Backend/View/Localization.php:134 media/js/aam.js:3999
808
  msgid "No JWT tokens have been generated."
809
  msgstr ""
810
 
811
+ #: application/Backend/View/Localization.php:135 media/js/aam.js:4043
812
  msgid "Delete Token"
813
  msgstr ""
814
 
815
+ #: application/Backend/View/Localization.php:136 media/js/aam.js:4056
816
  msgid "View Token"
817
  msgstr ""
818
 
819
+ #: application/Backend/View/Localization.php:137 media/js/aam.js:4081
820
  msgid "Creating..."
821
  msgstr ""
822
 
823
+ #: application/Backend/View/Localization.php:138 media/js/aam.js:4348
824
  msgid "Search Service"
825
  msgstr ""
826
 
827
+ #: application/Backend/View/Localization.php:139 media/js/aam.js:4349
828
  msgid "_TOTAL_ service(s)"
829
  msgstr ""
830
 
831
+ #: application/Backend/View/Localization.php:140
832
  #: application/Backend/tmpl/settings/content.php:19
833
  #: application/Backend/tmpl/settings/core.php:16
834
+ #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4361
835
  msgid "Enabled"
836
  msgstr ""
837
 
838
+ #: application/Backend/View/Localization.php:141
839
  #: application/Backend/tmpl/settings/content.php:19
840
  #: application/Backend/tmpl/settings/core.php:16
841
+ #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4361
842
  msgid "Disabled"
843
  msgstr ""
844
 
845
+ #: application/Backend/View/Localization.php:142 media/js/aam.js:4403
846
  msgid "All settings has been cleared successfully"
847
  msgstr ""
848
 
849
+ #: application/Backend/View/Localization.php:143
850
+ #: application/Backend/tmpl/metabox/main-iframe.php:188 media/js/aam.js:4415
851
  msgid "Clear"
852
  msgstr ""
853
 
854
+ #: application/Backend/View/Localization.php:144
855
  #: application/Backend/tmpl/page/subject-panel-advanced.php:102
856
+ #: application/Backend/tmpl/partial/role-inheritance.php:7 media/js/aam.js:4790
857
  msgid "Select Role"
858
  msgstr ""
859
 
860
+ #: application/Backend/View/Localization.php:145 media/js/aam.js:5083
861
  msgid "Data has been saved to clipboard"
862
  msgstr ""
863
 
864
+ #: application/Backend/View/Localization.php:146 media/js/aam.js:5087
865
  msgid "Failed to save data to clipboard"
866
  msgstr ""
867
 
868
+ #: application/Backend/View/Localization.php:147 media/js/aam.js:5159
869
  msgid "Operation completed successfully"
870
  msgstr ""
871
 
872
+ #: application/Backend/View/PostOptionList.php:37
873
+ #: application/Backend/tmpl/partial/post-access-form.php:76
874
+ #: application/Backend/tmpl/partial/post-access-form.php:87
875
+ #: application/Backend/tmpl/partial/post-access-form.php:98
876
  msgid "Hidden"
877
  msgstr ""
878
 
879
+ #: application/Backend/View/PostOptionList.php:38
880
+ #: application/Backend/tmpl/partial/post-access-form.php:63
881
+ msgid "Hidden Areas"
882
+ msgstr ""
883
+
884
+ #: application/Backend/View/PostOptionList.php:40
885
  msgid ""
886
  "Completely hide the post however, still allow direct access with the valid "
887
  "URL."
888
  msgstr ""
889
 
890
+ #: application/Backend/View/PostOptionList.php:43
891
  msgid "Restricted"
892
  msgstr ""
893
 
894
+ #: application/Backend/View/PostOptionList.php:44
895
  msgid ""
896
  "Restrict direct access to the post. Any attempt to access the post will be "
897
  "denied and redirected based on the Access Denied Redirect rule."
898
  msgstr ""
899
 
900
+ #: application/Backend/View/PostOptionList.php:47
901
+ #: application/Backend/tmpl/partial/post-access-form.php:117
902
  msgid "Teaser Message"
903
  msgstr ""
904
 
905
+ #: application/Backend/View/PostOptionList.php:48
906
+ #: application/Backend/tmpl/metabox/main-iframe.php:104
907
  msgid "Message"
908
  msgstr ""
909
 
910
+ #: application/Backend/View/PostOptionList.php:50
911
  msgid ""
912
  "Dynamically replace the post content with defined plain text or HTML teaser "
913
  "message."
914
  msgstr ""
915
 
916
+ #: application/Backend/View/PostOptionList.php:53
917
  msgid "Limited"
918
  msgstr ""
919
 
920
+ #: application/Backend/View/PostOptionList.php:54
921
  msgid "Access Limit"
922
  msgstr ""
923
 
924
+ #: application/Backend/View/PostOptionList.php:57
925
  msgid ""
926
  "Define how many times the post can be accessed. When the number of times "
927
  "exceeds the defined threshold, access will be denied and redirected based on "
928
  "the Access Denied Redirect rule."
929
  msgstr ""
930
 
931
+ #: application/Backend/View/PostOptionList.php:60
932
  msgid "Leave Comments"
933
  msgstr ""
934
 
935
+ #: application/Backend/View/PostOptionList.php:61
936
  msgid "Restrict access to leave comments for the post."
937
  msgstr ""
938
 
939
+ #: application/Backend/View/PostOptionList.php:64
940
  msgid "Redirect"
941
  msgstr ""
942
 
943
+ #: application/Backend/View/PostOptionList.php:65
944
  msgid "Destination"
945
  msgstr ""
946
 
947
+ #: application/Backend/View/PostOptionList.php:67
948
  msgid ""
949
  "Redirect user based on the defined redirect rule when user tries to access "
950
  "the post. The REDIRECT option has lower precedence and will be ignored if "
951
  "RESTRICTED option is checked."
952
  msgstr ""
953
 
954
+ #: application/Backend/View/PostOptionList.php:70
955
+ #: application/Backend/tmpl/partial/post-access-form.php:242
956
  msgid "Password Protected"
957
  msgstr ""
958
 
959
+ #: application/Backend/View/PostOptionList.php:71
960
+ #: application/Backend/tmpl/partial/post-access-form.php:246
961
  #: application/Backend/tmpl/widget/login-frontend.php:29
962
  msgid "Password"
963
  msgstr ""
964
 
965
+ #: application/Backend/View/PostOptionList.php:73
966
  msgid ""
967
  "Protect access to the post with a password. Available with WordPress 4.7.0 "
968
  "or higher."
969
  msgstr ""
970
 
971
+ #: application/Backend/View/PostOptionList.php:76
972
  msgid "Access Expires"
973
  msgstr ""
974
 
975
+ #: application/Backend/View/PostOptionList.php:77
976
  msgid "After"
977
  msgstr ""
978
 
979
+ #: application/Backend/View/PostOptionList.php:79
980
  msgid "Define when access will expire to the post."
981
  msgstr ""
982
 
983
+ #: application/Backend/View/PostOptionList.php:79
984
  #, php-format
985
  msgid ""
986
  "After expiration, the access to the post will be denied and redirected based "
988
  "%s or "
989
  msgstr ""
990
 
991
+ #: application/Backend/View/PostOptionList.php:84
992
  msgid "Restrict access to edit the post."
993
  msgstr ""
994
 
995
+ #: application/Backend/View/PostOptionList.php:87
996
  #: application/Backend/tmpl/page/subject-panel-advanced.php:59
997
  #: application/Backend/tmpl/service/jwt.php:136
998
+ #: application/Backend/tmpl/service/uri.php:130 media/js/aam.js:3743
999
+ #: media/js/aam.js:4127
1000
  msgid "Delete"
1001
  msgstr ""
1002
 
1003
+ #: application/Backend/View/PostOptionList.php:89
1004
  msgid "Restrict access to trash or permanently delete the post."
1005
  msgstr ""
1006
 
1007
+ #: application/Backend/View/PostOptionList.php:92
1008
  msgid "Publish"
1009
  msgstr ""
1010
 
1011
+ #: application/Backend/View/PostOptionList.php:94
1012
  msgid ""
1013
  "Restrict the ability to publish the post. User will be allowed only to "
1014
  "submit the post for review."
1030
  msgid "Howdy, %username%"
1031
  msgstr ""
1032
 
1033
+ #: application/Backend/tmpl/metabox/main-iframe.php:34
1034
  msgid "Notifications"
1035
  msgstr ""
1036
 
1037
+ #: application/Backend/tmpl/metabox/main-iframe.php:56
1038
  msgid "Access"
1039
  msgstr ""
1040
 
1041
+ #: application/Backend/tmpl/metabox/main-iframe.php:61
1042
  msgid "Settings"
1043
  msgstr ""
1044
 
1045
+ #: application/Backend/tmpl/metabox/main-iframe.php:67
1046
  msgid "Add-Ons"
1047
  msgstr ""
1048
 
1049
+ #: application/Backend/tmpl/metabox/main-iframe.php:73
1050
  msgid "Help"
1051
  msgstr ""
1052
 
1053
+ #: application/Backend/tmpl/metabox/main-iframe.php:86
1054
+ #: application/Backend/tmpl/metabox/main-iframe.php:117
1055
+ #: application/Backend/tmpl/metabox/main-iframe.php:171
1056
+ #: application/Backend/tmpl/metabox/main-iframe.php:181
1057
+ #: application/Backend/tmpl/page/addon-panel.php:81
1058
+ #: application/Backend/tmpl/page/addon-panel.php:92
1059
+ #: application/Backend/tmpl/page/addon-panel.php:102
1060
+ #: application/Backend/tmpl/page/addon-panel.php:115
 
1061
  #: application/Backend/tmpl/page/subject-panel-advanced.php:8
1062
  #: application/Backend/tmpl/page/subject-panel-advanced.php:20
1063
  #: application/Backend/tmpl/page/subject-panel-advanced.php:30
1066
  #: application/Backend/tmpl/page/subject-panel-advanced.php:60
1067
  #: application/Backend/tmpl/page/subject-panel-advanced.php:70
1068
  #: application/Backend/tmpl/page/subject-panel-advanced.php:112
1069
+ #: application/Backend/tmpl/partial/post-access-form.php:62
1070
+ #: application/Backend/tmpl/partial/post-access-form.php:106
1071
+ #: application/Backend/tmpl/partial/post-access-form.php:116
1072
+ #: application/Backend/tmpl/partial/post-access-form.php:128
1073
+ #: application/Backend/tmpl/partial/post-access-form.php:138
1074
+ #: application/Backend/tmpl/partial/post-access-form.php:158
1075
+ #: application/Backend/tmpl/partial/post-access-form.php:168
1076
+ #: application/Backend/tmpl/partial/post-access-form.php:231
1077
+ #: application/Backend/tmpl/partial/post-access-form.php:241
1078
+ #: application/Backend/tmpl/partial/post-access-form.php:252
1079
+ #: application/Backend/tmpl/partial/post-access-form.php:262
1080
+ #: application/Backend/tmpl/partial/post-access-form.php:274
1081
  #: application/Backend/tmpl/service/capability.php:49
1082
  #: application/Backend/tmpl/service/capability.php:65
1083
  #: application/Backend/tmpl/service/capability.php:75
1097
  #: application/Backend/tmpl/service/metabox.php:115
1098
  #: application/Backend/tmpl/service/metabox.php:125
1099
  #: application/Backend/tmpl/service/metabox.php:147
1100
+ #: application/Backend/tmpl/service/policy.php:50
1101
+ #: application/Backend/tmpl/service/policy.php:58
1102
+ #: application/Backend/tmpl/service/policy.php:68
1103
+ #: application/Backend/tmpl/service/policy.php:98
1104
  #: application/Backend/tmpl/service/toolbar.php:86
1105
  #: application/Backend/tmpl/service/toolbar.php:108
1106
  #: application/Backend/tmpl/service/uri.php:26
1110
  msgid "Close"
1111
  msgstr ""
1112
 
1113
+ #: application/Backend/tmpl/metabox/main-iframe.php:87
1114
+ msgid "Ask For Help"
1115
+ msgstr ""
1116
+
1117
+ #: application/Backend/tmpl/metabox/main-iframe.php:90
1118
+ #, php-format
1119
+ msgid ""
1120
+ "Before submitting a support request, please get familiar with %show AAM "
1121
+ "support works%s so you can set the right expectations. Especially pay "
1122
+ "attention to how do we prioritize support."
1123
+ msgstr ""
1124
+
1125
+ #: application/Backend/tmpl/metabox/main-iframe.php:93
1126
+ #: application/Backend/tmpl/service/menu.php:151
1127
+ #: application/Backend/tmpl/service/toolbar.php:93
1128
+ msgid "Name"
1129
  msgstr ""
1130
 
1131
  #: application/Backend/tmpl/metabox/main-iframe.php:94
1132
+ msgid "How should we call you"
1133
  msgstr ""
1134
 
1135
  #: application/Backend/tmpl/metabox/main-iframe.php:98
1136
+ msgid "Email"
1137
+ msgstr ""
1138
+
1139
+ #: application/Backend/tmpl/metabox/main-iframe.php:99
1140
+ msgid "Enter your email"
1141
+ msgstr ""
1142
+
1143
+ #: application/Backend/tmpl/metabox/main-iframe.php:100
1144
+ msgid "The rest of the conversation will be conducted via provided email"
1145
+ msgstr ""
1146
+
1147
+ #: application/Backend/tmpl/metabox/main-iframe.php:105
1148
+ msgid "Enter your message here..."
1149
+ msgstr ""
1150
+
1151
+ #: application/Backend/tmpl/metabox/main-iframe.php:106
1152
+ msgid "Please be [kind], [specific] and [patient], and let us do the rest"
1153
+ msgstr ""
1154
+
1155
+ #: application/Backend/tmpl/metabox/main-iframe.php:111
1156
+ #, php-format
1157
+ msgid "Attach system details (%slearn more here%s)"
1158
+ msgstr ""
1159
+
1160
+ #: application/Backend/tmpl/metabox/main-iframe.php:116
1161
+ msgid "Request Support"
1162
+ msgstr ""
1163
+
1164
+ #: application/Backend/tmpl/metabox/main-iframe.php:130
1165
+ msgid "Export/Import AAM Settings"
1166
+ msgstr ""
1167
+
1168
+ #: application/Backend/tmpl/metabox/main-iframe.php:135
1169
+ msgid "Reset AAM Settings"
1170
+ msgstr ""
1171
+
1172
+ #: application/Backend/tmpl/metabox/main-iframe.php:145
1173
+ msgid ""
1174
+ "Your browser does not support modern way to work with files. The Export/"
1175
+ "Import feature will not work properly. Consider to use the latest Chrome, "
1176
+ "Firefox or Safari browser instead."
1177
+ msgstr ""
1178
+
1179
+ #: application/Backend/tmpl/metabox/main-iframe.php:149
1180
+ msgid "Export"
1181
+ msgstr ""
1182
+
1183
+ #: application/Backend/tmpl/metabox/main-iframe.php:150
1184
+ msgid "Import"
1185
+ msgstr ""
1186
+
1187
+ #: application/Backend/tmpl/metabox/main-iframe.php:155
1188
+ msgid ""
1189
+ "Export AAM settings so they can be imported to a different location. To "
1190
+ "learn more about customizing exported data, refer to the \"How Import/Export "
1191
+ "feature works\" article."
1192
+ msgstr ""
1193
+
1194
+ #: application/Backend/tmpl/metabox/main-iframe.php:162
1195
+ msgid ""
1196
+ "Select a *.json file with valid AAM settings. All the current AAM settings "
1197
+ "will be lost and replaced with imported settings."
1198
+ msgstr ""
1199
+
1200
+ #: application/Backend/tmpl/metabox/main-iframe.php:182
1201
+ msgid "Clear all settings"
1202
+ msgstr ""
1203
+
1204
+ #: application/Backend/tmpl/metabox/main-iframe.php:185
1205
+ msgid "All AAM settings will be removed."
1206
+ msgstr ""
1207
+
1208
+ #: application/Backend/tmpl/metabox/main-iframe.php:189
1209
  msgid "Cancel"
1210
  msgstr ""
1211
 
1212
+ #: application/Backend/tmpl/metabox/main-iframe.php:201
1213
  msgid ""
1214
  "With the [Enterprise Package] get dedicated support channel and all the "
1215
  "premium add-ons for a [bulk number of live websites]"
1216
  msgstr ""
1217
 
1218
+ #: application/Backend/tmpl/metabox/main-iframe.php:202
1219
+ #: application/Backend/tmpl/page/addon-panel.php:66
1220
  msgid "Read More"
1221
  msgstr ""
1222
 
1223
+ #: application/Backend/tmpl/metabox/policy-metabox.php:32
1224
  #, php-format
1225
  msgid ""
1226
  "To learn more about Access &amp; Security policy document, please check "
1227
  "[%sAccess &amp; Security Policy%s] page."
1228
  msgstr ""
1229
 
1230
+ #: application/Backend/tmpl/metabox/policy-metabox.php:60
1231
  msgid "Syntax Error"
1232
  msgstr ""
1233
 
1234
+ #: application/Backend/tmpl/page/addon-panel.php:16
1235
  msgid ""
1236
  "By purchasing any of the premium addon(s) below, you obtain the license that "
1237
  "allows you to install and use AAM software for one physical WordPress "
1242
  "guaranteed] within 30 day from the time of purchase."
1243
  msgstr ""
1244
 
1245
+ #: application/Backend/tmpl/page/addon-panel.php:21
1246
  msgid "Download Addon"
1247
  msgstr ""
1248
 
1249
+ #: application/Backend/tmpl/page/addon-panel.php:25
1250
  msgid "Enter The License Key"
1251
  msgstr ""
1252
 
1253
+ #: application/Backend/tmpl/page/addon-panel.php:29
1254
  msgid "Download"
1255
  msgstr ""
1256
 
1257
+ #: application/Backend/tmpl/page/addon-panel.php:37
1258
  msgid "Premium"
1259
  msgstr ""
1260
 
1261
+ #: application/Backend/tmpl/page/addon-panel.php:38
1262
  msgid "Check For Updates"
1263
  msgstr ""
1264
 
1265
+ #: application/Backend/tmpl/page/addon-panel.php:50
1266
+ #: application/Backend/tmpl/page/addon-panel.php:52
1267
  msgid "License"
1268
  msgstr ""
1269
 
1270
+ #: application/Backend/tmpl/page/addon-panel.php:52
1271
  msgid "unregistered version"
1272
  msgstr ""
1273
 
1274
+ #: application/Backend/tmpl/page/addon-panel.php:60
1275
  msgid "Update Available"
1276
  msgstr ""
1277
 
1278
+ #: application/Backend/tmpl/page/addon-panel.php:62
1279
  msgid "Active"
1280
  msgstr ""
1281
 
1282
+ #: application/Backend/tmpl/page/addon-panel.php:64
1283
  msgid "Inactive"
1284
  msgstr ""
1285
 
1286
+ #: application/Backend/tmpl/page/addon-panel.php:82
1287
  msgid "License Key Info"
1288
  msgstr ""
1289
 
1290
+ #: application/Backend/tmpl/page/addon-panel.php:86
1291
  msgid ""
1292
  "Insert license key that you received after the payment (find the email "
1293
  "example below). It might take up to 2 hours to process the payment."
1294
  msgstr ""
1295
 
1296
+ #: application/Backend/tmpl/page/addon-panel.php:103
1297
  msgid "Plugin Installation"
1298
  msgstr ""
1299
 
1300
+ #: application/Backend/tmpl/page/addon-panel.php:107
1301
  msgid "The plugin has been successfully downloaded from our server."
1302
  msgstr ""
1303
 
1304
+ #: application/Backend/tmpl/page/addon-panel.php:111
1305
  #, php-format
1306
  msgid ""
1307
  "With AAM v6.0.0 or higher, all premium addons are [regular WordPress "
1370
  msgid "Change To Role"
1371
  msgstr ""
1372
 
1373
+ #: application/Backend/tmpl/page/subject-panel.php:14
1374
  msgid "Users/Roles Manager"
1375
  msgstr ""
1376
 
1377
+ #: application/Backend/tmpl/page/subject-panel.php:21
1378
  msgid "Roles"
1379
  msgstr ""
1380
 
1381
+ #: application/Backend/tmpl/page/subject-panel.php:27
1382
  msgid "Visitor"
1383
  msgstr ""
1384
 
1385
+ #: application/Backend/tmpl/page/subject-panel.php:30
1386
  msgid "Default"
1387
  msgstr ""
1388
 
1389
+ #: application/Backend/tmpl/page/subject-panel.php:33
1390
  msgid "None"
1391
  msgstr ""
1392
 
1393
+ #: application/Backend/tmpl/page/subject-panel.php:46
1394
+ #: application/Backend/tmpl/page/subject-panel.php:62
1395
  msgid "Action"
1396
  msgstr ""
1397
 
1398
+ #: application/Backend/tmpl/page/subject-panel.php:61
1399
  msgid "Username"
1400
  msgstr ""
1401
 
1402
+ #: application/Backend/tmpl/page/subject-panel.php:83
1403
  msgid ""
1404
  "You are not allowed to manage any of the existing users, roles, visitors or "
1405
  "default access settings."
1455
  "WordPress theme to find out what causes the issue."
1456
  msgstr ""
1457
 
1458
+ #: application/Backend/tmpl/partial/post-access-form.php:12
1459
  #: application/Backend/tmpl/service/login-redirect.php:17
1460
  #: application/Backend/tmpl/service/logout-redirect.php:17
1461
  #: application/Backend/tmpl/service/menu.php:17
1466
  msgid "Settings are customized"
1467
  msgstr ""
1468
 
1469
+ #: application/Backend/tmpl/partial/post-access-form.php:13
1470
  #: application/Backend/tmpl/service/login-redirect.php:18
1471
  #: application/Backend/tmpl/service/logout-redirect.php:18
1472
  #: application/Backend/tmpl/service/menu.php:18
1478
  msgid "Reset to default"
1479
  msgstr ""
1480
 
1481
+ #: application/Backend/tmpl/partial/post-access-form.php:21
1482
  #, php-format
1483
  msgid ""
1484
  "To fully protect your media library files, please refer to the %sHow to "
1485
  "manage access to WordPress media library%s article."
1486
  msgstr ""
1487
 
1488
+ #: application/Backend/tmpl/partial/post-access-form.php:36
1489
  msgid "change"
1490
  msgstr ""
1491
 
1492
+ #: application/Backend/tmpl/partial/post-access-form.php:72
1493
+ msgid "Hide post on the frontend site of the website"
1494
+ msgstr ""
1495
+
1496
+ #: application/Backend/tmpl/partial/post-access-form.php:76
1497
+ #: application/Backend/tmpl/partial/post-access-form.php:87
1498
+ #: application/Backend/tmpl/partial/post-access-form.php:98
1499
+ msgid "Visible"
1500
+ msgstr ""
1501
+
1502
+ #: application/Backend/tmpl/partial/post-access-form.php:83
1503
+ msgid "Hide post on the backend site of the website"
1504
+ msgstr ""
1505
+
1506
+ #: application/Backend/tmpl/partial/post-access-form.php:94
1507
+ msgid "Hide post in the RESTful API response"
1508
+ msgstr ""
1509
+
1510
+ #: application/Backend/tmpl/partial/post-access-form.php:121
1511
  msgid "Plain text or valid HTML"
1512
  msgstr ""
1513
 
1514
+ #: application/Backend/tmpl/partial/post-access-form.php:122
1515
  msgid "Enter your teaser message..."
1516
  msgstr ""
1517
 
1518
+ #: application/Backend/tmpl/partial/post-access-form.php:123
1519
  msgid ""
1520
  "Use [&#91;excerpt&#93;] shortcode to insert post excerpt to the teaser "
1521
  "message."
1522
  msgstr ""
1523
 
1524
+ #: application/Backend/tmpl/partial/post-access-form.php:139
1525
  msgid "Define Access Limit"
1526
  msgstr ""
1527
 
1528
+ #: application/Backend/tmpl/partial/post-access-form.php:143
1529
  msgid "Access Limit Threshold"
1530
  msgstr ""
1531
 
1532
+ #: application/Backend/tmpl/partial/post-access-form.php:144
1533
  msgid "Enter digital number"
1534
  msgstr ""
1535
 
1536
+ #: application/Backend/tmpl/partial/post-access-form.php:151
1537
  #, php-format
1538
  msgid "The user can access content [%d] times."
1539
  msgstr ""
1540
 
1541
+ #: application/Backend/tmpl/partial/post-access-form.php:169
1542
  msgid "Access Redirect"
1543
  msgstr ""
1544
 
1545
+ #: application/Backend/tmpl/partial/post-access-form.php:172
1546
  msgid ""
1547
  "Use REDIRECT option only if you want to redirect user to a different "
1548
  "location either temporary or permanently. Do not use it as a way to protect "
1549
  "access to avoid inconsistent user experience."
1550
  msgstr ""
1551
 
1552
+ #: application/Backend/tmpl/partial/post-access-form.php:177
1553
  #: application/Backend/tmpl/service/404redirect.php:26
1554
  #: application/Backend/tmpl/service/login-redirect.php:33
1555
  #: application/Backend/tmpl/service/logout-redirect.php:33
1558
  msgid "Redirected to existing page [(select from the drop-down)]"
1559
  msgstr ""
1560
 
1561
+ #: application/Backend/tmpl/partial/post-access-form.php:181
1562
  #: application/Backend/tmpl/service/logout-redirect.php:37
1563
  msgid "Redirected to the URL [(enter full URL starting from http or https)]"
1564
  msgstr ""
1565
 
1566
+ #: application/Backend/tmpl/partial/post-access-form.php:186
1567
  #: application/Backend/tmpl/service/redirect.php:49
1568
  #: application/Backend/tmpl/service/uri.php:52
1569
  msgid ""
1571
  "the restricted page)]"
1572
  msgstr ""
1573
 
1574
+ #: application/Backend/tmpl/partial/post-access-form.php:191
1575
  #: application/Backend/tmpl/service/404redirect.php:34
1576
  #: application/Backend/tmpl/service/login-redirect.php:41
1577
  #: application/Backend/tmpl/service/logout-redirect.php:41
1582
  msgid "Trigger PHP callback function [(valid %sPHP callback%s is required)]"
1583
  msgstr ""
1584
 
1585
+ #: application/Backend/tmpl/partial/post-access-form.php:195
1586
  #: application/Backend/tmpl/service/404redirect.php:38
1587
  #: application/Backend/tmpl/service/login-redirect.php:45
1588
  #: application/Backend/tmpl/service/logout-redirect.php:45
1592
  msgid "Existing Page"
1593
  msgstr ""
1594
 
1595
+ #: application/Backend/tmpl/partial/post-access-form.php:203
1596
  #: application/Backend/tmpl/service/404redirect.php:47
1597
  #: application/Backend/tmpl/service/login-redirect.php:54
1598
  #: application/Backend/tmpl/service/logout-redirect.php:54
1602
  msgid "-- Select Page --"
1603
  msgstr ""
1604
 
1605
+ #: application/Backend/tmpl/partial/post-access-form.php:209
1606
  #: application/Backend/tmpl/service/404redirect.php:53
1607
  #: application/Backend/tmpl/service/login-redirect.php:60
1608
  #: application/Backend/tmpl/service/logout-redirect.php:60
1611
  msgid "The URL"
1612
  msgstr ""
1613
 
1614
+ #: application/Backend/tmpl/partial/post-access-form.php:214
1615
  #: application/Backend/tmpl/service/404redirect.php:58
1616
  #: application/Backend/tmpl/service/login-redirect.php:65
1617
  #: application/Backend/tmpl/service/logout-redirect.php:65
1621
  msgid "PHP Callback Function"
1622
  msgstr ""
1623
 
1624
+ #: application/Backend/tmpl/partial/post-access-form.php:215
1625
  #: application/Backend/tmpl/service/redirect.php:92
1626
  #: application/Backend/tmpl/service/redirect.php:144
1627
  msgid "Enter valid callback"
1628
  msgstr ""
1629
 
1630
+ #: application/Backend/tmpl/partial/post-access-form.php:219
1631
  #: application/Backend/tmpl/service/uri.php:92
1632
  msgid "HTTP Redirect Code"
1633
  msgstr ""
1634
 
1635
+ #: application/Backend/tmpl/partial/post-access-form.php:247
1636
  msgid "Enter Password"
1637
  msgstr ""
1638
 
1639
+ #: application/Backend/tmpl/partial/post-access-form.php:263
1640
  msgid "Expiration Date/Time"
1641
  msgstr ""
1642
 
1760
 
1761
  #: application/Backend/tmpl/service/capability.php:39
1762
  #: application/Backend/tmpl/service/jwt.php:24
1763
+ #: application/Backend/tmpl/service/policy.php:36
1764
  #: application/Backend/tmpl/service/post.php:22
1765
  #: application/Backend/tmpl/service/uri.php:146
1766
  msgid "Actions"
1957
  msgid "Menu Details"
1958
  msgstr ""
1959
 
 
 
 
 
 
1960
  #: application/Backend/tmpl/service/menu.php:159
1961
  #: application/Backend/tmpl/service/toolbar.php:97
1962
  #: application/Backend/tmpl/service/uri.php:142
2022
  msgstr ""
2023
 
2024
  #: application/Backend/tmpl/service/metabox.php:132
2025
+ #: application/Backend/tmpl/service/policy.php:82
2026
  #: application/Backend/tmpl/service/post.php:21
2027
  msgid "Title"
2028
  msgstr ""
2035
  msgid "Internal ID"
2036
  msgstr ""
2037
 
2038
+ #: application/Backend/tmpl/service/policy.php:15
2039
  #, php-format
2040
  msgid ""
2041
  "Manage access and security policies for [%s]. For more information check "
2042
  "%sAccess &amp; Security Policy%s page."
2043
  msgstr ""
2044
 
2045
+ #: application/Backend/tmpl/service/policy.php:23
2046
  msgid "Policies are customized"
2047
  msgstr ""
2048
 
2049
+ #: application/Backend/tmpl/service/policy.php:24
2050
  msgid "Reset To Default"
2051
  msgstr ""
2052
 
2053
+ #: application/Backend/tmpl/service/policy.php:35
2054
+ #: application/Service/AccessPolicy.php:177
2055
  msgid "Policy"
2056
  msgstr ""
2057
 
2058
+ #: application/Backend/tmpl/service/policy.php:51
2059
+ #: application/Backend/tmpl/service/policy.php:57 media/js/aam.js:1451
2060
+ msgid "Delete Policy"
2061
+ msgstr ""
2062
+
2063
+ #: application/Backend/tmpl/service/policy.php:54
2064
+ #, php-format
2065
+ msgid "You are about to delete the %s policy. Please confirm."
2066
+ msgstr ""
2067
+
2068
+ #: application/Backend/tmpl/service/policy.php:69
2069
+ msgid "Install Access Policy"
2070
+ msgstr ""
2071
+
2072
+ #: application/Backend/tmpl/service/policy.php:72
2073
+ #, php-format
2074
+ msgid ""
2075
+ "Install an access policy from the official %sAAM Access Policy Hub%s. Insert "
2076
+ "the policy ID and it will be automatically downloaded and applied to proper "
2077
+ "assignees."
2078
+ msgstr ""
2079
+
2080
+ #: application/Backend/tmpl/service/policy.php:75
2081
+ msgid "Insert Policy ID"
2082
+ msgstr ""
2083
+
2084
+ #: application/Backend/tmpl/service/policy.php:76
2085
+ msgid "Fetch"
2086
+ msgstr ""
2087
+
2088
+ #: application/Backend/tmpl/service/policy.php:86
2089
+ msgid "Description"
2090
+ msgstr ""
2091
+
2092
+ #: application/Backend/tmpl/service/policy.php:90
2093
+ msgid "Assignee(s)"
2094
+ msgstr ""
2095
+
2096
+ #: application/Backend/tmpl/service/policy.php:97 media/js/aam.js:1369
2097
+ #: media/js/aam.js:1475
2098
+ msgid "Install"
2099
+ msgstr ""
2100
+
2101
+ #: application/Backend/tmpl/service/policy.php:107
2102
  #, php-format
2103
  msgid ""
2104
  "%s[AAM Plus Package]%s extension is required in order to apply Access &amp; "
2383
  msgid "Token has been revoked"
2384
  msgstr ""
2385
 
2386
+ #: application/Core/Policy/Validator.php:123
2387
  #: tests/Service/AccessPolicy/PolicyValidationTest.php:54
2388
  msgid "The policy is not valid JSON object"
2389
  msgstr ""
2390
 
2391
+ #: application/Core/Policy/Validator.php:142
2392
  #: tests/Service/AccessPolicy/PolicyValidationTest.php:37
2393
  msgid "The policy document is empty"
2394
  msgstr ""
2395
 
2396
+ #: application/Core/Policy/Validator.php:192
2397
+ msgid "The {$app} does not satisfy minimum required version"
2398
+ msgstr ""
2399
+
2400
+ #: application/Core/Policy/Validator.php:194
2401
+ msgid "The {$app} is required"
2402
+ msgstr ""
2403
+
2404
  #: application/Core/Redirect.php:77
2405
+ #: application/Service/ExtendedCapabilities.php:109
2406
  #: application/Service/Route.php:171
2407
  msgid "Access Denied"
2408
  msgstr ""
2409
 
2410
+ #: application/Service/AccessPolicy.php:69
2411
  msgid ""
2412
  "Manage access to the website with well documented JSON access policies for "
2413
  "any user, role or visitors. Keep the paper-trail of all the access changes "
2414
  "with policy revisions."
2415
  msgstr ""
2416
 
2417
+ #: application/Service/AccessPolicy.php:99
2418
  msgid "Access Policy Document"
2419
  msgstr ""
2420
 
2421
+ #: application/Service/AccessPolicy.php:110
2422
  msgid "Access Policy Assignee"
2423
  msgstr ""
2424
 
2425
+ #: application/Service/AccessPolicy.php:173
2426
  msgid "Access Policy"
2427
  msgstr ""
2428
 
2429
+ #: application/Service/AccessPolicy.php:178
2430
  msgid "Add New Policy"
2431
  msgstr ""
2432
 
2433
+ #: application/Service/AccessPolicy.php:179
2434
  msgid "New Policy"
2435
  msgstr ""
2436
 
2437
+ #: application/Service/AccessPolicy.php:181
2438
  msgid "Access and security policy"
2439
  msgstr ""
2440
 
2461
  "user/role access management."
2462
  msgstr ""
2463
 
2464
+ #: application/Service/Content.php:95
2465
  msgid ""
2466
  "Manage access to your website content for any user, role or visitor. This "
2467
  "include access to posts, pages, media attachment, custom post types, "
2468
  "categories, tags, custom taxonomies and terms."
2469
  msgstr ""
2470
 
2471
+ #: application/Service/Content.php:140
2472
  msgid "Access Manager"
2473
  msgstr ""
2474
 
2475
+ #: application/Service/Content.php:220
2476
  msgid "You are not allowed to publish this content"
2477
  msgstr ""
2478
 
2479
+ #: application/Service/Content.php:637
2480
  msgid "[No teaser message provided]"
2481
  msgstr ""
2482
 
2542
  "data spoofing."
2543
  msgstr ""
2544
 
2545
+ #: application/Service/Multisite.php:57
2546
+ msgid "Multisite Settings Sync"
2547
+ msgstr ""
2548
+
2549
+ #: application/Service/Multisite.php:58
2550
+ msgid ""
2551
+ "Automatically synchronize changes to the list of roles and capabilities as "
2552
+ "well as all access settings (if configured accordingly)."
2553
+ msgstr ""
2554
+
2555
  #: application/Service/NotFoundRedirect.php:53
2556
  msgid ""
2557
  "Manage frontend 404 (Not Found) redirect for any group of users or "
2676
  msgid "Add role"
2677
  msgstr ""
2678
 
2679
+ #: media/js/aam.js:1059 media/js/aam.js:2622 media/js/aam.js:2714
2680
+ #: media/js/aam.js:5199
2681
  msgid "Resetting..."
2682
  msgstr ""
2683
 
2684
+ #: media/js/aam.js:1487
2685
+ msgid "Everybody"
2686
+ msgstr ""
2687
+
2688
+ #: media/js/aam.js:1489
2689
+ msgid "Visitors"
2690
+ msgstr ""
2691
+
2692
+ #: media/js/aam.js:1496
2693
+ msgid "Current User"
2694
+ msgstr ""
2695
+
2696
+ #: media/js/aam.js:1498
2697
+ msgid "User ID"
2698
+ msgstr ""
2699
+
2700
+ #: media/js/aam.js:1547
2701
+ msgid "Installing..."
2702
+ msgstr ""
2703
+
2704
+ #: media/js/aam.js:1564
2705
+ msgid "Access Policy was installed successfully"
2706
+ msgstr ""
2707
+
2708
+ #: media/js/aam.js:2890
2709
  msgid "Post"
2710
  msgstr ""
2711
 
2712
+ #: media/js/aam.js:2956
2713
  msgid "post type"
2714
  msgstr ""
2715
 
2716
+ #: media/js/aam.js:2961 media/js/aam.js:2987 media/js/aam.js:3000
2717
+ #: media/js/aam.js:3009 media/js/aam.js:3022
2718
  msgid "ID:"
2719
  msgstr ""
2720
 
2721
+ #: media/js/aam.js:2983
2722
  msgid "taxonomy"
2723
  msgstr ""
2724
 
2725
+ #: media/js/aam.js:4472
2726
+ msgid "Settings has been exported successfully"
2727
+ msgstr ""
2728
+
2729
+ #: media/js/aam.js:4518
2730
+ msgid "Settings has been imported successfully"
2731
+ msgstr ""
2732
+
2733
+ #: media/js/aam.js:4539
2734
+ msgid "Invalid settings"
2735
+ msgstr ""
2736
+
2737
  #: media/js/vendor.js:597
2738
  msgid ": "
2739
  msgstr ""
2746
  msgid "Just for testing purposes"
2747
  msgstr ""
2748
 
 
 
 
 
 
 
 
 
 
 
2749
  #: tests/Service/Core/CoreServiceTest.php:37
2750
  msgid "<script>alert(1);</script>"
2751
  msgstr ""
media/css/aam.css CHANGED
@@ -108,6 +108,8 @@
108
  .icon-info-circled:before { content: '\e81f' !important; } /* '' */
109
  .icon-attention:before { content: '\e81e' !important; } /* '' */
110
  .icon-tag:before { content: '\e821' !important; } /* 'î ¡' */
 
 
111
 
112
  .icon-image-40 {
113
  font-size: 40px;
@@ -418,6 +420,19 @@ a.btn:focus, a.btn:active {
418
  margin: 5px 0 0 0;
419
  }
420
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  .btn-group-xs > .btn, .btn-xs {
422
  border-radius: 0;
423
  }
@@ -661,6 +676,15 @@ input[type=radio]:checked + label:before {
661
  margin-bottom: 15px !important;
662
  }
663
 
 
 
 
 
 
 
 
 
 
664
  .aam-highligh-row {
665
  border:3px solid #337ab7;
666
  }
@@ -669,6 +693,18 @@ input[type=radio]:checked + label:before {
669
  padding: 15px !important;
670
  }
671
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  .aam-lock {
673
  position: absolute;
674
  top: 0;
@@ -806,9 +842,9 @@ input[type=radio]:checked + label:before {
806
 
807
  .aam-sticky-note {
808
  position: fixed;
809
- top: 32px;
810
- left: 160px;
811
- width: calc(100% - 160px);
812
  -webkit-box-shadow: 0px 0px 12px 2px rgba(100,100,100,1);
813
  -moz-box-shadow: 0px 0px 12px 2px rgba(100,100,100,1);
814
  box-shadow: 0px 0px 12px 2px rgba(100,100,100,1);
108
  .icon-info-circled:before { content: '\e81f' !important; } /* '' */
109
  .icon-attention:before { content: '\e81e' !important; } /* '' */
110
  .icon-tag:before { content: '\e821' !important; } /* 'î ¡' */
111
+ .icon-file-code:before { content: '\f1c9' !important; } /* '' */
112
+ .icon-chat:before { content: '\e825' !important; } /* 'î ¥' */
113
 
114
  .icon-image-40 {
115
  font-size: 40px;
420
  margin: 5px 0 0 0;
421
  }
422
 
423
+ .subject-top-actions {
424
+ position: absolute;
425
+ top: 15px;
426
+ right: 30px;
427
+ font-size: 1.5em;
428
+ color:
429
+ #FFF;
430
+ }
431
+
432
+ .subject-top-actions a {
433
+ color: #FFFFFF !important;
434
+ }
435
+
436
  .btn-group-xs > .btn, .btn-xs {
437
  border-radius: 0;
438
  }
676
  margin-bottom: 15px !important;
677
  }
678
 
679
+ .aam-outer-left-xxs {
680
+ margin-left: 10px;
681
+ }
682
+
683
+ .aam-ghost {
684
+ opacity: 0.3;
685
+ filter: alpha(opacity=50);
686
+ }
687
+
688
  .aam-highligh-row {
689
  border:3px solid #337ab7;
690
  }
693
  padding: 15px !important;
694
  }
695
 
696
+ .aam-drop-zone {
697
+ border: 2px dashed
698
+ #bbb;
699
+ -moz-border-radius: 5px;
700
+ -webkit-border-radius: 5px;
701
+ border-radius: 5px;
702
+ padding: 25px;
703
+ text-align: center;
704
+ color:
705
+ #bbb;
706
+ }
707
+
708
  .aam-lock {
709
  position: absolute;
710
  top: 0;
842
 
843
  .aam-sticky-note {
844
  position: fixed;
845
+ top: 0px;
846
+ left: 0px;
847
+ width: 100%;
848
  -webkit-box-shadow: 0px 0px 12px 2px rgba(100,100,100,1);
849
  -moz-box-shadow: 0px 0px 12px 2px rgba(100,100,100,1);
850
  box-shadow: 0px 0px 12px 2px rgba(100,100,100,1);
media/font/fontello.eot CHANGED
Binary file
media/font/fontello.svg CHANGED
@@ -1,6 +1,6 @@
1
  <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="https://www.w3.org/2000/svg">
4
  <metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
5
  <defs>
6
  <font id="fontello" horiz-adv-x="1000" >
@@ -80,6 +80,8 @@
80
 
81
  <glyph glyph-name="link" unicode="&#xe824;" d="M813 171q0 23-16 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-393 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 11-8 12-12 10-11q18 17 18 41z m500-394q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
82
 
 
 
83
  <glyph glyph-name="eye" unicode="&#xe826;" d="M929 314q-85 132-213 197 34-58 34-125 0-104-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197 75-114 187-182t242-68 242 68 187 182z m-402 215q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m473-215q0-19-11-38-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38t11 39q78 128 210 205t279 78 279-78 210-205q11-20 11-39z" horiz-adv-x="1000" />
84
 
85
  <glyph glyph-name="check-empty" unicode="&#xe829;" d="M625 707h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v464q0 37-26 63t-63 26z m161-89v-464q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q66 0 114-48t47-113z" horiz-adv-x="785.7" />
@@ -126,6 +128,8 @@
126
 
127
  <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" />
128
 
 
 
129
  <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" />
130
 
131
  <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" />
1
  <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
  <metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
5
  <defs>
6
  <font id="fontello" horiz-adv-x="1000" >
80
 
81
  <glyph glyph-name="link" unicode="&#xe824;" d="M813 171q0 23-16 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-393 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 11-8 12-12 10-11q18 17 18 41z m500-394q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
82
 
83
+ <glyph glyph-name="chat" unicode="&#xe825;" d="M786 421q0-77-53-143t-143-104-197-38q-48 0-98 9-70-49-155-72-21-5-48-9h-2q-6 0-12 5t-6 12q-1 1-1 3t1 4 1 3l1 3t2 3 2 3 3 3 2 2q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125q0 78 53 144t143 104 197 38 197-38 143-104 53-144z m214-142q0-67-40-126t-108-98q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-12-4q-28 4-48 9-86 23-156 72-50-9-98-9-151 0-263 74 32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128z" horiz-adv-x="1000" />
84
+
85
  <glyph glyph-name="eye" unicode="&#xe826;" d="M929 314q-85 132-213 197 34-58 34-125 0-104-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197 75-114 187-182t242-68 242 68 187 182z m-402 215q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m473-215q0-19-11-38-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38t11 39q78 128 210 205t279 78 279-78 210-205q11-20 11-39z" horiz-adv-x="1000" />
86
 
87
  <glyph glyph-name="check-empty" unicode="&#xe829;" d="M625 707h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v464q0 37-26 63t-63 26z m161-89v-464q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q66 0 114-48t47-113z" horiz-adv-x="785.7" />
128
 
129
  <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" />
130
 
131
+ <glyph glyph-name="file-code" unicode="&#xf1c9;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-518 500q4 7 12 7t13-3l28-21q7-5 7-12t-3-13l-102-136 102-136q4-6 3-13t-7-12l-28-21q-6-4-13-4t-12 7l-126 168q-8 11 0 22z m447-167q8-11 0-22l-126-168q-4-6-11-7t-14 4l-28 21q-6 5-7 12t3 13l102 136-102 136q-4 6-3 13t7 12l28 21q6 4 14 3t11-7z m-346-258q-7 1-11 8t-3 13l77 464q1 7 7 11t14 3l35-5q7-2 11-8t3-13l-77-464q-1-7-7-11t-13-3z" horiz-adv-x="857.1" />
132
+
133
  <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" />
134
 
135
  <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
@@ -38,7 +38,7 @@
38
  function isCurrent(id) {
39
  var subject = getAAM().getSubject();
40
 
41
- return (subject.type === 'role' && subject.id === id);
42
  }
43
 
44
  /**
@@ -200,11 +200,11 @@
200
  } else {
201
  getAAM().fetchPartial('post-access-form', function (content) {
202
  $('#metabox-post-access-form').html(content);
203
- getAAM().loadAccessForm(
204
  $('#content-object-type').val(),
205
  $('#content-object-id').val(),
206
  $(this)
207
- );
208
  });
209
  }
210
  }
@@ -771,7 +771,7 @@
771
  switch (action) {
772
  case 'manage':
773
  $(container).append($('<i/>', {
774
- 'class': 'aam-row-action icon-cog ' + (isCurrent(data[0]) ? 'text-muted' : 'text-info')
775
  }).bind('click', function () {
776
  if (!$(this).prop('disabled')) {
777
  $(this).prop('disabled', true);
@@ -788,11 +788,11 @@
788
  } else {
789
  getAAM().fetchPartial('post-access-form', function (content) {
790
  $('#metabox-post-access-form').html(content);
791
- getAAM().loadAccessForm(
792
  $('#content-object-type').val(),
793
  $('#content-object-id').val(),
794
  $(this)
795
- );
796
  });
797
  }
798
  }
@@ -805,7 +805,7 @@
805
  case 'edit':
806
  if (getAAM().isUI('main')) {
807
  $(container).append($('<i/>', {
808
- 'class': 'aam-row-action icon-pencil text-info'
809
  }).bind('click', function () {
810
  // Update user's edit profile
811
  $('#edit-user-link').attr(
@@ -1118,14 +1118,14 @@
1118
  } else {
1119
  getAAM().fetchPartial('post-access-form', function (content) {
1120
  $('#metabox-post-access-form').html(content);
1121
- getAAM().loadAccessForm(
1122
  $('#content-object-type').val(),
1123
  $('#content-object-id').val(),
1124
  null,
1125
  function () {
1126
  $('i.icon-spin4', $(_this)).attr('class', 'icon-cog');
1127
  }
1128
- );
1129
  });
1130
  }
1131
  });
@@ -1193,14 +1193,14 @@
1193
  } else {
1194
  getAAM().fetchPartial('post-access-form', function (content) {
1195
  $('#metabox-post-access-form').html(content);
1196
- getAAM().loadAccessForm(
1197
  $('#content-object-type').val(),
1198
  $('#content-object-id').val(),
1199
  null,
1200
  function () {
1201
  $('i.icon-spin4', $(_this)).attr('class', 'icon-cog');
1202
  }
1203
- );
1204
  });
1205
  }
1206
  });
@@ -1267,6 +1267,46 @@
1267
  getAAM().applyPolicy(subject, id, effect, btn);
1268
  }
1269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1270
  /**
1271
  *
1272
  * @returns {undefined}
@@ -1280,6 +1320,10 @@
1280
  getAAM().reset('Main_Policy.reset', $(this));
1281
  });
1282
 
 
 
 
 
1283
  $('#policy-list').DataTable({
1284
  autoWidth: false,
1285
  ordering: false,
@@ -1307,17 +1351,24 @@
1307
  infoFiltered: ''
1308
  },
1309
  columnDefs: [
1310
- { visible: false, targets: [0, 3] }
1311
  ],
1312
  initComplete: function () {
1313
  var create = $('<a/>', {
1314
  'href': '#',
1315
- 'class': 'btn btn-primary'
1316
  }).html('<i class="icon-plus"></i> ' + getAAM().__('Create'))
1317
  .bind('click', function () {
1318
  window.open(getLocal().url.addPolicy, '_blank');
1319
  });
1320
 
 
 
 
 
 
 
 
1321
  $('.dataTables_filter', '#policy-list_wrapper').append(create);
1322
  },
1323
  createdRow: function (row, data) {
@@ -1383,6 +1434,30 @@
1383
  }));
1384
  break;
1385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1386
  default:
1387
  break;
1388
  }
@@ -1392,9 +1467,132 @@
1392
  $('td:eq(0)', row).html(data[1]);
1393
  }
1394
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1395
  }
1396
  }
1397
 
 
 
 
 
 
 
 
 
 
 
1398
  getAAM().addHook('init', initialize);
1399
 
1400
  })(jQuery);
@@ -2278,6 +2476,68 @@
2278
  });
2279
  }
2280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2281
  /**
2282
  *
2283
  * @param {type} type
@@ -2314,7 +2574,7 @@
2314
  object,
2315
  id,
2316
  function () {
2317
- getAAM().loadAccessForm(object, id, null, function() {
2318
  // Trigger modal to collection additional data
2319
  if (btn.data('trigger') && checked) {
2320
  $('#' + btn.data('trigger')).trigger('click');
@@ -2337,6 +2597,8 @@
2337
  });
2338
  });
2339
 
 
 
2340
  // Initialize the Reset to default button
2341
  $('#content-reset').bind('click', function () {
2342
  var type = $(this).attr('data-type');
@@ -2362,7 +2624,7 @@
2362
  success: function (response) {
2363
  if (response.status === 'success') {
2364
  $('#post-overwritten').addClass('hidden');
2365
- getAAM().loadAccessForm(type, id);
2366
  }
2367
  },
2368
  complete: function () {
@@ -2373,6 +2635,27 @@
2373
  });
2374
  });
2375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2376
  // Initialize the "Teaser Message" modal
2377
  $('#save-teaser-btn').bind('click', function() {
2378
  $(this).text(getAAM().__('Saving...'));
@@ -2387,7 +2670,7 @@
2387
  id,
2388
  function () {
2389
  $('#modal-teaser').modal('hide');
2390
- getAAM().loadAccessForm(object, id);
2391
  }
2392
  );
2393
  });
@@ -2406,7 +2689,7 @@
2406
  id,
2407
  function () {
2408
  $('#modal-limited').modal('hide');
2409
- getAAM().loadAccessForm(object, id);
2410
  }
2411
  );
2412
  });
@@ -2440,7 +2723,7 @@
2440
  getAAM().__('Counter was reset successfully')
2441
  );
2442
  $('#modal-limited').modal('hide');
2443
- getAAM().loadAccessForm(object, id);
2444
  }
2445
  },
2446
  error: function () {
@@ -2479,7 +2762,7 @@
2479
  id,
2480
  function () {
2481
  $('#modal-redirect').modal('hide');
2482
- getAAM().loadAccessForm(object, id);
2483
  }
2484
  );
2485
  });
@@ -2498,7 +2781,7 @@
2498
  id,
2499
  function () {
2500
  $('#modal-password').modal('hide');
2501
- getAAM().loadAccessForm(object, id);
2502
  }
2503
  );
2504
  });
@@ -2517,7 +2800,7 @@
2517
  id,
2518
  function () {
2519
  $('#modal-cease').modal('hide');
2520
- getAAM().loadAccessForm(object, id);
2521
  }
2522
  );
2523
  });
@@ -2544,68 +2827,13 @@
2544
  getAAM().triggerHook('init-access-form');
2545
  }
2546
 
2547
- /**
2548
- *
2549
- * @param {type} object
2550
- * @param {type} id
2551
- * @param {type} btn
2552
- * @param {type} callback
2553
- * @returns {undefined}
2554
- */
2555
- getAAM().loadAccessForm = function (object, id, btn, callback) {
2556
- if ($.inArray(object, ['cat', 'tag']) !== -1) {
2557
- object = 'term';
2558
- } else if ($.inArray(object, ['taxonomy-category', 'taxonomy-tag']) !== -1) {
2559
- object = 'taxonomy';
2560
- }
2561
-
2562
- //reset the form first
2563
- var container = $('.aam-access-form');
2564
-
2565
- //show overlay if present
2566
- $('.aam-overlay', container).show();
2567
-
2568
- $.ajax(getLocal().url.site, {
2569
- type: 'POST',
2570
- dataType: 'html',
2571
- data: {
2572
- action: 'aamc',
2573
- partial: 'post-access-form',
2574
- _ajax_nonce: getLocal().nonce,
2575
- type: object,
2576
- id: id,
2577
- subject: getAAM().getSubject().type,
2578
- subjectId: getAAM().getSubject().id
2579
- },
2580
- beforeSend: function () {
2581
- if (btn) {
2582
- $(btn).attr('data-class', $(btn).attr('class'));
2583
- $(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
2584
- }
2585
- },
2586
- success: function (response) {
2587
- $('#aam-access-form-container').html(response);
2588
- $('#post-list_wrapper').addClass('aam-hidden');
2589
- container.addClass('active');
2590
-
2591
- initializeAccessForm(object, id);
2592
 
2593
- if (typeof callback === 'function') {
2594
- callback.call();
2595
- }
2596
- },
2597
- error: function () {
2598
- getAAM().notification('danger');
2599
- },
2600
- complete: function () {
2601
- if (btn){
2602
- $(btn).attr('class', $(btn).attr('data-class')).removeAttr('data-class');
2603
- }
2604
- //hide overlay if present
2605
- $('.aam-overlay', container).hide();
2606
- }
2607
- });
2608
- };
2609
 
2610
  /**
2611
  *
@@ -2819,7 +3047,7 @@
2819
  $(container).append($('<i/>', {
2820
  'class': 'aam-row-action text-info icon-cog'
2821
  }).bind('click', function () {
2822
- getAAM().loadAccessForm(data[2], data[0], $(this), function () {
2823
  addBreadcrumbLevel('edit', data[2], data[3]);
2824
  });
2825
  }).attr({
@@ -3495,7 +3723,7 @@
3495
  _ajax_nonce: getLocal().nonce,
3496
  subject: getAAM().getSubject().type,
3497
  subjectId: getAAM().getSubject().id,
3498
- uri: $('#uri-delete-btn').data('uri')
3499
  },
3500
  beforeSend: function () {
3501
  $('#uri-delete-btn').text(getAAM().__('Deleting...')).attr('disabled', true);
@@ -3637,7 +3865,6 @@
3637
  }
3638
 
3639
  getAAM().addHook('init', initialize);
3640
-
3641
  })(jQuery);
3642
 
3643
  /**
@@ -3946,7 +4173,7 @@
3946
  * @param {type} cb
3947
  * @returns {undefined}
3948
  */
3949
- function downloadExtension(license, cb, error) {
3950
  $.ajax(`${getLocal().system.apiEndpoint}/download/${license}`, {
3951
  type: 'GET',
3952
  dataType: 'json',
@@ -3984,7 +4211,6 @@
3984
  "Accept": "application/json"
3985
  },
3986
  success: function (response) {
3987
- console.log(response);
3988
  $.ajax(getLocal().ajaxurl, {
3989
  type: 'POST',
3990
  dataType: 'json',
@@ -4000,7 +4226,9 @@
4000
  });
4001
  },
4002
  error: function (response) {
4003
- error(response.responseJSON);
 
 
4004
  }
4005
  });
4006
  }
@@ -4029,7 +4257,7 @@
4029
  }
4030
 
4031
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
4032
- downloadExtension(license, function (response) {
4033
  if (response) {
4034
  getAAM().downloadFile(
4035
  response.content,
@@ -4194,7 +4422,7 @@
4194
 
4195
  getAAM().addHook('init', initialize);
4196
 
4197
- //ConfigPress hook
4198
  getAAM().addHook('menu-feature-click', function (feature) {
4199
  if (feature === 'configpress'
4200
  && !$('#configpress-editor').next().hasClass('CodeMirror')) {
@@ -4220,6 +4448,177 @@
4220
  }
4221
  });
4222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4223
  })(jQuery);
4224
 
4225
  getAAM().fetchContent('main'); //fetch default AAM content
@@ -4284,6 +4683,38 @@
4284
  }
4285
  };
4286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4287
  /**
4288
  *
4289
  */
@@ -4685,20 +5116,21 @@
4685
  // Persist the subject in the local storage
4686
  window.localStorage.setItem('aam-subject', JSON.stringify(this.subject));
4687
 
4688
- //update the header
4689
- // First set the type of the subject
4690
- $('.aam-current-subject').text(
4691
- type.charAt(0).toUpperCase() + type.slice(1) + ': '
4692
- );
4693
 
4694
- // Second set the name of the subject
4695
- $('.aam-current-subject').append($('<strong/>').text(name));
4696
 
4697
- //highlight screen if the same level
4698
- if (parseInt(level) >= getLocal().level || type === 'default') {
4699
- $('.aam-current-subject').addClass('danger');
4700
- } else {
4701
- $('.aam-current-subject').removeClass('danger');
 
4702
  }
4703
 
4704
  this.triggerHook('setSubject');
38
  function isCurrent(id) {
39
  var subject = getAAM().getSubject();
40
 
41
+ return (getAAM().isUI('main') && subject.type === 'role' && subject.id === id);
42
  }
43
 
44
  /**
200
  } else {
201
  getAAM().fetchPartial('post-access-form', function (content) {
202
  $('#metabox-post-access-form').html(content);
203
+ getAAM().triggerHook('load-access-form', [
204
  $('#content-object-type').val(),
205
  $('#content-object-id').val(),
206
  $(this)
207
+ ]);
208
  });
209
  }
210
  }
771
  switch (action) {
772
  case 'manage':
773
  $(container).append($('<i/>', {
774
+ 'class': 'aam-row-action icon-cog ' + (isCurrent(data[0]) ? 'text-muted' : 'text-primary')
775
  }).bind('click', function () {
776
  if (!$(this).prop('disabled')) {
777
  $(this).prop('disabled', true);
788
  } else {
789
  getAAM().fetchPartial('post-access-form', function (content) {
790
  $('#metabox-post-access-form').html(content);
791
+ getAAM().triggerHook('load-access-form', [
792
  $('#content-object-type').val(),
793
  $('#content-object-id').val(),
794
  $(this)
795
+ ]);
796
  });
797
  }
798
  }
805
  case 'edit':
806
  if (getAAM().isUI('main')) {
807
  $(container).append($('<i/>', {
808
+ 'class': 'aam-row-action icon-pencil text-warning'
809
  }).bind('click', function () {
810
  // Update user's edit profile
811
  $('#edit-user-link').attr(
1118
  } else {
1119
  getAAM().fetchPartial('post-access-form', function (content) {
1120
  $('#metabox-post-access-form').html(content);
1121
+ getAAM().triggerHook('load-access-form', [
1122
  $('#content-object-type').val(),
1123
  $('#content-object-id').val(),
1124
  null,
1125
  function () {
1126
  $('i.icon-spin4', $(_this)).attr('class', 'icon-cog');
1127
  }
1128
+ ]);
1129
  });
1130
  }
1131
  });
1193
  } else {
1194
  getAAM().fetchPartial('post-access-form', function (content) {
1195
  $('#metabox-post-access-form').html(content);
1196
+ getAAM().triggerHook('load-access-form', [
1197
  $('#content-object-type').val(),
1198
  $('#content-object-id').val(),
1199
  null,
1200
  function () {
1201
  $('i.icon-spin4', $(_this)).attr('class', 'icon-cog');
1202
  }
1203
+ ]);
1204
  });
1205
  }
1206
  });
1267
  getAAM().applyPolicy(subject, id, effect, btn);
1268
  }
1269
 
1270
+ /**
1271
+ * Delete policy
1272
+ *
1273
+ * @param {Int} id
1274
+ */
1275
+ function deletePolicy(id, btn) {
1276
+ $.ajax(getLocal().ajaxurl, {
1277
+ type: 'POST',
1278
+ dataType: 'json',
1279
+ data: {
1280
+ action: 'aam',
1281
+ sub_action: 'Main_Policy.delete',
1282
+ _ajax_nonce: getLocal().nonce,
1283
+ id: id
1284
+ },
1285
+ beforeSend: function () {
1286
+ $(btn).attr('data-original', $(btn).text());
1287
+ $(btn).text(getAAM().__('Deleting...')).attr('disabled', true);
1288
+ },
1289
+ success: function (response) {
1290
+ if (response.status === 'success') {
1291
+ $('#policy-list').DataTable().ajax.reload();
1292
+ } else {
1293
+ getAAM().notification(
1294
+ 'danger'
1295
+ );
1296
+ }
1297
+ },
1298
+ error: function () {
1299
+ getAAM().notification('danger');
1300
+ },
1301
+ complete: function () {
1302
+ $('#delete-policy-modal').modal('hide');
1303
+ $(btn).text($(btn).attr('data-original')).attr(
1304
+ 'disabled', false
1305
+ );
1306
+ }
1307
+ });
1308
+ }
1309
+
1310
  /**
1311
  *
1312
  * @returns {undefined}
1320
  getAAM().reset('Main_Policy.reset', $(this));
1321
  });
1322
 
1323
+ $('#delete-policy-btn').bind('click', function() {
1324
+ deletePolicy($(this).attr('data-id'));
1325
+ });
1326
+
1327
  $('#policy-list').DataTable({
1328
  autoWidth: false,
1329
  ordering: false,
1351
  infoFiltered: ''
1352
  },
1353
  columnDefs: [
1354
+ { visible: false, targets: [0, 3, 4] }
1355
  ],
1356
  initComplete: function () {
1357
  var create = $('<a/>', {
1358
  'href': '#',
1359
+ 'class': 'btn btn-sm btn-primary'
1360
  }).html('<i class="icon-plus"></i> ' + getAAM().__('Create'))
1361
  .bind('click', function () {
1362
  window.open(getLocal().url.addPolicy, '_blank');
1363
  });
1364
 
1365
+ var install = $('<a/>', {
1366
+ 'href': '#modal-install-policy',
1367
+ 'class': 'btn btn-sm btn-success aam-outer-left-xxs',
1368
+ 'data-toggle': 'modal'
1369
+ }).html('<i class="icon-download-cloud"></i> ' + getAAM().__('Install'));
1370
+
1371
+ $('.dataTables_filter', '#policy-list_wrapper').append(install);
1372
  $('.dataTables_filter', '#policy-list_wrapper').append(create);
1373
  },
1374
  createdRow: function (row, data) {
1434
  }));
1435
  break;
1436
 
1437
+ case 'delete':
1438
+ $(container).append($('<i/>', {
1439
+ 'class': 'aam-row-action icon-trash-empty text-danger'
1440
+ }).bind('click', function () {
1441
+ var message = $('.aam-confirm-message', '#delete-policy-modal').data('message');
1442
+
1443
+ // replace some dynamic parts
1444
+ message = message.replace('%s', '<b>' + data[1] + '</b>');
1445
+ $('.aam-confirm-message', '#delete-policy-modal').html(message);
1446
+
1447
+ $('#delete-policy-btn').attr('data-id', data[0]);
1448
+ $('#delete-policy-modal').modal('show');
1449
+ }).attr({
1450
+ 'data-toggle': "tooltip",
1451
+ 'title': getAAM().__('Delete Policy')
1452
+ }));
1453
+ break;
1454
+
1455
+ case 'no-delete':
1456
+ $(container).append($('<i/>', {
1457
+ 'class': 'aam-row-action text-muted icon-trash-empty'
1458
+ }));
1459
+ break;
1460
+
1461
  default:
1462
  break;
1463
  }
1467
  $('td:eq(0)', row).html(data[1]);
1468
  }
1469
  });
1470
+
1471
+ var policy = null;
1472
+
1473
+ function reset() {
1474
+ $('#policy-details').addClass('aam-ghost');
1475
+ $('#install-policy').prop('disabled', true).text(getAAM().__('Install'));
1476
+ $('#policy-title,#policy-description,#policy-subjects').empty();
1477
+ policy = null;
1478
+ }
1479
+
1480
+ function buildSubject(subject, effect)
1481
+ {
1482
+ var response;
1483
+
1484
+ const badge = effect ? '<span class="badge danger">apply</span>' : '<span class="badge success">exclude</span>';
1485
+
1486
+ if (subject === 'default') {
1487
+ response = getAAM().__('Everybody') + ' ' + badge;
1488
+ } else if (subject === 'visitor') {
1489
+ response = getAAM().__('Visitors') + ' ' + badge;
1490
+ } else if (subject.search('role') === 0) {
1491
+ response = getAAM().__('Role') + ' ' + subject.substr(5) + ' ' + badge;
1492
+ } else if (subject.search('user') === 0) {
1493
+ const uid = subject.substr(5);
1494
+
1495
+ if (uid === 'current') {
1496
+ response = getAAM().__('Current User') + ' ' + badge;
1497
+ } else {
1498
+ response = getAAM().__('User ID') + ' ' + subject.substr(5) + ' ' + badge;
1499
+ }
1500
+ }
1501
+
1502
+ return response;
1503
+ }
1504
+
1505
+ $('#policy-id').bind('change', function() {
1506
+ const id = $.trim($(this).val());
1507
+
1508
+ // Reset modal
1509
+ reset();
1510
+
1511
+ if (id) {
1512
+ $.ajax(`${getLocal().system.apiEndpoint}/policy/${id}`, {
1513
+ type: 'GET',
1514
+ dataType: 'json',
1515
+ headers: {
1516
+ "Accept": "application/json"
1517
+ },
1518
+ success: function (response) {
1519
+ $('#policy-title').text(response.metadata.title);
1520
+ $('#policy-description').text(response.metadata.description);
1521
+ $('#policy-details').removeClass('aam-ghost');
1522
+ $('#install-policy').prop('disabled', false);
1523
+
1524
+ var assignees = [];
1525
+
1526
+ // Build the list if assignees
1527
+ $.each(response.metadata.assignee, function(i, val) {
1528
+ assignees.push(buildSubject(val, true));
1529
+ });
1530
+
1531
+ $.each(response.metadata.override, function(i, val) {
1532
+ assignees.push(buildSubject(val, false));
1533
+ });
1534
+
1535
+ $('#policy-subjects').html(assignees.join(';&nbsp;'));
1536
+
1537
+ policy = response;
1538
+ },
1539
+ error: function (response) {
1540
+ getAAM().notification('danger', response.responseJSON.reason);
1541
+ }
1542
+ });
1543
+ }
1544
+ });
1545
+
1546
+ $('#install-policy').bind('click', function() {
1547
+ $(this).prop('disabled', true).text(getAAM().__('Installing...'));
1548
+
1549
+ getAAM().queueRequest(function () {
1550
+ $.ajax(getLocal().ajaxurl, {
1551
+ type: 'POST',
1552
+ dataType: 'json',
1553
+ data: {
1554
+ action: 'aam',
1555
+ sub_action: 'Main_Policy.install',
1556
+ _ajax_nonce: getLocal().nonce,
1557
+ metadata: JSON.stringify(policy.metadata),
1558
+ 'aam-policy': JSON.stringify(policy.policy)
1559
+ },
1560
+ success: function (response) {
1561
+ if (response.status === 'success') {
1562
+ getAAM().notification(
1563
+ 'success',
1564
+ getAAM().__('Access Policy was installed successfully')
1565
+ );
1566
+ $('#policy-list').DataTable().ajax.reload();
1567
+ $('#modal-install-policy').modal('hide');
1568
+ } else {
1569
+ getAAM().notification('danger', response.errors);
1570
+ }
1571
+ },
1572
+ error: function () {
1573
+ getAAM().notification('danger');
1574
+ }
1575
+ });
1576
+ });
1577
+ });
1578
+
1579
+ $('#modal-install-policy').on('shown.bs.modal', function() {
1580
+ $('#policy-id').val('').focus();
1581
+ reset();
1582
+ });
1583
  }
1584
  }
1585
 
1586
+ // Generate Policy action
1587
+ $('#generate-access-policy').bind('click', function() {
1588
+ const btn = $('i', this);
1589
+
1590
+ btn.attr('class', 'icon-spin4 animate-spin');
1591
+ getAAM().generatePolicy(function() {
1592
+ btn.attr('class', 'icon-file-code');
1593
+ })
1594
+ });
1595
+
1596
  getAAM().addHook('init', initialize);
1597
 
1598
  })(jQuery);
2476
  });
2477
  }
2478
 
2479
+ /**
2480
+ *
2481
+ * @param {*} object
2482
+ * @param {*} id
2483
+ * @param {*} btn
2484
+ * @param {*} callback
2485
+ */
2486
+ function loadAccessForm(object, id, btn, callback) {
2487
+ if ($.inArray(object, ['cat', 'tag']) !== -1) {
2488
+ object = 'term';
2489
+ } else if ($.inArray(object, ['taxonomy-category', 'taxonomy-tag']) !== -1) {
2490
+ object = 'taxonomy';
2491
+ }
2492
+
2493
+ //reset the form first
2494
+ var container = $('.aam-access-form');
2495
+
2496
+ //show overlay if present
2497
+ $('.aam-overlay', container).show();
2498
+
2499
+ $.ajax(getLocal().url.site, {
2500
+ type: 'POST',
2501
+ dataType: 'html',
2502
+ data: {
2503
+ action: 'aamc',
2504
+ partial: 'post-access-form',
2505
+ _ajax_nonce: getLocal().nonce,
2506
+ type: object,
2507
+ id: id,
2508
+ subject: getAAM().getSubject().type,
2509
+ subjectId: getAAM().getSubject().id
2510
+ },
2511
+ beforeSend: function () {
2512
+ if (btn) {
2513
+ $(btn).attr('data-class', $(btn).attr('class'));
2514
+ $(btn).attr('class', 'aam-row-action icon-spin4 animate-spin');
2515
+ }
2516
+ },
2517
+ success: function (response) {
2518
+ $('#aam-access-form-container').html(response);
2519
+ $('#post-list_wrapper').addClass('aam-hidden');
2520
+ container.addClass('active');
2521
+
2522
+ initializeAccessForm(object, id);
2523
+
2524
+ if (typeof callback === 'function') {
2525
+ callback.call();
2526
+ }
2527
+ },
2528
+ error: function () {
2529
+ getAAM().notification('danger');
2530
+ },
2531
+ complete: function () {
2532
+ if (btn){
2533
+ $(btn).attr('class', $(btn).attr('data-class')).removeAttr('data-class');
2534
+ }
2535
+ //hide overlay if present
2536
+ $('.aam-overlay', container).hide();
2537
+ }
2538
+ });
2539
+ }
2540
+
2541
  /**
2542
  *
2543
  * @param {type} type
2574
  object,
2575
  id,
2576
  function () {
2577
+ loadAccessForm(object, id, null, function() {
2578
  // Trigger modal to collection additional data
2579
  if (btn.data('trigger') && checked) {
2580
  $('#' + btn.data('trigger')).trigger('click');
2597
  });
2598
  });
2599
 
2600
+ $('[data-toggle="toggle"]', '#aam-access-form-container').bootstrapToggle();
2601
+
2602
  // Initialize the Reset to default button
2603
  $('#content-reset').bind('click', function () {
2604
  var type = $(this).attr('data-type');
2624
  success: function (response) {
2625
  if (response.status === 'success') {
2626
  $('#post-overwritten').addClass('hidden');
2627
+ loadAccessForm(type, id);
2628
  }
2629
  },
2630
  complete: function () {
2635
  });
2636
  });
2637
 
2638
+ // Initialize the "Hidden Areas" modal
2639
+ $('#save-hidden-btn').bind('click', function() {
2640
+ $(this).text(getAAM().__('Saving...'));
2641
+
2642
+ save(
2643
+ $(this).attr('data-ref'),
2644
+ {
2645
+ enabled: true,
2646
+ frontend: $('#hidden-frontend').prop('checked'),
2647
+ backend: $('#hidden-backend').prop('checked'),
2648
+ api: $('#hidden-api').prop('checked')
2649
+ },
2650
+ object,
2651
+ id,
2652
+ function () {
2653
+ $('#modal-hidden').modal('hide');
2654
+ loadAccessForm(object, id);
2655
+ }
2656
+ );
2657
+ });
2658
+
2659
  // Initialize the "Teaser Message" modal
2660
  $('#save-teaser-btn').bind('click', function() {
2661
  $(this).text(getAAM().__('Saving...'));
2670
  id,
2671
  function () {
2672
  $('#modal-teaser').modal('hide');
2673
+ loadAccessForm(object, id);
2674
  }
2675
  );
2676
  });
2689
  id,
2690
  function () {
2691
  $('#modal-limited').modal('hide');
2692
+ loadAccessForm(object, id);
2693
  }
2694
  );
2695
  });
2723
  getAAM().__('Counter was reset successfully')
2724
  );
2725
  $('#modal-limited').modal('hide');
2726
+ loadAccessForm(object, id);
2727
  }
2728
  },
2729
  error: function () {
2762
  id,
2763
  function () {
2764
  $('#modal-redirect').modal('hide');
2765
+ loadAccessForm(object, id);
2766
  }
2767
  );
2768
  });
2781
  id,
2782
  function () {
2783
  $('#modal-password').modal('hide');
2784
+ loadAccessForm(object, id);
2785
  }
2786
  );
2787
  });
2800
  id,
2801
  function () {
2802
  $('#modal-cease').modal('hide');
2803
+ loadAccessForm(object, id);
2804
  }
2805
  );
2806
  });
2827
  getAAM().triggerHook('init-access-form');
2828
  }
2829
 
2830
+ getAAM().addHook('load-access-form', function(params) {
2831
+ loadAccessForm(...params);
2832
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2833
 
2834
+ getAAM().addHook('save-post-settings', function(params) {
2835
+ save(...params);
2836
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
2837
 
2838
  /**
2839
  *
3047
  $(container).append($('<i/>', {
3048
  'class': 'aam-row-action text-info icon-cog'
3049
  }).bind('click', function () {
3050
+ loadAccessForm(data[2], data[0], $(this), function () {
3051
  addBreadcrumbLevel('edit', data[2], data[3]);
3052
  });
3053
  }).attr({
3723
  _ajax_nonce: getLocal().nonce,
3724
  subject: getAAM().getSubject().type,
3725
  subjectId: getAAM().getSubject().id,
3726
+ uri: $('#uri-delete-btn').attr('data-uri')
3727
  },
3728
  beforeSend: function () {
3729
  $('#uri-delete-btn').text(getAAM().__('Deleting...')).attr('disabled', true);
3865
  }
3866
 
3867
  getAAM().addHook('init', initialize);
 
3868
  })(jQuery);
3869
 
3870
  /**
4173
  * @param {type} cb
4174
  * @returns {undefined}
4175
  */
4176
+ function downloadAddon(license, cb, error) {
4177
  $.ajax(`${getLocal().system.apiEndpoint}/download/${license}`, {
4178
  type: 'GET',
4179
  dataType: 'json',
4211
  "Accept": "application/json"
4212
  },
4213
  success: function (response) {
 
4214
  $.ajax(getLocal().ajaxurl, {
4215
  type: 'POST',
4216
  dataType: 'json',
4226
  });
4227
  },
4228
  error: function (response) {
4229
+ getAAM().notification(
4230
+ 'danger', response.responseJSON.reason
4231
+ );
4232
  }
4233
  });
4234
  }
4257
  }
4258
 
4259
  $('i', _this).attr('class', 'icon-spin4 animate-spin');
4260
+ downloadAddon(license, function (response) {
4261
  if (response) {
4262
  getAAM().downloadFile(
4263
  response.content,
4422
 
4423
  getAAM().addHook('init', initialize);
4424
 
4425
+ // ConfigPress hook
4426
  getAAM().addHook('menu-feature-click', function (feature) {
4427
  if (feature === 'configpress'
4428
  && !$('#configpress-editor').next().hasClass('CodeMirror')) {
4448
  }
4449
  });
4450
 
4451
+ // Import/Export feature
4452
+ if (window.File && window.FileReader && window.FileList && window.Blob) {
4453
+ $('#file-api-error').remove();
4454
+
4455
+ $('#export-settings').bind('click', function() {
4456
+ getAAM().queueRequest(function () {
4457
+ $.ajax(getLocal().ajaxurl, {
4458
+ type: 'POST',
4459
+ dataType: 'json',
4460
+ data: {
4461
+ action: 'aam',
4462
+ sub_action: 'Settings_Manager.exportSettings',
4463
+ _ajax_nonce: getLocal().nonce
4464
+ },
4465
+ beforeSend: function () {
4466
+ $('#export-settings').prop('disabled', true);
4467
+ $('#export-settings').text(getAAM().__('Processing...'));
4468
+ },
4469
+ success: function (response) {
4470
+ getAAM().notification(
4471
+ 'success',
4472
+ getAAM().__('Settings has been exported successfully')
4473
+ );
4474
+ getAAM().downloadFile(
4475
+ response.result,
4476
+ 'aam-settings.json',
4477
+ 'application/json'
4478
+ )
4479
+ },
4480
+ error: function () {
4481
+ getAAM().notification('danger');
4482
+ },
4483
+ complete: function () {
4484
+ $('#export-settings').prop('disabled', false);
4485
+ $('#export-settings').text(getAAM().__('Download Exported Settings'));
4486
+ }
4487
+ });
4488
+ });
4489
+ });
4490
+
4491
+ // Handle the selected file
4492
+ $('#aam-settings').bind('change', function(e) {
4493
+ // Read the content for the selected file and evaluate it
4494
+ const reader = new FileReader();
4495
+
4496
+ reader.onload = function() {
4497
+ try {
4498
+ JSON.parse(reader.result);
4499
+
4500
+ // Import AAM settings
4501
+ getAAM().queueRequest(function () {
4502
+ $.ajax(getLocal().ajaxurl, {
4503
+ type: 'POST',
4504
+ dataType: 'json',
4505
+ data: {
4506
+ action: 'aam',
4507
+ sub_action: 'Settings_Manager.importSettings',
4508
+ _ajax_nonce: getLocal().nonce,
4509
+ payload: reader.result
4510
+ },
4511
+ beforeSend: function () {
4512
+ $('#aam-settings').prop('disabled', true);
4513
+ },
4514
+ success: function (response) {
4515
+ if (response.status === 'success') {
4516
+ getAAM().notification(
4517
+ 'success',
4518
+ getAAM().__('Settings has been imported successfully')
4519
+ );
4520
+ location.reload();
4521
+ } else {
4522
+ getAAM().notification(
4523
+ 'danger',
4524
+ response.reason
4525
+ );
4526
+ }
4527
+ },
4528
+ error: function () {
4529
+ getAAM().notification('danger');
4530
+ },
4531
+ complete: function () {
4532
+ $('#aam-settings').prop('disabled', false);
4533
+ }
4534
+ });
4535
+ });
4536
+ } catch(ex) {
4537
+ getAAM().notification(
4538
+ 'danger',
4539
+ getAAM().__('Invalid settings')
4540
+ );
4541
+ }
4542
+ }
4543
+
4544
+ reader.readAsText(e.target.files[0]);
4545
+ });
4546
+
4547
+ } else {
4548
+ $('#import-export-container').remove();
4549
+ }
4550
+ })(jQuery);
4551
+
4552
+ /**
4553
+ * Support message
4554
+ */
4555
+ (function ($) {
4556
+
4557
+ function setRequest(payload) {
4558
+ $.ajax(`${getLocal().system.apiEndpoint}/message`, {
4559
+ type: 'POST',
4560
+ dataType: 'json',
4561
+ data: JSON.stringify(payload),
4562
+ contentType: 'application/json',
4563
+ headers: {
4564
+ "Accept": "application/json"
4565
+ },
4566
+ success: function () {
4567
+ getAAM().notification(
4568
+ 'success', getAAM().__('Message has been sent')
4569
+ );
4570
+ $('input,textarea', '#modal-support').val('');
4571
+ $('#modal-support').modal('hide');
4572
+ },
4573
+ error: function (response) {
4574
+ getAAM().notification(
4575
+ 'danger', response.responseJSON.reason
4576
+ );
4577
+ }
4578
+ });
4579
+ }
4580
+
4581
+ $('#submit-support').bind('click', function() {
4582
+ // Prepare request model
4583
+ let request = {
4584
+ 'email': $.trim($('#support-email').val()),
4585
+ 'fullname': $.trim($('#support-name').val()),
4586
+ 'message': $.trim($('#support-message').val()),
4587
+ }
4588
+
4589
+ // Validate the data
4590
+ let error = false;
4591
+
4592
+ const regex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w+)+$/;
4593
+ if (!request.email || !regex.test(request.email)) {
4594
+ error = true;
4595
+ $('#support-email').focus();
4596
+ }
4597
+
4598
+ if (!request.message) {
4599
+ error = true;
4600
+ $('#support-message').focus();
4601
+ }
4602
+
4603
+ if (error === false) {
4604
+ if ($('#support-details').prop('checked')) {
4605
+ $.ajax(getLocal().ajaxurl, {
4606
+ type: 'POST',
4607
+ dataType: 'json',
4608
+ data: {
4609
+ action: 'aam',
4610
+ sub_action: 'Settings_Manager.getSupportMetadata',
4611
+ _ajax_nonce: getLocal().nonce
4612
+ },
4613
+ success: function(response) {
4614
+ request.metadata = response;
4615
+ setRequest(request);
4616
+ }
4617
+ });
4618
+ }
4619
+ }
4620
+ });
4621
+
4622
  })(jQuery);
4623
 
4624
  getAAM().fetchContent('main'); //fetch default AAM content
4683
  }
4684
  };
4685
 
4686
+ /**
4687
+ *
4688
+ */
4689
+ AAM.prototype.generatePolicy = function(cb) {
4690
+ $.ajax(getLocal().ajaxurl, {
4691
+ type: 'POST',
4692
+ dataType: 'json',
4693
+ headers: {
4694
+ "Accept": "application/json"
4695
+ },
4696
+ data: {
4697
+ action: 'aam',
4698
+ sub_action: 'Main_Policy.generate',
4699
+ _ajax_nonce: getLocal().nonce,
4700
+ subject: getAAM().getSubject().type,
4701
+ subjectId: getAAM().getSubject().id
4702
+ },
4703
+ beforeSend: function () {
4704
+ },
4705
+ success: function (response) {
4706
+ getAAM().downloadFile(
4707
+ response.policy,
4708
+ response.title + '.json',
4709
+ 'application/json'
4710
+ )
4711
+ },
4712
+ complete: function() {
4713
+ cb();
4714
+ }
4715
+ });
4716
+ }
4717
+
4718
  /**
4719
  *
4720
  */
5116
  // Persist the subject in the local storage
5117
  window.localStorage.setItem('aam-subject', JSON.stringify(this.subject));
5118
 
5119
+ if (getAAM().isUI('main')) {
5120
+ // First set the type of the subject
5121
+ $('.aam-current-subject').text(
5122
+ type.charAt(0).toUpperCase() + type.slice(1) + ': '
5123
+ );
5124
 
5125
+ // Second set the name of the subject
5126
+ $('.aam-current-subject').append($('<strong/>').text(name));
5127
 
5128
+ // Highlight screen if the same level
5129
+ if (parseInt(level) >= getLocal().level || type === 'default') {
5130
+ $('.aam-current-subject').addClass('danger');
5131
+ } else {
5132
+ $('.aam-current-subject').removeClass('danger');
5133
+ }
5134
  }
5135
 
5136
  this.triggerHook('setSubject');
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: vasyltech
3
  Tags: access control, membership, backend menu, user role, restricted content, security, jwt
4
  Requires at least: 4.7.0
5
  Requires PHP: 5.6.0
6
- Tested up to: 5.3.1
7
- Stable tag: 6.1.1
8
 
9
  All you need to manage access to WordPress websites on the frontend, backend and API levels for any role, user or visitors.
10
 
@@ -91,6 +91,23 @@ We take security and privacy very seriously, that is why there are several non-n
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  = 6.1.1 =
95
  * Fixed Bug: Unnecessary backslashes before displaying the access policy [https://forum.aamplugin.com/d/432-access-policy-ui-escaping-slashes](https://forum.aamplugin.com/d/432-access-policy-ui-escaping-slashes)
96
  * Fixed Bug: aam_access_dashboard custom capability caused "Access Denied"
3
  Tags: access control, membership, backend menu, user role, restricted content, security, jwt
4
  Requires at least: 4.7.0
5
  Requires PHP: 5.6.0
6
+ Tested up to: 5.3.2
7
+ Stable tag: 6.2.0
8
 
9
  All you need to manage access to WordPress websites on the frontend, backend and API levels for any role, user or visitors.
10
 
91
 
92
  == Changelog ==
93
 
94
+ = 6.2.0 =
95
+ * Fixed Bug: Access policy was not applied to visitors
96
+ * Fixed Bug: Bug fixing that is related to unwanted PHP notices [https://forum.aamplugin.com/d/456-notice-undefined-index-expire](https://forum.aamplugin.com/d/456-notice-undefined-index-expire)
97
+ * Fixed Bug: Failing to delete multiple Access URI rules without reloading the page
98
+ * Added New: Ability to generate Access Policy from user's or role's settings [https://forum.aamplugin.com/d/446-announcement-about-upcoming-features/2](https://forum.aamplugin.com/d/446-announcement-about-upcoming-features/2)
99
+ * Added New: More granular control over the HIDDEN access option [https://forum.aamplugin.com/d/446-announcement-about-upcoming-features](https://forum.aamplugin.com/d/446-announcement-about-upcoming-features)
100
+ * Added New: Export/Import AAM settings [https://aamplugin.com/article/how-to-export-and-import-aam-settings](https://aamplugin.com/article/how-to-export-and-import-aam-settings)
101
+ * Added New: Ability to send support request from the AAM UI
102
+ * Added New: Multisite Settings Sync service that allows to sync access settings changes across all sites
103
+ * Added New: New hook `aam_updated_access_settings` that is triggered when access settings are stored
104
+ * Added New: New data type casting (*date) for Access Policy [https://aamplugin.com/reference/policy#markers](https://aamplugin.com/reference/policy#markers)
105
+ * Added New: New POLICY_PARAM access policy token [https://aamplugin.com/reference/policy#policy_param](https://aamplugin.com/reference/policy#policy_param)
106
+ * Added New: New WP_SITE access policy token [https://aamplugin.com/reference/policy#wp_site](https://aamplugin.com/reference/policy#wp_site)
107
+ * Change: [DATETIME](https://aamplugin.com/reference/policy#marker-datetime) access policy token returns time in UTC timezone
108
+ * Change: Enhanced security over AAM UI
109
+ * Change: Multiple internal simplifications and refactoring
110
+
111
  = 6.1.1 =
112
  * Fixed Bug: Unnecessary backslashes before displaying the access policy [https://forum.aamplugin.com/d/432-access-policy-ui-escaping-slashes](https://forum.aamplugin.com/d/432-access-policy-ui-escaping-slashes)
113
  * Fixed Bug: aam_access_dashboard custom capability caused "Access Denied"