PluginProbe
Plugin Detective – Troubleshooting Conflicts / 1.2.13
Plugin Detective – Troubleshooting Conflicts v1.2.13
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 1.2.25 All 53 releases
plugin-detective / troubleshoot / includes / class-settings.php

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

651 lines 25.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 pd_maybe_require( ABSPATH . WPINC . '/l10n.php' );
198 pd_maybe_require( ABSPATH . WPINC . '/class-wp-textdomain-registry.php' );
199 pd_maybe_require( ABSPATH . WPINC . '/class-wp-locale.php' );
200 pd_maybe_require( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
201
202 // Run the installer if WordPress is not installed.
203 /* PD: Start wp_not_installed() disable */
204
205 // wp_not_installed();
206
207 /* PD: End wp_not_installed() disable */
208
209
210 // Load most of WordPress.
211 pd_maybe_require( ABSPATH . WPINC . '/class-wp-walker.php' );
212 pd_maybe_require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
213 pd_maybe_require( ABSPATH . WPINC . '/formatting.php' );
214 pd_maybe_require( ABSPATH . WPINC . '/capabilities.php' );
215 pd_maybe_require( ABSPATH . WPINC . '/class-wp-roles.php' );
216 pd_maybe_require( ABSPATH . WPINC . '/class-wp-role.php' );
217 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user.php' );
218 pd_maybe_require( ABSPATH . WPINC . '/class-wp-query.php' );
219 pd_maybe_require( ABSPATH . WPINC . '/query.php' );
220 pd_maybe_require( ABSPATH . WPINC . '/date.php' );
221 pd_maybe_require( ABSPATH . WPINC . '/theme.php' );
222 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme.php' );
223 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-schema.php' );
224 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-data.php' );
225 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json.php' );
226 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-resolver.php' );
227 pd_maybe_require( ABSPATH . WPINC . '/global-styles-and-settings.php' );
228 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-template.php' );
229 pd_maybe_require( ABSPATH . WPINC . '/block-template-utils.php' );
230 pd_maybe_require( ABSPATH . WPINC . '/block-template.php' );
231 pd_maybe_require( ABSPATH . WPINC . '/theme-templates.php' );
232 pd_maybe_require( ABSPATH . WPINC . '/template.php' );
233 pd_maybe_require( ABSPATH . WPINC . '/https-detection.php' );
234 pd_maybe_require( ABSPATH . WPINC . '/https-migration.php' );
235 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-request.php' );
236 pd_maybe_require( ABSPATH . WPINC . '/user.php' );
237 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-query.php' );
238 pd_maybe_require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
239 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
240 pd_maybe_require( ABSPATH . WPINC . '/meta.php' );
241 pd_maybe_require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
242 pd_maybe_require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
243 pd_maybe_require( ABSPATH . WPINC . '/general-template.php' );
244 pd_maybe_require( ABSPATH . WPINC . '/link-template.php' );
245
246
247 pd_maybe_require( ABSPATH . WPINC . '/author-template.php' );
248 pd_maybe_require( ABSPATH . WPINC . '/post.php' );
249 pd_maybe_require( ABSPATH . WPINC . '/class-walker-page.php' );
250 pd_maybe_require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
251 pd_maybe_require( ABSPATH . WPINC . '/class-wp-post-type.php' );
252 pd_maybe_require( ABSPATH . WPINC . '/class-wp-post.php' );
253 pd_maybe_require( ABSPATH . WPINC . '/post-template.php' );
254 pd_maybe_require( ABSPATH . WPINC . '/revision.php' );
255 pd_maybe_require( ABSPATH . WPINC . '/post-formats.php' );
256 pd_maybe_require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
257 pd_maybe_require( ABSPATH . WPINC . '/category.php' );
258 pd_maybe_require( ABSPATH . WPINC . '/class-walker-category.php' );
259 pd_maybe_require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
260 pd_maybe_require( ABSPATH . WPINC . '/category-template.php' );
261 pd_maybe_require( ABSPATH . WPINC . '/comment.php' );
262 pd_maybe_require( ABSPATH . WPINC . '/class-wp-comment.php' );
263 pd_maybe_require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
264 pd_maybe_require( ABSPATH . WPINC . '/class-walker-comment.php' );
265 pd_maybe_require( ABSPATH . WPINC . '/comment-template.php' );
266 pd_maybe_require( ABSPATH . WPINC . '/rewrite.php' );
267 pd_maybe_require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
268 pd_maybe_require( ABSPATH . WPINC . '/feed.php' );
269 pd_maybe_require( ABSPATH . WPINC . '/bookmark.php' );
270 pd_maybe_require( ABSPATH . WPINC . '/bookmark-template.php' );
271 pd_maybe_require( ABSPATH . WPINC . '/kses.php' );
272 pd_maybe_require( ABSPATH . WPINC . '/cron.php' );
273 pd_maybe_require( ABSPATH . WPINC . '/deprecated.php' );
274 pd_maybe_require( ABSPATH . WPINC . '/script-loader.php' );
275 pd_maybe_require( ABSPATH . WPINC . '/taxonomy.php' );
276 pd_maybe_require( ABSPATH . WPINC . '/class-wp-taxonomy.php' );
277 pd_maybe_require( ABSPATH . WPINC . '/class-wp-term.php' );
278 pd_maybe_require( ABSPATH . WPINC . '/class-wp-term-query.php' );
279 pd_maybe_require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
280 pd_maybe_require( ABSPATH . WPINC . '/update.php' );
281 pd_maybe_require( ABSPATH . WPINC . '/canonical.php' );
282 pd_maybe_require( ABSPATH . WPINC . '/shortcodes.php' );
283 pd_maybe_require( ABSPATH . WPINC . '/embed.php' );
284 pd_maybe_require( ABSPATH . WPINC . '/class-wp-embed.php' );
285 pd_maybe_require( ABSPATH . WPINC . '/class-oembed.php' );
286 pd_maybe_require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
287 pd_maybe_require( ABSPATH . WPINC . '/media.php' );
288 pd_maybe_require( ABSPATH . WPINC . '/http.php' );
289 pd_maybe_require( ABSPATH . WPINC . '/class-http.php' );
290 // 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
291 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
292 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
293 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
294 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
295 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
296 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-response.php' );
297 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
298 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-requests-hooks.php' );
299 pd_maybe_require( ABSPATH . WPINC . '/widgets.php' );
300 pd_maybe_require( ABSPATH . WPINC . '/class-wp-widget.php' );
301 pd_maybe_require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
302 pd_maybe_require( ABSPATH . WPINC . '/nav-menu.php' );
303 pd_maybe_require( ABSPATH . WPINC . '/nav-menu-template.php' );
304 pd_maybe_require( ABSPATH . WPINC . '/admin-bar.php' );
305 pd_maybe_require( ABSPATH . WPINC . '/rest-api.php' );
306 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
307 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
308 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
309 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
310 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
311 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
312 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-global-styles-controller.php' );
313 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
314 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
315 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
316 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php' );
317 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
318 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
319 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-items-controller.php' );
320 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menus-controller.php' );
321 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-locations-controller.php' );
322 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
323 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
324 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' );
325 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php' );
326 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-types-controller.php' );
327 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php' );
328 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
329 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
330 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php' );
331 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php' );
332 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php' );
333 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php' );
334 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php' );
335 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-site-health-controller.php' );
336 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-sidebars-controller.php' );
337 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widget-types-controller.php' );
338 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widgets-controller.php' );
339 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-templates-controller.php' );
340 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-url-details-controller.php' );
341 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
342 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
343 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
344 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
345 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
346 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
347 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
348
349 pd_maybe_require( ABSPATH . WPINC . '/sitemaps.php' );
350 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps.php' );
351 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-index.php' );
352 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-provider.php' );
353 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-registry.php' );
354 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-renderer.php' );
355 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-stylesheet.php' );
356 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-posts.php' );
357 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-taxonomies.php' );
358 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-users.php' );
359 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-editor-context.php' );
360
361
362 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-type.php' );
363 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-pattern-categories-registry.php' );
364 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-patterns-registry.php' );
365 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-styles-registry.php' );
366 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
367 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block.php' );
368 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-list.php' );
369 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
370 pd_maybe_require( ABSPATH . WPINC . '/blocks.php' );
371 pd_maybe_require( ABSPATH . WPINC . '/blocks/index.php' );
372 pd_maybe_require( ABSPATH . WPINC . '/block-editor.php' );
373 pd_maybe_require( ABSPATH . WPINC . '/block-patterns.php' );
374 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-supports.php' );
375 pd_maybe_require( ABSPATH . WPINC . '/block-supports/align.php' );
376 pd_maybe_require( ABSPATH . WPINC . '/block-supports/border.php' );
377 pd_maybe_require( ABSPATH . WPINC . '/block-supports/colors.php' );
378 pd_maybe_require( ABSPATH . WPINC . '/block-supports/custom-classname.php' );
379 pd_maybe_require( ABSPATH . WPINC . '/block-supports/dimensions.php' );
380 pd_maybe_require( ABSPATH . WPINC . '/block-supports/duotone.php' );
381 pd_maybe_require( ABSPATH . WPINC . '/block-supports/elements.php' );
382 pd_maybe_require( ABSPATH . WPINC . '/block-supports/generated-classname.php' );
383 pd_maybe_require( ABSPATH . WPINC . '/block-supports/layout.php' );
384 pd_maybe_require( ABSPATH . WPINC . '/block-supports/spacing.php' );
385 pd_maybe_require( ABSPATH . WPINC . '/block-supports/typography.php' );
386 pd_maybe_require( ABSPATH . WPINC . '/style-engine.php' );
387 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine.php' );
388 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-declarations.php' );
389 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-rule.php' );
390 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-rules-store.php' );
391 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-processor.php' );
392
393
394 /* PD: Start bail out early */
395 // return;
396 /* PD: End bail out early */
397 $GLOBALS['wp_embed'] = new WP_Embed();
398
399 /**
400 * WordPress Textdomain Registry object.
401 *
402 * Used to support just-in-time translations for manually loaded text domains.
403 *
404 * @since 6.1.0
405 *
406 * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry.
407 */
408 if ( class_exists( '\WP_Textdomain_Registry' ) ) {
409 $GLOBALS['wp_textdomain_registry'] = new WP_Textdomain_Registry();
410 }
411
412 // Load multisite-specific files.
413 if ( is_multisite() ) {
414 pd_maybe_require( ABSPATH . WPINC . '/ms-functions.php' );
415 pd_maybe_require( ABSPATH . WPINC . '/ms-default-filters.php' );
416 pd_maybe_require( ABSPATH . WPINC . '/ms-deprecated.php' );
417 }
418
419 // Define constants that rely on the API to obtain the default value.
420 // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
421 wp_plugin_directory_constants();
422
423 $GLOBALS['wp_plugin_paths'] = array();
424
425 // Load must-use plugins.
426 foreach ( wp_get_mu_plugins() as $mu_plugin ) {
427 include_once( $mu_plugin );
428 }
429 unset( $mu_plugin );
430
431 // Load network activated plugins.
432 if ( is_multisite() ) {
433 foreach ( wp_get_active_network_plugins() as $network_plugin ) {
434 wp_register_plugin_realpath( $network_plugin );
435 include_once( $network_plugin );
436 }
437 unset( $network_plugin );
438 }
439
440 /**
441 * Fires once all must-use and network-activated plugins have loaded.
442 *
443 * @since 2.8.0
444 */
445 do_action( 'muplugins_loaded' );
446
447 if ( is_multisite() )
448 ms_cookie_constants( );
449
450 // Define constants after multisite is loaded.
451 wp_cookie_constants();
452
453 // Define and enforce our SSL constants
454 wp_ssl_constants();
455
456 // Create common globals.
457 pd_maybe_require( ABSPATH . WPINC . '/vars.php' );
458
459 // Make taxonomies and posts available to plugins and themes.
460 // @plugin authors: warning: these get registered again on the init hook.
461 create_initial_taxonomies();
462 create_initial_post_types();
463
464 if ( function_exists( 'wp_start_scraping_edited_file_errors' ) ) {
465 wp_start_scraping_edited_file_errors();
466 }
467
468 // Register the default theme directory root
469 register_theme_directory( get_theme_root() );
470
471 /* PD: Start cache disable */
472
473 // Load active plugins.
474 // foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
475 // wp_register_plugin_realpath( $plugin );
476 // include_once( $plugin );
477 // }
478 // unset( $plugin );
479
480 /* PD: End cache disable */
481
482 // Load pluggable functions.
483 pd_maybe_require( ABSPATH . WPINC . '/pluggable.php' );
484 pd_maybe_require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
485
486 // Set internal encoding.
487 wp_set_internal_encoding();
488
489 // Run wp_cache_postload() if object cache is enabled and the function exists.
490 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
491 wp_cache_postload();
492
493 /**
494 * Fires once activated plugins have loaded.
495 *
496 * Pluggable functions are also available at this point in the loading order.
497 *
498 * @since 1.5.0
499 */
500 do_action( 'plugins_loaded' );
501
502 // Define constants which affect functionality if not already defined.
503 wp_functionality_constants();
504
505 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
506 wp_magic_quotes();
507
508 /**
509 * Fires when comment cookies are sanitized.
510 *
511 * @since 2.0.11
512 */
513 do_action( 'sanitize_comment_cookies' );
514
515 /**
516 * WordPress Query object
517 * @global WP_Query $wp_the_query
518 * @since 2.0.0
519 */
520 $GLOBALS['wp_the_query'] = new WP_Query();
521
522 /**
523 * Holds the reference to @see $wp_the_query
524 * Use this global for WordPress queries
525 * @global WP_Query $wp_query
526 * @since 1.5.0
527 */
528 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
529
530 /**
531 * Holds the WordPress Rewrite object for creating pretty URLs
532 * @global WP_Rewrite $wp_rewrite
533 * @since 1.5.0
534 */
535 $GLOBALS['wp_rewrite'] = new WP_Rewrite();
536
537 /**
538 * WordPress Object
539 * @global WP $wp
540 * @since 2.0.0
541 */
542 $GLOBALS['wp'] = new WP();
543
544 /**
545 * WordPress Widget Factory Object
546 * @global WP_Widget_Factory $wp_widget_factory
547 * @since 2.8.0
548 */
549 $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
550
551 /**
552 * WordPress User Roles
553 * @global WP_Roles $wp_roles
554 * @since 2.0.0
555 */
556 $GLOBALS['wp_roles'] = new WP_Roles();
557
558 /**
559 * Fires before the theme is loaded.
560 *
561 * @since 2.6.0
562 */
563 do_action( 'setup_theme' );
564
565 // Define the template related constants.
566 wp_templating_constants( );
567
568 // Load the default text localization domain.
569 load_default_textdomain();
570
571 $locale = get_locale();
572 $locale_file = WP_LANG_DIR . "/$locale.php";
573 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
574 require( $locale_file );
575 unset( $locale_file );
576
577 /**
578 * WordPress Locale object for loading locale domain date and various strings.
579 * @global WP_Locale $wp_locale
580 * @since 2.1.0
581 */
582 $GLOBALS['wp_locale'] = new WP_Locale();
583
584 /**
585 * WordPress Locale Switcher object for switching locales.
586 *
587 * @since 4.7.0
588 *
589 * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
590 */
591 $GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
592 $GLOBALS['wp_locale_switcher']->init();
593
594 // Load the functions for the active theme, for both parent and child theme if applicable.
595 if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
596 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
597 include( STYLESHEETPATH . '/functions.php' );
598 if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
599 include( TEMPLATEPATH . '/functions.php' );
600 }
601
602 /**
603 * Fires after the theme is loaded.
604 *
605 * @since 3.0.0
606 */
607 do_action( 'after_setup_theme' );
608
609 // Create an instance of WP_Site_Health so that Cron events may fire.
610 if ( ! class_exists( 'WP_Site_Health' ) ) {
611 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
612 }
613 WP_Site_Health::get_instance();
614
615 // Set up current user.
616 $GLOBALS['wp']->init();
617
618 /**
619 * Fires after WordPress has finished loading but before any headers are sent.
620 *
621 * Most of WP is loaded at this stage, and the user is authenticated. WP continues
622 * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
623 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
624 *
625 * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
626 *
627 * @since 1.5.0
628 */
629 do_action( 'init' );
630
631 // Check site status
632 if ( is_multisite() ) {
633 if ( true !== ( $file = ms_site_check() ) ) {
634 require( $file );
635 die();
636 }
637 unset($file);
638 }
639
640 /**
641 * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
642 *
643 * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
644 * users not logged in.
645 *
646 * @link https://codex.wordpress.org/AJAX_in_Plugins
647 *
648 * @since 3.0.0
649 */
650 do_action( 'wp_loaded' );
651