-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugin.php
46 lines (36 loc) · 1.18 KB
/
plugin.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
<?php
/**
*
* Plugin Name: Debug Log Helper
* Plugin URI: #
* Description: Debug & Query log Helper tool
* Version: 1.5.3
* Author: Lukman Nakib
* Author URI: https://nkb-bd.github.io/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: debug-log-config-tool
*/
use DebugLogConfigTool\Classes\DLCT_Bootstrap;
if (!defined('ABSPATH')) {
exit;
}
define('DLCT_PLUGIN_URL', plugin_dir_url(__FILE__));
define('DLCT_PLUGIN_VERSION', '1.5.3');
define('DLCT_PLUGIN_MAIN_FILE', __FILE__);
define('DLCT_PLUGIN_BASENAME', plugin_basename(__FILE__));
define('DLCT_PLUGIN_DIR', plugin_dir_path(__FILE__));
include dirname( __FILE__ ) . '/autoload.php';
add_action('init', function () {
$dlct_bootstrap = DLCT_Bootstrap::getInstance();
$dlct_bootstrap->init();
}, 10, 1);
register_activation_hook(DLCT_PLUGIN_MAIN_FILE, function () {
DLCT_Bootstrap::activate();
});
register_deactivation_hook(DLCT_PLUGIN_MAIN_FILE, function () {
DLCT_Bootstrap::deactivate();
});
add_action('shutdown', function (){
\DebugLogConfigTool\Controllers\LogController::maybeCacheQueries();
});