-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsole-dev-wp.php
More file actions
27 lines (22 loc) · 858 Bytes
/
sole-dev-wp.php
File metadata and controls
27 lines (22 loc) · 858 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
<?php
/**
* Plugin Name: SOLE Dev (Wordpress)
* Description: Help prevent common mistakes in local WordPress development. Has no impact on production sites.
* Version: 1.0.0
*/
// Only run on local .test environments or when SOLE_DEV_ENVIRONMENT is defined and true
if (strpos($_SERVER['HTTP_HOST'] ?? '', '.test') === false && (!defined('SOLE_DEV_ENVIRONMENT') || !SOLE_DEV_ENVIRONMENT)) {
return;
}
// Define plugin directory
define('SOLE_DEV_DIR', __DIR__);
// Load class files
require_once SOLE_DEV_DIR . '/class-email-disabler.php';
require_once SOLE_DEV_DIR . '/class-media-proxy.php';
require_once SOLE_DEV_DIR . '/class-dev-warning.php';
require_once SOLE_DEV_DIR . '/class-link-confirmation.php';
// Initialize modules
new Sole_Dev_Email_Disabler();
new Sole_Dev_Media_Proxy();
new Sole_Dev_Warning();
new Sole_Dev_Link_Confirmation();