-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwp-debug-log-widget.php
More file actions
43 lines (34 loc) · 1.14 KB
/
wp-debug-log-widget.php
File metadata and controls
43 lines (34 loc) · 1.14 KB
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
<?php // phpcs:disable
declare(strict_types=1);
/**
* Plugin Name: Debug Log Widget
* Description: Adds an admin dashboard widget to parse the WordPress error log file.
* Author: Austin Passy
* Author URI: https://github.com/thefrosty
* Version: 1.5.0.1
* Requires at least: 6.6
* Tested up to: 6.8.1
* Requires PHP: 8.3
* Plugin URI: https://github.com/thefrosty/wp-debug-log-widget
* GitHub Plugin URI: https://github.com/thefrosty/wp-debug-log-widget
* Update URI: https://github.com/thefrosty/wp-debug-log-widget
* Primary Branch: develop
* Release Asset: true
* phpcs:enable
*/
namespace TheFrosty\WpDebugLogWidget;
\defined('ABSPATH') || exit;
use TheFrosty\WpUtilities\Plugin\PluginFactory;
use TheFrosty\WpUtilities\WpAdmin\DisablePluginUpdateCheck;
if (\is_readable(__DIR__ . '/vendor/autoload.php')) {
include __DIR__ . '/vendor/autoload.php';
}
$plugin = PluginFactory::create('debug-log-widget');
if (\is_admin()) {
$plugin
->add(new DisablePluginUpdateCheck())
->addOnHook(ErrorLog::class, 'admin_init', 10, true);
}
\add_action('init', static function () use ($plugin) {
$plugin->initialize();
});