Advanced Access Manager - Version 3.5

Version Description

  • Improved access control for Posts & Pages
  • Introduced Access Manager metabox to Post edit screen
  • Added Access action to list of Posts and Pages
  • Improved UI
  • Deprecated Skeleton extension in favor to upcoming totally new concept
  • Fixed bug with metaboxes initialization when backend filtering is OFF
Download this release

Release Info

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

Code changes from version 3.4.2 to 3.5

Application/Backend/Feature/Extension.php CHANGED
@@ -107,7 +107,7 @@ class AAM_Backend_Feature_Extension extends AAM_Backend_Feature_Abstract {
107
  } else {
108
  $response = json_encode(array(
109
  'status' => 'failure',
110
- 'error' => __('License key is missing.', AAM_KEY)
111
  ));
112
  }
113
 
107
  } else {
108
  $response = json_encode(array(
109
  'status' => 'failure',
110
+ 'error' => __('License key is missing.', AAM_KEY)
111
  ));
112
  }
113
 
Application/Backend/Feature/Post.php CHANGED
@@ -34,68 +34,6 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
34
  return $this->wrapTable($response);
35
  }
36
 
37
- /**
38
- * Get breadcrumb for a post or term
39
- *
40
- * @return string
41
- *
42
- * @access public
43
- */
44
- public function getBreadcrumb() {
45
- $type = AAM_Core_Request::post('type');
46
-
47
- if ($type == 'term') {
48
- $breadcrub = $this->renderTermBreadcrumb();
49
- } else {
50
- $breadcrub = $this->renderPostBreadcrumb();
51
- }
52
-
53
- return json_encode(array(
54
- 'status' => 'success',
55
- 'breadcrumb' => ($breadcrub ? $breadcrub : __('Base Level', AAM_KEY))
56
- ));
57
- }
58
-
59
- /**
60
- * Render term breadcrumb
61
- *
62
- * @return string
63
- *
64
- * @access protected
65
- */
66
- protected function renderTermBreadcrumb() {
67
- list($term, $taxonomy) = explode('|', AAM_Core_Request::post('id'));
68
- $ancestors = array_reverse(get_ancestors($term, $taxonomy, 'taxonomy'));
69
-
70
- $breadcrumb = array();
71
- foreach ($ancestors as $id) {
72
- $breadcrumb[] = get_term($id, $taxonomy)->name;
73
- }
74
-
75
- return implode(' ≫ ', $breadcrumb);
76
- }
77
-
78
- /**
79
- * Render post breadcrumb
80
- *
81
- * @return string
82
- *
83
- * @access protected
84
- */
85
- protected function renderPostBreadcrumb() {
86
- $post = get_post(AAM_Core_Request::post('id'));
87
- $terms = wp_get_object_terms($post->ID, get_object_taxonomies($post));
88
-
89
- $breadcrumb = array();
90
- foreach ($terms as $term) {
91
- if (is_taxonomy_hierarchical($term->taxonomy)) {
92
- $breadcrumb[] = $term->name;
93
- }
94
- }
95
-
96
- return implode('; ', $breadcrumb);
97
- }
98
-
99
  /**
100
  * Retrieve list of registered post types
101
  *
@@ -323,6 +261,20 @@ class AAM_Backend_Feature_Post extends AAM_Backend_Feature_Abstract {
323
  public static function getTemplate() {
324
  return 'object/post.phtml';
325
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
 
327
  /**
328
  * Register Posts & Pages feature
34
  return $this->wrapTable($response);
35
  }
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  /**
38
  * Retrieve list of registered post types
39
  *
261
  public static function getTemplate() {
262
  return 'object/post.phtml';
263
  }
264
+
265
+ /**
266
+ *
267
+ * @return type
268
+ */
269
+ public function getCurrentPost() {
270
+ $id = intval(AAM_Core_Request::post('oid'));
271
+
272
+ if ($id) {
273
+ $post = get_post($id);
274
+ }
275
+
276
+ return (isset($post) ? $post : null);
277
+ }
278
 
