-
Notifications
You must be signed in to change notification settings - Fork 2
/
wp-whise.php
48 lines (40 loc) · 1.04 KB
/
wp-whise.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
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/*
Plugin Name: Whise integration
Plugin URI:
Description: Synchronise WordPress with Whise service
Version: 1.0
Author: AppSaloon
Author URI: https://www.appsaloon.be/
License: GPL3
*/
namespace wp_whise;
use wp_whise\lib\Container;
use wp_whise\lib\Container_Interface;
define( 'WP_WHISE_DIR', plugin_dir_path( __FILE__ ) );
define( 'WP_WHISE_URL', plugin_dir_url( __FILE__ ) );
define( 'WP_WHISE_FILE', __FILE__ );
define( 'WP_WHISE_VERSION', '1.0' );
/**
* Register autoloader to load files/classes dynamically
*/
include_once WP_WHISE_DIR . 'lib/autoloader.php';
/**
* Load composer/PHP-DI container
*
* FYI vendor files are moved from /vendor to /lib/ioc/ directory
*
* "php-di/php-di": "5.0"
*/
include_once WP_WHISE_DIR . 'lib/ioc/autoload.php';
class Plugin_Boilerplate {
/**
* Plugin_Boilerplate constructor.
*
* @param Container_Interface $container
*/
public function __construct( Container_Interface $container ) {
$container->container->get( 'init_config' );
}
}
new Plugin_Boilerplate( Container::getInstance() );