-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.php
More file actions
37 lines (31 loc) · 846 Bytes
/
plugin.php
File metadata and controls
37 lines (31 loc) · 846 Bytes
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
<?php
/**
* Plugin Name: Wp Plugin Template
* Description: Desc
* Version: 1.0
* Author: LunaPress
* Author URI: https://onepix.net/
* Requires at least: 6.8.3
* Tested up to: 6.8.3
* Requires PHP: 8.3
* Text Domain: wp-plugin-template
* Domain Path: /languages/
* Requires Plugins:
*
* @package LunaPress\WpPluginTemplate
*/
declare(strict_types=1);
defined('ABSPATH') || exit;
use LunaPress\PhpDiAdapter\PhpDiContainerBuilder;
use LunaPress\PluginTemplate\TemplatePlugin;
$prefixedAutoload = __DIR__ . '/vendor-prefixed/autoload.php';
$vendorAutoload = __DIR__ . '/vendor/autoload.php';
if (file_exists($prefixedAutoload)) {
require_once $prefixedAutoload;
} else {
require_once $vendorAutoload;
}
TemplatePlugin::getInstance()
->setContainerBuilder(
new PhpDiContainerBuilder()
)->boot(__FILE__);