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

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