PluginProbe
Plugin Detective – Troubleshooting Conflicts / 1.2
Plugin Detective – Troubleshooting Conflicts v1.2
1.2.35 1.2.33 1.2.32 1.2.31 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2 1.2.1 1.2.10 1.2.12 1.2.13 1.2.14 1.2.16 1.2.19 1.2.20 1.2.22 1.2.23 1.2.24 All 54 releases
plugin-detective / troubleshoot / includes / class-settings.php

class-settings.php in Plugin Detective – Troubleshooting Conflicts 1.2, at troubleshoot/includes/class-settings.php

630 lines 24.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 function pd_maybe_require( $path ) {
3 if ( file_exists( $path ) ) {
4 require $path;
5 }
6 }
7 /**
8 * Troubleshoot Settings.
9 *
10 * @since 0.0.0
11 * @package Troubleshoot
12 */
13
14 /**
15 * Troubleshoot Settings.
16 *
17 * @since 0.0.0
18 */
19 class PDT_Settings {
20 /**
21 * Parent plugin class.
22 *
23 * @since 0.0.0
24 *
25 * @var Troubleshoot
26 */
27 protected $plugin = null;
28
29 /**
30 * Constructor.
31 *
32 * @since 0.0.0
33 *
34 * @param Troubleshoot $plugin Main plugin object.
35 */
36 public function __construct( $plugin ) {
37 $this->plugin = $plugin;
38 $this->hooks();
39 }
40
41 /**
42 * Initiate our hooks.
43 *
44 * @since 0.0.0
45 */
46 public function hooks() {
47
48 }
49 }
50
51 /**
52 * Used to set up and fix common variables and include
53 * the WordPress procedural and class library.
54 *
55 * Allows for some configuration in wp-config.php (see default-constants.php)
56 *
57 * @package WordPress
58 */
59
60 /**
61 * Stores the location of the WordPress directory of functions, classes, and core content.
62 *
63 * @since 1.0.0
64 */
65 define( 'WPINC', 'wp-includes' );
66
67 // Include files required for initialization.
68 pd_maybe_require( ABSPATH . WPINC . '/load.php' );
69 @include( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
70 @include( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
71 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
72 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php' );
73 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php' );
74 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php' );
75 @include( ABSPATH . WPINC . '/class-wp-recovery-mode.php' );
76 @include( ABSPATH . WPINC . '/error-protection.php' );
77 @include( ABSPATH . WPINC . '/default-constants.php' );
78 require_once( ABSPATH . WPINC . '/plugin.php' );
79
80 /*
81 * These can't be directly globalized in version.php. When updating,
82 * we're including version.php from another installation and don't want
83 * these values to be overridden if already set.
84 */
85 global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
86 pd_maybe_require( ABSPATH . WPINC . '/version.php' );
87
88 /**
89 * If not already configured, `$blog_id` will default to 1 in a single site
90 * configuration. In multisite, it will be overridden by default in ms-settings.php.
91 *
92 * @global int $blog_id
93 * @since 2.0.0
94 */
95 global $blog_id;
96 global $table_prefix;
97
98 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
99 wp_initial_constants();
100
101 if ( function_exists( 'wp_register_fatal_error_handler' ) ) {
102 // Make sure we register the shutdown handler for fatal errors as soon as possible.
103 wp_register_fatal_error_handler();
104 }
105
106 // Check for the required PHP version and for the MySQL extension or a database drop-in.
107 wp_check_php_mysql_versions();
108
109 // Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
110 @ini_set( 'magic_quotes_runtime', 0 );
111 @ini_set( 'magic_quotes_sybase', 0 );
112
113 // WordPress calculates offsets from UTC.
114 date_default_timezone_set( 'UTC' );
115
116 // Standardize $_SERVER variables across setups.
117 wp_fix_server_vars();
118
119 // Check if we have received a request due to missing favicon.ico
120 wp_favicon_request();
121
122 // Check if we're in maintenance mode.
123 // wp_maintenance();
124
125 // Start loading timer.
126 timer_start();
127
128 // Check if we're in WP_DEBUG mode.
129 wp_debug_mode();
130
131 /**
132 * Filters whether to enable loading of the advanced-cache.php drop-in.
133 *
134 * This filter runs before it can be used by plugins. It is designed for non-web
135 * run-times. If false is returned, advanced-cache.php will never be loaded.
136 *
137 * @since 4.6.0
138 *
139 * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
140 * Default true.
141 */
142
143 /* PD: Start cache disable */
144 // if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
145 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
146 // WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
147 // Re-initialize any hooks added manually by advanced-cache.php
148 // if ( $wp_filter ) {
149 // $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
150 // }
151 /* PD: End cache disable */
152
153
154
155 // Define WP_LANG_DIR if not set.
156 wp_set_lang_dir();
157
158 // Load early WordPress files.
159 pd_maybe_require( ABSPATH . WPINC . '/compat.php' );
160 pd_maybe_require( ABSPATH . WPINC . '/class-wp-list-util.php' );
161 pd_maybe_require( ABSPATH . WPINC . '/functions.php' );
162 pd_maybe_require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
163 pd_maybe_require( ABSPATH . WPINC . '/class-wp.php' );
164 pd_maybe_require( ABSPATH . WPINC . '/class-wp-error.php' );
165 pd_maybe_require( ABSPATH . WPINC . '/pomo/mo.php' );
166
167 // Include the wpdb class and, if present, a db.php database drop-in.
168 global $wpdb;
169 require_wp_db();
170 // Set the database table prefix and the format specifiers for database table columns.
171 $GLOBALS['table_prefix'] = $table_prefix;
172 wp_set_wpdb_vars();
173
174 // Start the WordPress object cache, or an external object cache if the drop-in is present.
175 wp_start_object_cache();
176
177 // Attach the default filters.
178 pd_maybe_require( ABSPATH . WPINC . '/default-filters.php' );
179
180 // Initialize multisite if enabled.
181 if ( is_multisite() ) {
182 pd_maybe_require( ABSPATH . WPINC . '/class-wp-site-query.php' );
183 pd_maybe_require( ABSPATH . WPINC . '/class-wp-network-query.php' );
184 pd_maybe_require( ABSPATH . WPINC . '/ms-blogs.php' );
185 pd_maybe_require( ABSPATH . WPINC . '/ms-settings.php' );
186 } elseif ( ! defined( 'MULTISITE' ) ) {
187 define( 'MULTISITE', false );
188 }
189
190 register_shutdown_function( 'shutdown_action_hook' );
191
192 // Stop most of WordPress from being loaded if we just want the basics.
193 if ( SHORTINIT )
194 return false;
195
196 // Load the L10n library.
197 require_once( ABSPATH . WPINC . '/l10n.php' );
198 require_once( ABSPATH . WPINC . '/class-wp-locale.php' );
199 require_once( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
200
201 // Run the installer if WordPress is not installed.
202 /* PD: Start wp_not_installed() disable */
203
204 // wp_not_installed();
205
206 /* PD: End wp_not_installed() disable */
207
208
209 // Load most of WordPress.
210 pd_maybe_require( ABSPATH . WPINC . '/class-wp-walker.php' );
211 pd_maybe_require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
212 pd_maybe_require( ABSPATH . WPINC . '/formatting.php' );
213 pd_maybe_require( ABSPATH . WPINC . '/capabilities.php' );
214 pd_maybe_require( ABSPATH . WPINC . '/class-wp-roles.php' );
215 pd_maybe_require( ABSPATH . WPINC . '/class-wp-role.php' );
216 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user.php' );
217 pd_maybe_require( ABSPATH . WPINC . '/class-wp-query.php' );
218 pd_maybe_require( ABSPATH . WPINC . '/query.php' );
219 pd_maybe_require( ABSPATH . WPINC . '/date.php' );
220 pd_maybe_require( ABSPATH . WPINC . '/theme.php' );
221 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme.php' );
222 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-schema.php' );
223 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json.php' );
224 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-resolver.php' );
225 pd_maybe_require( ABSPATH . WPINC . '/global-styles-and-settings.php' );
226 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-template.php' );
227 pd_maybe_require( ABSPATH . WPINC . '/block-template-utils.php' );
228 pd_maybe_require( ABSPATH . WPINC . '/block-template.php' );
229 pd_maybe_require( ABSPATH . WPINC . '/theme-templates.php' );
230 pd_maybe_require( ABSPATH . WPINC . '/template.php' );
231 pd_maybe_require( ABSPATH . WPINC . '/https-detection.php' );
232 pd_maybe_require( ABSPATH . WPINC . '/https-migration.php' );
233 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-request.php' );
234 pd_maybe_require( ABSPATH . WPINC . '/user.php' );
235 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-query.php' );
236 pd_maybe_require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
237 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
238 pd_maybe_require( ABSPATH . WPINC . '/meta.php' );
239 pd_maybe_require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
240 pd_maybe_require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
241 pd_maybe_require( ABSPATH . WPINC . '/general-template.php' );
242 pd_maybe_require( ABSPATH . WPINC . '/link-template.php' );
243
244
245 pd_maybe_require( ABSPATH . WPINC . '/author-template.php' );
246 pd_maybe_require( ABSPATH . WPINC . '/post.php' );
247 pd_maybe_require( ABSPATH . WPINC . '/class-walker-page.php' );
248 pd_maybe_require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
249 pd_maybe_require( ABSPATH . WPINC . '/class-wp-post-type.php' );
250 pd_maybe_require( ABSPATH . WPINC . '/class-wp-post.php' );
251 pd_maybe_require( ABSPATH . WPINC . '/post-template.php' );
252 pd_maybe_require( ABSPATH . WPINC . '/revision.php' );
253 pd_maybe_require( ABSPATH . WPINC . '/post-formats.php' );
254 pd_maybe_require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
255 pd_maybe_require( ABSPATH . WPINC . '/category.php' );
256 pd_maybe_require( ABSPATH . WPINC . '/class-walker-category.php' );
257 pd_maybe_require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
258 pd_maybe_require( ABSPATH . WPINC . '/category-template.php' );
259 pd_maybe_require( ABSPATH . WPINC . '/comment.php' );
260 pd_maybe_require( ABSPATH . WPINC . '/class-wp-comment.php' );
261 pd_maybe_require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
262 pd_maybe_require( ABSPATH . WPINC . '/class-walker-comment.php' );
263 pd_maybe_require( ABSPATH . WPINC . '/comment-template.php' );
264 pd_maybe_require( ABSPATH . WPINC . '/rewrite.php' );
265 pd_maybe_require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
266 pd_maybe_require( ABSPATH . WPINC . '/feed.php' );
267 pd_maybe_require( ABSPATH . WPINC . '/bookmark.php' );
268 pd_maybe_require( ABSPATH . WPINC . '/bookmark-template.php' );
269 pd_maybe_require( ABSPATH . WPINC . '/kses.php' );
270 pd_maybe_require( ABSPATH . WPINC . '/cron.php' );
271 pd_maybe_require( ABSPATH . WPINC . '/deprecated.php' );
272 pd_maybe_require( ABSPATH . WPINC . '/script-loader.php' );
273 pd_maybe_require( ABSPATH . WPINC . '/taxonomy.php' );
274 pd_maybe_require( ABSPATH . WPINC . '/class-wp-taxonomy.php' );
275 pd_maybe_require( ABSPATH . WPINC . '/class-wp-term.php' );
276 pd_maybe_require( ABSPATH . WPINC . '/class-wp-term-query.php' );
277 pd_maybe_require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
278 pd_maybe_require( ABSPATH . WPINC . '/update.php' );
279 pd_maybe_require( ABSPATH . WPINC . '/canonical.php' );
280 pd_maybe_require( ABSPATH . WPINC . '/shortcodes.php' );
281 pd_maybe_require( ABSPATH . WPINC . '/embed.php' );
282 pd_maybe_require( ABSPATH . WPINC . '/class-wp-embed.php' );
283 pd_maybe_require( ABSPATH . WPINC . '/class-oembed.php' );
284 pd_maybe_require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
285 pd_maybe_require( ABSPATH . WPINC . '/media.php' );
286 pd_maybe_require( ABSPATH . WPINC . '/http.php' );
287 pd_maybe_require( ABSPATH . WPINC . '/class-http.php' );
288 // pd_maybe_require( ABSPATH . WPINC . '/class-wp-http.php' ); // fatal error if both are here. class-http is better for backcompat. class-wp-http was introduced in 5.9
289 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
290 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
291 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
292 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
293 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
294 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-response.php' );
295 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
296 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-requests-hooks.php' );
297 pd_maybe_require( ABSPATH . WPINC . '/widgets.php' );
298 pd_maybe_require( ABSPATH . WPINC . '/class-wp-widget.php' );
299 pd_maybe_require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
300 pd_maybe_require( ABSPATH . WPINC . '/nav-menu.php' );
301 pd_maybe_require( ABSPATH . WPINC . '/nav-menu-template.php' );
302 pd_maybe_require( ABSPATH . WPINC . '/admin-bar.php' );
303 pd_maybe_require( ABSPATH . WPINC . '/rest-api.php' );
304 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
305 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
306 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
307 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
308 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
309 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
310 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-global-styles-controller.php' );
311 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
312 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
313 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
314 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php' );
315 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
316 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
317 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-items-controller.php' );
318 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menus-controller.php' );
319 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-locations-controller.php' );
320 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
321 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
322 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' );
323 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php' );
324 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-types-controller.php' );
325 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php' );
326 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
327 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
328 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php' );
329 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php' );
330 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php' );
331 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php' );
332 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php' );
333 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-site-health-controller.php' );
334 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-sidebars-controller.php' );
335 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widget-types-controller.php' );
336 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widgets-controller.php' );
337 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-templates-controller.php' );
338 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-url-details-controller.php' );
339 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
340 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
341 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
342 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
343 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
344 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
345 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
346
347 pd_maybe_require( ABSPATH . WPINC . '/sitemaps.php' );
348 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps.php' );
349 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-index.php' );
350 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-provider.php' );
351 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-registry.php' );
352 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-renderer.php' );
353 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-stylesheet.php' );
354 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-posts.php' );
355 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-taxonomies.php' );
356 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-users.php' );
357 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-editor-context.php' );
358
359
360 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-type.php' );
361 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-pattern-categories-registry.php' );
362 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-patterns-registry.php' );
363 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-styles-registry.php' );
364 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
365 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block.php' );
366 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-list.php' );
367 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
368 pd_maybe_require( ABSPATH . WPINC . '/blocks.php' );
369 pd_maybe_require( ABSPATH . WPINC . '/blocks/index.php' );
370 pd_maybe_require( ABSPATH . WPINC . '/block-editor.php' );
371 pd_maybe_require( ABSPATH . WPINC . '/block-patterns.php' );
372 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-supports.php' );
373 pd_maybe_require( ABSPATH . WPINC . '/block-supports/align.php' );
374 pd_maybe_require( ABSPATH . WPINC . '/block-supports/border.php' );
375 pd_maybe_require( ABSPATH . WPINC . '/block-supports/colors.php' );
376 pd_maybe_require( ABSPATH . WPINC . '/block-supports/custom-classname.php' );
377 pd_maybe_require( ABSPATH . WPINC . '/block-supports/dimensions.php' );
378 pd_maybe_require( ABSPATH . WPINC . '/block-supports/duotone.php' );
379 pd_maybe_require( ABSPATH . WPINC . '/block-supports/elements.php' );
380 pd_maybe_require( ABSPATH . WPINC . '/block-supports/generated-classname.php' );
381 pd_maybe_require( ABSPATH . WPINC . '/block-supports/layout.php' );
382 pd_maybe_require( ABSPATH . WPINC . '/block-supports/spacing.php' );
383 pd_maybe_require( ABSPATH . WPINC . '/block-supports/typography.php' );
384
385
386 /* PD: Start bail out early */
387 // return;
388 /* PD: End bail out early */
389 $GLOBALS['wp_embed'] = new WP_Embed();
390
391 // Load multisite-specific files.
392 if ( is_multisite() ) {
393 pd_maybe_require( ABSPATH . WPINC . '/ms-functions.php' );
394 pd_maybe_require( ABSPATH . WPINC . '/ms-default-filters.php' );
395 pd_maybe_require( ABSPATH . WPINC . '/ms-deprecated.php' );
396 }
397
398 // Define constants that rely on the API to obtain the default value.
399 // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
400 wp_plugin_directory_constants();
401
402 $GLOBALS['wp_plugin_paths'] = array();
403
404 // Load must-use plugins.
405 foreach ( wp_get_mu_plugins() as $mu_plugin ) {
406 include_once( $mu_plugin );
407 }
408 unset( $mu_plugin );
409
410 // Load network activated plugins.
411 if ( is_multisite() ) {
412 foreach ( wp_get_active_network_plugins() as $network_plugin ) {
413 wp_register_plugin_realpath( $network_plugin );
414 include_once( $network_plugin );
415 }
416 unset( $network_plugin );
417 }
418
419 /**
420 * Fires once all must-use and network-activated plugins have loaded.
421 *
422 * @since 2.8.0
423 */
424 do_action( 'muplugins_loaded' );
425
426 if ( is_multisite() )
427 ms_cookie_constants( );
428
429 // Define constants after multisite is loaded.
430 wp_cookie_constants();
431
432 // Define and enforce our SSL constants
433 wp_ssl_constants();
434
435 // Create common globals.
436 pd_maybe_require( ABSPATH . WPINC . '/vars.php' );
437
438 // Make taxonomies and posts available to plugins and themes.
439 // @plugin authors: warning: these get registered again on the init hook.
440 create_initial_taxonomies();
441 create_initial_post_types();
442
443 if ( function_exists( 'wp_start_scraping_edited_file_errors' ) ) {
444 wp_start_scraping_edited_file_errors();
445 }
446
447 // Register the default theme directory root
448 register_theme_directory( get_theme_root() );
449
450 /* PD: Start cache disable */
451
452 // Load active plugins.
453 // foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
454 // wp_register_plugin_realpath( $plugin );
455 // include_once( $plugin );
456 // }
457 // unset( $plugin );
458
459 /* PD: End cache disable */
460
461 // Load pluggable functions.
462 pd_maybe_require( ABSPATH . WPINC . '/pluggable.php' );
463 pd_maybe_require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
464
465 // Set internal encoding.
466 wp_set_internal_encoding();
467
468 // Run wp_cache_postload() if object cache is enabled and the function exists.
469 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
470 wp_cache_postload();
471
472 /**
473 * Fires once activated plugins have loaded.
474 *
475 * Pluggable functions are also available at this point in the loading order.
476 *
477 * @since 1.5.0
478 */
479 do_action( 'plugins_loaded' );
480
481 // Define constants which affect functionality if not already defined.
482 wp_functionality_constants();
483
484 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
485 wp_magic_quotes();
486
487 /**
488 * Fires when comment cookies are sanitized.
489 *
490 * @since 2.0.11
491 */
492 do_action( 'sanitize_comment_cookies' );
493
494 /**
495 * WordPress Query object
496 * @global WP_Query $wp_the_query
497 * @since 2.0.0
498 */
499 $GLOBALS['wp_the_query'] = new WP_Query();
500
501 /**
502 * Holds the reference to @see $wp_the_query
503 * Use this global for WordPress queries
504 * @global WP_Query $wp_query
505 * @since 1.5.0
506 */
507 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
508
509 /**
510 * Holds the WordPress Rewrite object for creating pretty URLs
511 * @global WP_Rewrite $wp_rewrite
512 * @since 1.5.0
513 */
514 $GLOBALS['wp_rewrite'] = new WP_Rewrite();
515
516 /**
517 * WordPress Object
518 * @global WP $wp
519 * @since 2.0.0
520 */
521 $GLOBALS['wp'] = new WP();
522
523 /**
524 * WordPress Widget Factory Object
525 * @global WP_Widget_Factory $wp_widget_factory
526 * @since 2.8.0
527 */
528 $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
529
530 /**
531 * WordPress User Roles
532 * @global WP_Roles $wp_roles
533 * @since 2.0.0
534 */
535 $GLOBALS['wp_roles'] = new WP_Roles();
536
537 /**
538 * Fires before the theme is loaded.
539 *
540 * @since 2.6.0
541 */
542 do_action( 'setup_theme' );
543
544 // Define the template related constants.
545 wp_templating_constants( );
546
547 // Load the default text localization domain.
548 load_default_textdomain();
549
550 $locale = get_locale();
551 $locale_file = WP_LANG_DIR . "/$locale.php";
552 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
553 require( $locale_file );
554 unset( $locale_file );
555
556 /**
557 * WordPress Locale object for loading locale domain date and various strings.
558 * @global WP_Locale $wp_locale
559 * @since 2.1.0
560 */
561 $GLOBALS['wp_locale'] = new WP_Locale();
562
563 /**
564 * WordPress Locale Switcher object for switching locales.
565 *
566 * @since 4.7.0
567 *
568 * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
569 */
570 $GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
571 $GLOBALS['wp_locale_switcher']->init();
572
573 // Load the functions for the active theme, for both parent and child theme if applicable.
574 if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
575 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
576 include( STYLESHEETPATH . '/functions.php' );
577 if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
578 include( TEMPLATEPATH . '/functions.php' );
579 }
580
581 /**
582 * Fires after the theme is loaded.
583 *
584 * @since 3.0.0
585 */
586 do_action( 'after_setup_theme' );
587
588 // Create an instance of WP_Site_Health so that Cron events may fire.
589 if ( ! class_exists( 'WP_Site_Health' ) ) {
590 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
591 }
592 WP_Site_Health::get_instance();
593
594 // Set up current user.
595 $GLOBALS['wp']->init();
596
597 /**
598 * Fires after WordPress has finished loading but before any headers are sent.
599 *
600 * Most of WP is loaded at this stage, and the user is authenticated. WP continues
601 * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
602 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
603 *
604 * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
605 *
606 * @since 1.5.0
607 */
608 do_action( 'init' );
609
610 // Check site status
611 if ( is_multisite() ) {
612 if ( true !== ( $file = ms_site_check() ) ) {
613 require( $file );
614 die();
615 }
616 unset($file);
617 }
618
619 /**
620 * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
621 *
622 * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
623 * users not logged in.
624 *
625 * @link https://codex.wordpress.org/AJAX_in_Plugins
626 *
627 * @since 3.0.0
628 */
629 do_action( 'wp_loaded' );
630