Advanced Access Manager - Version 3.8.2

Version Description

  • Optimized AAM UI to manage large amount of posts and categories
  • Improved Multisite support
  • Improved UI
  • Fixed bug with Extensions tab
  • Added ability to check for extension updates manually
Download this release

Release Info

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

Code changes from version 3.8.1 to 3.8.2

Application/Backend/Feature/Extension.php CHANGED
@@ -114,6 +114,20 @@ class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
114
  return $response;
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /**
118
  * Install extension failure response
119
  *
114
  return $response;
115
  }
116
 
117
+ /**
118
+ *
119
+ * @return type
120
+ */
121
+ public function check() {
122
+ //grab the server extension list
123
+ $response = AAM_Core_Server::check();
124
+ if (!empty($response)) {
125
+ AAM_Core_API::updateOption('aam-extension-repository', $response);
126
+ }
127
+
128
+ return json_encode(array('status' => 'success'));
129
+ }
130
+
131
  /**
132
  * Install extension failure response
133
  *
Application/Backend/Feature/Post.php CHANGED
@@ -42,21 +42,51 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
42
  * @access protected
43
  */
44
  protected function retrieveTypeList() {
45
- $response = array('data' => array());
46
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  foreach (get_post_types(array(), 'objects') as $type) {
48
- if ($type->public) {
49
- $response['data'][] = array(
50
- $type->name,
51
- null,
52
- 'type',
53
- $type->labels->name,
54
- 'drilldown,manage'
55
- );
56
  }
57
  }
58
-
59
- return $response;
 
 
 
 
60
  }
61
 
62
  /**
@@ -71,8 +101,50 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
71
  * @access protected
72
  */
73
  protected function retrieveTypeContent($type) {
74
- $list = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  //first retrieve all hierarchical terms that belong to Post Type
77
  foreach (get_object_taxonomies($type, 'objects') as $tax) {
78
  if (is_taxonomy_hierarchical($tax->name)) {
@@ -80,26 +152,35 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
80
  $list = array_merge($list, $this->retrieveTermList($tax->name));
81
  }
82
  }
83
-
84
  //retrieve all posts
85
- $posts = get_posts(array(
86
- 'post_type' => $type, 'category' => 0,
87
- 'numberposts' => -1, 'post_status' => 'any'
88
- ));
89
-
90
- foreach ($posts as $post) {
91
- $list[] = array(
92
- $post->ID,
93
- get_edit_post_link($post->ID, 'link'),
94
- 'post',
95
- $post->post_title,
96
- 'manage,edit'
97
- );
 
 
 
 
 
98
  }
99
-
100
- return array('data' => $list);
 
 
 
 
101
  }
102
-
103
  /**
104
  * Retrieve term list
105
  *
@@ -112,16 +193,9 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
112
  protected function retrieveTermList($taxonomy) {
113
  $response = array();
114
 
115
- $terms = get_terms($taxonomy, array('hide_empty' => false));
116
-
117
- foreach ($terms as $term) {
118
- $response[] = array(
119
- $term->term_id . '|' . $taxonomy,
120
- get_edit_term_link($term->term_id, $taxonomy),
121
- 'term',
122
- $term->name,
123
- 'manage,edit'
124
- );
125
  }
126
 
127
  return $response;
42
  * @access protected
43
  */
44
  protected function retrieveTypeList() {
45
+ $list = $this->prepareTypeList();
46
+ $response = array(
47
+ 'data' => array(),
48
+ 'recordsTotal' => $list->total,
49
+ 'recordsFiltered' => $list->filtered
50
+ );
51
+
52
+ foreach ($list->records as $type) {
53
+ $response['data'][] = array(
54
+ $type->name,
55
+ null,
56
+ 'type',
57
+ $type->labels->name,
58
+ 'drilldown,manage'
59
+ );
60
+ }
61
+
62
+ return $response;
63
+ }
64
+
65
+ /**
66
+ *
67
+ * @return type
68
+ */
69
+ protected function prepareTypeList() {
70
+ $list = get_post_types(array(), 'objects');
71
+ $filtered = array();
72
+
73
+ //filters
74
+ $s = AAM_Core_Request::post('search.value');
75
+ $length = AAM_Core_Request::post('length');
76
+ $start = AAM_Core_Request::post('start');
77
+
78
  foreach (get_post_types(array(), 'objects') as $type) {
79
+ if ($type->public
80
+ && (empty($s) || stripos($type->labels->name, $s) !== false)) {
81
+ $filtered[] = $type;
 
 
 
 
 
82
  }
83
  }
84
+
85
+ return (object) array(
86
+ 'total' => count($list),
87
+ 'filtered' => count($filtered),
88
+ 'records' => array_slice($filtered, $start, $length)
89
+ );
90
  }
