PluginProbe
Plugin Detective – Troubleshooting Conflicts / 1.2.16
Plugin Detective – Troubleshooting Conflicts v1.2.16
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.16, at troubleshoot/includes/class-settings.php

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