PluginProbe
User Access Manager / 2.2.13
User Access Manager v2.2.13
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | user-access-manager.php +47 -52 trunk2.2.13 View file →
@@ -2,10 +2,10 @@
2 2 /**
3 3 * Plugin Name: User Access Manager
4 4 * Plugin URI: https://wordpress.org/plugins/user-access-manager/
5 5 * Author URI: https://twitter.com/GM_Alex
6 - * Version: 2.3.20
7 - * Requires PHP: 8.0
6 + * Version: 2.2.13
7 + * Requires PHP: 7.2
8 8 * Author: Alexander Schneider
9 9 * Description: Manage the access to your posts, pages, categories and files.
10 10 * Text Domain: user-access-manager
11 11 *
@@ -10,9 +10,9 @@
10 10 * Text Domain: user-access-manager
11 11 *
12 12 * user-access-manager.php
13 13 *
14 - * The user access manager main file.
14 + * The the user access manager main file.
15 15 *
16 16 * PHP versions 5
17 17 *
18 18 * @author Alexander Schneider <alexanderschneider85@gmail.com>
@@ -21,61 +21,56 @@
21 21 * @version SVN: $id$
22 22 * @link http://wordpress.org/extend/plugins/user-access-manager/
23 23 */
24 24
25 -function initUam() {
26 - $basePath = __DIR__ . DIRECTORY_SEPARATOR;
25 +$basePath = __DIR__.DIRECTORY_SEPARATOR;
26 +//Load language
27 +require_once $basePath.'includes'.DIRECTORY_SEPARATOR.'language.php';
28 +$locale = apply_filters('plugin_locale', get_locale(), 'user-access-manager');
29 +load_textdomain(
30 + 'user-access-manager',
31 + WP_LANG_DIR.DIRECTORY_SEPARATOR.'user-access-manager'.DIRECTORY_SEPARATOR.'user-access-manager-'.$locale.'.mo'
32 +);
33 +load_plugin_textdomain(
34 + 'user-access-manager',
35 + false,
36 + plugin_basename(dirname(__FILE__)).DIRECTORY_SEPARATOR.'languages'
37 +);
27 38
28 - //Load language
29 - require_once $basePath . 'includes' . DIRECTORY_SEPARATOR . 'language.php';
30 - $locale = apply_filters('plugin_locale', get_locale(), 'user-access-manager');
31 - load_textdomain(
32 - 'user-access-manager',
33 - WP_LANG_DIR . DIRECTORY_SEPARATOR . 'user-access-manager' . DIRECTORY_SEPARATOR . 'user-access-manager-' . $locale . '.mo'
39 +//--- Check requirements ---
40 +
41 +//Check php version
42 +if (version_compare(phpversion(), '7.2') === -1) {
43 + add_action(
44 + 'admin_notices',
45 + function () {
46 + echo '<div id="message" class="error"><p><strong>'
47 + .sprintf(TXT_UAM_PHP_VERSION_TO_LOW, phpversion())
48 + .'</strong></p></div>';
49 + }
34 50 );
35 - load_plugin_textdomain(
36 - 'user-access-manager',
37 - false,
38 - plugin_basename(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'languages'
39 - );
40 51
41 - //--- Check requirements ---
52 + return;
53 +}
42 54
43 - //Check php version
44 - if (version_compare((string)phpversion(), '7.2') === -1) {
45 - add_action(
46 - 'admin_notices',
47 - function () {
48 - echo '<div id="message" class="error"><p><strong>'
49 - . sprintf(TXT_UAM_PHP_VERSION_TO_LOW, phpversion())
50 - . '</strong></p></div>';
51 - }
52 - );
55 +//Check wordpress version
56 +global $wp_version;
53 57
54 - return;
55 - }
58 +if (version_compare($wp_version, '4.6') === -1) {
59 + add_action(
60 + 'admin_notices',
61 + function () use ($wp_version) {
62 + echo '<div id="message" class="error"><p><strong>'
63 + .sprintf(TXT_UAM_WORDPRESS_VERSION_TO_LOW, $wp_version)
64 + .'</strong></p></div>';
65 + }
66 + );
56 67
57 - //Check WordPress version
58 - global $wp_version;
68 + return;
69 +}
59 70
60 - if (version_compare((string)$wp_version, '4.6') === -1) {
61 - add_action(
62 - 'admin_notices',
63 - function () use ($wp_version) {
64 - echo '<div id="message" class="error"><p><strong>'
65 - . sprintf(TXT_UAM_WORDPRESS_VERSION_TO_LOW, $wp_version)
66 - . '</strong></p></div>';
67 - }
68 - );
71 +//Defines
72 +require_once $basePath.'vendor/autoload.php';
73 +require_once $basePath.'init.php';
69 74
70 - return;
71 - }
72 -
73 - //Defines
74 - require_once $basePath . 'includes' . DIRECTORY_SEPARATOR . 'version.php';
75 - require_once $basePath.'vendor/autoload.php';
76 - require_once $basePath.'init.php';
77 - global $userAccessManager;
78 - $userAccessManager = initUserAccessManger();
79 -}
80 -
81 -add_action('init', 'initUam', 0);
75 +global $userAccessManager;
76 +$userAccessManager = initUserAccessManger();