run:R W Run
DIR
2026-04-15 19:02:18
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-15 19:02:17
R W Run
6.13 KB
2026-04-15 19:02:18
R W Run
989 By
2026-04-09 18:51:36
R W Run
0 By
2024-10-24 20:39:28
R W Run
15.03 KB
2026-01-22 01:54:00
R W Run
error_log
📄gd-system-plugin.php
1<?php
2/**
3 * Plugin Name: System Plugin
4 * Version: 4.260.0
5 * License: GPL-2.0
6 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
7 * Text Domain: gd-system-plugin
8 * Domain Path: /gd-system-plugin/languages
9 *
10 * This plugin, like WordPress, is licensed under the GPL.
11 * Use it to make something cool, have fun, and share what you've learned with others.
12 *
13 * Copyright © 2020 GoDaddy Operating Company, LLC. All Rights Reserved.
14 */
15
16namespace WPaaS;
17
18
19if ( ! defined( 'ABSPATH' ) ) {
20
21 exit;
22
23}
24
25if ( class_exists( '\WPaaS\Plugin' ) ) {
26
27 return;
28
29}
30
31
32require_once __DIR__ . '/gd-system-plugin/includes/autoload.php';
33require_once __DIR__ . '/gd-system-plugin/includes/deprecated.php';
34
35register_activation_hook( __FILE__, function() {
36 $llms = new LLMSTXT();
37 $llms->register_virtual_llms();
38 flush_rewrite_rules();
39});
40
41register_deactivation_hook( __FILE__, function() {
42 flush_rewrite_rules();
43});
44
45
46final class Plugin {
47
48 use Singleton, Helpers;
49
50 /**
51 * Arary of plugin data.
52 *
53 * @var array
54 */
55 public static $data = [];
56
57 /**
58 * Plugin configs object.
59 *
60 * @var Configs
61 */
62 public static $configs;
63
64 /**
65 * Class constructor.
66 */
67 private function __construct() {
68
69 if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
70
71 return;
72
73 }
74
75 self::$data['version'] = '4.260.0';
76 self::$data['basename'] = plugin_basename( __FILE__ );
77 self::$data['base_dir'] = __DIR__ . '/gd-system-plugin/';
78 self::$data['assets_url'] = home_url( 'wp-content/mu-plugins/gd-system-plugin/assets/',
79 is_ssl() ? 'https' : null );
80 self::$data['assets_dir'] = WPMU_PLUGIN_DIR . '/gd-system-plugin/assets/';
81
82 self::$data['user-agent'] = 'wp-paas-system-plugin/' . self::$data['version'] . ' (godaddy; gdcorp-partners) Dev-WordPress-Platform/1.0';
83
84 load_muplugin_textdomain( 'gd-system-plugin', 'gd-system-plugin/languages' );
85
86 self::$configs = new Configs();
87
88 new Activity_logger();
89
90 $api = new API();
91 new Feature_Flag( $api );
92
93 new Cache(); // deprecated
94 $cache = new Cache_V2( $api );
95
96 if ( ( self::is_wp_cli() || self::is_wp_cron() ) && ! self::is_wpaas_v2() ) {
97 new Rewrite_Static_Assets();
98 }
99
100
101 /**
102 * Filter the plugin configs object.
103 *
104 * @since 2.0.0
105 *
106 * @var stdClass
107 */
108 self::$configs = apply_filters( strtolower( str_replace( '\\', '_', get_class( self::$configs ) ) ), self::$configs ); // @codingStandardsIgnoreLine
109
110 if ( ! $this->validate_wpaas() ) {
111
112 return;
113
114 }
115
116 $this->setup_env_vars();
117 $smart_updates = new Smart_Update( $api );
118
119 new WP_Mirror();
120 new Hotfixes( $api ); // Load these early.
121 new Auto_Updates( $api );
122 new Disallowed_Plugins( $api );
123 new GMV();
124 new Bundled_Plugins();
125 new CDN();
126 new Site_Optimizer();
127 new Gravity_Forms();
128 new Sucuri_Scanner();
129 new Worker();
130 new \WPaaS_Deprecated();
131 new Yoast_SEO();
132
133 $storage_limit_checker = new Storage_Limit_Checker();
134 new Storage_Limit_Enforcer( $storage_limit_checker );
135
136 /**
137 * We can stop here in CLI mode.
138 */
139 if ( self::is_wp_cli() ) {
140
141 new CLI();
142
143 return;
144
145 }
146
147 new Change_Domain();
148 new Debug_Mode();
149 new RAD( $api );
150 new REST_API( $api, $cache, $smart_updates );
151 new RUM();
152 new SSO( $api );
153 new Temp_Domain( $api );
154 new Admin\Bar();
155 new Admin\Block_Count();
156 new Admin\Dashboard_Widgets();
157 new Admin\Feedback_Form( $api );
158 new Admin\Product_Events();
159 new Admin\Recommended_Plugins_Tab();
160 new Admin\Growl();
161 new Admin\Site_Health();
162 new Admin\Themes_Tab( $api );
163 new Admin\Admin_Notices( $storage_limit_checker );
164 new XMLRPC();
165 new TrustedSite();
166 new LLMSTXT();
167 $experiment = new Experiment( $api );
168 new Expiration_Banner( $experiment );
169
170 }
171
172 /**
173 * Setup commonly used env var for bundled plugins to consume
174 *
175 * @return void
176 */
177 private function setup_env_vars() {
178
179 if ( ! getenv( 'SERVER_ENV' ) ) {
180
181 putenv( 'SERVER_ENV=' . self::get_env() );
182
183 }
184
185 if ( ! getenv( 'SITE_UID' ) && defined( 'GD_ACCOUNT_UID' ) && GD_ACCOUNT_UID ) {
186
187 putenv( 'SITE_UID=' . GD_ACCOUNT_UID );
188
189 }
190
191 }
192
193 /**
194 * Verify that we are running on WPaaS.
195 *
196 * @return bool
197 */
198 private function validate_wpaas() {
199
200 if ( self::is_wpaas() ) {
201
202 return true;
203
204 }
205
206 /**
207 * Filter self-destruct mode.
208 *
209 * @since 2.0.0
210 *
211 * @var bool
212 */
213 $self_destruct = (bool) apply_filters( 'wpaas_self_destruct_enabled',
214 ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) );
215
216 /**
217 * If a WPaaS site has been migrated away to a different host
218 * we will attempt to silently delete this System Plugin from
219 * the filesystem.
220 *
221 * Self-destruct mode is disabled when running in debug mode.
222 */
223 if ( $self_destruct ) {
224
225 if ( ! class_exists( 'WP_Filesystem' ) ) {
226
227 require_once ABSPATH . 'wp-admin/includes/file.php';
228
229 }
230
231 WP_Filesystem();
232
233 global $wp_filesystem;
234
235 $wp_filesystem->delete( self::$data['base_dir'], true );
236 $wp_filesystem->delete( __FILE__ );
237
238 }
239
240 return false;
241
242 }
243
244 /**
245 * Wrapper for wp_remote_get.
246 *
247 * @param string $url The URL to which the request is sent.
248 * @param array $args Optional. An array of request arguments. Default empty array.
249 *
250 * @return array|WP_Error The response array or a WP_Error on failure.
251 */
252 public static function remote_get( $url, $args = array() ) {
253 $args['user-agent'] = self::$data['user-agent'];
254 return wp_remote_get( $url, $args );
255 }
256
257 /**
258 * Wrapper for wp_remote_post.
259 *
260 * @param string $url The URL to which the request is sent.
261 * @param array $args Optional. An array of request arguments. Default empty array.
262 *
263 * @return array|WP_Error The response array or a WP_Error on failure.
264 */
265 public static function remote_post( $url, $args = array() ) {
266 $args['user-agent'] = self::$data['user-agent'];
267 return wp_remote_post( $url, $args );
268 }
269
270 /**
271 * Wrapper for wp_remote_request.
272 *
273 * @param string $url The URL to which the request is sent.
274 * @param array $args Optional. An array of request arguments. Default empty array.
275 *
276 * @return array|WP_Error The response array or a WP_Error on failure.
277 */
278 public static function remote_request( $url, $args = array() ) {
279 $args['user-agent'] = self::$data['user-agent'];
280 return wp_remote_request( $url, $args );
281 }
282}
283
284plugin();
285
286
Ui Ux Design – Teachers Night Out

Get in Touch

© 2024 Teachers Night Out. All Rights Reserved.