-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin.php
37 lines (29 loc) · 904 Bytes
/
plugin.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
<?php declare(strict_types = 1);
/**
* Personare Plugin Boilerplate
*
* @package MyApp
*
* Plugin Name: Personare Plugin Boilerplate
* Description: Descreva seu plugin.
* Version: 2.0.1
* Author: Personare
* Author URI: https://personare.com.br/
* Text Domain: my-app
* Domain Path: /languages
* Requires PHP: 7.3
*/
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
define( 'MY_APP_SLUG', 'my-app' );
define( 'MY_APP_FILE', __FILE__ );
$container = new League\Container\Container();
/* register the reflection container as a delegate to enable auto wiring. */
$container->delegate(
( new League\Container\ReflectionContainer() )->cacheResolutions(),
);
$config = ( require __DIR__ . '/config.php' );
foreach ( $config['service_providers'] as $service_provider ) {
$container->addServiceProvider( $service_provider );
}