| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* |
| 5 |
* Plugin Name: Debug Log Manager Tool |
| 6 |
* Plugin URI: https://nkb-bd.github.io/ |
| 7 |
* Description: Debug & Query log Helper tool with additional CLI like tools |
| 8 |
* Version: 3.0.7 |
| 9 |
* Requires at least: 6.0 |
| 10 |
* Requires PHP: 7.4 |
| 11 |
* Tested up to: 7.0 |
| 12 |
* Author: Lukman Nakib |
| 13 |
* Author URI: https://nkb-bd.github.io/ |
| 14 |
* License: GPL-2.0+ |
| 15 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 16 |
* Text Domain: debug-log-config-tool |
| 17 |
*/ |
| 18 |
|
| 19 |
|
| 20 |
use DebugLogConfigTool\Classes\DLCT_Bootstrap; |
| 21 |
|
| 22 |
if (!defined('ABSPATH')) { |
| 23 |
exit; |
| 24 |
} |
| 25 |
define('DLCT_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 26 |
define('DLCT_PLUGIN_VERSION', '3.0.7'); |
| 27 |
define('DLCT_PLUGIN_MAIN_FILE', __FILE__); |
| 28 |
define('DLCT_PLUGIN_BASENAME', plugin_basename(__FILE__)); |
| 29 |
define('DLCT_PLUGIN_DIR', plugin_dir_path(__FILE__)); |
| 30 |
|
| 31 |
include dirname( __FILE__ ) . '/autoload.php'; |
| 32 |
add_action('init', function () { |
| 33 |
$dlct_bootstrap = DLCT_Bootstrap::getInstance(); |
| 34 |
$dlct_bootstrap->init(); |
| 35 |
}, 10, 1); |
| 36 |
register_activation_hook(DLCT_PLUGIN_MAIN_FILE, function () { |
| 37 |
DLCT_Bootstrap::activate(); |
| 38 |
}); |
| 39 |
|
| 40 |
register_deactivation_hook(DLCT_PLUGIN_MAIN_FILE, function () { |
| 41 |
DLCT_Bootstrap::deactivate(); |
| 42 |
}); |
| 43 |
|
| 44 |
|
| 45 |
add_action('shutdown', function (){ |
| 46 |
\DebugLogConfigTool\Controllers\LogController::maybeCacheQueries(); |
| 47 |
}); |
| 48 |
|