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

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