279
  /**
280
  * Register Posts & Pages feature
Application/Backend/Feature/ProductList.php CHANGED
@@ -9,12 +9,12 @@
9
 
10
  return array(
11
  array(
12
- 'title' => 'AAM Plus Package',
13
  'id' => 'AAM Plus Package',
14
  'type' => 'commercial',
15
  'cost' => '$30',
16
  'currency' => 'USD',
17
- 'description' => __('Setup access to unlimited number of posts, pages or custom post types as well as define default access to ALL posts, pages, custom post types, categories or custom taxonomies.', AAM_KEY),
18
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FGAHULDEFZV4U',
19
  'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Plus Package'),
20
  'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Plus Package')
@@ -69,20 +69,11 @@ return array(
69
  'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Post Filter'),
70
  'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Post Filter')
71
  ),
72
- array(
73
- 'title' => 'AAM Skeleton Extension',
74
- 'id' => 'AAM Skeleton Extension',
75
- 'type' => 'GNU',
76
- 'license' => 'SKELETONEXT',
77
- 'description' => __('Skeleton for custom AAM extension. Please find all necessary documentation inside the source code.', AAM_KEY),
78
- 'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Skeleton Extension'),
79
- 'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Skeleton Extension')
80
- ),
81
  array(
82
  'title' => 'CodePinch',
83
  'id' => 'WP Error Fix',
84
  'type' => 'plugin',
85
- 'description' => __('Our patent-pending technology provides solutions to PHP errors within hours, preventing costly maintenance time and keeping your WordPress site error.', AAM_KEY),
86
  'status' => AAM_Core_Repository::getInstance()->pluginStatus('WP Error Fix')
87
  ),
88
  array(
9
 
10
  return array(
11
  array(
12
+ 'title' => '<span class="aam-highlight">AAM Plus Package</span>',
13
  'id' => 'AAM Plus Package',
14
  'type' => 'commercial',
15
  'cost' => '$30',
16
  'currency' => 'USD',
17
+ 'description' => __('Out best selling extension that allows you to setup access to unlimited number of posts, pages or custom post types as well as define default access to ALL posts, pages, custom post types, categories or custom taxonomies.', AAM_KEY),
18
  'storeURL' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FGAHULDEFZV4U',
19
  'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Plus Package'),
20
  'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Plus Package')
69
  'status' => AAM_Core_Repository::getInstance()->extensionStatus('AAM Post Filter'),
70
  'version' => AAM_Core_Repository::getInstance()->getExtensionVersion('AAM Post Filter')
71
  ),
 
 
 
 
 
 
 
 
 
72
  array(
73
  'title' => 'CodePinch',
74
  'id' => 'WP Error Fix',
75
  'type' => 'plugin',
76
+ 'description' => '<span class="aam-highlight">Highly recommended!</span> ' . __('Patent-pending technology that provides solutions to PHP errors within hours, preventing costly maintenance time and keeping your WordPress site error.', AAM_KEY) . ' <a href="http://codepinch.io" target="_blank">Read more.</a>',
77
  'status' => AAM_Core_Repository::getInstance()->pluginStatus('WP Error Fix')
78
  ),
79
  array(
Application/Backend/Filter.php CHANGED
@@ -38,6 +38,9 @@ class AAM_Backend_Filter {
38
  //manager WordPress metaboxes
39
  add_action("in_admin_header", array($this, 'metaboxes'), 999);
40
 
 
 
 
41
  //post restrictions
42
  add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
43
  add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
@@ -62,6 +65,41 @@ class AAM_Backend_Filter {
62
  add_filter('screen_options_show_screen', array($this, 'screenOptions'));
63
  add_filter('contextual_help', array($this, 'helpOptions'), 10, 3);
64
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  /**
67
  * Filter the Admin Menu
@@ -98,10 +136,7 @@ class AAM_Backend_Filter {
98
  $screen = '';
99
  }
100
 
101
- if (AAM_Core_Request::get('init') == 'metabox') {
102
- $model = new AAM_Backend_Feature_Metabox;
103
- $model->initialize($screen);
104
- } else {
105
  AAM::getUser()->getObject('metabox')->filterBackend($screen);
106
  }
107
  }
38
  //manager WordPress metaboxes
39
  add_action("in_admin_header", array($this, 'metaboxes'), 999);
40
 
41
+ //control admin area
42
+ add_action('admin_init', array($this, 'adminInit'));
43
+
44
  //post restrictions
45
  add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
46
  add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
65
  add_filter('screen_options_show_screen', array($this, 'screenOptions'));
66
  add_filter('contextual_help', array($this, 'helpOptions'), 10, 3);
67
  }
68
+
69
+ /**
70
+ * Control Admin Area access
71
+ *
72
+ * @return void
73
+ *
74
+ * @access public
75
+ * @since 3.3
76
+ */
77
+ public function adminInit() {
78
+ global $plugin_page;
79
+
80
+ //compile menu
81
+ if (empty($plugin_page)){
82
+ $menu = basename(AAM_Core_Request::server('SCRIPT_NAME'));
83
+
84
+ $taxonomy = AAM_Core_Request::get('taxonomy');
85
+ $postType = AAM_Core_Request::get('post_type');
86
+ $page = AAM_Core_Request::get('page');
87
+
88
+ if (!empty($taxonomy)) {
89
+ $menu .= '?taxonomy=' . $taxonomy;
90
+ } elseif (!empty($postType)) {
91
+ $menu .= '?post_type=' . $postType;
92
+ } elseif (!empty($page)) {
93
+ $menu .= '?page=' . $page;
94
+ }
95
+ } else {
96
+ $menu = $plugin_page;
97
+ }
98
+
99
+ if (AAM::getUser()->getObject('menu')->has($menu)) {
100
+ AAM_Core_API::reject('backend');
101
+ }
102
+ }
103
 
104
  /**
105
  * Filter the Admin Menu
136
  $screen = '';
137
  }
138
 
139
+ if (AAM_Core_Request::get('init') != 'metabox') {
 
 
 
140
  AAM::getUser()->getObject('metabox')->filterBackend($screen);
141
  }
142
  }
Application/Backend/Manager.php CHANGED
@@ -48,8 +48,15 @@ class AAM_Backend_Manager {
48
  //manage access action to the user list
49
  add_filter('user_row_actions', array($this, 'userActions'), 10, 2);
50
 
51
- //control admin area
52
- add_action('admin_init', array($this, 'adminInit'));
 
 
 
 
 
 
 
53
 
54
  //check extension version
55
  $this->checkExtensionList();
@@ -60,41 +67,6 @@ class AAM_Backend_Manager {
60
  }
61
  }
62
 
63
- /**
64
- * Control Admin Area access
65
- *
66
- * @return void
67
- *
68
- * @access public
69
- * @since 3.3
70
- */
71
- public function adminInit() {
72
- global $plugin_page;
73
-
74
- //compile menu
75
- if (empty($plugin_page)){
76
- $menu = basename(AAM_Core_Request::server('SCRIPT_NAME'));
77
-
78
- $taxonomy = AAM_Core_Request::get('taxonomy');
79
- $postType = AAM_Core_Request::get('post_type');
80
- $page = AAM_Core_Request::get('page');
81
-
82
- if (!empty($taxonomy)) {
83
- $menu .= '?taxonomy=' . $taxonomy;
84
- } elseif (!empty($postType)) {
85
- $menu .= '?post_type=' . $postType;
86
- } elseif (!empty($page)) {
87
- $menu .= '?page=' . $page;
88
- }
89
- } else {
90
- $menu = $plugin_page;
91
- }
92
-
93
- if (AAM::getUser()->getObject('menu')->has($menu)) {
94
- AAM_Core_API::reject('backend');
95
- }
96
- }
97
-
98
  /**
99
  *
100
  */
@@ -141,6 +113,53 @@ class AAM_Backend_Manager {
141
  }
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  /**
145
  * Add extra column to search in for User search
146
  *
@@ -156,6 +175,25 @@ class AAM_Backend_Manager {
156
  return $columns;
157
  }
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  /**
160
  * Add "Manage Access" action
161
  *
@@ -174,8 +212,8 @@ class AAM_Backend_Manager {
174
  if (current_user_can($cap, $user->ID)) {
175
  $url = admin_url('admin.php?page=aam&user=' . $user->ID);
176
 
177
- $actions['aam'] = '<a href="' . $url . '">';
178
- $actions['aam'] .= __('AAM', AAM_KEY) . '</a>';
179
  }
180
 
181
  return $actions;
@@ -232,8 +270,11 @@ class AAM_Backend_Manager {
232
  }
233
 
234
  /**
 
 
 
235
  *
236
- * @return type
237
  */
