PluginProbe
User Access Manager / 2.0.13
User Access Manager v2.0.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 +39 -52 trunk2.0.13 View file →
@@ -2,10 +2,9 @@
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.0.13
8 7 * Author: Alexander Schneider
9 8 * Description: Manage the access to your posts, pages, categories and files.
10 9 * Text Domain: user-access-manager
11 10 *
@@ -10,9 +9,9 @@
10 9 * Text Domain: user-access-manager
11 10 *
12 11 * user-access-manager.php
13 12 *
14 - * The user access manager main file.
13 + * The the user access manager main file.
15 14 *
16 15 * PHP versions 5
17 16 *
18 17 * @author Alexander Schneider <alexanderschneider85@gmail.com>
@@ -21,61 +20,49 @@
21 20 * @version SVN: $id$
22 21 * @link http://wordpress.org/extend/plugins/user-access-manager/
23 22 */
24 23
25 -function initUam() {
26 - $basePath = __DIR__ . DIRECTORY_SEPARATOR;
24 +$basePath = __DIR__.DIRECTORY_SEPARATOR;
25 +//Load language
26 +require_once $basePath.'includes'.DIRECTORY_SEPARATOR.'language.php';
27 +$locale = apply_filters('plugin_locale', get_locale(), 'user-access-manager');
28 +load_textdomain('user-access-manager', WP_LANG_DIR.'/user-access-manager/user-access-manager-'.$locale.'.mo');
29 +load_plugin_textdomain('user-access-manager', false, plugin_basename(dirname(__FILE__)).'/languages');
27 30
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'
31 +//--- Check requirements ---
32 +
33 +//Check php version
34 +if (version_compare(phpversion(), '5.4') === -1) {
35 + add_action(
36 + 'admin_notices',
37 + function () {
38 + echo '<div id="message" class="error"><p><strong>'
39 + .sprintf(TXT_UAM_PHP_VERSION_TO_LOW, phpversion())
40 + .'</strong></p></div>';
41 + }
34 42 );
35 - load_plugin_textdomain(
36 - 'user-access-manager',
37 - false,
38 - plugin_basename(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'languages'
39 - );
40 43
41 - //--- Check requirements ---
44 + return;
45 +}
42 46
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 - );
47 +//Check wordpress version
48 +global $wp_version;
53 49
54 - return;
55 - }
50 +if (version_compare($wp_version, '4.6') === -1) {
51 + add_action(
52 + 'admin_notices',
53 + function () use ($wp_version) {
54 + echo '<div id="message" class="error"><p><strong>'
55 + .sprintf(TXT_UAM_WORDPRESS_VERSION_TO_LOW, $wp_version)
56 + .'</strong></p></div>';
57 + }
58 + );
56 59
57 - //Check WordPress version
58 - global $wp_version;
60 + return;
61 +}
59 62
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 - );
63 +//Defines
64 +require_once $basePath.'autoload.php';
65 +require_once $basePath.'init.php';
69 66
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);
67 +global $userAccessManager;
68 +$userAccessManager = initUserAccessManger();