91
 
92
  /**
101
  * @access protected
102
  */
103
  protected function retrieveTypeContent($type) {
104
+ $list = $this->prepareContentList($type);
105
+ $response = array(
106
+ 'data' => array(),
107
+ 'recordsTotal' => $list->total,
108
+ 'recordsFiltered' => $list->filtered
109
+ );
110
+
111
+ foreach($list->records as $record) {
112
+ if (isset($record->ID)) { //this is post
113
+ $response['data'][] = array(
114
+ $record->ID,
115
+ get_edit_post_link($record->ID, 'link'),
116
+ 'post',
117
+ $record->post_title,
118
+ 'manage,edit'
119
+ );
120
+ } else { //term
121
+ $response['data'][] = array(
122
+ $record->term_id . '|' . $record->taxonomy,
123
+ get_edit_term_link($record->term_id, $record->taxonomy),
124
+ 'term',
125
+ $record->name,
126
+ 'manage,edit'
127
+ );
128
+ }
129
+ }
130
+
131
 
132
+ return $response;
133
+ }
134
+
135
+ /**
136
+ *
137
+ * @return type
138
+ */
139
+ protected function prepareContentList($type) {
140
+ $list = array();
141
+ $filtered = array();
142
+
143
+ //filters
144
+ $s = AAM_Core_Request::post('search.value');
145
+ $length = AAM_Core_Request::post('length');
146
+ $start = AAM_Core_Request::post('start');
147
+
148
  //first retrieve all hierarchical terms that belong to Post Type
149
  foreach (get_object_taxonomies($type, 'objects') as $tax) {
150
  if (is_taxonomy_hierarchical($tax->name)) {
152
  $list = array_merge($list, $this->retrieveTermList($tax->name));
153
  }
154
  }
155
+
156
  //retrieve all posts
157
+ $list = array_merge(
158
+ $list,
159
+ get_posts(array(
160
+ 'post_type' => $type, 'category' => 0,
161
+ 'numberposts' => -1, 'post_status' => 'any'
162
+ ))
163
+ );
164
+
165
+ foreach($list as $row) {
166
+ if (!empty($s)) {
167
+ if (isset($row->term_id) && stripos($row->name, $s) !== false) {
168
+ $filtered[] = $row;
169
+ } elseif (isset($row->ID) && stripos($row->post_title, $s) !== false) {
170
+ $filtered[] = $row;
171
+ }
172
+ } else {
173
+ $filtered[] = $row;
174
+ }
175
  }
176
+
177
+ return (object) array(
178
+ 'total' => count($list),
179
+ 'filtered' => count($filtered),
180
+ 'records' => array_slice($filtered, $start, $length)
181
+ );
182
  }
