-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathsite-command.php
More file actions
40 lines (30 loc) · 903 Bytes
/
site-command.php
File metadata and controls
40 lines (30 loc) · 903 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
38
39
40
<?php
if ( ! defined( 'SITE_TEMPLATE_ROOT' ) ) {
define( 'SITE_TEMPLATE_ROOT', __DIR__ . '/templates' );
}
if ( ! defined( 'GLOBAL_DB' ) ) {
define( 'GLOBAL_DB', 'global-db' );
}
if ( ! defined( 'GLOBAL_FRONTEND_NETWORK' ) ) {
define( 'GLOBAL_FRONTEND_NETWORK', 'ee-global-frontend-network' );
}
if ( ! defined( 'GLOBAL_BACKEND_NETWORK' ) ) {
define( 'GLOBAL_BACKEND_NETWORK', 'ee-global-backend-network' );
}
if ( ! defined( 'EE_ROOT_DIR' ) ) {
define( 'EE_ROOT_DIR', '/opt/easyengine' );
}
if ( ! class_exists( 'EE' ) ) {
return;
}
$sites_path = EE_ROOT_DIR . '/sites/';
if ( ! is_dir( $sites_path ) ) {
mkdir( $sites_path );
}
define( 'WEBROOT', $sites_path );
$autoload = dirname( __FILE__ ) . '/vendor/autoload.php';
if ( file_exists( $autoload ) ) {
require_once $autoload;
}
EE::add_command( 'site', 'Site_Command' );
Site_Command::add_site_type( 'html', 'EE\Site\Type\HTML' );