/
dt-home.php
50 lines (42 loc) · 1.49 KB
/
dt-home.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
49
50
<?php
/**
* Plugin Name: DT Home
* Plugin URI: https://github.com/TheCodeZone/dt_home
* Description: An app home screen for disciple.tools. Part of the DT Toolbox.
* Text Domain: dt_home
* Domain Path: /languages
* Version: 1.0.0-beta7
* Author URI: https://github.com/TheCodeZone
* GitHub Plugin URI: https://github.com/TheCodeZone/dt_home
* Requires at least: 4.7.0
* (Requires 4.7+ because of the integration of the REST API at 4.7 and the security requirements of this milestone version.)
* Tested up to: 5.6
*
* @package Disciple_Tools
* @link https://github.com/thecodezone
* @license GPL-2.0 or later
* https://www.gnu.org/licenses/gpl-2.0.html
*/
use DT\Home\Illuminate\Container\Container;
use DT\Home\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
register_activation_hook( __FILE__, function () {
flush_rewrite_rules( true );
} );
register_deactivation_hook( __FILE__, function () {
flush_rewrite_rules( true );
} );
require_once plugin_dir_path( __FILE__ ) . 'vendor-scoped/scoper-autoload.php';
require_once plugin_dir_path( __FILE__ ) . 'vendor-scoped/autoload.php';
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
$container = new Container();
$container->singleton( Container::class, function ( $container ) {
return $container;
} );
$container->singleton( Plugin::class, function ( $container ) {
return new Plugin( $container );
} );
$plugin_instance = $container->make( Plugin::class );
$plugin_instance->init();