-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwonolog.php
More file actions
67 lines (55 loc) · 1.78 KB
/
wonolog.php
File metadata and controls
67 lines (55 loc) · 1.78 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
declare(strict_types=1);
/*
* This file is part of the Wonolog WordPress plugin.
*
* (ɔ) Frugan <dev@frugan.it>
*
* This source file is subject to the GNU GPLv3 or later license that is bundled
* with this source code in the file LICENSE.
*/
namespace WpSpaghetti\Wonolog;
/*
* Plugin Name: Wonolog
* Plugin URI: https://github.com/wp-spaghetti/wonolog
* Description: Opinionated WordPress logging plugin built on top of Inpsyde's Wonolog
* Version: 0.3.0
* Text Domain: wonolog
* Domain Path: /languages
* Author: Frugan
* Author URI: https://github.com/wp-spaghetti
* Requires at least: 6.0
* Tested up to: 6.9
* Requires PHP: 8.1
* License: GPL-3.0-or-later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Donate link: https://buymeacoff.ee/frugan
*/
use WpSpaghetti\Deps\Inpsyde\Wonolog\Configurator;
use YahnisElsts\PluginUpdateChecker\v5\PucFactory; // @puc-remove
if (!\defined('WPINC')) {
exit;
}
// Autoload dependencies
require_once __DIR__.'/vendor-deps/scoper-autoload.php';
require_once __DIR__.'/vendor/autoload.php';
if (!class_exists(Configurator::class)) {
return;
}
// Initialize Wonolog with opinionated configuration
add_action(Configurator::ACTION_SETUP, static function (Configurator $configurator): void {
$config = new Bootstrap();
$config->configure($configurator);
});
// @puc-begin
// Initialize Plugin Update Checker for automatic GitHub releases updates.
// This block is only included in the --with-puc distribution (not WordPress.org).
if (class_exists(PucFactory::class)) {
$updateChecker = PucFactory::buildUpdateChecker(
'https://github.com/wp-spaghetti/wonolog/',
__FILE__,
'wonolog'
);
$updateChecker->getVcsApi()->enableReleaseAssets('/wonolog--with-puc\.zip$/');
}
// @puc-end