183
+
184
  /**
185
  * Retrieve term list
186
  *
193
  protected function retrieveTermList($taxonomy) {
194
  $response = array();
195
 
196
+ foreach (get_terms($taxonomy, array('hide_empty' => false)) as $term) {
197
+ $term->taxonomy = $taxonomy;
198
+ $response[] = $term;
 
 
 
 
 
 
 
199
  }
200
 
201
  return $response;
Application/Backend/Manager.php CHANGED
@@ -37,8 +37,13 @@ class AAM_Backend_Manager {
37
  add_action('admin_print_styles', array($this, 'printStylesheet'));
38
 
39
  //manager Admin Menu
40
- add_action('admin_menu', array($this, 'adminMenu'), 999);
41
-
 
 
 
 
 
42
  //manager AAM Ajax Requests
43
  add_action('wp_ajax_aam', array($this, 'ajax'));
44
  //manager AAM Features Content rendering
37
  add_action('admin_print_styles', array($this, 'printStylesheet'));
38
 
39
  //manager Admin Menu
40
+ if (is_multisite() && is_network_admin()) {
41
+ //register AAM in the network admin panel
42
+ add_action('network_admin_menu', array($this, 'adminMenu'), 999);
43
+ } else {
44
+ add_action('admin_menu', array($this, 'adminMenu'), 999);
45
+ }
46
+
47
  //manager AAM Ajax Requests
48
  add_action('wp_ajax_aam', array($this, 'ajax'));
49
  //manager AAM Features Content rendering
Application/Backend/phtml/extension.phtml CHANGED
@@ -29,11 +29,12 @@
29
  <?php if(count($commercial)) { ?><li role="presentation" class="active"><a href="#premium-extensions" aria-controls="premium-extensions" role="tab" data-toggle="tab"><i class='icon-basket'></i> <?php echo __('Premium', AAM_KEY); ?></a></li><?php } ?>
30
  <?php if(count($free)) { ?><li role="presentation" <?php echo (!count($commercial) ? 'class="active"' : ''); ?>><a href="#free-extensions" aria-controls="free-extensions" role="tab" data-toggle="tab"><i class='icon-download-cloud'></i> <?php echo __('Free', AAM_KEY); ?></a></li><?php } ?>
31
  <?php if(count($plugins)) { ?><li role="presentation" <?php echo (!count($commercial) && !count($free) ? 'class="active"' : ''); ?>><a href="#useful-plugins" aria-controls="help-plugins" role="tab" data-toggle="tab"><i class='icon-thumbs-up-alt'></i> <?php echo __('Useful Plugins', AAM_KEY); ?></a></li><?php } ?>
 
32
  </ul>
33
 
34
  <!-- Tab panes -->
35
  <div class="tab-content">
36
- <div role="tabpanel" class="tab-pane<?php echo (count($commercial) ? 'active' : ''); ?>" id="premium-extensions">
37
  <table class="table table-striped table-bordered">
38
  <tbody>
39
  <?php foreach ($commercial as $product) { ?>
@@ -107,7 +108,6 @@
107
  </table>
108
  </div>
109
  </div>
110
-
111
  </div>
112
 
113
  <div class="modal fade" id="extension-notification-modal" tabindex="-1" role="dialog">
29
  <?php if(count($commercial)) { ?><li role="presentation" class="active"><a href="#premium-extensions" aria-controls="premium-extensions" role="tab" data-toggle="tab"><i class='icon-basket'></i> <?php echo __('Premium', AAM_KEY); ?></a></li><?php } ?>
30
  <?php if(count($free)) { ?><li role="presentation" <?php echo (!count($commercial) ? 'class="active"' : ''); ?>><a href="#free-extensions" aria-controls="free-extensions" role="tab" data-toggle="tab"><i class='icon-download-cloud'></i> <?php echo __('Free', AAM_KEY); ?></a></li><?php } ?>
31
  <?php if(count($plugins)) { ?><li role="presentation" <?php echo (!count($commercial) && !count($free) ? 'class="active"' : ''); ?>><a href="#useful-plugins" aria-controls="help-plugins" role="tab" data-toggle="tab"><i class='icon-thumbs-up-alt'></i> <?php echo __('Useful Plugins', AAM_KEY); ?></a></li><?php } ?>
32
+ <li style="float:right;"><a href="#" id="update-check" data-toggle="tooltip" title="<?php echo __('Check For Updates', AAM_KEY); ?>"><small><i class="icon-arrows-cw"></i> <?php echo __('Check', AAM_KEY); ?></small></a></li>
33
  </ul>
34
 
35
  <!-- Tab panes -->
36
  <div class="tab-content">
37
+ <div role="tabpanel" class="tab-pane<?php echo (count($commercial) ? ' active' : ''); ?>" id="premium-extensions">
38
  <table class="table table-striped table-bordered">
39
  <tbody>
40
  <?php foreach ($commercial as $product) { ?>
108
  </table>
109
  </div>
110
  </div>
 
111
  </div>
112
 
113
  <div class="modal fade" id="extension-notification-modal" tabindex="-1" role="dialog">
Application/Backend/phtml/index.phtml CHANGED
@@ -56,6 +56,20 @@
56
  </div>
57
  <?php } ?>
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  <div class="metabox-holder">
60
  <?php do_action('aam-sidebar-ui-action', 'top'); ?>
61
 
56
  </div>
57
  <?php } ?>
58
 
59
+ <?php if (is_network_admin() && !defined('AAM_MULTISITE')) { ?>
60
+ <div class="metabox-holder">
61
+ <div class="postbox">
62
+ <h3 class="hndle text-warning">
63
+ <i class='icon-attention-circled'></i> <span><?php echo __('AAM Multisite', AAM_KEY); ?></span>
64
+ </h3>
65
+ <div class="inside">
66
+ <p class="aam-info"><?php echo AAM_Backend_View_Helper::preparePhrase('Install free [AAM Multisite extension] in order to manage all your sites from Network Admin', 'b'); ?></p>
67
+ <p class="text-center"><a href="#" class="btn btn-sm btn-primary aam-download-extension" data-license="AAMMULTISITE"><i class="icon-download-cloud"></i> <?php echo __('Install AAM Multisite', AAM_KEY); ?></a></p>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ <?php } ?>
72
+
73
  <div class="metabox-holder">
74
  <?php do_action('aam-sidebar-ui-action', 'top'); ?>
75
 
Application/Backend/phtml/object/metabox.phtml CHANGED
@@ -80,7 +80,7 @@
80
  </div>
81
  <div class="modal-body">
82
  <p class="aam-info">
83
- <?php echo __('Some metaboxes are conditional and appear on screen when certain conditions are met. For example metabox "Comments" appears only when you edit existing page. That is why if you do not see a desired metabox below, try to copy & paste full URL to a backend screen where that metabox appear.'); ?>
84
  </p>
85
  <div class="form-group">
86
  <label><?php echo __('Backend page URL', AAM_KEY); ?></label>
80
  </div>
81
  <div class="modal-body">
82
  <p class="aam-info">
83
+ <?php echo __('Some metaboxes are conditional and appear on an edit screen when certain conditions are met. For example metabox "Comments" appears only for existing page and not for new page. That is why if you do not see a desired metabox below, try to copy & paste full URL to an edit screen where that metabox appears.'); ?>
84
  </p>
85
  <div class="form-group">
86
  <label><?php echo __('Backend page URL', AAM_KEY); ?></label>
Application/Backend/phtml/object/post.phtml CHANGED
@@ -24,7 +24,7 @@
24
 
25
  <div class="aam-overwrite hidden" id="post-overwritten">
26
  <span><i class="icon-attention-circled"></i> <?php echo __('Settings are overwritten', AAM_KEY); ?></span>
27
- <span><a href="#" id="post-reset"><?php echo __('Reset', AAM_KEY); ?></a></span>
28
  </div>
29
 
30
  <div class="aam-inherited hidden" id="post-inherited">
@@ -157,6 +157,7 @@
157
  <?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
158
  </tbody>
159
  </table>
 
160
  <a href="#" class="btn btn-xs btn-primary post-back">&Lt; <?php echo __('Go Back', AAM_KEY); ?></a>
161
  </div>
162
  </div>
24
 
25
  <div class="aam-overwrite hidden" id="post-overwritten">
26
  <span><i class="icon-attention-circled"></i> <?php echo __('Settings are overwritten', AAM_KEY); ?></span>
27
+ <span><a href="#" id="post-reset" class="btn btn-xs btn-danger"><?php echo __('Reset', AAM_KEY); ?></a></span>
28
  </div>
29
 
30
  <div class="aam-inherited hidden" id="post-inherited">
157
  <?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
158
  </tbody>
159
  </table>
160
+
161
  <a href="#" class="btn btn-xs btn-primary post-back">&Lt; <?php echo __('Go Back', AAM_KEY); ?></a>
162
  </div>
163
  </div>
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: Manage User and Role Access to WordPress Backend and Frontend.
6
- Version: 3.8.1
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://www.vasyltech.com
9
 
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: Manage User and Role Access to WordPress Backend and Frontend.
6
+ Version: 3.8.2
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://www.vasyltech.com
9
 
media/css/aam.css CHANGED
@@ -62,45 +62,6 @@
62
  /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
63
  }
64
 
65
- .icon-spin4:before { content: '\e800'; } /* '' */
66
- .icon-eye-off:before { content: '\e801'; } /* '' */
67
- .icon-attention-circled:before { content: '\e802'; } /* '' */
68
- .icon-user-secret:before { content: '\e803'; } /* '' */
69
- .icon-users:before { content: '\e804'; } /* '' */
70
- .icon-eye:before { content: '\e805'; } /* '' */
71
- .icon-basket:before { content: '\e806'; } /* '' */
72
- .icon-user:before { content: '\e807'; } /* '' */
73
- .icon-trash-empty:before { content: '\e808'; } /* '' */
74
- .icon-download-cloud:before { content: '\e809'; } /* '' */
75
- .icon-github:before { content: '\e80a'; } /* '' */
76
- .icon-cog:before { content: '\e80b'; } /* '' */
77
- .icon-lock:before { content: '\e80c'; } /* '' */
78
- .icon-twitter:before { content: '\e80d'; } /* '' */
79
- .icon-sort-down:before { content: '\e80e'; } /* '' */
80
- .icon-pencil:before { content: '\e80f'; } /* '' */
81
- .icon-arrows-cw:before { content: '\e810'; } /* '' */
82
- .icon-sort-up:before { content: '\e811'; } /* '' */
83
- .icon-sort:before { content: '\e812'; } /* '' */
84
- .icon-lock-open-alt:before { content: '\e813'; } /* '' */
85
- .icon-plus:before { content: '\e814'; } /* '' */
86
- .icon-filter:before { content: '\e815'; } /* '' */
87
- .icon-check:before { content: '\e816'; } /* '' */
88
- .icon-help-circled:before { content: '\e817'; } /* '' */
89
- .icon-box:before { content: '\e818'; } /* '' */
90
- .icon-folder:before { content: '\e819'; } /* '' */
91
- .icon-check-empty:before { content: '\e81a'; } /* '' */
92
- .icon-doc-text-inv:before { content: '\e81b'; } /* '' */
93
- .icon-home:before { content: '\e81c'; } /* '' */
94
- .icon-angle-double-right:before { content: '\e81d'; } /* '' */
95
- .icon-facebook:before { content: '\e81e'; } /* '' */
96
- .icon-star:before { content: '\e81f'; } /* '' */
97
- .icon-list:before { content: '\e820'; } /* 'î  ' */
98
- .icon-level-down:before { content: '\e821'; } /* 'î ¡' */
99
- .icon-link:before { content: '\e822'; } /* 'î ¢' */
100
- .icon-circle:before { content: '\f111'; } /* '' */
101
- .icon-thumbs-up-alt:before { content: '\f164'; } /* '' */
102
- .icon-circle-thin:before { content: '\f1db'; } /* '' */
103
-
104
  .icon-spin4:before { content: '\e800'; } /* '' */
