-
Notifications
You must be signed in to change notification settings - Fork 0
/
sterner-stuff-wordpress-core.php
103 lines (82 loc) · 3.08 KB
/
sterner-stuff-wordpress-core.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/*
Plugin Name: Made of Sterner Stuff
Plugin URI: https://sternerstuff.dev
Description: Core functionality for built-to-last Sterner Stuff WordPress sites.
Version: 12.0.0
Author: Ethan Clevenger
Author URI: https://sternerstuff.dev
*/
use Env\Env;
use SternerStuffWordPress\Commands\Deploy;
use SternerStuffWordPress\Commands\SyncDB;
use SternerStuffWordPress\Commands\Update;
use SternerStuffWordPress\DisableRedisProAds;
use SternerStuffWordPress\DisableTracking;
use SternerStuffWordPress\EditingExperience;
use SternerStuffWordPress\GravityForms\Captcha;
use SternerStuffWordPress\GravityForms\HideUpdateMessages;
use SternerStuffWordPress\JetpackModes;
use SternerStuffWordPress\LimitRevisions;
use SternerStuffWordPress\MaintenanceMode;
use SternerStuffWordPress\Permissions;
use SternerStuffWordPress\PluginAPIManager;
use SternerStuffWordPress\QuadLayers\DisableQuadLayersPluginNotices;
use SternerStuffWordPress\TheEventsCalendar\AllowTroubleshooting;
use SternerStuffWordPress\WooCommerce\WooCommerceSandbox;
use SternerStuffWordPress\WordPress\DisableAdminEmailCheck;
use SternerStuffWordPress\WordPress\Mailers;
use SternerStuffWordPress\WordPress\SiteHealthChecks;
use SternerStuffWordPress\WPMigrateDBPro\PreservedOptions;
use SternerStuffWordPress\WPRocket;
use SternerStuffWordPress\Yoast\DisableIndexingNotification;
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
class SternerStuffWordPress {
private static $self = false;
function __construct() {
SternerStuffWordPress\EnvConstants::define();
$manager = new PluginAPIManager();
if(Env::get('MAINTENANCE_MODE_ENABLED')) {
$manager->register( new MaintenanceMode() );
}
new SternerStuffWordPress\DisabledPlugins();
// WordPress
$manager->register( new DisableAdminEmailCheck() );
$manager->register( new Mailers() );
$manager->register( new SiteHealthChecks() );
// WooCommerce
$manager->register( new WooCommerceSandbox() );
// Gravity Forms
$manager->register( new Captcha() );
$manager->register( new HideUpdateMessages() );
// The Events Calendar
$manager->register( new AllowTroubleshooting() );
// Yoast
$manager->register( new DisableIndexingNotification() );
// Other plugins
$manager->register( new WPRocket() );
$manager->register( new JetpackModes() );
$manager->register( new PreservedOptions() );
$manager->register( new DisableQuadLayersPluginNotices() );
$manager->register( new LimitRevisions() );
$manager->register( new Permissions() );
$manager->register( new EditingExperience() );
$manager->register( new DisableTracking() );
$manager->register( new DisableRedisProAds() );
if(defined( 'WP_CLI' ) && constant('WP_CLI')) {
Deploy::register();
Update::register();
SyncDB::register();
}
add_filter( 'xmlrpc_enabled', '__return_false' );
define('KINSTAMU_CUSTOM_MUPLUGIN_URL', WPMU_PLUGIN_URL . '/kinsta-mu-plugins/');
}
// Keep this method at the bottom of the class
public static function getInstance() {
if(!self::$self) {
self::$self = new self();
}
return self::$self;
}
}
SternerStuffWordPress::getInstance();