238
  protected function getCurrentSubject() {
239
  $userId = AAM_Core_Request::get('user');
48
  //manage access action to the user list
49
  add_filter('user_row_actions', array($this, 'userActions'), 10, 2);
50
 
51
+ //register custom access control metabox
52
+ add_action('add_meta_boxes', array($this, 'metabox'));
53
+
54
+ //manager WordPress metaboxes
55
+ add_action("in_admin_header", array($this, 'initMetaboxes'), 999);
56
+
57
+ //extend post inline actions
58
+ add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
59
+ add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
60
 
61
  //check extension version
62
  $this->checkExtensionList();
67
  }
68
  }
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  /**
71
  *
72
  */
113
  }
114
  }
115
 
116
+ /**
117
+ *
118
+ */
119
+ public function metabox() {
120
+ add_meta_box(
121
+ 'aam-acceess-control',
122
+ __('Access Manager', AAM_KEY),
123
+ array($this, 'renderMetabox'),
124
+ null,
125
+ 'side',
126
+ 'high'
127
+ );
128
+ }
129
+
130
+ /**
131
+ *
132
+ * @global type $post
133
+ */
134
+ public function renderMetabox() {
135
+ echo AAM_Backend_View::getInstance()->renderMetabox();
136
+ }
137
+
138
+ /**
139
+ * Hanlde Metabox initialization process
140
+ *
141
+ * @return void
142
+ *
143
+ * @access public
144
+ */
145
+ public function initMetaboxes() {
146
+ global $post;
147
+
148
+ if (AAM_Core_Request::get('init') == 'metabox') {
149
+ //make sure that nobody is playing with screen options
150
+ if ($post instanceof WP_Post) {
151
+ $screen = $post->post_type;
152
+ } elseif ($screen_object = get_current_screen()) {
153
+ $screen = $screen_object->id;
154
+ } else {
155
+ $screen = '';
156
+ }
157
+
158
+ $model = new AAM_Backend_Feature_Metabox;
159
+ $model->initialize($screen);
160
+ }
161
+ }
162
+
163
  /**
164
  * Add extra column to search in for User search
165
  *
175
  return $columns;
176
  }
177
 
178
+ /**
179
+ *
180
+ * @param type $actions
181
+ * @param type $post
182
+ * @return string
183
+ */
184
+ public function postRowActions($actions, $post) {
185
+ $cap = AAM_Core_Config::get('page.capability', 'administrator');
186
+
187
+ if (AAM::getUser()->hasCapability($cap)) {
188
+ $url = admin_url('admin.php?page=aam&oid=' . $post->ID . '#post');
189
+
190
+ $actions['aam'] = '<a href="' . $url . '" target="_blank">';
191
+ $actions['aam'] .= __('Access', AAM_KEY) . '</a>';
192
+ }
193
+
194
+ return $actions;
195
+ }
196
+
197
  /**
198
  * Add "Manage Access" action
199
  *
212
  if (current_user_can($cap, $user->ID)) {
213
  $url = admin_url('admin.php?page=aam&user=' . $user->ID);
214
 
215
+ $actions['aam'] = '<a href="' . $url . '" target="_blank">';
216
+ $actions['aam'] .= __('Access', AAM_KEY) . '</a>';
217
  }
218
 
219
  return $actions;
270
  }
271
 
272
  /**
273
+ * Get current subject
274
+ *
275
+ * @return stdClass
276
  *
277
+ * @access protected
278
  */