105
  .icon-user-secret:before { content: '\e801'; } /* '' */
106
  .icon-folder:before { content: '\e802'; } /* '' */
@@ -167,7 +128,6 @@
167
  .icon-circle-thin:before { content: '\f1db'; } /* '' */
168
  .icon-clone:before { content: '\f24d'; } /* '' */
169
 
170
-
171
  .animate-spin {
172
  -moz-animation: spin 2s infinite linear;
173
  -o-animation: spin 2s infinite linear;
@@ -620,6 +580,11 @@ input[type=radio]:checked + label:before {
620
  float: right;
621
  }
622
 
 
 
 
 
 
623
  .row.aam-bordered {
624
  margin-left: 0;
625
  margin-right: 0;
@@ -909,12 +874,19 @@ input[type=radio]:checked + label:before {
909
  }
910
 
911
  .dataTables_processing {
912
- border: 1px solid #cccccc;
913
  color: #337ab7;
914
  font-size: 0.8em;
915
  font-weight: 700;
916
  margin-top: -8px;
917
- padding: 2px 5px;
 
 
 
 
 
 
 
 
918
  }
919
 
920
  .aam-loading {
62
  /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  .icon-spin4:before { content: '\e800'; } /* '' */
66
  .icon-user-secret:before { content: '\e801'; } /* '' */
67
  .icon-folder:before { content: '\e802'; } /* '' */
128
  .icon-circle-thin:before { content: '\f1db'; } /* '' */
129
  .icon-clone:before { content: '\f24d'; } /* '' */
130
 
 
131
  .animate-spin {
132
  -moz-animation: spin 2s infinite linear;
133
  -o-animation: spin 2s infinite linear;
580
  float: right;
581
  }
582
 
583
+ .aam-overwrite .btn {
584
+ margin-top: -3px;
585
+ border: 0;
586
+ }
587
+
588
  .row.aam-bordered {
589
  margin-left: 0;
590
  margin-right: 0;
874
  }
875
 
876
  .dataTables_processing {
 
877
  color: #337ab7;
878
  font-size: 0.8em;
879
  font-weight: 700;
880
  margin-top: -8px;
881
+ padding: 30px 5px;
882
+ position: absolute;
883
+ top: 5px;
884
+ left: 15px;
885
+ width: calc(100% - 30px);
886
+ height: 100%;
887
+ background-color: #FFFFFF;
888
+ opacity: 0.6;
889
+ text-align: center;
890
  }
891
 
892
  .aam-loading {
media/js/aam-ui.js CHANGED
@@ -1223,15 +1223,6 @@
1223
  type: null
1224
  };
1225
 
1226
- /**
1227
- * Ajax query queue
1228
- *
1229
- * Is used to get the posts/terms breadcrumbs
1230
- *
1231
- * @type Array
1232
- */
1233
- var queue = new Array();
1234
-
1235
  /**
1236
  *
1237
  * @param {type} type
@@ -1334,6 +1325,8 @@
1334
  $('#post-parent').text(aam.__('default settings'));
1335
  } else if (response.meta.inherited === 'term') {
1336
  $('#post-parent').text(aam.__('parent category'));
 
 
1337
  }
1338
  $('#post-inherited').removeClass('hidden');
1339
  }
@@ -1411,20 +1404,18 @@
1411
  autoWidth: false,
1412
  ordering: false,
1413
  pagingType: 'simple',
1414
- serverSide: false,
1415
- stateSave: true,
1416
  ajax: {
1417
  url: aamLocal.ajaxurl,
1418
  type: 'POST',
1419
- data: function () {
1420
- return {
1421
- action: 'aam',
1422
- sub_action: 'Post.getTable',
1423
- _ajax_nonce: aamLocal.nonce,
1424
- subject: aam.getSubject().type,
1425
- subjectId: aam.getSubject().id,
1426
- type: filter.type
1427
- };
1428
  }
1429
  },
1430
  columnDefs: [
@@ -1437,17 +1428,6 @@
1437
  infoFiltered: '',
1438
  lengthMenu: '_MENU_'
1439
  },
1440
- drawCallback: function () {
1441
- setTimeout(function () {
1442
- if (queue.length) {
1443
- queue.pop().call();
1444
- }
1445
- }, 700);
1446
- },
1447
- initComplete: function () {
1448
- //reset the ajax queue
1449
- queue = new Array();
1450
- },
1451
  rowCallback: function (row, data) {
1452
  //object type icon
1453
  switch (data[2]) {
@@ -1476,8 +1456,7 @@
1476
  );
1477
  //set filter
1478
  filter[data[2]] = data[0];
1479
- //reset the ajax queue
1480
- queue = new Array();
1481
  //finally reload the data
1482
  $('#post-list').DataTable().ajax.reload();
1483
 
@@ -1545,9 +1524,6 @@
1545
  $('.aam-post-breadcrumb').delegate('a', 'click', function (event) {
1546
  event.preventDefault();
1547
 
1548
- //stop any pending ajax calls
1549
- queue = new Array();
1550
-
1551
  filter.type = $(this).data('id');
1552
  $('#post-list').DataTable().ajax.reload();
1553
  $(this).nextAll().remove();
@@ -1846,6 +1822,35 @@
1846
  );
1847
  $('#extension-notification-modal').modal('hide');
1848
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1849
  }
1850
 
1851
  aam.addHook('init', initialize);
1223
  type: null
1224
  };
1225
 
 
 
 
 
 
 
 
 
 
1226
  /**
1227
  *
1228
  * @param {type} type
1325
  $('#post-parent').text(aam.__('default settings'));
1326
  } else if (response.meta.inherited === 'term') {
1327
  $('#post-parent').text(aam.__('parent category'));
1328
+ } else if (response.meta.inherited === 'post') {
1329
+ $('#post-parent').text(aam.__('parent post'));
1330
  }
1331
  $('#post-inherited').removeClass('hidden');
1332
  }
1404
  autoWidth: false,
1405
  ordering: false,
1406
  pagingType: 'simple',
1407
+ processing: true,
1408
+ serverSide: true,
1409
  ajax: {
1410
  url: aamLocal.ajaxurl,
1411
  type: 'POST',
1412
+ data: function (data) {
1413
+ data.action = 'aam';
1414
+ data.sub_action = 'Post.getTable';
1415
+ data._ajax_nonce = aamLocal.nonce;
1416
+ data.subject = aam.getSubject().type;
1417
+ data.subjectId = aam.getSubject().id;
1418
+ data.type = filter.type;
 
 
1419
  }
1420
  },
1421
  columnDefs: [
1428
  infoFiltered: '',
1429
  lengthMenu: '_MENU_'
1430
  },
 
 
 
 
 
 
 
 
 
 
 
1431
  rowCallback: function (row, data) {
1432
  //object type icon
1433
  switch (data[2]) {
1456
  );
1457
  //set filter
1458
  filter[data[2]] = data[0];
1459
+
 
1460
  //finally reload the data
1461
  $('#post-list').DataTable().ajax.reload();
1462
 
1524
  $('.aam-post-breadcrumb').delegate('a', 'click', function (event) {
1525
  event.preventDefault();
1526
 
 
 
 
1527
  filter.type = $(this).data('id');
1528
  $('#post-list').DataTable().ajax.reload();
1529
  $(this).nextAll().remove();
1822
  );
1823
  $('#extension-notification-modal').modal('hide');
1824
  });
1825
+
1826
+ $('#update-check').bind('click', function(event) {
1827
+ event.preventDefault();
1828
+
1829
+ $.ajax(aamLocal.ajaxurl, {
1830
+ type: 'POST',
1831
+ dataType: 'json',
1832
+ async: false,
1833
+ data: {
1834
+ action: 'aam',
1835
+ sub_action: 'Extension.check',
1836
+ _ajax_nonce: aamLocal.nonce
1837
+ },
1838
+ beforeSend: function () {
1839
+ $('#update-check i').attr('class', 'icon-spin4 animate-spin');
1840
+ },
1841
+ success: function (response) {
1842
+ if (response.status === 'success') {
1843
+ location.reload();
1844
+ }
1845
+ },
1846
+ error: function () {
1847
+ aam.notification('danger', aam.__('Application error'));
1848
+ },
1849
+ complete: function () {
1850
+ $('#update-check i').attr('class', 'icon-arrows-cw');
1851
+ }
1852
+ });
1853
+ });
1854
  }
1855
 
1856
  aam.addHook('init', initialize);
readme.txt CHANGED
@@ -3,10 +3,10 @@ Contributors: vasyltech
3
  Tags: access, role, user, visitor, capability, page, post, permission, security, redirect
4
  Requires at least: 3.8
5
  Tested up to: 4.6.1
6
- Stable tag: 3.8.1
7
 
8
- One of the best tools in WordPress repository to manage access to your posts,
9
- pages, categories and backend area for users, roles and visitors.
10
 
11
  == Description ==
12
 
@@ -17,8 +17,8 @@ pages, categories and backend area for users, roles and visitors.
17
  AAM is well documented so even inexperienced WordPress user can easily understand
18
  how to use it in the most efficient way.
19
 
20
- Notice! Some of the features are limited with the basic version and you may
21
- consider to get recommended premium extension.
22
 
23
  AAM the main objectives are:
24
 
@@ -64,6 +64,13 @@ out more about the Advanced Access Manager.
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
 
 
67
  = 3.8.1 =
68
  * Minor refactoring
69
  * UI improvements
3
  Tags: access, role, user, visitor, capability, page, post, permission, security, redirect
4
  Requires at least: 3.8
5
  Tested up to: 4.6.1
6
+ Stable tag: 3.8.2
7
 
8
+ Great WordPress plugin to manage access to your posts, pages, categories and
9
+ backend area for users, roles and visitors.
10
 
11
  == Description ==
12
 
17
  AAM is well documented so even inexperienced WordPress user can easily understand
18
  how to use it in the most efficient way.
19
 
20
+ Please Note! Some of the features are limited with the basic version and if
21
+ necessary, consider to get recommended free or premium extension.
22
 
23
  AAM the main objectives are:
24
 
64
 
65
  == Changelog ==
66
 
67
+ = 3.8.2 =
68
+ * Optimized AAM UI to manage large amount of posts and categories
69
+ * Improved Multisite support
70
+ * Improved UI
71
+ * Fixed bug with Extensions tab
72
+ * Added ability to check for extension updates manually
73
+
74
  = 3.8.1 =
75
  * Minor refactoring
76
  * UI improvements