-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdebug-toolkit.php
61 lines (56 loc) · 1.67 KB
/
debug-toolkit.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
<?php
/**
* Debug Toolkit - Code debug made easier and more enjoyable.
*
* @package KnowTheCode\DebugToolkit
* @author hellofromTonya
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Debug Toolkit
* Plugin URI: https://wordpress.org/plugins/debug-toolkit
* Description: Code debug made easier and more enjoyable. A suite of tools to help you debug your code.
* Version: 1.0.1
* Author: hellofromTonya
* Author URI: https://KnowTheCode.io
* Text Domain: debugtoolkit
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* GitHub Plugin URI: https://github.com/KnowTheCode/debug-toolkit
* Requires PHP: 5.6
* Requires WP: 4.9
*/
namespace KnowTheCode\DebugToolkit;
if ( version_compare( phpversion(), '5.6', '<' ) ) {
add_action( 'admin_notices', __NAMESPACE__ . '\render_php_version_admin_notice' );
/**
* Render the admin notice if the version of PHP is older.
*
* @since 1.0.0
*/
function render_php_version_admin_notice() {
?>
<div class="notice notice-error">
<p><?php esc_html_e( 'The Debug Toolkit plugin requires PHP 5.6+. Please contact your host to update your PHP version.', 'debugtoolkit' ); ?></p>
</div>
<?php
}
return;
}
/**
* Gets the plugin's root directory.
*
* @since 1.0.0
* @access private
*
* @return string
*/
function _get_plugin_root_dir() {
return __DIR__;
}
// Load the files and Composer.
require_once __DIR__ . '/src/kint-functions.php';
require_once __DIR__ . '/src/vardumper-functions.php';
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/src/setup.php';
_setup_plugin();