generated from Pierre-Lannoy/wp-plugin-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keys-master.php
84 lines (77 loc) · 2.32 KB
/
keys-master.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* Main plugin file.
*
* @package Bootstrap
* @author Pierre Lannoy <https://pierre.lannoy.fr/>.
* @since 1.0.0
*
* @wordpress-plugin
* Plugin Name: Keys Master
* Plugin URI: https://perfops.one/keys-master
* Description: Powerful application passwords manager for WordPress with role-based usage control and full analytics reporting capabilities.
* Version: 2.0.0
* Requires at least: 6.2
* Requires PHP: 8.1
* Author: Pierre Lannoy / PerfOps One
* Author URI: https://perfops.one
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Network: true
* Text Domain: keys-master
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
require_once __DIR__ . '/init.php';
require_once __DIR__ . '/functions.php';
require_once __DIR__ . '/includes/system/class-option.php';
require_once __DIR__ . '/includes/system/class-environment.php';
require_once __DIR__ . '/autoload.php';
require_once __DIR__ . '/includes/libraries/class-libraries.php';
require_once __DIR__ . '/includes/libraries/autoload.php';
require_once __DIR__ . '/includes/features/class-wpcli.php';
/**
* The code that runs during plugin activation.
*
* @since 1.0.0
*/
function pokm_activate() {
KeysMaster\Plugin\Activator::activate();
}
/**
* The code that runs during plugin deactivation.
*
* @since 1.0.0
*/
function pokm_deactivate() {
KeysMaster\Plugin\Deactivator::deactivate();
}
/**
* The code that runs during plugin uninstallation.
*
* @since 1.0.0
*/
function pokm_uninstall() {
KeysMaster\Plugin\Uninstaller::uninstall();
}
/**
* Begins execution of the plugin.
*
* @since 1.0.0
*/
function pokm_run() {
\DecaLog\Engine::initPlugin( POKM_SLUG, POKM_PRODUCT_NAME, POKM_VERSION, \KeysMaster\Plugin\Core::get_base64_logo() );
// It is needed to do these inits here because some plugins make very early die()
\KeysMaster\System\Password::init();
\KeysMaster\Plugin\Feature\Capture::init();
\KeysMaster\Plugin\Feature\Schema::init();
$plugin = new KeysMaster\Plugin\Core();
$plugin->run();
}
register_activation_hook( __FILE__, 'pokm_activate' );
register_deactivation_hook( __FILE__, 'pokm_deactivate' );
register_uninstall_hook( __FILE__, 'pokm_uninstall' );
pokm_run();