-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin-skeleton.php.dist
More file actions
41 lines (33 loc) · 1.02 KB
/
plugin-skeleton.php.dist
File metadata and controls
41 lines (33 loc) · 1.02 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
<?php
/**
* Plugin Name: WP Modern Plugin Skeleton
* Description: Modern WordPress plugin skeleton using hexagonal architecture
* Version: 0.1.0
* Author: Unknown
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Domain Path: /languages
* Text Domain: wp-modern-skeleton
* Requires at least: 6.0
* Tested up to: 6.8
* Requires PHP: 8.2
* Stable tag: 0.1.0
*/
declare(strict_types=1);
use WP\Skeleton\Adapter\WordpressPlugin;
use WP\Skeleton\Adapter\WordpressCron;
use WP\Skeleton\Infrastructure\DI\ContainerProvider;
defined('ABSPATH') or die('No script kiddies please!');
require_once __DIR__ . '/vendor/autoload.php';
ContainerProvider::setPluginContext(
new PluginContext(
__FILE__,
'wp-modern-plugin-skeleton',
'https://github.com/N3XT0R/wp-modern-plugin-skeleton',
'skeleton'
)
);
$container = ContainerProvider::getContainer();
WordpressPlugin::setContainer($container);
WordpressCron::setContainer($container);
WordpressPlugin::init(__FILE__);