Version Description
- Small fix in core
- Moved ConfigPress as stand-alone plugin. It is no longer a part of AAM
- Styled the AAM notification message
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 2.9.2 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 2.9.2
- aam.php +25 -27
- application/core/configpress.php +8 -86
- application/core/repository.php +44 -52
- application/view/help.php +0 -51
- application/view/manager.php +4 -4
- application/view/tmpl/configpress.phtml +16 -6
- application/view/tmpl/extension.phtml +28 -23
- application/view/tmpl/help_developers.phtml +0 -29
- application/view/tmpl/help_extensions.phtml +0 -16
- application/view/tmpl/help_faq.phtml +0 -38
- application/view/tmpl/help_overview.phtml +0 -48
- application/view/tmpl/manager.phtml +13 -1
- config.php +6 -3
- extension/AAM_Activity_Log/extension.php +2 -4
- extension/AAM_Secure/geoip/freegeoip.php +11 -10
- library/Zend/Config.php +0 -485
- library/Zend/Config/Exception.php +0 -33
- library/Zend/Config/Ini.php +0 -301
- library/Zend/Exception.php +0 -101
- media/css/aam.css +40 -0
- media/css/codemirror.css +0 -262
- media/css/extension.css +1 -1
- media/css/images/logo.png +0 -0
- media/js/aam.js +5 -31
- media/js/codemirror.js +0 -1
- media/js/configpress.js +0 -46
- media/js/extension.js +22 -16
- media/js/properties.js +0 -64
- readme.txt +81 -51
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: 2.
|
7 |
Author: Vasyl Martyniuk <support@wpaam.com>
|
8 |
Author URI: http://www.wpaam.com
|
9 |
|
@@ -68,9 +68,6 @@ class aam {
|
|
68 |
add_action('admin_print_scripts', array($this, 'printScripts'));
|
69 |
add_action('admin_print_styles', array($this, 'printStyles'));
|
70 |
|
71 |
-
//add help menu
|
72 |
-
add_filter('contextual_help', array($this, 'contextualHelp'), 10, 3);
|
73 |
-
|
74 |
//manager Admin Menu
|
75 |
if (aam_Core_API::isNetworkPanel()) {
|
76 |
add_action('network_admin_menu', array($this, 'adminMenu'), 999);
|
@@ -94,6 +91,10 @@ class aam {
|
|
94 |
add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
|
95 |
add_filter('tag_row_actions', array($this, 'tagRowActions'), 10, 2);
|
96 |
add_action('admin_action_edit', array($this, 'adminActionEdit'), 10);
|
|
|
|
|
|
|
|
|
97 |
//wp die hook
|
98 |
add_filter('wp_die_handler', array($this, 'wpDie'), 10);
|
99 |
//***For UI purposes***
|
@@ -189,6 +190,26 @@ class aam {
|
|
189 |
|
190 |
return $open;
|
191 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
/**
|
194 |
* Get Post ID
|
@@ -295,24 +316,6 @@ class aam {
|
|
295 |
return $pages;
|
296 |
}
|
297 |
|
298 |
-
/**
|
299 |
-
* Contextual Help Menu
|
300 |
-
*
|
301 |
-
* @param type $contextual_help
|
302 |
-
* @param type $screen_id
|
303 |
-
* @param type $screen
|
304 |
-
*
|
305 |
-
* @return
|
306 |
-
*/
|
307 |
-
public function contextualHelp($contextual_help, $screen_id, $screen){
|
308 |
-
if ($this->isAAMScreen()){
|
309 |
-
$help = new aam_View_Help();
|
310 |
-
$help->content($screen);
|
311 |
-
}
|
312 |
-
|
313 |
-
return $contextual_help;
|
314 |
-
}
|
315 |
-
|
316 |
/**
|
317 |
* Filter Navigation menu
|
318 |
*
|
@@ -757,7 +760,6 @@ class aam {
|
|
757 |
AAM_MEDIA_URL . 'css/configpress.css',
|
758 |
array('aam-common-style')
|
759 |
);
|
760 |
-
wp_enqueue_style('aam-codemirror', AAM_MEDIA_URL . 'css/codemirror.css');
|
761 |
}
|
762 |
|
763 |
}
|
@@ -828,11 +830,7 @@ class aam {
|
|
828 |
wp_localize_script('aam-admin', 'aamLocal', $localization);
|
829 |
} elseif ($this->isAAMConfigPressScreen()) {
|
830 |
wp_enqueue_script('jquery-ui-core');
|
831 |
-
wp_enqueue_script('jquery-effects-core');
|
832 |
-
wp_enqueue_script('jquery-effects-highlight');
|
833 |
wp_enqueue_script('aam-admin', AAM_MEDIA_URL . 'js/configpress.js');
|
834 |
-
wp_enqueue_script('aam-codemirror', AAM_MEDIA_URL . 'js/codemirror.js');
|
835 |
-
wp_enqueue_script('aam-cmini', AAM_MEDIA_URL . 'js/properties.js');
|
836 |
|
837 |
$localization = array(
|
838 |
'nonce' => wp_create_nonce('aam_ajax'),
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: Manage User and Role Access to WordPress Backend and Frontend.
|
6 |
+
Version: 2.9.2
|
7 |
Author: Vasyl Martyniuk <support@wpaam.com>
|
8 |
Author URI: http://www.wpaam.com
|
9 |
|
68 |
add_action('admin_print_scripts', array($this, 'printScripts'));
|
69 |
add_action('admin_print_styles', array($this, 'printStyles'));
|
70 |
|
|
|
|
|
|
|
71 |
//manager Admin Menu
|
72 |
if (aam_Core_API::isNetworkPanel()) {
|
73 |
add_action('network_admin_menu', array($this, 'adminMenu'), 999);
|
91 |
add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
|
92 |
add_filter('tag_row_actions', array($this, 'tagRowActions'), 10, 2);
|
93 |
add_action('admin_action_edit', array($this, 'adminActionEdit'), 10);
|
94 |
+
//control permalink editing
|
95 |
+
add_filter(
|
96 |
+
'get_sample_permalink_html', array($this, 'permalinkHTML'), 10, 4
|
97 |
+
);
|
98 |
//wp die hook
|
99 |
add_filter('wp_die_handler', array($this, 'wpDie'), 10);
|
100 |
//***For UI purposes***
|
190 |
|
191 |
return $open;
|
192 |
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Control edit permalink feature
|
196 |
+
*
|
197 |
+
* @param string $html
|
198 |
+
* @param int $id
|
199 |
+
* @param type $new_title
|
200 |
+
* @param type $new_slug
|
201 |
+
*
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function permalinkHTML($html, $id, $new_title, $new_slug) {
|
205 |
+
if (aam_Core_ConfigPress::getParam('aam.control_permalink') === 'true') {
|
206 |
+
if ($this->getUser()->hasCapability('manage_permalink') === false) {
|
207 |
+
$html = '';
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
return $html;
|
212 |
+
}
|
213 |
|
214 |
/**
|
215 |
* Get Post ID
|
316 |
return $pages;
|
317 |
}
|
318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
/**
|
320 |
* Filter Navigation menu
|
321 |
*
|
760 |
AAM_MEDIA_URL . 'css/configpress.css',
|
761 |
array('aam-common-style')
|
762 |
);
|
|
|
763 |
}
|
764 |
|
765 |
}
|
830 |
wp_localize_script('aam-admin', 'aamLocal', $localization);
|
831 |
} elseif ($this->isAAMConfigPressScreen()) {
|
832 |
wp_enqueue_script('jquery-ui-core');
|
|
|
|
|
833 |
wp_enqueue_script('aam-admin', AAM_MEDIA_URL . 'js/configpress.js');
|
|
|
|
|
834 |
|
835 |
$localization = array(
|
836 |
'nonce' => wp_create_nonce('aam_ajax'),
|
application/core/configpress.php
CHANGED
@@ -17,16 +17,6 @@
|
|
17 |
*/
|
18 |
final class aam_Core_ConfigPress {
|
19 |
|
20 |
-
/**
|
21 |
-
* Parsed ConfigPress from the file
|
22 |
-
*
|
23 |
-
* @var Zend_Config_Ini
|
24 |
-
*
|
25 |
-
* @access private
|
26 |
-
* @static
|
27 |
-
*/
|
28 |
-
private static $_config = null;
|
29 |
-
|
30 |
/**
|
31 |
* Read ConfigPress File content
|
32 |
*
|
@@ -46,33 +36,6 @@ final class aam_Core_ConfigPress {
|
|
46 |
return $content;
|
47 |
}
|
48 |
|
49 |
-
/**
|
50 |
-
* Write ConfigPres to file
|
51 |
-
*
|
52 |
-
* @param string $content
|
53 |
-
*
|
54 |
-
* @return boolean
|
55 |
-
*
|
56 |
-
* @access public
|
57 |
-
* @static
|
58 |
-
*/
|
59 |
-
public static function write($content) {
|
60 |
-
if (is_writable(AAM_TEMP_DIR)) {
|
61 |
-
$filename = aam_Core_API::getBlogOption('aam_configpress', '');
|
62 |
-
if (!$filename) { //file already was created
|
63 |
-
$filename = sha1(uniqid('aam'));
|
64 |
-
aam_Core_API::updateBlogOption('aam_configpress', $filename);
|
65 |
-
}
|
66 |
-
$response = file_put_contents(
|
67 |
-
AAM_TEMP_DIR . $filename, stripcslashes($content)
|
68 |
-
);
|
69 |
-
} else {
|
70 |
-
$response = false;
|
71 |
-
}
|
72 |
-
|
73 |
-
return $response;
|
74 |
-
}
|
75 |
-
|
76 |
/**
|
77 |
* Get ConfigPress parameter
|
78 |
*
|
@@ -85,27 +48,13 @@ final class aam_Core_ConfigPress {
|
|
85 |
* @static
|
86 |
*/
|
87 |
public static function getParam($param, $default = null) {
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
//parse the file content & create Config INI Object
|
93 |
-
self::parseConfig(AAM_TEMP_DIR . $filename);
|
94 |
-
}
|
95 |
-
}
|
96 |
-
|
97 |
-
//find the parameter
|
98 |
-
$tree = self::$_config;
|
99 |
-
foreach (explode('.', $param) as $section) {
|
100 |
-
if (isset($tree->{$section})) {
|
101 |
-
$tree = $tree->{$section};
|
102 |
-
} else {
|
103 |
-
$tree = $default;
|
104 |
-
break;
|
105 |
-
}
|
106 |
}
|
107 |
|
108 |
-
return self::parseParam($
|
109 |
}
|
110 |
|
111 |
/**
|
@@ -120,10 +69,9 @@ final class aam_Core_ConfigPress {
|
|
120 |
* @static
|
121 |
*/
|
122 |
protected static function parseParam($param, $default) {
|
123 |
-
if (
|
124 |
-
|
125 |
-
|
126 |
-
$response = call_user_func($func);
|
127 |
} else {
|
128 |
$response = $default;
|
129 |
}
|
@@ -134,30 +82,4 @@ final class aam_Core_ConfigPress {
|
|
134 |
return $response;
|
135 |
}
|
136 |
|
137 |
-
/**
|
138 |
-
* Parse ConfigPress file and create an object
|
139 |
-
*
|
140 |
-
* @param string $filename
|
141 |
-
*
|
142 |
-
* @return void
|
143 |
-
*
|
144 |
-
* @access protected
|
145 |
-
* @static
|
146 |
-
*/
|
147 |
-
protected static function parseConfig($filename) {
|
148 |
-
//include third party library
|
149 |
-
if (!class_exists('Zend_Config')) {
|
150 |
-
require_once(AAM_LIBRARY_DIR . 'Zend/Exception.php');
|
151 |
-
require_once(AAM_LIBRARY_DIR . 'Zend/Config/Exception.php');
|
152 |
-
require_once(AAM_LIBRARY_DIR . 'Zend/Config.php');
|
153 |
-
require_once(AAM_LIBRARY_DIR . 'Zend/Config/Ini.php');
|
154 |
-
}
|
155 |
-
//parse ini file
|
156 |
-
try {
|
157 |
-
self::$_config = new Zend_Config_Ini($filename);
|
158 |
-
} catch (Zend_Config_Exception $e) {
|
159 |
-
//do nothing
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
}
|
17 |
*/
|
18 |
final class aam_Core_ConfigPress {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Read ConfigPress File content
|
22 |
*
|
36 |
return $content;
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
/**
|
40 |
* Get ConfigPress parameter
|
41 |
*
|
48 |
* @static
|
49 |
*/
|
50 |
public static function getParam($param, $default = null) {
|
51 |
+
if (class_exists('ConfigPress')) {
|
52 |
+
$response = ConfigPress::get($param, $default);
|
53 |
+
} else {
|
54 |
+
$response = $default;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
+
return self::parseParam($response, $default);
|
58 |
}
|
59 |
|
60 |
/**
|
69 |
* @static
|
70 |
*/
|
71 |
protected static function parseParam($param, $default) {
|
72 |
+
if (is_array($param) && isset($param['userFunc'])) {
|
73 |
+
if (is_callable($param['userFunc'])) {
|
74 |
+
$response = call_user_func($param['userFunc']);
|
|
|
75 |
} else {
|
76 |
$response = $default;
|
77 |
}
|
82 |
return $response;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
application/core/repository.php
CHANGED
@@ -17,21 +17,6 @@
|
|
17 |
*/
|
18 |
class aam_Core_Repository {
|
19 |
|
20 |
-
/**
|
21 |
-
* Extensions download Failed
|
22 |
-
*/
|
23 |
-
const STATUS_FAILED = 'failed';
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Extensions status pending
|
27 |
-
*/
|
28 |
-
const STATUS_PENDING = 'pending';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Extensions installed successfully
|
32 |
-
*/
|
33 |
-
const STATUS_INSTALLED = 'installed';
|
34 |
-
|
35 |
/**
|
36 |
* Single instance of itself
|
37 |
*
|
@@ -153,17 +138,22 @@ class aam_Core_Repository {
|
|
153 |
* @access public
|
154 |
*/
|
155 |
public function hasExtension($extension){
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
|
169 |
/**
|
@@ -175,8 +165,8 @@ class aam_Core_Repository {
|
|
175 |
*
|
176 |
* @access public
|
177 |
*/
|
178 |
-
public function
|
179 |
-
return ($this->
|
180 |
}
|
181 |
|
182 |
/**
|
@@ -192,12 +182,8 @@ class aam_Core_Repository {
|
|
192 |
|
193 |
if (is_array($repository)) {
|
194 |
//get the list of extensions
|
195 |
-
foreach ($repository as $
|
196 |
-
|
197 |
-
$repository[$extension]->status = self::STATUS_INSTALLED;
|
198 |
-
} else {
|
199 |
-
$repository[$extension]->status = self::STATUS_FAILED;
|
200 |
-
}
|
201 |
}
|
202 |
aam_Core_API::updateBlogOption('aam_extensions', $repository, 1);
|
203 |
}
|
@@ -219,10 +205,7 @@ class aam_Core_Repository {
|
|
219 |
|
220 |
if ($this->retrieve($license)){
|
221 |
$repository[$extension] = (object) array(
|
222 |
-
'
|
223 |
-
'license' => $license,
|
224 |
-
//ugly way but quick
|
225 |
-
'basedir' => "{$this->_basedir}/" . str_replace(' ', '_', $extension)
|
226 |
);
|
227 |
aam_Core_API::updateBlogOption('aam_extensions', $repository, 1);
|
228 |
$response = true;
|
@@ -237,31 +220,40 @@ class aam_Core_Repository {
|
|
237 |
* Remove Extension from the repository
|
238 |
*
|
239 |
* @param string $extension
|
240 |
-
* @param string $license
|
241 |
*
|
242 |
* @return boolean
|
243 |
*
|
244 |
* @access public
|
245 |
*/
|
246 |
-
public function remove($extension
|
247 |
global $wp_filesystem;
|
248 |
|
249 |
-
$this->initFilesystem();
|
250 |
$repository = aam_Core_API::getBlogOption('aam_extensions', array(), 1);
|
251 |
-
$response = false;
|
252 |
|
|
|
|
|
253 |
if (isset($repository[$extension])){
|
254 |
-
$
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
|
|
262 |
}
|
263 |
|
264 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
}
|
266 |
|
267 |
/**
|
@@ -291,7 +283,7 @@ class aam_Core_Repository {
|
|
291 |
protected function retrieve($license) {
|
292 |
global $wp_filesystem;
|
293 |
|
294 |
-
$url = WPAAM_REST_API . '?method=
|
295 |
$res = wp_remote_request($url, array('timeout' => 10));
|
296 |
$response = false;
|
297 |
if (!is_wp_error($res)) {
|
17 |
*/
|
18 |
class aam_Core_Repository {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Single instance of itself
|
22 |
*
|
138 |
* @access public
|
139 |
*/
|
140 |
public function hasExtension($extension){
|
141 |
+
return file_exists(
|
142 |
+
$this->_basedir . '/' . $this->prepareExtFName($extension)
|
143 |
+
);
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Check if license exists
|
148 |
+
*
|
149 |
+
* @param string $extension
|
150 |
+
*
|
151 |
+
* @return boolean
|
152 |
+
*
|
153 |
+
* @access public
|
154 |
+
*/
|
155 |
+
public function hasLicense($extension) {
|
156 |
+
return (isset($this->_repository[$extension]) ? true : false);
|
157 |
}
|
158 |
|
159 |
/**
|
165 |
*
|
166 |
* @access public
|
167 |
*/
|
168 |
+
public function getLicense($ext){
|
169 |
+
return ($this->hasLicense($ext) ? $this->_repository[$ext]->license : '');
|
170 |
}
|
171 |
|
172 |
/**
|
182 |
|
183 |
if (is_array($repository)) {
|
184 |
//get the list of extensions
|
185 |
+
foreach ($repository as $data) {
|
186 |
+
$this->retrieve($data->license);
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
aam_Core_API::updateBlogOption('aam_extensions', $repository, 1);
|
189 |
}
|
205 |
|
206 |
if ($this->retrieve($license)){
|
207 |
$repository[$extension] = (object) array(
|
208 |
+
'license' => $license
|
|
|
|
|
|
|
209 |
);
|
210 |
aam_Core_API::updateBlogOption('aam_extensions', $repository, 1);
|
211 |
$response = true;
|
220 |
* Remove Extension from the repository
|
221 |
*
|
222 |
* @param string $extension
|
|
|
223 |
*
|
224 |
* @return boolean
|
225 |
*
|
226 |
* @access public
|
227 |
*/
|
228 |
+
public function remove($extension){
|
229 |
global $wp_filesystem;
|
230 |
|
|
|
231 |
$repository = aam_Core_API::getBlogOption('aam_extensions', array(), 1);
|
|
|
232 |
|
233 |
+
//if extension has been downloaded as part of dev license, it'll be
|
234 |
+
//not present in the repository list
|
235 |
if (isset($repository[$extension])){
|
236 |
+
unset($repository[$extension]);
|
237 |
+
aam_Core_API::updateBlogOption('aam_extensions', $repository, 1);
|
238 |
+
}
|
239 |
+
|
240 |
+
if ($this->hasExtension($extension)){
|
241 |
+
$this->initFilesystem();
|
242 |
+
$wp_filesystem->rmdir(
|
243 |
+
$this->_basedir . '/' . $this->prepareExtFName($extension), true
|
244 |
+
);
|
245 |
}
|
246 |
|
247 |
+
return true;
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
*
|
252 |
+
* @param type $extension
|
253 |
+
* @return type
|
254 |
+
*/
|
255 |
+
protected function prepareExtFName($extension) {
|
256 |
+
return str_replace(' ', '_', $extension);
|
257 |
}
|
258 |
|
259 |
/**
|
283 |
protected function retrieve($license) {
|
284 |
global $wp_filesystem;
|
285 |
|
286 |
+
$url = WPAAM_REST_API . '?method=exchange&license=' . $license;
|
287 |
$res = wp_remote_request($url, array('timeout' => 10));
|
288 |
$response = false;
|
289 |
if (!is_wp_error($res)) {
|
application/view/help.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* ======================================================================
|
5 |
-
* LICENSE: This file is subject to the terms and conditions defined in *
|
6 |
-
* file 'license.txt', which is part of this source code package. *
|
7 |
-
* ======================================================================
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
*
|
12 |
-
* @package AAM
|
13 |
-
* @author Vasyl Martyniuk <support@wpaam.com>
|
14 |
-
* @copyright Copyright C 2013 Vasyl Martyniuk
|
15 |
-
* @license GNU General Public License {@link http://www.gnu.org/licenses/}
|
16 |
-
*/
|
17 |
-
class aam_View_Help extends aam_View_Abstract {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get View content
|
21 |
-
*
|
22 |
-
* @return string
|
23 |
-
*
|
24 |
-
* @access public
|
25 |
-
*/
|
26 |
-
public function content($screen) {
|
27 |
-
$basedir = dirname(__FILE__) . '/tmpl/';
|
28 |
-
$screen->add_help_tab(array(
|
29 |
-
'id' => 'faq',
|
30 |
-
'title' => 'FAQ',
|
31 |
-
'content' => $this->loadTemplate($basedir . 'help_faq.phtml')
|
32 |
-
));
|
33 |
-
//add overview tab
|
34 |
-
$screen->add_help_tab(array(
|
35 |
-
'id' => 'overview',
|
36 |
-
'title' => 'Overview',
|
37 |
-
'content' => $this->loadTemplate($basedir . 'help_overview.phtml')
|
38 |
-
));
|
39 |
-
$screen->add_help_tab(array(
|
40 |
-
'id' => 'extensions',
|
41 |
-
'title' => 'Extensions',
|
42 |
-
'content' => $this->loadTemplate($basedir . 'help_extensions.phtml')
|
43 |
-
));
|
44 |
-
$screen->add_help_tab(array(
|
45 |
-
'id' => 'developers',
|
46 |
-
'title' => 'Developers',
|
47 |
-
'content' => $this->loadTemplate($basedir . 'help_developers.phtml')
|
48 |
-
));
|
49 |
-
}
|
50 |
-
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
application/view/manager.php
CHANGED
@@ -732,13 +732,13 @@ class aam_View_Manager extends aam_View_Abstract {
|
|
732 |
}
|
733 |
|
734 |
/**
|
735 |
-
* Install
|
736 |
*
|
737 |
* @return string
|
738 |
*
|
739 |
* @access public
|
740 |
*/
|
741 |
-
public function
|
742 |
{
|
743 |
if (current_user_can(aam_Core_ConfigPress::getParam(
|
744 |
'aam.menu.extensions.capability', 'administrator'
|
@@ -753,13 +753,13 @@ class aam_View_Manager extends aam_View_Abstract {
|
|
753 |
}
|
754 |
|
755 |
/**
|
756 |
-
* Remove
|
757 |
*
|
758 |
* @return string
|
759 |
*
|
760 |
* @access public
|
761 |
*/
|
762 |
-
public function
|
763 |
{
|
764 |
if (current_user_can(aam_Core_ConfigPress::getParam(
|
765 |
'aam.menu.extensions.capability', 'administrator'
|
732 |
}
|
733 |
|
734 |
/**
|
735 |
+
* Install license
|
736 |
*
|
737 |
* @return string
|
738 |
*
|
739 |
* @access public
|
740 |
*/
|
741 |
+
public function installLicense()
|
742 |
{
|
743 |
if (current_user_can(aam_Core_ConfigPress::getParam(
|
744 |
'aam.menu.extensions.capability', 'administrator'
|
753 |
}
|
754 |
|
755 |
/**
|
756 |
+
* Remove license
|
757 |
*
|
758 |
* @return string
|
759 |
*
|
760 |
* @access public
|
761 |
*/
|
762 |
+
public function removeLicense()
|
763 |
{
|
764 |
if (current_user_can(aam_Core_ConfigPress::getParam(
|
765 |
'aam.menu.extensions.capability', 'administrator'
|
application/view/tmpl/configpress.phtml
CHANGED
@@ -18,7 +18,16 @@
|
|
18 |
</span>
|
19 |
</h3>
|
20 |
<div class="inside">
|
21 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
</div>
|
23 |
</div>
|
24 |
</div>
|
@@ -38,7 +47,7 @@
|
|
38 |
<div class="inside">
|
39 |
<p>
|
40 |
Below is the list of all possible ConfigPress settings with explanation:
|
41 |
-
|
42 |
<span style="color:#05a;font-weight: bold;">[aam]</span>
|
43 |
<span style="color:#00b418">#Define default access to admin menu items if it was not configured.</span>
|
44 |
<span style="color:#00b418">#By default it is set to</span> <span style="color:#d80800">"allow"</span>.
|
@@ -69,6 +78,10 @@
|
|
69 |
<span style="color:#00b418">#Each time you create new role with AAM, the ID is changed to something like aam_78koi9831933i.</span>
|
70 |
<span style="color:#00b418">#Setting below suppresses this behavior and keep the name in lowercase format.</span>
|
71 |
<span style="color:#0100b6;font-weight:700;">native_role_id</span> = <span style="color:#d80800">"true"</span>
|
|
|
|
|
|
|
|
|
72 |
|
73 |
<span style="color:#05a;font-weight: bold;">[backend]</span>
|
74 |
<span style="color:#00b418">#Defines redirect behavior when access is denied to any backend resource like menu</span>
|
@@ -85,7 +98,7 @@
|
|
85 |
<span style="color:#0100b6;font-weight:700;">access.deny.redirect</span> = <span style="color:#d80800">"http://someurlhere.in"</span>
|
86 |
<span style="color:#00b418">#Redefine default <b>Access Denied</b> message.</span>
|
87 |
<span style="color:#0100b6;font-weight:700;">access.deny.message</span> = <span style="color:#d80800">"Oops. This is restricted area"</span>
|
88 |
-
|
89 |
</p>
|
90 |
</div>
|
91 |
</div>
|
@@ -123,9 +136,6 @@
|
|
123 |
</h3>
|
124 |
<div class="inside">
|
125 |
<div class="large-icons-row">
|
126 |
-
<a href="#" class="aam-icon aam-icon-large aam-icon-large-save" id="save_config" >
|
127 |
-
<span></span><?php echo __('Save', 'aam'); ?>
|
128 |
-
</a>
|
129 |
<a href="#" class="aam-icon aam-icon-large aam-icon-large-info" id="info_screen" >
|
130 |
<span></span><?php echo __('Info', 'aam'); ?>
|
131 |
</a>
|
18 |
</span>
|
19 |
</h3>
|
20 |
<div class="inside">
|
21 |
+
<p>
|
22 |
+
ConfigPress has been moved as a stand-alone plugin. Please install <a href="https://wordpress.org/plugins/configpress/" target="_blank">ConfigPress plugin</a> from official WordPress repository.
|
23 |
+
</p>
|
24 |
+
<?php $config = aam_Core_ConfigPress::read(); ?>
|
25 |
+
<?php if ($config) { ?>
|
26 |
+
<p>After you install ConfigPress plugin. Go to Settings > ConfigPress and copy & paste your below configurations:</p>
|
27 |
+
<pre>
|
28 |
+
<?php echo aam_Core_ConfigPress::read(); ?>
|
29 |
+
</pre>
|
30 |
+
<?php } ?>
|
31 |
</div>
|
32 |
</div>
|
33 |
</div>
|
47 |
<div class="inside">
|
48 |
<p>
|
49 |
Below is the list of all possible ConfigPress settings with explanation:
|
50 |
+
<pre style="background:#fff;color:#000">
|
51 |
<span style="color:#05a;font-weight: bold;">[aam]</span>
|
52 |
<span style="color:#00b418">#Define default access to admin menu items if it was not configured.</span>
|
53 |
<span style="color:#00b418">#By default it is set to</span> <span style="color:#d80800">"allow"</span>.
|
78 |
<span style="color:#00b418">#Each time you create new role with AAM, the ID is changed to something like aam_78koi9831933i.</span>
|
79 |
<span style="color:#00b418">#Setting below suppresses this behavior and keep the name in lowercase format.</span>
|
80 |
<span style="color:#0100b6;font-weight:700;">native_role_id</span> = <span style="color:#d80800">"true"</span>
|
81 |
+
<span style="color:#00b418">#Control access to Edit Permalink feature (Permalink block under the post or page title).</span>
|
82 |
+
<span style="color:#00b418">#If this feature is activated, make sure that you created the custom capability "Manage Permalink"</span>
|
83 |
+
<span style="color:#00b418">#By default this feature is deactivated.</span>
|
84 |
+
<span style="color:#0100b6;font-weight:700;">control_permalink</span> = <span style="color:#d80800">"false"</span>
|
85 |
|
86 |
<span style="color:#05a;font-weight: bold;">[backend]</span>
|
87 |
<span style="color:#00b418">#Defines redirect behavior when access is denied to any backend resource like menu</span>
|
98 |
<span style="color:#0100b6;font-weight:700;">access.deny.redirect</span> = <span style="color:#d80800">"http://someurlhere.in"</span>
|
99 |
<span style="color:#00b418">#Redefine default <b>Access Denied</b> message.</span>
|
100 |
<span style="color:#0100b6;font-weight:700;">access.deny.message</span> = <span style="color:#d80800">"Oops. This is restricted area"</span>
|
101 |
+
</pre>
|
102 |
</p>
|
103 |
</div>
|
104 |
</div>
|
136 |
</h3>
|
137 |
<div class="inside">
|
138 |
<div class="large-icons-row">
|
|
|
|
|
|
|
139 |
<a href="#" class="aam-icon aam-icon-large aam-icon-large-info" id="info_screen" >
|
140 |
<span></span><?php echo __('Info', 'aam'); ?>
|
141 |
</a>
|
application/view/tmpl/extension.phtml
CHANGED
@@ -46,9 +46,9 @@
|
|
46 |
<div class="extension-actions">
|
47 |
<a href="http://wpaam.com/aam-extensions/aam-plus-package/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
48 |
<?php if ($this->getRepository()->hasExtension('AAM Plus Package')) { ?>
|
49 |
-
<a href="#" extension="AAM Plus Package" license="<?php echo $this->getRepository()->
|
50 |
<?php } else { ?>
|
51 |
-
<a href="#" extension="AAM Plus Package" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UEM8U65HFEG4Q" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
|
52 |
<?php } ?>
|
53 |
</div>
|
54 |
</td>
|
@@ -67,9 +67,9 @@
|
|
67 |
<div class="extension-actions">
|
68 |
<a href="http://wpaam.com/aam-extensions/aam-activities/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
69 |
<?php if ($this->getRepository()->hasExtension('AAM Activities')) { ?>
|
70 |
-
<a href="#" extension="AAM Activities" license="<?php echo $this->getRepository()->
|
71 |
<?php } else { ?>
|
72 |
-
<a href="#" extension="AAM Activities" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HME9DTSFSJH4W" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
|
73 |
<?php } ?>
|
74 |
</div>
|
75 |
</td>
|
@@ -88,9 +88,9 @@
|
|
88 |
<div class="extension-actions">
|
89 |
<a href="http://wpaam.com/aam-extensions/aam-media-manager/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
90 |
<?php if ($this->getRepository()->hasExtension('AAM Media Manager')) { ?>
|
91 |
-
<a href="#" extension="AAM Media Manager" license="<?php echo $this->getRepository()->
|
92 |
<?php } else { ?>
|
93 |
-
<a href="#" extension="AAM Media Manager" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WJ48A7Z6EFZJ4" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
|
94 |
<?php } ?>
|
95 |
</div>
|
96 |
</td>
|
@@ -104,15 +104,15 @@
|
|
104 |
The content (or part of the content) can be filtered based on currently logged in user or visitor.
|
105 |
Check our <a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank">website</a> for more information.
|
106 |
</td>
|
107 |
-
<td class="extension-price payed">$
|
108 |
<td>
|
109 |
|
110 |
<div class="extension-actions">
|
111 |
<a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
112 |
<?php if ($this->getRepository()->hasExtension('AAM Content Filter')) { ?>
|
113 |
-
<a href="#" extension="AAM Content Filter" license="<?php echo $this->getRepository()->
|
114 |
<?php } else { ?>
|
115 |
-
<a href="#" extension="AAM Content Filter" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X7NZ7QF8A9CVS" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
|
116 |
<?php } ?>
|
117 |
</div>
|
118 |
</td>
|
@@ -130,28 +130,28 @@
|
|
130 |
<div class="extension-actions">
|
131 |
<a href="http://wpaam.com/aam-development/aam-plugin-manager/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
132 |
<?php if ($this->getRepository()->hasExtension('AAM Plugin Manager')) { ?>
|
133 |
-
<a href="#" extension="AAM Plugin Manager" license="<?php echo $this->getRepository()->
|
134 |
<?php } else { ?>
|
135 |
-
<a href="#" extension="AAM Plugin Manager" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QJ2H2J483VXPL" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
|
136 |
<?php } ?>
|
137 |
</div>
|
138 |
</td>
|
139 |
</tr>
|
140 |
</tbody>
|
141 |
</table>
|
142 |
-
<div id="
|
143 |
<p class="dialog-content">
|
144 |
-
<?php echo __('If you already have license key
|
145 |
<input type="text" class="license-input" id="license_key" placeholder="License Key" />
|
146 |
</p>
|
147 |
-
<ul class="
|
148 |
</div>
|
149 |
-
<div id="
|
150 |
<p class="dialog-content" style="text-align: center;">
|
151 |
-
<?php echo __('
|
152 |
<b><span id="installed_license_key"></span></b>
|
153 |
</p>
|
154 |
-
<ul class="
|
155 |
</div>
|
156 |
</div>
|
157 |
</div>
|
@@ -189,13 +189,13 @@
|
|
189 |
</h3>
|
190 |
<div class="inside">
|
191 |
<div class="large-icons-row">
|
192 |
-
<a href="https://twitter.com/
|
193 |
<span></span><?php echo __('Follow Us', 'aam'); ?>
|
194 |
</a>
|
195 |
-
<a href="mailto:
|
196 |
<span></span><?php echo __('Send Message', 'aam'); ?>
|
197 |
</a>
|
198 |
-
<a href="http://
|
199 |
<span></span><?php echo __('Website', 'aam'); ?>
|
200 |
</a>
|
201 |
</div>
|
@@ -211,14 +211,19 @@
|
|
211 |
<div class="postbox">
|
212 |
<div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
|
213 |
<h3 class="hndle">
|
214 |
-
<span><?php echo __('Development License', 'aam'); ?></span>
|
215 |
</h3>
|
216 |
<div class="inside">
|
217 |
<p>
|
218 |
-
<?php echo __('
|
219 |
</p>
|
220 |
<div style="text-align: center;">
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
222 |
</div>
|
223 |
</div>
|
224 |
</div>
|
46 |
<div class="extension-actions">
|
47 |
<a href="http://wpaam.com/aam-extensions/aam-plus-package/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
48 |
<?php if ($this->getRepository()->hasExtension('AAM Plus Package')) { ?>
|
49 |
+
<a href="#" extension="AAM Plus Package" license="<?php echo $this->getRepository()->getLicense('AAM Plus Package'); ?>" class="extension-action extension-action-ok view-license-btn" aam-tooltip="Installed Successfully"></a>
|
50 |
<?php } else { ?>
|
51 |
+
<a href="#" extension="AAM Plus Package" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UEM8U65HFEG4Q" class="extension-action extension-action-purchase add-license-btn" aam-tooltip="Get it Today"></a>
|
52 |
<?php } ?>
|
53 |
</div>
|
54 |
</td>
|
67 |
<div class="extension-actions">
|
68 |
<a href="http://wpaam.com/aam-extensions/aam-activities/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
69 |
<?php if ($this->getRepository()->hasExtension('AAM Activities')) { ?>
|
70 |
+
<a href="#" extension="AAM Activities" license="<?php echo $this->getRepository()->getLicense('AAM Activities'); ?>" class="extension-action extension-action-ok view-license-btn" aam-tooltip="Installed Successfully"></a>
|
71 |
<?php } else { ?>
|
72 |
+
<a href="#" extension="AAM Activities" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HME9DTSFSJH4W" class="extension-action extension-action-purchase add-license-btn" aam-tooltip="Get it Today"></a>
|
73 |
<?php } ?>
|
74 |
</div>
|
75 |
</td>
|
88 |
<div class="extension-actions">
|
89 |
<a href="http://wpaam.com/aam-extensions/aam-media-manager/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
90 |
<?php if ($this->getRepository()->hasExtension('AAM Media Manager')) { ?>
|
91 |
+
<a href="#" extension="AAM Media Manager" license="<?php echo $this->getRepository()->getLicense('AAM Media Manager'); ?>" class="extension-action extension-action-ok view-license-btn" aam-tooltip="Installed Successfully"></a>
|
92 |
<?php } else { ?>
|
93 |
+
<a href="#" extension="AAM Media Manager" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WJ48A7Z6EFZJ4" class="extension-action extension-action-purchase add-license-btn" aam-tooltip="Get it Today"></a>
|
94 |
<?php } ?>
|
95 |
</div>
|
96 |
</td>
|
104 |
The content (or part of the content) can be filtered based on currently logged in user or visitor.
|
105 |
Check our <a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank">website</a> for more information.
|
106 |
</td>
|
107 |
+
<td class="extension-price payed">$20.00</td>
|
108 |
<td>
|
109 |
|
110 |
<div class="extension-actions">
|
111 |
<a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
112 |
<?php if ($this->getRepository()->hasExtension('AAM Content Filter')) { ?>
|
113 |
+
<a href="#" extension="AAM Content Filter" license="<?php echo $this->getRepository()->getLicense('AAM Content Filter'); ?>" class="extension-action extension-action-ok view-license-btn" aam-tooltip="Installed Successfully"></a>
|
114 |
<?php } else { ?>
|
115 |
+
<a href="#" extension="AAM Content Filter" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X7NZ7QF8A9CVS" class="extension-action extension-action-purchase add-license-btn" aam-tooltip="Get it Today"></a>
|
116 |
<?php } ?>
|
117 |
</div>
|
118 |
</td>
|
130 |
<div class="extension-actions">
|
131 |
<a href="http://wpaam.com/aam-development/aam-plugin-manager/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
|
132 |
<?php if ($this->getRepository()->hasExtension('AAM Plugin Manager')) { ?>
|
133 |
+
<a href="#" extension="AAM Plugin Manager" license="<?php echo $this->getRepository()->getLicense('AAM Content Filter'); ?>" class="extension-action extension-action-ok view-license-btn" aam-tooltip="Installed Successfully"></a>
|
134 |
<?php } else { ?>
|
135 |
+
<a href="#" extension="AAM Plugin Manager" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QJ2H2J483VXPL" class="extension-action extension-action-purchase add-license-btn" aam-tooltip="Get it Today"></a>
|
136 |
<?php } ?>
|
137 |
</div>
|
138 |
</td>
|
139 |
</tr>
|
140 |
</tbody>
|
141 |
</table>
|
142 |
+
<div id="install_license" class="aam-dialog" title="<?php echo __('Install License', 'aam'); ?>">
|
143 |
<p class="dialog-content">
|
144 |
+
<?php echo __('If you already have license key, just enter it below. Othewise click <b>Purchase</b> button to checkout your order.', 'aam'); ?>
|
145 |
<input type="text" class="license-input" id="license_key" placeholder="License Key" />
|
146 |
</p>
|
147 |
+
<ul class="license-error-list"></ul>
|
148 |
</div>
|
149 |
+
<div id="update_license" class="aam-dialog" title="<?php echo __('Update License', 'aam'); ?>">
|
150 |
<p class="dialog-content" style="text-align: center;">
|
151 |
+
<?php echo __('Your license key: ', 'aam'); ?><br/>
|
152 |
<b><span id="installed_license_key"></span></b>
|
153 |
</p>
|
154 |
+
<ul class="license-error-list"></ul>
|
155 |
</div>
|
156 |
</div>
|
157 |
</div>
|
189 |
</h3>
|
190 |
<div class="inside">
|
191 |
<div class="large-icons-row">
|
192 |
+
<a href="https://twitter.com/vasyltech" class="aam-icon aam-icon-large aam-icon-large-twitter" aam-tooltip="Follow @wpaam" target="_blank">
|
193 |
<span></span><?php echo __('Follow Us', 'aam'); ?>
|
194 |
</a>
|
195 |
+
<a href="mailto:vasyl@vasyltech.com" class="aam-icon aam-icon-large aam-icon-large-message" aam-tooltip="Send Us Email">
|
196 |
<span></span><?php echo __('Send Message', 'aam'); ?>
|
197 |
</a>
|
198 |
+
<a href="http://vasyltech.com" class="aam-icon aam-icon-large aam-icon-large-link" aam-tooltip="Visit Us" target="_blank">
|
199 |
<span></span><?php echo __('Website', 'aam'); ?>
|
200 |
</a>
|
201 |
</div>
|
211 |
<div class="postbox">
|
212 |
<div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
|
213 |
<h3 class="hndle">
|
214 |
+
<span style="color:#FF0000;"><?php echo __('Development License', 'aam'); ?></span>
|
215 |
</h3>
|
216 |
<div class="inside">
|
217 |
<p>
|
218 |
+
<?php echo __('Get <b>Development License</b> for $119 and receive access to all extensions that are available today and will be developed within a year.', 'aam'); ?>
|
219 |
</p>
|
220 |
<div style="text-align: center;">
|
221 |
+
<?php if ($this->getRepository()->hasLicense('AAM Development License')) { ?>
|
222 |
+
<a href="#" extension="AAM Development License" license="<?php echo $this->getRepository()->getLicense('AAM Development License'); ?>" class="button button-primary button-large view-license-btn"><?php echo __('View License', 'aam'); ?></a>
|
223 |
+
<?php } else { ?>
|
224 |
+
<a href="#" extension="AAM Development License" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3Q6UDARTR532U" class="button button-primary button-large add-license-btn"><?php echo __('Add License', 'aam'); ?></a>
|
225 |
+
<?php } ?>
|
226 |
+
|
227 |
</div>
|
228 |
</div>
|
229 |
</div>
|
application/view/tmpl/help_developers.phtml
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<h2>AAM Development Framework</h2>
|
2 |
-
|
3 |
-
<p>
|
4 |
-
Are you passionate about WordPress development? We are too! Become a member of
|
5 |
-
the AAM community and obtain our
|
6 |
-
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3Q6UDARTR532U" target="_blank">Exclusive Development License</a>
|
7 |
-
where you can profit from your own ideas and have access to all AAM extensions.
|
8 |
-
</p>
|
9 |
-
|
10 |
-
<p>
|
11 |
-
We receive regular requests and suggestions for new extensions and decided we would
|
12 |
-
extend the opportunity to create and earn by opening our platform to you. We will
|
13 |
-
host your extensions on our server so you may develop custom features for you and
|
14 |
-
your customers. If you have a great idea and would like to create an extension for
|
15 |
-
sales, we will review, approve and host it on AAM server.
|
16 |
-
</p>
|
17 |
-
|
18 |
-
<p>
|
19 |
-
You can download the sample extension from our official
|
20 |
-
<a href="https://github.com/wpaam/AAM-Feature-Example" target="_blank">GitHub Repository</a>
|
21 |
-
and customize it to your special need.
|
22 |
-
</p>
|
23 |
-
|
24 |
-
<p>
|
25 |
-
Additionally the
|
26 |
-
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3Q6UDARTR532U" target="_blank">AAM Development License</a>
|
27 |
-
gives you an opportunity to download <b>ALL</b> AAM extensions that are available
|
28 |
-
now and all new extensions that will be developed within a year from the time of purchase.
|
29 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
application/view/tmpl/help_extensions.phtml
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<h2>AAM Extensions</h2>
|
2 |
-
|
3 |
-
<p>
|
4 |
-
Advanced Access Manager is free platform and you can use most of the features without
|
5 |
-
any limitations but in case you are looking for more, this is where AAM extensions
|
6 |
-
might be useful for you to check. Complete list of available extensions you can find
|
7 |
-
on AAM->Extensions page.
|
8 |
-
</p>
|
9 |
-
<p>
|
10 |
-
We are using PayPal to process the payment and if it completed successfully, you will
|
11 |
-
automatically receive an email with license key that you can use to activate the extension.
|
12 |
-
</p>
|
13 |
-
<p>
|
14 |
-
In case of any issues with license key, we guaranty to resolve the issue within one business day.
|
15 |
-
Otherwise your money back.
|
16 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
application/view/tmpl/help_faq.phtml
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<h2>Frequently Asked Questions</h2>
|
2 |
-
|
3 |
-
<h4>What is Advanced Access Manager?</h4>
|
4 |
-
<p>
|
5 |
-
Advanced Access Manager (aka AAM) is free WordPress plugin that allows you to
|
6 |
-
control access to your website. With AAM you can manager access to your Posts,
|
7 |
-
Pages and Categories, filter unnecessary areas in your Backend, manager Users and
|
8 |
-
Roles and many more.
|
9 |
-
</p>
|
10 |
-
|
11 |
-
<h4>What should I know to understand how AAM works?</h4>
|
12 |
-
<p>
|
13 |
-
Best way to learn more about AAM is to check our
|
14 |
-
<a href="http://wpaam.com/tutorials/" target="_blank">collection of tutorials</a>.
|
15 |
-
From here you'll get the basic understanding about most important aspects of AAM
|
16 |
-
functionality. It is also very important to understand how WordPress
|
17 |
-
<a href="https://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Roles & Capabilities</a>
|
18 |
-
are organized.
|
19 |
-
</p>
|
20 |
-
|
21 |
-
<h4>I'm not able to manage Administrator Role. What am I missing?</h4>
|
22 |
-
<p>
|
23 |
-
In fact that AAM is very powerful tool, many unexperienced users were able to limit
|
24 |
-
Administrator rights and loose access to Dashboard. That is why from AAM Release 2.5
|
25 |
-
we introduced <a href="http://wpaam.com/tutorials/aam-super-admin/" target="_blank">AAM Super Admin</a>.
|
26 |
-
You can make one user in your system as AAM Super Administrator that is able to manager other
|
27 |
-
administrators.<br/>
|
28 |
-
<span style="color:#FF0000; font-weight: bold;">Warning!</span> Do not limit capabilities for Administrator
|
29 |
-
Role, because even if you are AAM Super Administrator, you still remain WordPress Administrator.
|
30 |
-
</p>
|
31 |
-
|
32 |
-
<h4>What is ConfigPress?</h4>
|
33 |
-
<p>
|
34 |
-
Think about ConfigPress as a settings page but instead of dozens of checkboxes, drop-downs and input fields
|
35 |
-
you use configuration script based on <a href="http://en.wikipedia.org/wiki/INI_file" target="_blank">INI Standard</a>.
|
36 |
-
The reason we use this format is that AAM is not only just a plugin but complex and very flexible development
|
37 |
-
tool. That is why we came to conclusion to organize all settings in ConfigPress format.
|
38 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
application/view/tmpl/help_overview.phtml
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<h2>General Overview</h2>
|
2 |
-
<p>
|
3 |
-
Advanced Access Manager (aka AAM) is one of the most popular access control plugins. It is easy-to-use but
|
4 |
-
at the same time very powerful tool that gives you a flexible control over your either
|
5 |
-
single WordPress site or Multisite Network. With AAM you are allowed to configure access
|
6 |
-
to different parts of your website for any <i>role</i> or individual <i>user</i>.
|
7 |
-
</p>
|
8 |
-
<p>
|
9 |
-
Another great aspect of AAM is that our team constantly working on new features and improving
|
10 |
-
existing. We are very dedicated to success of this project and our support is ready to help you
|
11 |
-
within 48hours.
|
12 |
-
</p>
|
13 |
-
<p>
|
14 |
-
Below you can find some of the major feature that are available in current AAM version:
|
15 |
-
</p>
|
16 |
-
|
17 |
-
<b>Control access to backend menu (including submenu).</b> As example you can restrict
|
18 |
-
access for <i>role</i> Editor to Menu "Pages" or does not allow any <i>user</i> to
|
19 |
-
manage Post's Categories.<br/>
|
20 |
-
<br/>
|
21 |
-
<b>Filter <i>widgets</i> & <i>metaboxes</i>.</b> Filter the list of metaboxes that any <i>role</i>
|
22 |
-
or <i>user</i> can see during Post/Page editing. At the same time you can filter the
|
23 |
-
list of Dashboard and Frontend widgets.<br/>
|
24 |
-
<br/>
|
25 |
-
<b>Control access to any <i>post</i>, <i>page</i>, <i>custom post type</i> or <i>category</i>.</b>
|
26 |
-
You can restrict access to page or post for any <i>user</i> or <i>role</i> as well as
|
27 |
-
restrict access to entire <i>category</i> and all posts inside it. You can also restrict
|
28 |
-
commenting for pages or exclude any from the frontend menu. For more restrictions you can
|
29 |
-
consider to get <a href="http://wpaam.com/aam-extensions/aam-plus-package/" target="_blank">AAM Plus Package</a>.<br/>
|
30 |
-
<br/>
|
31 |
-
<b>Filter Post or Page content.</b> You can filter Post's or Page's content for
|
32 |
-
currently logged in user or visitor. This feature is available with extension
|
33 |
-
<a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank">AAM Content Manager</a>.<br/>
|
34 |
-
<br/>
|
35 |
-
<b>Manage capabilities for any <i>role</i> or <i>user</i>.</b>
|
36 |
-
AAM, with simple interface, allows you to grand or remove capabilities for any <i>role</i> or <i>user</i>.
|
37 |
-
You can also create new custom capability or remove existing.<br/>
|
38 |
-
<br/>
|
39 |
-
<b>Create custom actions for system events.</b> As example your system can send email
|
40 |
-
to you if some user published post or page, or modified content. You also can develop
|
41 |
-
your own custom action for system event.<br/>
|
42 |
-
<br/>
|
43 |
-
<b>Track <i>user</i> activities.</b> With AAM you can track user activities within
|
44 |
-
your website. So you can easily find out when user was logged in or modified any post
|
45 |
-
or page. To extend the list of tracked activities, consider to get
|
46 |
-
<a href="http://wpaam.com/aam-extensions/aam-activities/" target="_blank">AAM Activities</a>
|
47 |
-
extension.
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
application/view/tmpl/manager.phtml
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* ======================================================================
|
5 |
* LICENSE: This file is subject to the terms and conditions defined in *
|
@@ -8,6 +7,19 @@
|
|
8 |
*/
|
9 |
?>
|
10 |
<div class="wrap" id="aam">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
<form action="" method="post" id="aam_form">
|
12 |
<?php do_action('aam_cmanager_hierarchy'); ?>
|
13 |
<div class="postbox-container" style="width:70%;">
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* ======================================================================
|
4 |
* LICENSE: This file is subject to the terms and conditions defined in *
|
7 |
*/
|
8 |
?>
|
9 |
<div class="wrap" id="aam">
|
10 |
+
<div class="aam-notification">
|
11 |
+
<div class="aam-logo"></div>
|
12 |
+
<div class="aam-notification-content">
|
13 |
+
<h1>Important Notification</h1>
|
14 |
+
<p>
|
15 |
+
Advanced Access Manager is changing the primary owner to <a href="http://vasyltech.com" target="_blank">VasylTech</a>.<br/>
|
16 |
+
Stay tuned to the AAM version 3 development progress on <a href="https://github.com/VasylTech/advanced-access-manager" target="_blank">GitHub repository</a> or on twitter <a href="https://twitter.com/vasyltech" target="_blank">@vasyltech</a>.
|
17 |
+
<br/>The estimated release is mid November 2015.
|
18 |
+
</p>
|
19 |
+
</div>
|
20 |
+
<a class="dashicons dashicons-dismiss" id="close-aam-notification" href="#"></a>
|
21 |
+
</div>
|
22 |
+
|
23 |
<form action="" method="post" id="aam_form">
|
24 |
<?php do_action('aam_cmanager_hierarchy'); ?>
|
25 |
<div class="postbox-container" style="width:70%;">
|
config.php
CHANGED
@@ -8,14 +8,17 @@
|
|
8 |
*/
|
9 |
|
10 |
//AAM Version for Update purpose
|
11 |
-
define('AAM_VERSION', '2.
|
12 |
|
13 |
define('AAM_BASE_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
14 |
|
15 |
$base_url = WP_PLUGIN_URL . '/' . basename(AAM_BASE_DIR) . '/';
|
16 |
-
if (
|
17 |
-
$base_url = str_replace('
|
|
|
|
|
18 |
}
|
|
|
19 |
define('AAM_BASE_URL', $base_url);
|
20 |
|
21 |
define('AAM_TEMPLATE_DIR', AAM_BASE_DIR . 'view/html/');
|
8 |
*/
|
9 |
|
10 |
//AAM Version for Update purpose
|
11 |
+
define('AAM_VERSION', '2.9.2');
|
12 |
|
13 |
define('AAM_BASE_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
14 |
|
15 |
$base_url = WP_PLUGIN_URL . '/' . basename(AAM_BASE_DIR) . '/';
|
16 |
+
if (strpos($base_url, 'https') === 0) {
|
17 |
+
$base_url = str_replace('https:', '', $base_url);
|
18 |
+
} elseif (strpos($base_url, 'http') === 0) {
|
19 |
+
$base_url = str_replace('http:', '', $base_url);
|
20 |
}
|
21 |
+
|
22 |
define('AAM_BASE_URL', $base_url);
|
23 |
|
24 |
define('AAM_TEMPLATE_DIR', AAM_BASE_DIR . 'view/html/');
|
extension/AAM_Activity_Log/extension.php
CHANGED
@@ -79,11 +79,9 @@ class AAM_Extension_ActivityLog extends AAM_Core_Extension {
|
|
79 |
}
|
80 |
|
81 |
/**
|
82 |
-
*
|
83 |
-
* @param type $username
|
84 |
-
* @param type $user
|
85 |
*/
|
86 |
-
public function login(
|
87 |
$this->getParent()->getUser()
|
88 |
->getObject(aam_Control_Object_Activity::UID)->add(
|
89 |
time(),
|
79 |
}
|
80 |
|
81 |
/**
|
82 |
+
*
|
|
|
|
|
83 |
*/
|
84 |
+
public function login() {
|
85 |
$this->getParent()->getUser()
|
86 |
->getObject(aam_Control_Object_Activity::UID)->add(
|
87 |
time(),
|
extension/AAM_Secure/geoip/freegeoip.php
CHANGED
@@ -12,17 +12,18 @@ class FreeGeoIP extends GeoIP {
|
|
12 |
|
13 |
public static function query($ip) {
|
14 |
$response = aam_Core_API::cURL('http://freegeoip.net/xml/' . $ip, false, true);
|
|
|
15 |
if ($response['status'] == 'success') {
|
16 |
-
$data = simplexml_load_string($response['content']);
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
}
|
27 |
|
28 |
return $geodata;
|
12 |
|
13 |
public static function query($ip) {
|
14 |
$response = aam_Core_API::cURL('http://freegeoip.net/xml/' . $ip, false, true);
|
15 |
+
$geodata = null;
|
16 |
if ($response['status'] == 'success') {
|
17 |
+
$data = @simplexml_load_string($response['content']);
|
18 |
+
if ($data) {
|
19 |
+
$geodata = (object) array(
|
20 |
+
'countryCode' => (string) $data->CountryCode,
|
21 |
+
'countryName' => (string) $data->CountryName,
|
22 |
+
'region' => (string) $data->RegionCode,
|
23 |
+
'city' => (string) $data->City,
|
24 |
+
'zip' => (string) $data->ZipCode
|
25 |
+
);
|
26 |
+
}
|
27 |
}
|
28 |
|
29 |
return $geodata;
|
library/Zend/Config.php
DELETED
@@ -1,485 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Zend Framework
|
4 |
-
*
|
5 |
-
* LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the new BSD license that is bundled
|
8 |
-
* with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://framework.zend.com/license/new-bsd
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@zend.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* @category Zend
|
16 |
-
* @package Zend_Config
|
17 |
-
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
|
18 |
-
* @license http://framework.zend.com/license/new-bsd New BSD License
|
19 |
-
* @version $Id: Config.php 23775 2011-03-01 17:25:24Z ralph $
|
20 |
-
*/
|
21 |
-
|
22 |
-
/**
|
23 |
-
* File has been modified by Vasyl Martyniuk <martyniuk.vasyl@gmail.com> to fit the
|
24 |
-
* project needs.
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @category Zend
|
29 |
-
* @package Zend_Config
|
30 |
-
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
|
31 |
-
* @license http://framework.zend.com/license/new-bsd New BSD License
|
32 |
-
*/
|
33 |
-
class Zend_Config implements Countable, Iterator
|
34 |
-
{
|
35 |
-
/**
|
36 |
-
* Whether in-memory modifications to configuration data are allowed
|
37 |
-
*
|
38 |
-
* @var boolean
|
39 |
-
*/
|
40 |
-
protected $_allowModifications;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Iteration index
|
44 |
-
*
|
45 |
-
* @var integer
|
46 |
-
*/
|
47 |
-
protected $_index;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Number of elements in configuration data
|
51 |
-
*
|
52 |
-
* @var integer
|
53 |
-
*/
|
54 |
-
protected $_count;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Contains array of configuration data
|
58 |
-
*
|
59 |
-
* @var array
|
60 |
-
*/
|
61 |
-
protected $_data;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Used when unsetting values during iteration to ensure we do not skip
|
65 |
-
* the next element
|
66 |
-
*
|
67 |
-
* @var boolean
|
68 |
-
*/
|
69 |
-
protected $_skipNextIteration;
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Contains which config file sections were loaded. This is null
|
73 |
-
* if all sections were loaded, a string name if one section is loaded
|
74 |
-
* and an array of string names if multiple sections were loaded.
|
75 |
-
*
|
76 |
-
* @var mixed
|
77 |
-
*/
|
78 |
-
protected $_loadedSection;
|
79 |
-
|
80 |
-
/**
|
81 |
-
* This is used to track section inheritance. The keys are names of sections that
|
82 |
-
* extend other sections, and the values are the extended sections.
|
83 |
-
*
|
84 |
-
* @var array
|
85 |
-
*/
|
86 |
-
protected $_extends = array();
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Load file error string.
|
90 |
-
*
|
91 |
-
* Is null if there was no error while file loading
|
92 |
-
*
|
93 |
-
* @var string
|
94 |
-
*/
|
95 |
-
protected $_loadFileErrorStr = null;
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Zend_Config provides a property based interface to
|
99 |
-
* an array. The data are read-only unless $allowModifications
|
100 |
-
* is set to true on construction.
|
101 |
-
*
|
102 |
-
* Zend_Config also implements Countable and Iterator to
|
103 |
-
* facilitate easy access to the data.
|
104 |
-
*
|
105 |
-
* @param array $array
|
106 |
-
* @param boolean $allowModifications
|
107 |
-
* @return void
|
108 |
-
*/
|
109 |
-
public function __construct(array $array, $allowModifications = false)
|
110 |
-
{
|
111 |
-
$this->_allowModifications = (boolean) $allowModifications;
|
112 |
-
$this->_loadedSection = null;
|
113 |
-
$this->_index = 0;
|
114 |
-
$this->_data = array();
|
115 |
-
foreach ($array as $key => $value) {
|
116 |
-
if (is_array($value)) {
|
117 |
-
$this->_data[$key] = new self($value, $this->_allowModifications);
|
118 |
-
} else {
|
119 |
-
$this->_data[$key] = $value;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
$this->_count = count($this->_data);
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Retrieve a value and return $default if there is no element set.
|
127 |
-
*
|
128 |
-
* @param string $name
|
129 |
-
* @param mixed $default
|
130 |
-
* @return mixed
|
131 |
-
*/
|
132 |
-
public function get($name, $default = null)
|
133 |
-
{
|
134 |
-
$result = $default;
|
135 |
-
if (array_key_exists($name, $this->_data)) {
|
136 |
-
$result = $this->_data[$name];
|
137 |
-
}
|
138 |
-
return $result;
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Magic function so that $obj->value will work.
|
143 |
-
*
|
144 |
-
* @param string $name
|
145 |
-
* @return mixed
|
146 |
-
*/
|
147 |
-
public function __get($name)
|
148 |
-
{
|
149 |
-
return $this->get($name);
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Only allow setting of a property if $allowModifications
|
154 |
-
* was set to true on construction. Otherwise, throw an exception.
|
155 |
-
*
|
156 |
-
* @param string $name
|
157 |
-
* @param mixed $value
|
158 |
-
* @throws Zend_Config_Exception
|
159 |
-
* @return void
|
160 |
-
*/
|
161 |
-
public function __set($name, $value)
|
162 |
-
{
|
163 |
-
if ($this->_allowModifications) {
|
164 |
-
if (is_array($value)) {
|
165 |
-
$this->_data[$name] = new self($value, true);
|
166 |
-
} else {
|
167 |
-
$this->_data[$name] = $value;
|
168 |
-
}
|
169 |
-
$this->_count = count($this->_data);
|
170 |
-
} else {
|
171 |
-
/** @see Zend_Config_Exception */
|
172 |
-
throw new Zend_Config_Exception('Zend_Config is read only');
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Deep clone of this instance to ensure that nested Zend_Configs
|
178 |
-
* are also cloned.
|
179 |
-
*
|
180 |
-
* @return void
|
181 |
-
*/
|
182 |
-
public function __clone()
|
183 |
-
{
|
184 |
-
$array = array();
|
185 |
-
foreach ($this->_data as $key => $value) {
|
186 |
-
if ($value instanceof Zend_Config) {
|
187 |
-
$array[$key] = clone $value;
|
188 |
-
} else {
|
189 |
-
$array[$key] = $value;
|
190 |
-
}
|
191 |
-
}
|
192 |
-
$this->_data = $array;
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Return an associative array of the stored data.
|
197 |
-
*
|
198 |
-
* @return array
|
199 |
-
*/
|
200 |
-
public function toArray()
|
201 |
-
{
|
202 |
-
$array = array();
|
203 |
-
$data = $this->_data;
|
204 |
-
foreach ($data as $key => $value) {
|
205 |
-
if ($value instanceof Zend_Config) {
|
206 |
-
$array[$key] = $value->toArray();
|
207 |
-
} else {
|
208 |
-
$array[$key] = $value;
|
209 |
-
}
|
210 |
-
}
|
211 |
-
return $array;
|
212 |
-
}
|
213 |
-
|
214 |
-
/**
|
215 |
-
* Support isset() overloading on PHP 5.1
|
216 |
-
*
|
217 |
-
* @param string $name
|
218 |
-
* @return boolean
|
219 |
-
*/
|
220 |
-
public function __isset($name)
|
221 |
-
{
|
222 |
-
return isset($this->_data[$name]);
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Support unset() overloading on PHP 5.1
|
227 |
-
*
|
228 |
-
* @param string $name
|
229 |
-
* @throws Zend_Config_Exception
|
230 |
-
* @return void
|
231 |
-
*/
|
232 |
-
public function __unset($name)
|
233 |
-
{
|
234 |
-
if ($this->_allowModifications) {
|
235 |
-
unset($this->_data[$name]);
|
236 |
-
$this->_count = count($this->_data);
|
237 |
-
$this->_skipNextIteration = true;
|
238 |
-
} else {
|
239 |
-
/** @see Zend_Config_Exception */
|
240 |
-
throw new Zend_Config_Exception('Zend_Config is read only');
|
241 |
-
}
|
242 |
-
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Defined by Countable interface
|
247 |
-
*
|
248 |
-
* @return int
|
249 |
-
*/
|
250 |
-
public function count()
|
251 |
-
{
|
252 |
-
return $this->_count;
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Defined by Iterator interface
|
257 |
-
*
|
258 |
-
* @return mixed
|
259 |
-
*/
|
260 |
-
public function current()
|
261 |
-
{
|
262 |
-
$this->_skipNextIteration = false;
|
263 |
-
return current($this->_data);
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* Defined by Iterator interface
|
268 |
-
*
|
269 |
-
* @return mixed
|
270 |
-
*/
|
271 |
-
public function key()
|
272 |
-
{
|
273 |
-
return key($this->_data);
|
274 |
-
}
|
275 |
-
|
276 |
-
/**
|
277 |
-
* Defined by Iterator interface
|
278 |
-
*
|
279 |
-
*/
|
280 |
-
public function next()
|
281 |
-
{
|
282 |
-
if ($this->_skipNextIteration) {
|
283 |
-
$this->_skipNextIteration = false;
|
284 |
-
return;
|
285 |
-
}
|
286 |
-
next($this->_data);
|
287 |
-
$this->_index++;
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Defined by Iterator interface
|
292 |
-
*
|
293 |
-
*/
|
294 |
-
public function rewind()
|
295 |
-
{
|
296 |
-
$this->_skipNextIteration = false;
|
297 |
-
reset($this->_data);
|
298 |
-
$this->_index = 0;
|
299 |
-
}
|
300 |
-
|
301 |
-
/**
|
302 |
-
* Defined by Iterator interface
|
303 |
-
*
|
304 |
-
* @return boolean
|
305 |
-
*/
|
306 |
-
public function valid()
|
307 |
-
{
|
308 |
-
return $this->_index < $this->_count;
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Returns the section name(s) loaded.
|
313 |
-
*
|
314 |
-
* @return mixed
|
315 |
-
*/
|
316 |
-
public function getSectionName()
|
317 |
-
{
|
318 |
-
if(is_array($this->_loadedSection) && count($this->_loadedSection) == 1) {
|
319 |
-
$this->_loadedSection = $this->_loadedSection[0];
|
320 |
-
}
|
321 |
-
return $this->_loadedSection;
|
322 |
-
}
|
323 |
-
|
324 |
-
/**
|
325 |
-
* Returns true if all sections were loaded
|
326 |
-
*
|
327 |
-
* @return boolean
|
328 |
-
*/
|
329 |
-
public function areAllSectionsLoaded()
|
330 |
-
{
|
331 |
-
return $this->_loadedSection === null;
|
332 |
-
}
|
333 |
-
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Merge another Zend_Config with this one. The items
|
337 |
-
* in $merge will override the same named items in
|
338 |
-
* the current config.
|
339 |
-
*
|
340 |
-
* @param Zend_Config $merge
|
341 |
-
* @return Zend_Config
|
342 |
-
*/
|
343 |
-
public function merge(Zend_Config $merge)
|
344 |
-
{
|
345 |
-
foreach($merge as $key => $item) {
|
346 |
-
if(array_key_exists($key, $this->_data)) {
|
347 |
-
if($item instanceof Zend_Config && $this->$key instanceof Zend_Config) {
|
348 |
-
$this->$key = $this->$key->merge(new Zend_Config($item->toArray(), !$this->readOnly()));
|
349 |
-
} else {
|
350 |
-
$this->$key = $item;
|
351 |
-
}
|
352 |
-
} else {
|
353 |
-
if($item instanceof Zend_Config) {
|
354 |
-
$this->$key = new Zend_Config($item->toArray(), !$this->readOnly());
|
355 |
-
} else {
|
356 |
-
$this->$key = $item;
|
357 |
-
}
|
358 |
-
}
|
359 |
-
}
|
360 |
-
|
361 |
-
return $this;
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Prevent any more modifications being made to this instance. Useful
|
366 |
-
* after merge() has been used to merge multiple Zend_Config objects
|
367 |
-
* into one object which should then not be modified again.
|
368 |
-
*
|
369 |
-
*/
|
370 |
-
public function setReadOnly()
|
371 |
-
{
|
372 |
-
$this->_allowModifications = false;
|
373 |
-
foreach ($this->_data as $key => $value) {
|
374 |
-
if ($value instanceof Zend_Config) {
|
375 |
-
$value->setReadOnly();
|
376 |
-
}
|
377 |
-
}
|
378 |
-
}
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Returns if this Zend_Config object is read only or not.
|
382 |
-
*
|
383 |
-
* @return boolean
|
384 |
-
*/
|
385 |
-
public function readOnly()
|
386 |
-
{
|
387 |
-
return !$this->_allowModifications;
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Get the current extends
|
392 |
-
*
|
393 |
-
* @return array
|
394 |
-
*/
|
395 |
-
public function getExtends()
|
396 |
-
{
|
397 |
-
return $this->_extends;
|
398 |
-
}
|
399 |
-
|
400 |
-
/**
|
401 |
-
* Set an extend for Zend_Config_Writer
|
402 |
-
*
|
403 |
-
* @param string $extendingSection
|
404 |
-
* @param string $extendedSection
|
405 |
-
* @return void
|
406 |
-
*/
|
407 |
-
public function setExtend($extendingSection, $extendedSection = null)
|
408 |
-
{
|
409 |
-
if ($extendedSection === null && isset($this->_extends[$extendingSection])) {
|
410 |
-
unset($this->_extends[$extendingSection]);
|
411 |
-
} else if ($extendedSection !== null) {
|
412 |
-
$this->_extends[$extendingSection] = $extendedSection;
|
413 |
-
}
|
414 |
-
}
|
415 |
-
|
416 |
-
/**
|
417 |
-
* Throws an exception if $extendingSection may not extend $extendedSection,
|
418 |
-
* and tracks the section extension if it is valid.
|
419 |
-
*
|
420 |
-
* @param string $extendingSection
|
421 |
-
* @param string $extendedSection
|
422 |
-
* @throws Zend_Config_Exception
|
423 |
-
* @return void
|
424 |
-
*/
|
425 |
-
protected function _assertValidExtend($extendingSection, $extendedSection)
|
426 |
-
{
|
427 |
-
// detect circular section inheritance
|
428 |
-
$extendedSectionCurrent = $extendedSection;
|
429 |
-
while (array_key_exists($extendedSectionCurrent, $this->_extends)) {
|
430 |
-
if ($this->_extends[$extendedSectionCurrent] == $extendingSection) {
|
431 |
-
/** @see Zend_Config_Exception */
|
432 |
-
throw new Zend_Config_Exception('Illegal circular inheritance detected');
|
433 |
-
}
|
434 |
-
$extendedSectionCurrent = $this->_extends[$extendedSectionCurrent];
|
435 |
-
}
|
436 |
-
// remember that this section extends another section
|
437 |
-
$this->_extends[$extendingSection] = $extendedSection;
|
438 |
-
}
|
439 |
-
|
440 |
-
/**
|
441 |
-
* Handle any errors from simplexml_load_file or parse_ini_file
|
442 |
-
*
|
443 |
-
* @param integer $errno
|
444 |
-
* @param string $errstr
|
445 |
-
* @param string $errfile
|
446 |
-
* @param integer $errline
|
447 |
-
*/
|
448 |
-
protected function _loadFileErrorHandler($errno, $errstr, $errfile, $errline)
|
449 |
-
{
|
450 |
-
if ($this->_loadFileErrorStr === null) {
|
451 |
-
$this->_loadFileErrorStr = $errstr;
|
452 |
-
} else {
|
453 |
-
$this->_loadFileErrorStr .= (PHP_EOL . $errstr);
|
454 |
-
}
|
455 |
-
}
|
456 |
-
|
457 |
-
/**
|
458 |
-
* Merge two arrays recursively, overwriting keys of the same name
|
459 |
-
* in $firstArray with the value in $secondArray.
|
460 |
-
*
|
461 |
-
* @param mixed $firstArray First array
|
462 |
-
* @param mixed $secondArray Second array to merge into first array
|
463 |
-
* @return array
|
464 |
-
*/
|
465 |
-
protected function _arrayMergeRecursive($firstArray, $secondArray)
|
466 |
-
{
|
467 |
-
if (is_array($firstArray) && is_array($secondArray)) {
|
468 |
-
foreach ($secondArray as $key => $value) {
|
469 |
-
if (isset($firstArray[$key])) {
|
470 |
-
$firstArray[$key] = $this->_arrayMergeRecursive($firstArray[$key], $value);
|
471 |
-
} else {
|
472 |
-
if($key === 0) {
|
473 |
-
$firstArray= array(0=>$this->_arrayMergeRecursive($firstArray, $value));
|
474 |
-
} else {
|
475 |
-
$firstArray[$key] = $value;
|
476 |
-
}
|
477 |
-
}
|
478 |
-
}
|
479 |
-
} else {
|
480 |
-
$firstArray = $secondArray;
|
481 |
-
}
|
482 |
-
|
483 |
-
return $firstArray;
|
484 |
-
}
|
485 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/Zend/Config/Exception.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Zend Framework
|
4 |
-
*
|
5 |
-
* LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the new BSD license that is bundled
|
8 |
-
* with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://framework.zend.com/license/new-bsd
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@zend.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* @category Zend
|
16 |
-
* @package Zend_Config
|
17 |
-
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
|
18 |
-
* @license http://framework.zend.com/license/new-bsd New BSD License
|
19 |
-
* @version $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $
|
20 |
-
*/
|
21 |
-
|
22 |
-
/**
|
23 |
-
* File has been modified by Vasyl Martyniuk <martyniuk.vasyl@gmail.com> to fit the
|
24 |
-
* project needs.
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @category Zend
|
29 |
-
* @package Zend_Config
|
30 |
-
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
|
31 |
-
* @license http://framework.zend.com/license/new-bsd New BSD License
|
32 |
-
*/
|
33 |
-
class Zend_Config_Exception extends Zend_Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library/Zend/Config/Ini.php
DELETED
@@ -1,301 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Zend Framework
|
4 |
-
*
|
5 |
-
* LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the new BSD license that is bundled
|
8 |
-
* with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://framework.zend.com/license/new-bsd
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@zend.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* @category Zend
|
16 |
-
* @package Zend_Config
|
17 |
-
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
|
18 |
-
* @license http://framework.zend.com/license/new-bsd New BSD License
|
19 |
-
* @version $Id: Ini.php 24045 2011-05-23 12:45:11Z rob $
|
20 |
-
*/
|
21 |
-
|
22 |
-
/**
|
23 |
-
* File has been modified by Vasyl Martyniuk <martyniuk.vasyl@gmail.com> to fit the
|
24 |
-
* project needs.
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @category Zend
|
30 |
-
* @package Zend_Config
|
31 |
-
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
|
32 |
-
* @license http://framework.zend.com/license/new-bsd New BSD License
|
33 |
-
*/
|
34 |
-
class Zend_Config_Ini extends Zend_Config
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* String that separates nesting levels of configuration data identifiers
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
protected $_nestSeparator = '.';
|
42 |
-
|
43 |
-
/**
|
44 |
-
* String that separates the parent section name
|
45 |
-
*
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
protected $_sectionSeparator = ':';
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Whether to skip extends or not
|
52 |
-
*
|
53 |
-
* @var boolean
|
54 |
-
*/
|
55 |
-
protected $_skipExtends = false;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Loads the section $section from the config file $filename for
|
59 |
-
* access facilitated by nested object properties.
|
60 |
-
*
|
61 |
-
* If the section name contains a ":" then the section name to the right
|
62 |
-
* is loaded and included into the properties. Note that the keys in
|
63 |
-
* this $section will override any keys of the same
|
64 |
-
* name in the sections that have been included via ":".
|
65 |
-
*
|
66 |
-
* If the $section is null, then all sections in the ini file are loaded.
|
67 |
-
*
|
68 |
-
* If any key includes a ".", then this will act as a separator to
|
69 |
-
* create a sub-property.
|
70 |
-
*
|