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

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