-
Notifications
You must be signed in to change notification settings - Fork 0
/
wpss-ultimate-user-management.php
60 lines (50 loc) · 1.74 KB
/
wpss-ultimate-user-management.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
*
* @package wpss-ultimate-user-management
* @copyleft 2024 Angelo Rocha
*
* @wordpress-plugin
* Plugin Name: WPSS Ultimate User Management
* Plugin URI: https://github.com/angelorocha/wpss-ultimate-user-management
* Description: Manage users, roles and capabilities more easily.
* Version: 1.1.1
* Requires at least: 6.1
* Requires PHP: 8.1
* Author: Angelo Rocha
* Author URI: https://angelorocha.com.br
* License: GNU General Public License v3 or later
* License URI: /LICENSE
* Text Domain: wpss-ultimate-user-management
* Domain Path: /lang
*/
namespace WpssUserManager;
use WpssUserManager\Admin\WPSSPluginInit;
use WpssUserManager\Admin\WPSSUserRolesCapsManager;
use WpssUserManager\Admin\WPSSWidgets;
/** Prevent direct access */
if ( !defined( 'ABSPATH' ) ) {
header( 'HTTP/1.0 403 Forbidden' );
exit;
}
/** Define constant to plugin path */
if ( !defined( 'WPSS_URCM_PLUGIN_PATH' ) ) {
define( 'WPSS_URCM_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
}
/** Define constant to plugin url */
if ( !defined( 'WPSS_URCM_PLUGIN_URI' ) ) {
define( 'WPSS_URCM_PLUGIN_URI', plugin_dir_url( __FILE__ ) );
}
/** Define constant to plugin main file, used in register activate/deactivate actions */
if ( !defined( 'WPSS_URCM_PLUGIN_FILE' ) ) {
define( 'WPSS_URCM_PLUGIN_FILE', __FILE__ );
}
/** Execute autoload */
require_once WPSS_URCM_PLUGIN_PATH . 'autoload.php';
wpss_autoload( WPSS_URCM_PLUGIN_PATH );
/** Plugin init */
add_action( 'plugins_loaded', [ WPSSUserRolesCapsManager::class, 'instance' ], 0 );
/** Setup plugin */
WPSSPluginInit::setup();
/** Init widget visibility */
add_action( 'widgets_init', [ WPSSWidgets::class, 'hide_widgets' ], 11 );