279
  protected function getCurrentSubject() {
280
  $userId = AAM_Core_Request::get('user');
Application/Backend/View.php CHANGED
@@ -78,6 +78,26 @@ class AAM_Backend_View {
78
 
79
  return $content;
80
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  /**
83
  * Process the ajax call
78
 
79
  return $content;
80
  }
81
+
82
+ /**
83
+ * Run the Manager
84
+ *
85
+ * @return string
86
+ *
87
+ * @access public
88
+ */
89
+ public function renderMetabox() {
90
+ global $post;
91
+
92
+ $url = admin_url('admin.php?page=aam&oid=' . $post->ID . '#post');
93
+
94
+ ob_start();
95
+ require_once(dirname(__FILE__) . '/phtml/metabox.phtml');
96
+ $content = ob_get_contents();
97
+ ob_end_clean();
98
+
99
+ return $content;
100
+ }
101
 
102
  /**
103
  * Process the ajax call
Application/Backend/phtml/contact.phtml CHANGED
@@ -13,10 +13,9 @@
13
  <li>Be patient. It might take up to 3 business days for us to response.</li>
14
  </ol>
15
  <h3 class="aam-info text-center">
16
- e-mail: vasyl@vasyltech.com
17
  </h3>
18
  </div>
19
  </div>
20
  </div>
21
- <?php
22
- }
13
  <li>Be patient. It might take up to 3 business days for us to response.</li>
14
  </ol>
15
  <h3 class="aam-info text-center">
16
+ e-mail: <a href="mailto:vasyl@vasyltech.com" class="aam-highlight">vasyl@vasyltech.com</a>
17
  </h3>
18
  </div>
19
  </div>
20
  </div>
21
+ <?php }
 
Application/Backend/phtml/extension.phtml CHANGED
@@ -154,5 +154,4 @@
154
  </div>
155
  </div>
156
  </div>
157
- <?php
158
- }
154
  </div>
155
  </div>
156
  </div>
157
+ <?php }
 
Application/Backend/phtml/index.phtml CHANGED
@@ -27,7 +27,6 @@
27
  <div class="aam-info aam-social">
28
  <a target="_blank" href="http://vasyltech.com/advanced-access-manager"><i class="icon-home"></i></a>
29
  <a target="_blank" href="http://twitter.com/vasyltech"><i class="icon-twitter"></i></a>
30
- <a target="_blank" href="https://github.com/VasylTech/advanced-access-manager"><i class="icon-github"></i></a>
31
  <a target="_blank" href="https://www.facebook.com/vasyltech"><i class="icon-facebook"></i></a>
32
  <a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/advanced-access-manager"><i class="icon-star"></i></a>
33
  </div>
@@ -234,5 +233,4 @@
234
  </div>
235
  </div>
236
  </div>
237
- <?php
238
- }
27
  <div class="aam-info aam-social">
28
  <a target="_blank" href="http://vasyltech.com/advanced-access-manager"><i class="icon-home"></i></a>
29
  <a target="_blank" href="http://twitter.com/vasyltech"><i class="icon-twitter"></i></a>
 
30
  <a target="_blank" href="https://www.facebook.com/vasyltech"><i class="icon-facebook"></i></a>
31
  <a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/advanced-access-manager"><i class="icon-star"></i></a>
32
  </div>
233
  </div>
234
  </div>
235
  </div>
236
+ <?php }
 
Application/Backend/phtml/main-panel.phtml CHANGED
@@ -20,5 +20,4 @@
20
  ?>
21
  </div>
22
  </div>
23
- <?php
24
- }
20
  ?>
21
  </div>
22
  </div>
23
+ <?php }
 
Application/Backend/phtml/metabox.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <a href="<?php echo $url; ?>" class="page-title-action" target="_blank" style="display: block; margin: 17px 5px 0px; text-align:center;"><?php echo __('Manage Access', AAM_KEY); ?></a>
3
+ <?php }
Application/Backend/phtml/object/post.phtml CHANGED
@@ -3,15 +3,23 @@
3
  <?php if (!defined('AAM_PLUS_PACKAGE')) { ?>
4
  <div class="row">
5
  <div class="col-xs-12">
6
- <p class="aam-info">
7
  <?php echo AAM_Backend_View_Helper::preparePhrase('You are allowed to manage access up to 10 posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension to unlock this limitation.', 'b'); ?>
8
  </p>
9
  </div>
10
  </div>
11
  <?php } ?>
 
 
12
 
13
  <div class="aam-post-breadcrumb">
14
  <a href="#" data-level="root"><i class="icon-home"></i> <?php echo __('Root', AAM_KEY); ?></a>
 
 
 
 
 
 
15
  </div>
16
 
17
  <div class="aam-overwrite hidden" id="post-overwritten">
@@ -23,6 +31,10 @@
23
  <span><?php echo __('Settings inherited from', AAM_KEY); ?> <strong id="post-parent"></strong></span>
24
  <span></span>
25
  </div>
 
 
 
 
26
 
27
  <div class="aam-container">
28
  <table id="post-list" class="table table-striped table-bordered">
@@ -59,12 +71,8 @@
59
 
60
  <tr>
61
  <td width="90%">
62
- <strong class="aam-block"><?php echo __('List', AAM_KEY); ?></strong>
63
- <p class="aam-hint">
64
- <?php echo __('Filter (exclude) post from any list on your website frontend.', AAM_KEY); ?>
65
- <span class="aam-highlight"><?php echo __('Warning!', AAM_KEY); ?></span>
66
- <?php echo __('If checked, this property may slowdown your website with large amount of posts.', AAM_KEY); ?>
67
- </p>
68
  </td>
69
  <td>
70
  <div class="aam-row-actions">
@@ -74,10 +82,8 @@
74
  </tr>
75
  <tr>
76
  <td>
77
- <strong class="aam-block"><?php echo __('Read', AAM_KEY); ?></strong>
78
- <p class="aam-hint">
79
- <?php echo __('Restrict access to read a post. If "List" option is not checked, a post will be still listed on your website frontend.', AAM_KEY); ?>
80
- </p>
81
  </td>
82
  <td>
83
  <div class="aam-row-actions">
@@ -87,10 +93,8 @@
87
  </tr>
88
  <tr>
89
  <td>
90
- <strong class="aam-block"><?php echo __('Comment', AAM_KEY); ?></strong>
91
- <p class="aam-hint">
92
- <?php echo __('Restrict access to comment on a post (if commenting feature is activated).', AAM_KEY); ?>
93
- </p>
94
  </td>
95
  <td>
96
  <div class="aam-row-actions">
@@ -108,12 +112,8 @@
108
 
109
  <tr class="aam-backend-post-access">
110
  <td>
111
- <strong class="aam-block"><?php echo __('List', AAM_KEY); ?></strong>
112
- <p class="aam-hint">
113
- <?php echo __('Filter (exclude) post from any list on your website backend.', AAM_KEY); ?>
114
- <span class="aam-highlight"><?php echo __('Warning!', AAM_KEY); ?></span>
115
- <?php echo __('If checked, this property may slowdown your backend with large amount of posts.', AAM_KEY); ?>
116
- </p>
117
  </td>
118
  <td>
119
  <div class="aam-row-actions">
@@ -123,10 +123,8 @@
123
  </tr>
124
  <tr class="aam-backend-post-access">
125
  <td>
126
- <strong class="aam-block"><?php echo __('Edit', AAM_KEY); ?></strong>
127
- <p class="aam-hint">
128
- <?php echo __('Restrict access to edit a post (also the link "Edit" and "Quick Edit" will be removed below the post title).', AAM_KEY); ?>
129
- </p>
130
  </td>
131
  <td>
132
  <div class="aam-row-actions">
@@ -136,10 +134,8 @@
136
  </tr>
137
  <tr class="aam-backend-post-access">
138
  <td>
139
- <strong class="aam-block"><?php echo __('Delete', AAM_KEY); ?></strong>
140
- <p class="aam-hint">
141
- <?php echo __('Restrict access to trash or permanently delete a post (also the link "Trash" or "Delete Permanently" will be removed for a post).', AAM_KEY); ?>
142
- </p>
143
  </td>
144
  <td>
145
  <div class="aam-row-actions">
@@ -148,7 +144,6 @@
148
  </td>
149
  </tr>
150
  <?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
151
-
152
  </tbody>
153
  </table>
154
  <a href="#" class="btn btn-xs btn-primary post-back">&Lt; <?php echo __('Go Back', AAM_KEY); ?></a>
3
  <?php if (!defined('AAM_PLUS_PACKAGE')) { ?>
4
  <div class="row">
5
  <div class="col-xs-12">
6
+ <p class="aam-notification">
7
  <?php echo AAM_Backend_View_Helper::preparePhrase('You are allowed to manage access up to 10 posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension to unlock this limitation.', 'b'); ?>
8
  </p>
9
  </div>
10
  </div>
11
  <?php } ?>
12
+
13
+ <?php $current = $this->getCurrentPost(); ?>
14
 
15
  <div class="aam-post-breadcrumb">
16
  <a href="#" data-level="root"><i class="icon-home"></i> <?php echo __('Root', AAM_KEY); ?></a>
17
+ <?php if (!is_null($current)) { ?>
18
+ <span>
19
+ <i class="icon-angle-double-right"></i>
20
+ <?php echo $current->post_title; ?>
21
+ </span>
22
+ <?php } ?>
23
  </div>
24
 
25
  <div class="aam-overwrite hidden" id="post-overwritten">
31
  <span><?php echo __('Settings inherited from', AAM_KEY); ?> <strong id="post-parent"></strong></span>
32
  <span></span>
33
  </div>
34
+
35
+ <?php if (!is_null($current)) { ?>
36
+ <input type="hidden" id="load-post" value="<?php echo $current->ID; ?>" />
37
+ <?php } ?>
38
 
39
  <div class="aam-container">
40
  <table id="post-list" class="table table-striped table-bordered">
71
 
72
  <tr>
73
  <td width="90%">
74
+ <strong class="aam-block aam-highlight text-uppercase"><?php echo __('List', AAM_KEY); ?>&nbsp;</strong>
75
+ <p class="aam-hint" data-dynamic-post-label="Hide %s from all frontend website lists."></p>
 
 
 
 
76
  </td>
77
  <td>
78
  <div class="aam-row-actions">
82
  </tr>
83
  <tr>
84
  <td>
85
+ <strong class="aam-block aam-highlight text-uppercase"><?php echo __('Read', AAM_KEY); ?></strong>
86
+ <p class="aam-hint" data-dynamic-post-label="Restrict access to read %s. If List option is not checked, %s will be still listed on your website frontend."></p>
 
 
87
  </td>
88
  <td>
89
  <div class="aam-row-actions">
93
  </tr>
94
  <tr>
95
  <td>
96
+ <strong class="aam-block aam-highlight text-uppercase"><?php echo __('Comment', AAM_KEY); ?></strong>
97
+ <p class="aam-hint" data-dynamic-post-label="Restrict access to comment on %s (if commenting feature is activated)."></p>
 
 
98
  </td>
99
  <td>
100
  <div class="aam-row-actions">
112
 
113
  <tr class="aam-backend-post-access">
114
  <td>
115
+ <strong class="aam-block aam-highlight text-uppercase"><?php echo __('List', AAM_KEY); ?></strong>
116
+ <p class="aam-hint" data-dynamic-post-label="Hide or exclude %s from any website backend lists."></p>
 
 
 
 
117
  </td>
118
  <td>
119
  <div class="aam-row-actions">
123
  </tr>
124
  <tr class="aam-backend-post-access">
125
  <td>
126
+ <strong class="aam-block aam-highlight text-uppercase"><?php echo __('Edit', AAM_KEY); ?></strong>
127
+ <p class="aam-hint" data-dynamic-post-label="Restrict access to edit %s (also the link Edit and Quick Edit will be removed below the %s title)."></p>
 
 
128
  </td>
129
  <td>
130
  <div class="aam-row-actions">
134
  </tr>
135
  <tr class="aam-backend-post-access">
136
  <td>
137
+ <strong class="aam-block aam-highlight text-uppercase"><?php echo __('Delete', AAM_KEY); ?></strong>
138
+ <p class="aam-hint" data-dynamic-post-label="Restrict access to trash or permanently delete %s (also the link Trash or Delete Permanently will be removed below the %s title)."></p>
 
 
139
  </td>
140
  <td>
141
  <div class="aam-row-actions">
144
  </td>
145
  </tr>
146
  <?php do_action('aam-post-access-option-action', 'post', 'backend'); ?>
 
147
  </tbody>
148
  </table>
149
  <a href="#" class="btn btn-xs btn-primary post-back">&Lt; <?php echo __('Go Back', AAM_KEY); ?></a>
Application/Backend/phtml/partial/post-type.phtml CHANGED
@@ -1,12 +1,7 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="row">
3
  <div class="col-xs-12">
4
- <p class="aam-info">
5
- <?php echo AAM_Backend_View_Helper::preparePhrase('Define the default access to your posts, pages, custom post types or categories. This feature is available only with [AAM Plus Package] extension. But you can still manage access to individual posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>
6
- </p>
7
-
8
- <img src="http://vasyltech.com/img/aam-default-access-form.jpg" class="img-responsive" />
9
  </div>
10
  </div>
11
- <?php
12
- }
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="row">
3
  <div class="col-xs-12">
4
+ <p class="aam-notification" data-dynamic-post-label="<?php echo AAM_Backend_View_Helper::preparePhrase('Manage default access to all your %s and %s Categories. This feature is available only with [AAM Plus Package] extension. But you can still manage access to individual %s but only up to 10 %s. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>"></p>
 
 
 
 
5
  </div>
6
  </div>
7
+ <?php }
 
Application/Backend/phtml/partial/term-type.phtml CHANGED
@@ -1,12 +1,7 @@
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="row">
3
  <div class="col-xs-12">
4
- <p class="aam-info">
5
- <?php echo AAM_Backend_View_Helper::preparePhrase('Managing default access to categories (terms) is available in [AAM Plus Package] only. But you can still manage access to individual posts, pages or custom post types. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>
6
- </p>
7
-
8
- <img src="http://vasyltech.com/img/aam-term-access-form.jpg" class="img-responsive" />
9
  </div>
10
  </div>
11
- <?php
12
- }
1
  <?php if (defined('AAM_KEY')) { ?>
2
  <div class="row">
3
  <div class="col-xs-12">
4
+ <p class="aam-notification" data-dynamic-post-label="<?php echo AAM_Backend_View_Helper::preparePhrase('Manage access to %s is available with [AAM Plus Package] extension only. With this feature you can define default access to all child posts that belong to %s. Consider to purchase [AAM Plus Package] extension.', 'b', 'b'); ?>"></p>
 
 
 
 
5
  </div>
6
  </div>
7
+ <?php }
 
Application/Backend/phtml/utility.phtml CHANGED
@@ -1,69 +1,71 @@
1
- <div class="aam-feature" id="utilities-content">
2
- <table class="table table-striped table-bordered">
3
- <tbody>
4
- <tr>
5
- <td>
6
- <span class='aam-setting-title'><?php echo __('Edit/Delete Capabilities', AAM_KEY); ?></span>
7
- <p class="aam-setting-description">
8
- <?php echo AAM_Backend_View_Helper::preparePhrase('[Please notice!] This feature should be used only by experienced users. Toggle an ability to edit or delete capabilities. [Since AAM v3.0.6]', 'strong', 'small'); ?>
9
- </p>
10
- </td>
11
- <td>
12
- <input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="manage-capability" <?php echo (AAM_Core_Config::get('manage-capability', false) ? 'checked' : ''); ?> />
13
- </td>
14
- </tr>
15
- <tr>
16
- <td>
17
- <span class='aam-setting-title'><?php echo __('Backend Access Control', AAM_KEY); ?></span>
18
- <p class="aam-setting-description">
19
- <?php echo AAM_Backend_View_Helper::preparePhrase('Use AAM to control access to posts, pages, categories, menus and metaboxes etc. Disable this setting to stop AAM from controling access for backend. [Since AAM v3.1]', 'small'); ?>
20
- </p>
21
- </td>
22
- <td>
23
- <input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="backend-access-control" <?php echo (AAM_Core_Config::get('backend-access-control', true) ? 'checked' : ''); ?> />
24
- </td>
25
- </tr>
26
- <tr>
27
- <td>
28
- <span class='aam-setting-title'><?php echo __('Frontend Access Control', AAM_KEY); ?></span>
29
- <p class="aam-setting-description">
30
- <?php echo AAM_Backend_View_Helper::preparePhrase('Use AAM to control access to posts, pages, categories, menus and widgets. Disable this setting to stop AAM from controling access for frontend. [Since AAM v3.1]', 'small'); ?>
31
- </p>
32
- </td>
33
- <td>
34
- <input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="frontend-access-control" <?php echo (AAM_Core_Config::get('frontend-access-control', true) ? 'checked' : ''); ?> />
35
- </td>
36
- </tr>
37
- <?php do_action('aam-utilities-setting'); ?>
38
- <tr>
39
- <td>
40
- <span class='aam-setting-title'><?php echo __('Clear All Settings', AAM_KEY); ?></span>
41
- <p class="aam-setting-description">
42
- <?php echo __('Remove all the settings related to AAM (including all extension licenses).', AAM_KEY); ?>
43
- </p>
44
- </td>
45
- <td>
46
- <a href="#clear-settings-modal" data-toggle="modal" class="btn btn-danger btn-block">Clear Settings</a>
47
- </td>
48
- </tr>
49
- </tbody>
50
- </table>
 
51
 
52
- <div class="modal fade" id="clear-settings-modal" tabindex="-1" role="dialog">
53
- <div class="modal-dialog modal-sm" role="document">
54
- <div class="modal-content">
55
- <div class="modal-header">
56
- <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
57
- <h4 class="modal-title"><?php echo __('Clear All Settings', AAM_KEY); ?></h4>
58
- </div>
59
- <div class="modal-body">
60
- <p class="text-center text-larger"><?php echo __('All settings related to AAM will be removed. Please confirm your action.', AAM_KEY); ?></p>
61
- </div>
62
- <div class="modal-footer">
63
- <button type="button" class="btn btn-danger" id="clear-settings"><?php echo __('Clear', AAM_KEY); ?></button>
64
- <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Cancel', AAM_KEY); ?></button>
 
65
  </div>
66
  </div>
67
  </div>
68
  </div>
69
- </div>
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="aam-feature" id="utilities-content">
3
+ <table class="table table-striped table-bordered">
4
+ <tbody>
5
+ <tr>
6
+ <td>
7
+ <span class='aam-setting-title'><?php echo __('Edit/Delete Capabilities', AAM_KEY); ?></span>
8
+ <p class="aam-setting-description">
9
+ <?php echo AAM_Backend_View_Helper::preparePhrase('[Please notice!] This feature should be used only by experienced users. Toggle an ability to edit or delete capabilities. [Since AAM v3.0.6]', 'strong', 'small'); ?>
10
+ </p>
11
+ </td>
12
+ <td>
13
+ <input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="manage-capability" <?php echo (AAM_Core_Config::get('manage-capability', false) ? 'checked' : ''); ?> />
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <td>
18
+ <span class='aam-setting-title'><?php echo __('Backend Access Control', AAM_KEY); ?></span>
19
+ <p class="aam-setting-description">
20
+ <?php echo AAM_Backend_View_Helper::preparePhrase('Use AAM to control access to posts, pages, categories, menus and metaboxes etc. Disable this setting to stop AAM from controling access for backend. [Since AAM v3.1]', 'small'); ?>
21
+ </p>
22
+ </td>
23
+ <td>
24
+ <input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="backend-access-control" <?php echo (AAM_Core_Config::get('backend-access-control', true) ? 'checked' : ''); ?> />
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <td>
29
+ <span class='aam-setting-title'><?php echo __('Frontend Access Control', AAM_KEY); ?></span>
30
+ <p class="aam-setting-description">
31
+ <?php echo AAM_Backend_View_Helper::preparePhrase('Use AAM to control access to posts, pages, categories, menus and widgets. Disable this setting to stop AAM from controling access for frontend. [Since AAM v3.1]', 'small'); ?>
32
+ </p>
33
+ </td>
34
+ <td>
35
+ <input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="frontend-access-control" <?php echo (AAM_Core_Config::get('frontend-access-control', true) ? 'checked' : ''); ?> />
36
+ </td>
37
+ </tr>
38
+ <?php do_action('aam-utilities-setting'); ?>
39
+ <tr>
40
+ <td>
41
+ <span class='aam-setting-title'><?php echo __('Clear All Settings', AAM_KEY); ?></span>
42
+ <p class="aam-setting-description">
43
+ <?php echo __('Remove all the settings related to AAM (including all extension licenses).', AAM_KEY); ?>
44
+ </p>
45
+ </td>
46
+ <td>
47
+ <a href="#clear-settings-modal" data-toggle="modal" class="btn btn-danger btn-block">Clear Settings</a>
48
+ </td>
49
+ </tr>
50
+ </tbody>
51
+ </table>
52
 
53
+ <div class="modal fade" id="clear-settings-modal" tabindex="-1" role="dialog">
54
+ <div class="modal-dialog modal-sm" role="document">
55
+ <div class="modal-content">
56
+ <div class="modal-header">
57
+ <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
58
+ <h4 class="modal-title"><?php echo __('Clear All Settings', AAM_KEY); ?></h4>
59
+ </div>
60
+ <div class="modal-body">
61
+ <p class="text-center text-larger"><?php echo __('All settings related to AAM will be removed. Please confirm your action.', AAM_KEY); ?></p>
62
+ </div>
63
+ <div class="modal-footer">
64
+ <button type="button" class="btn btn-danger" id="clear-settings"><?php echo __('Clear', AAM_KEY); ?></button>
65
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Cancel', AAM_KEY); ?></button>
66
+ </div>
67
  </div>
68
  </div>
69
  </div>
70
  </div>
71
+ <?php }
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.4.2
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: http://www.vasyltech.com
9
 
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: Manage User and Role Access to WordPress Backend and Frontend.
6
+ Version: 3.5
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: http://www.vasyltech.com
9
 
media/css/aam.css CHANGED
@@ -422,6 +422,7 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
422
 
423
  .aam-block {
424
  display: block;
 
425
  }
426
 
427
  .aam-lock {
@@ -434,10 +435,6 @@ input[type="checkbox"]:focus, input[type="radio"]:focus {
434
  z-index: 9999;
435
  }
436
 
437
- .aam-block {
438
- display: block;
439
- }
440
-
441
  .panel-title {
442
  position: relative;
443
  }
422
 
423
  .aam-block {
424
  display: block;
425
+ letter-spacing: 1.5px;
426
  }
427
 
428
  .aam-lock {
435
  z-index: 9999;
436
  }
437
 
 
 
 
 
438
  .panel-title {
439
  position: relative;
440
  }
media/js/aam-ui.js CHANGED
@@ -1260,6 +1260,12 @@
1260
  $(btn).attr('class', 'aam-row-action text-info icon-cog');
1261
  }
1262
  });
 
 
 
 
 
 
1263
  }
1264
 
1265
  /**
@@ -1301,7 +1307,7 @@
1301
 
1302
  return result;
1303
  }
1304
-
1305
  /**
1306
  *
1307
  * @returns {undefined}
@@ -1394,43 +1400,6 @@
1394
  $('td:eq(1)', row).html(data[3]);
1395
  }
1396
 
1397
- //add breadcrumb but only if not a type
1398
- if (data[2] !== 'type') {
1399
- queue.push(function () {
1400
- $.ajax(aamLocal.ajaxurl, {
1401
- type: 'POST',
1402
- dataType: 'json',
1403
- data: {
1404
- action: 'aam',
1405
- sub_action: 'Post.getBreadcrumb',
1406
- _ajax_nonce: aamLocal.nonce,
1407
- type: data[2],
1408
- id: data[0]
1409
- },
1410
- success: function (response) {
1411
- if (response.status === 'success') {
1412
- $('td:eq(1) span', row).html(
1413
- response.breadcrumb
1414
- );
1415
- }
1416
- },
1417
- error: function () {
1418
- $('td:eq(1) span', row).html(aam.__('Failed'));
1419
- },
1420
- complete: function () {
1421
- if (queue.length) {
1422
- queue.pop().call();
1423
- }
1424
- }
1425
- });
1426
- });
1427
- $('td:eq(1)', row).append(
1428
- $('<span/>', {'class': 'aam-row-subtitle'}).text(
1429
- aam.__('Loading...')
1430
- )
1431
- );
1432
- }
1433
-
1434
  //update the actions
1435
  var actions = data[4].split(',');
1436
 
@@ -1447,18 +1416,20 @@
1447
  'data-toggle': "tooltip",
1448
  'title': aam.__('Drill-Down')
1449
  }));
 
1450
  break;
1451
 
1452
  case 'manage':
1453
  $(container).append($('<i/>', {
1454
  'class': 'aam-row-action text-info icon-cog'
1455
  }).bind('click', function () {
1456
- loadAccessForm(data[2], data[0], $(this));
1457
  addBreadcrumbLevel('edit', data[2], data[3]);
 
1458
  }).attr({
1459
  'data-toggle': "tooltip",
1460
  'title': aam.__('Manage Access')
1461
  }));
 
1462
  break;
1463
 
1464
  case 'edit' :
@@ -1540,6 +1511,11 @@
1540
  $('.aam-post-breadcrumb span:last').remove();
1541
  $('#post-overwritten, #post-inherited').addClass('hidden');
1542
  });
 
 
 
 
 
1543
  }
1544
 
1545
  aam.addHook('init', initialize);
@@ -1754,11 +1730,16 @@
1754
  });
1755
  });
1756
 
 
 
1757
  if (location.hash !== '') {
1758
- $('li[data-feature="' + location.hash.substr(1) + '"]', '#feature-list').trigger('click');
1759
- } else {
1760
- $('li:eq(0)', '#feature-list').trigger('click');
 
1761
  }
 
 
1762
  }
1763
 
1764
  /**
@@ -1766,6 +1747,9 @@
1766
  * @returns {undefined}
1767
  */
1768
  aam.fetchContent = function () {
 
 
 
1769
  $.ajax(aamLocal.url.site, {
1770
  type: 'POST',
1771
  dataType: 'html',
@@ -1774,12 +1758,13 @@
1774
  action: 'aamc',
1775
  _ajax_nonce: aamLocal.nonce,
1776
  subject: this.getSubject().type,
1777
- subjectId: this.getSubject().id
 
1778
  },
1779
  beforeSend: function () {
1780
  var loader = $('<div/>', {'class': 'aam-loading'}).html(
1781
  '<i class="icon-spin4 animate-spin"></i>'
1782
- );
1783
  $('#aam-content').html(loader);
1784
  },
1785
  success: function (response) {
1260
  $(btn).attr('class', 'aam-row-action text-info icon-cog');
1261
  }
1262
  });
1263
+
1264
+ //update dynamic labels
1265
+ var marker = '<b>' + $('.aam-post-breadcrumb span').text() + '</b>';
1266
+ $('[data-dynamic-post-label]').each(function() {
1267
+ $(this).html($(this).attr('data-dynamic-post-label').replace(/%s/g, marker));
1268
+ });
1269
  }
1270
 
1271
  /**
1307
 
1308
  return result;
1309
  }
1310
+
1311
  /**
1312
  *
1313
  * @returns {undefined}
1400
  $('td:eq(1)', row).html(data[3]);
1401
  }
1402
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1403
  //update the actions
1404
  var actions = data[4].split(',');
1405
 
1416
  'data-toggle': "tooltip",
1417
  'title': aam.__('Drill-Down')
1418
  }));
1419
+ $('.tooltip').remove();
1420
  break;
1421
 
1422
  case 'manage':
1423
  $(container).append($('<i/>', {
1424
  'class': 'aam-row-action text-info icon-cog'
1425
  }).bind('click', function () {
 
1426
  addBreadcrumbLevel('edit', data[2], data[3]);
1427
+ loadAccessForm(data[2], data[0], $(this));
1428
  }).attr({
1429
  'data-toggle': "tooltip",
1430
  'title': aam.__('Manage Access')
1431
  }));
1432
+ $('.tooltip').remove();
1433
  break;
1434
 
1435
  case 'edit' :
1511
  $('.aam-post-breadcrumb span:last').remove();
1512
  $('#post-overwritten, #post-inherited').addClass('hidden');
1513
  });
1514
+
1515
+ //load referenced post
1516
+ if ($('#load-post').val()) {
1517
+ loadAccessForm('post', $('#load-post').val());
1518
+ }
1519
  }
1520
 
1521
  aam.addHook('init', initialize);
1730
  });
1731
  });
1732
 
1733
+ var item = $('li:eq(0)', '#feature-list');
1734
+
1735
  if (location.hash !== '') {
1736
+ var hash = location.hash.substr(1);
1737
+ if ($('li[data-feature="' + hash + '"]', '#feature-list').length) {
1738
+ item = $('li[data-feature="' + hash + '"]', '#feature-list');
1739
+ }
1740
  }
1741
+
1742
+ item.trigger('click');
1743
  }
1744
 
1745
  /**
1747
  * @returns {undefined}
1748
  */
1749
  aam.fetchContent = function () {
1750
+ //referred object ID like post, page or any custom post type
1751
+ var object = window.location.search.match(/&oid\=([^&]*)/);
1752
+
1753
  $.ajax(aamLocal.url.site, {
1754
  type: 'POST',
1755
  dataType: 'html',
1758
  action: 'aamc',
1759
  _ajax_nonce: aamLocal.nonce,
1760
  subject: this.getSubject().type,
1761
+ subjectId: this.getSubject().id,
1762
+ oid: object ? object[1] : null
1763
  },
1764
  beforeSend: function () {
1765
  var loader = $('<div/>', {'class': 'aam-loading'}).html(
1766
  '<i class="icon-spin4 animate-spin"></i>'
1767
+ );
1768
  $('#aam-content').html(loader);
1769
  },
1770
  success: function (response) {
media/js/aam.js CHANGED
@@ -23,6 +23,7 @@
23
  * Different UI hooks
24
  */
25
  this.hooks = {};
 
26
  }
27
 
28
  /**
@@ -56,7 +57,7 @@
56
  }
57
  }
58
  };
59
-
60
  /**
61
  * Initialize the AAM
62
  *
23
  * Different UI hooks
24
  */
25
  this.hooks = {};
26
+
27
  }
28
 
29
  /**
57
  }
58
  }
59
  };
60
+
61
  /**
62
  * Initialize the AAM
63
  *
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
3
  Tags: access, role, user, capability, page, post, permission, security
4
  Requires at least: 3.8
5
  Tested up to: 4.5.3
6
- Stable tag: 3.4.2
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.
@@ -37,9 +37,7 @@ $user->getObject('post', 10)->has('frontend.read');
37
 
38
  //Example 2. Get Admin Menu object and check if user has access to Media menu.
39
  //If true then access denied to this menu
40
- $user->getObject('menu')->has('upload.php');
41
-
42
- //For more information feel free to contact us via email vasyl@vasyltech.com`
43
 
44
  Check our [website page](http://vasyltech.com/advanced-access-manager) to find
45
  out more about the Advanced Access Manager.
@@ -59,6 +57,14 @@ out more about the Advanced Access Manager.
59
 
60
  == Changelog ==
61
 
 
 
 
 
 
 
 
 
62
  = 3.4.2 =
63
  * Fixed bug with post & pages access control
64
  * Added Extension version indicator
3
  Tags: access, role, user, capability, page, post, permission, security
4
  Requires at least: 3.8
5
  Tested up to: 4.5.3
6
+ Stable tag: 3.5
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.
37
 
38
  //Example 2. Get Admin Menu object and check if user has access to Media menu.
39
  //If true then access denied to this menu
40
+ $user->getObject('menu')->has('upload.php');`
 
 
41
 
42
  Check our [website page](http://vasyltech.com/advanced-access-manager) to find
43
  out more about the Advanced Access Manager.
57
 
58
  == Changelog ==
59
 
60
+ = 3.5 =
61
+ * Improved access control for Posts & Pages
62
+ * Introduced Access Manager metabox to Post edit screen
63
+ * Added Access action to list of Posts and Pages
64
+ * Improved UI
65
+ * Deprecated Skeleton extension in favor to upcoming totally new concept
66
+ * Fixed bug with metaboxes initialization when backend filtering is OFF
67
+
68
  = 3.4.2 =
69
  * Fixed bug with post & pages access control
70
  * Added Extension version indicator