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

889 lines 38.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 function pd_maybe_require( $path ) {
8 if ( file_exists( $path ) ) {
9 require_once $path;
10 }
11
12 // class-settings.php is included from inside a static method, so vars
13 // set at script scope by required files (notably wp-includes/version.php)
14 // land here as locals instead of in $GLOBALS. Promote the known set so
15 // core functions like wp_check_php_mysql_versions() can read them.
16 foreach ( array( 'wp_version', 'wp_db_version', 'tinymce_version', 'required_php_version', 'required_php_extensions', 'required_mysql_version', 'wp_local_package' ) as $name ) {
17 if ( isset( $$name ) ) {
18 $GLOBALS[ $name ] = $$name;
19 }
20 }
21 }
22 /**
23 * Troubleshoot Settings.
24 *
25 * @since 0.0.0
26 * @package Troubleshoot
27 */
28
29 /**
30 * Troubleshoot Settings.
31 *
32 * @since 0.0.0
33 */
34 class PDT_Settings {
35 /**
36 * Parent plugin class.
37 *
38 * @since 0.0.0
39 *
40 * @var Troubleshoot
41 */
42 protected $plugin = null;
43
44 /**
45 * Constructor.
46 *
47 * @since 0.0.0
48 *
49 * @param Troubleshoot $plugin Main plugin object.
50 */
51 public function __construct( $plugin ) {
52 $this->plugin = $plugin;
53 $this->hooks();
54 }
55
56 /**
57 * Initiate our hooks.
58 *
59 * @since 0.0.0
60 */
61 public function hooks() {
62
63 }
64 }
65
66 /**
67 * Used to set up and fix common variables and include
68 * the WordPress procedural and class library.
69 *
70 * Allows for some configuration in wp-config.php (see default-constants.php)
71 *
72 * @package WordPress
73 */
74
75 /**
76 * Stores the location of the WordPress directory of functions, classes, and core content.
77 *
78 * @since 1.0.0
79 */
80 define( 'WPINC', 'wp-includes' );
81
82 /**
83 * Version information for the current WordPress release.
84 *
85 * These can't be directly globalized in version.php. When updating,
86 * include version.php from another installation and don't override
87 * these values if already set.
88 *
89 * @global string $wp_version The WordPress version string.
90 * @global int $wp_db_version WordPress database version.
91 * @global string $tinymce_version TinyMCE version.
92 * @global string $required_php_version The minimum required PHP version string.
93 * @global string[] $required_php_extensions The names of required PHP extensions.
94 * @global string $required_mysql_version The minimum required MySQL version string.
95 * @global string $wp_local_package Locale code of the package.
96 */
97 global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_php_extensions, $required_mysql_version, $wp_local_package;
98 pd_maybe_require( ABSPATH . WPINC . '/version.php' );
99 pd_maybe_require( ABSPATH . WPINC . '/compat-utf8.php' );
100 pd_maybe_require( ABSPATH . WPINC . '/compat.php' );
101 pd_maybe_require( ABSPATH . WPINC . '/load.php' );
102
103 // Check the server requirements.
104 // wp_check_php_mysql_versions();
105
106 // Include files required for initialization.
107 @include( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
108 @include( ABSPATH . WPINC . '/class-wp-exception.php' );
109 @include( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
110 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
111 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php' );
112 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php' );
113 @include( ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php' );
114 @include( ABSPATH . WPINC . '/class-wp-recovery-mode.php' );
115 @include( ABSPATH . WPINC . '/error-protection.php' );
116 @include( ABSPATH . WPINC . '/default-constants.php' );
117 require_once( ABSPATH . WPINC . '/plugin.php' );
118
119 /**
120 * If not already configured, `$blog_id` will default to 1 in a single site
121 * configuration. In multisite, it will be overridden by default in ms-settings.php.
122 *
123 * @global int $blog_id
124 * @since 2.0.0
125 */
126 global $blog_id;
127 global $table_prefix;
128
129 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
130 wp_initial_constants();
131
132 if ( function_exists( 'wp_register_fatal_error_handler' ) ) {
133 // Make sure we register the shutdown handler for fatal errors as soon as possible.
134 wp_register_fatal_error_handler();
135 }
136
137 // Check for the required PHP version and for the MySQL extension or a database drop-in.
138 wp_check_php_mysql_versions();
139
140 // Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
141 @ini_set( 'magic_quotes_runtime', 0 ); // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- Vendored WordPress core loader (wp-settings.php).
142 @ini_set( 'magic_quotes_sybase', 0 ); // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- Vendored WordPress core loader (wp-settings.php).
143
144 // WordPress calculates offsets from UTC.
145 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
146 date_default_timezone_set( 'UTC' );
147
148 // Standardize $_SERVER variables across setups.
149 wp_fix_server_vars();
150
151 // Check if we have received a request due to missing favicon.ico
152 wp_favicon_request();
153
154 // Check if we're in maintenance mode.
155 // wp_maintenance();
156
157 // Start loading timer.
158 timer_start();
159
160 // Check if we're in WP_DEBUG mode.
161 wp_debug_mode();
162
163 /**
164 * Filters whether to enable loading of the advanced-cache.php drop-in.
165 *
166 * This filter runs before it can be used by plugins. It is designed for non-web
167 * run-times. If false is returned, advanced-cache.php will never be loaded.
168 *
169 * @since 4.6.0
170 *
171 * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
172 * Default true.
173 */
174
175 /* PD: Start cache disable */
176 // if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
177 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
178 // WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
179 // Re-initialize any hooks added manually by advanced-cache.php
180 // if ( $wp_filter ) {
181 // $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
182 // }
183 /* PD: End cache disable */
184
185
186
187 // Define WP_LANG_DIR if not set.
188 wp_set_lang_dir();
189
190 // Load early WordPress files.
191 pd_maybe_require( ABSPATH . WPINC . '/class-wp-list-util.php' );
192 pd_maybe_require( ABSPATH . WPINC . '/class-wp-token-map.php' );
193 pd_maybe_require( ABSPATH . WPINC . '/utf8.php' );
194 pd_maybe_require( ABSPATH . WPINC . '/formatting.php' );
195 pd_maybe_require( ABSPATH . WPINC . '/meta.php' );
196 pd_maybe_require( ABSPATH . WPINC . '/functions.php' );
197 pd_maybe_require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
198 pd_maybe_require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
199 pd_maybe_require( ABSPATH . WPINC . '/class-wp.php' );
200 pd_maybe_require( ABSPATH . WPINC . '/class-wp-error.php' );
201 pd_maybe_require( ABSPATH . WPINC . '/pomo/mo.php' );
202 pd_maybe_require( ABSPATH . WPINC . '/l10n/class-wp-translation-controller.php' );
203 pd_maybe_require( ABSPATH . WPINC . '/l10n/class-wp-translations.php' );
204 pd_maybe_require( ABSPATH . WPINC . '/l10n/class-wp-translation-file.php' );
205 pd_maybe_require( ABSPATH . WPINC . '/l10n/class-wp-translation-file-mo.php' );
206 pd_maybe_require( ABSPATH . WPINC . '/l10n/class-wp-translation-file-php.php' );
207
208 /**
209 * @since 0.71
210 *
211 * @global wpdb $wpdb WordPress database abstraction object.
212 */
213 global $wpdb;
214 // Include the wpdb class and, if present, a db.php database drop-in.
215 require_wp_db();
216
217 /**
218 * @since 3.3.0
219 *
220 * @global string $table_prefix The database table prefix.
221 */
222 if ( ! isset( $GLOBALS['table_prefix'] ) ) {
223 $GLOBALS['table_prefix'] = $table_prefix;
224 }
225
226 // Set the database table prefix and the format specifiers for database table columns.
227 wp_set_wpdb_vars();
228
229 // Start the WordPress object cache, or an external object cache if the drop-in is present.
230 wp_start_object_cache();
231
232 // Attach the default filters.
233 pd_maybe_require( ABSPATH . WPINC . '/default-filters.php' );
234
235 // Initialize multisite if enabled.
236 if ( is_multisite() ) {
237 pd_maybe_require( ABSPATH . WPINC . '/class-wp-site-query.php' );
238 pd_maybe_require( ABSPATH . WPINC . '/class-wp-network-query.php' );
239 pd_maybe_require( ABSPATH . WPINC . '/ms-blogs.php' );
240 pd_maybe_require( ABSPATH . WPINC . '/ms-settings.php' );
241 } elseif ( ! defined( 'MULTISITE' ) ) {
242 define( 'MULTISITE', false );
243 }
244
245 register_shutdown_function( 'shutdown_action_hook' );
246
247 // Stop most of WordPress from being loaded if we just want the basics.
248 if ( SHORTINIT )
249 return false;
250
251 // Load the L10n library.
252 pd_maybe_require( ABSPATH . WPINC . '/l10n.php' );
253 pd_maybe_require( ABSPATH . WPINC . '/class-wp-textdomain-registry.php' );
254 pd_maybe_require( ABSPATH . WPINC . '/class-wp-locale.php' );
255 pd_maybe_require( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
256
257 // Run the installer if WordPress is not installed.
258 /* PD: Start wp_not_installed() disable */
259
260 // wp_not_installed();
261
262 /* PD: End wp_not_installed() disable */
263
264
265 // Load most of WordPress.
266 pd_maybe_require( ABSPATH . WPINC . '/class-wp-walker.php' );
267 pd_maybe_require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
268 pd_maybe_require( ABSPATH . WPINC . '/capabilities.php' );
269 pd_maybe_require( ABSPATH . WPINC . '/class-wp-roles.php' );
270 pd_maybe_require( ABSPATH . WPINC . '/class-wp-role.php' );
271 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user.php' );
272 pd_maybe_require( ABSPATH . WPINC . '/class-wp-query.php' );
273 pd_maybe_require( ABSPATH . WPINC . '/query.php' );
274 pd_maybe_require( ABSPATH . WPINC . '/date.php' );
275 pd_maybe_require( ABSPATH . WPINC . '/class-wp-date-query.php' );
276 pd_maybe_require( ABSPATH . WPINC . '/theme.php' );
277 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme.php' );
278 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-schema.php' );
279 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-data.php' );
280 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json.php' );
281 pd_maybe_require( ABSPATH . WPINC . '/class-wp-theme-json-resolver.php' );
282 pd_maybe_require( ABSPATH . WPINC . '/class-wp-duotone.php' );
283 pd_maybe_require( ABSPATH . WPINC . '/global-styles-and-settings.php' );
284 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-template.php' );
285 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-templates-registry.php' );
286 pd_maybe_require( ABSPATH . WPINC . '/block-template-utils.php' );
287 pd_maybe_require( ABSPATH . WPINC . '/block-template.php' );
288 pd_maybe_require( ABSPATH . WPINC . '/theme-templates.php' );
289 pd_maybe_require( ABSPATH . WPINC . '/theme-previews.php' );
290 pd_maybe_require( ABSPATH . WPINC . '/template.php' );
291 pd_maybe_require( ABSPATH . WPINC . '/https-detection.php' );
292 pd_maybe_require( ABSPATH . WPINC . '/https-migration.php' );
293 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-request.php' );
294 pd_maybe_require( ABSPATH . WPINC . '/user.php' );
295 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-query.php' );
296 pd_maybe_require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
297 pd_maybe_require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
298 pd_maybe_require( ABSPATH . WPINC . '/meta.php' );
299 pd_maybe_require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
300 pd_maybe_require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
301 pd_maybe_require( ABSPATH . WPINC . '/general-template.php' );
302 pd_maybe_require( ABSPATH . WPINC . '/link-template.php' );
303
304
305 pd_maybe_require( ABSPATH . WPINC . '/author-template.php' );
306 pd_maybe_require( ABSPATH . WPINC . '/robots-template.php' );
307 pd_maybe_require( ABSPATH . WPINC . '/post.php' );
308 pd_maybe_require( ABSPATH . WPINC . '/class-walker-page.php' );
309 pd_maybe_require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
310 pd_maybe_require( ABSPATH . WPINC . '/class-wp-post-type.php' );
311 pd_maybe_require( ABSPATH . WPINC . '/class-wp-post.php' );
312 pd_maybe_require( ABSPATH . WPINC . '/post-template.php' );
313 pd_maybe_require( ABSPATH . WPINC . '/revision.php' );
314 pd_maybe_require( ABSPATH . WPINC . '/post-formats.php' );
315 pd_maybe_require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
316 pd_maybe_require( ABSPATH . WPINC . '/category.php' );
317 pd_maybe_require( ABSPATH . WPINC . '/class-walker-category.php' );
318 pd_maybe_require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
319 pd_maybe_require( ABSPATH . WPINC . '/category-template.php' );
320 pd_maybe_require( ABSPATH . WPINC . '/comment.php' );
321 pd_maybe_require( ABSPATH . WPINC . '/class-wp-comment.php' );
322 pd_maybe_require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
323 pd_maybe_require( ABSPATH . WPINC . '/class-walker-comment.php' );
324 pd_maybe_require( ABSPATH . WPINC . '/comment-template.php' );
325 pd_maybe_require( ABSPATH . WPINC . '/rewrite.php' );
326 pd_maybe_require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
327 pd_maybe_require( ABSPATH . WPINC . '/feed.php' );
328 pd_maybe_require( ABSPATH . WPINC . '/bookmark.php' );
329 pd_maybe_require( ABSPATH . WPINC . '/bookmark-template.php' );
330 pd_maybe_require( ABSPATH . WPINC . '/kses.php' );
331 pd_maybe_require( ABSPATH . WPINC . '/cron.php' );
332 pd_maybe_require( ABSPATH . WPINC . '/deprecated.php' );
333 pd_maybe_require( ABSPATH . WPINC . '/script-loader.php' );
334 pd_maybe_require( ABSPATH . WPINC . '/build/routes.php' );
335 pd_maybe_require( ABSPATH . WPINC . '/build/pages.php' );
336 pd_maybe_require( ABSPATH . WPINC . '/taxonomy.php' );
337 pd_maybe_require( ABSPATH . WPINC . '/class-wp-taxonomy.php' );
338 pd_maybe_require( ABSPATH . WPINC . '/class-wp-term.php' );
339 pd_maybe_require( ABSPATH . WPINC . '/class-wp-term-query.php' );
340 pd_maybe_require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
341 pd_maybe_require( ABSPATH . WPINC . '/update.php' );
342 pd_maybe_require( ABSPATH . WPINC . '/canonical.php' );
343 pd_maybe_require( ABSPATH . WPINC . '/shortcodes.php' );
344 pd_maybe_require( ABSPATH . WPINC . '/embed.php' );
345 pd_maybe_require( ABSPATH . WPINC . '/class-wp-embed.php' );
346 pd_maybe_require( ABSPATH . WPINC . '/class-oembed.php' );
347 pd_maybe_require( ABSPATH . WPINC . '/class-wp-oembed.php' );
348 pd_maybe_require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
349 pd_maybe_require( ABSPATH . WPINC . '/media.php' );
350 pd_maybe_require( ABSPATH . WPINC . '/http.php' );
351 pd_maybe_require( ABSPATH . WPINC . '/class-http.php' );
352 pd_maybe_require( ABSPATH . WPINC . '/html-api/html5-named-character-references.php' );
353 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-attribute-token.php' );
354 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-span.php' );
355 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-doctype-info.php' );
356 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-text-replacement.php' );
357 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-decoder.php' );
358 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-tag-processor.php' );
359 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-unsupported-exception.php' );
360 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-active-formatting-elements.php' );
361 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-open-elements.php' );
362 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-token.php' );
363 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-stack-event.php' );
364 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-processor-state.php' );
365 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-html-processor.php' );
366 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-processor.php' );
367 if ( ! class_exists( 'WP_Block_Processor' ) ) {
368 pd_maybe_require( ABSPATH . WPINC . '/html-api/class-wp-block-processor.php' );
369 }
370 // 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
371 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
372 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
373 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
374 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
375 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
376 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-response.php' );
377 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
378 pd_maybe_require( ABSPATH . WPINC . '/class-wp-http-requests-hooks.php' );
379 pd_maybe_require( ABSPATH . WPINC . '/php-ai-client/autoload.php' );
380 pd_maybe_require( ABSPATH . WPINC . '/ai-client/adapters/class-wp-ai-client-http-client.php' );
381 pd_maybe_require( ABSPATH . WPINC . '/ai-client/adapters/class-wp-ai-client-cache.php' );
382 pd_maybe_require( ABSPATH . WPINC . '/ai-client/adapters/class-wp-ai-client-discovery-strategy.php' );
383 pd_maybe_require( ABSPATH . WPINC . '/ai-client/adapters/class-wp-ai-client-event-dispatcher.php' );
384 pd_maybe_require( ABSPATH . WPINC . '/ai-client/class-wp-ai-client-ability-function-resolver.php' );
385 pd_maybe_require( ABSPATH . WPINC . '/ai-client/class-wp-ai-client-prompt-builder.php' );
386 pd_maybe_require( ABSPATH . WPINC . '/ai-client.php' );
387 pd_maybe_require( ABSPATH . WPINC . '/class-wp-connector-registry.php' );
388 pd_maybe_require( ABSPATH . WPINC . '/connectors.php' );
389 pd_maybe_require( ABSPATH . WPINC . '/class-wp-icons-registry.php' );
390 pd_maybe_require( ABSPATH . WPINC . '/widgets.php' );
391 pd_maybe_require( ABSPATH . WPINC . '/class-wp-widget.php' );
392 pd_maybe_require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
393 pd_maybe_require( ABSPATH . WPINC . '/nav-menu-template.php' );
394 pd_maybe_require( ABSPATH . WPINC . '/nav-menu.php' );
395 pd_maybe_require( ABSPATH . WPINC . '/admin-bar.php' );
396 pd_maybe_require( ABSPATH . WPINC . '/class-wp-application-passwords.php' );
397 pd_maybe_require( ABSPATH . WPINC . '/abilities-api/class-wp-ability-category.php' );
398 pd_maybe_require( ABSPATH . WPINC . '/abilities-api/class-wp-ability-categories-registry.php' );
399 pd_maybe_require( ABSPATH . WPINC . '/abilities-api/class-wp-ability.php' );
400 pd_maybe_require( ABSPATH . WPINC . '/abilities-api/class-wp-abilities-registry.php' );
401 pd_maybe_require( ABSPATH . WPINC . '/abilities-api.php' );
402 pd_maybe_require( ABSPATH . WPINC . '/abilities.php' );
403 pd_maybe_require( ABSPATH . WPINC . '/collaboration/interface-wp-sync-storage.php' );
404 pd_maybe_require( ABSPATH . WPINC . '/collaboration/class-wp-sync-post-meta-storage.php' );
405 pd_maybe_require( ABSPATH . WPINC . '/collaboration/class-wp-http-polling-sync-server.php' );
406 pd_maybe_require( ABSPATH . WPINC . '/collaboration.php' );
407 pd_maybe_require( ABSPATH . WPINC . '/rest-api.php' );
408 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
409 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
410 pd_maybe_require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
411 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
412 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
413 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
414 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-global-styles-controller.php' );
415 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
416 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
417 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
418 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php' );
419 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-template-revisions-controller.php' );
420 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php' );
421 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php' );
422 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
423 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
424 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-items-controller.php' );
425 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menus-controller.php' );
426 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-locations-controller.php' );
427 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
428 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
429 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' );
430 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php' );
431 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-types-controller.php' );
432 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php' );
433 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
434 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
435 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php' );
436 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php' );
437 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php' );
438 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php' );
439 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-patterns-controller.php' );
440 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-pattern-categories-controller.php' );
441 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php' );
442 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-site-health-controller.php' );
443 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-sidebars-controller.php' );
444 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widget-types-controller.php' );
445 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widgets-controller.php' );
446 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-templates-controller.php' );
447 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-url-details-controller.php' );
448 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-navigation-fallback-controller.php' );
449 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-font-families-controller.php' );
450 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-font-faces-controller.php' );
451 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-font-collections-controller.php' );
452 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-icons-controller.php' );
453 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-abilities-v1-categories-controller.php' );
454 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-abilities-v1-list-controller.php' );
455 pd_maybe_require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-abilities-v1-run-controller.php' );
456 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
457 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
458 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
459 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
460 pd_maybe_require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
461 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
462 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
463
464 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-term-search-handler.php' );
465 pd_maybe_require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-format-search-handler.php' );
466 pd_maybe_require( ABSPATH . WPINC . '/sitemaps.php' );
467 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps.php' );
468 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-index.php' );
469 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-provider.php' );
470 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-registry.php' );
471 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-renderer.php' );
472 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-stylesheet.php' );
473 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-posts.php' );
474 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-taxonomies.php' );
475 pd_maybe_require( ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-users.php' );
476 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-bindings-source.php' );
477 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-bindings-registry.php' );
478 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-editor-context.php' );
479
480
481 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-type.php' );
482 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-pattern-categories-registry.php' );
483 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-patterns-registry.php' );
484 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-styles-registry.php' );
485 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
486 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block.php' );
487 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-list.php' );
488 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-metadata-registry.php' );
489 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-parser-block.php' );
490 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-parser-frame.php' );
491 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
492 pd_maybe_require( ABSPATH . WPINC . '/class-wp-classic-to-block-menu-converter.php' );
493 pd_maybe_require( ABSPATH . WPINC . '/class-wp-navigation-fallback.php' );
494 pd_maybe_require( ABSPATH . WPINC . '/block-bindings.php' );
495 pd_maybe_require( ABSPATH . WPINC . '/block-bindings/pattern-overrides.php' );
496 pd_maybe_require( ABSPATH . WPINC . '/block-bindings/post-data.php' );
497 pd_maybe_require( ABSPATH . WPINC . '/block-bindings/post-meta.php' );
498 pd_maybe_require( ABSPATH . WPINC . '/block-bindings/term-data.php' );
499 pd_maybe_require( ABSPATH . WPINC . '/blocks.php' );
500 pd_maybe_require( ABSPATH . WPINC . '/blocks/index.php' );
501 pd_maybe_require( ABSPATH . WPINC . '/block-editor.php' );
502 pd_maybe_require( ABSPATH . WPINC . '/block-patterns.php' );
503 pd_maybe_require( ABSPATH . WPINC . '/class-wp-block-supports.php' );
504 pd_maybe_require( ABSPATH . WPINC . '/block-supports/utils.php' );
505 pd_maybe_require( ABSPATH . WPINC . '/block-supports/align.php' );
506 pd_maybe_require( ABSPATH . WPINC . '/block-supports/custom-classname.php' );
507 pd_maybe_require( ABSPATH . WPINC . '/block-supports/generated-classname.php' );
508 pd_maybe_require( ABSPATH . WPINC . '/block-supports/settings.php' );
509 pd_maybe_require( ABSPATH . WPINC . '/block-supports/elements.php' );
510 pd_maybe_require( ABSPATH . WPINC . '/block-supports/colors.php' );
511 pd_maybe_require( ABSPATH . WPINC . '/block-supports/typography.php' );
512 pd_maybe_require( ABSPATH . WPINC . '/block-supports/border.php' );
513 pd_maybe_require( ABSPATH . WPINC . '/block-supports/layout.php' );
514 pd_maybe_require( ABSPATH . WPINC . '/block-supports/position.php' );
515 pd_maybe_require( ABSPATH . WPINC . '/block-supports/spacing.php' );
516 pd_maybe_require( ABSPATH . WPINC . '/block-supports/dimensions.php' );
517 pd_maybe_require( ABSPATH . WPINC . '/block-supports/duotone.php' );
518 pd_maybe_require( ABSPATH . WPINC . '/block-supports/shadow.php' );
519 pd_maybe_require( ABSPATH . WPINC . '/block-supports/background.php' );
520 pd_maybe_require( ABSPATH . WPINC . '/block-supports/block-style-variations.php' );
521 pd_maybe_require( ABSPATH . WPINC . '/block-supports/aria-label.php' );
522 pd_maybe_require( ABSPATH . WPINC . '/block-supports/block-visibility.php' );
523 pd_maybe_require( ABSPATH . WPINC . '/block-supports/anchor.php' );
524 pd_maybe_require( ABSPATH . WPINC . '/block-supports/custom-css.php' );
525 pd_maybe_require( ABSPATH . WPINC . '/block-supports/auto-register.php' );
526 pd_maybe_require( ABSPATH . WPINC . '/style-engine.php' );
527 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine.php' );
528 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-declarations.php' );
529 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-rule.php' );
530 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-rules-store.php' );
531 pd_maybe_require( ABSPATH . WPINC . '/style-engine/class-wp-style-engine-processor.php' );
532 pd_maybe_require( ABSPATH . WPINC . '/fonts/class-wp-font-face-resolver.php' );
533 pd_maybe_require( ABSPATH . WPINC . '/fonts/class-wp-font-collection.php' );
534 pd_maybe_require( ABSPATH . WPINC . '/fonts/class-wp-font-face.php' );
535 pd_maybe_require( ABSPATH . WPINC . '/fonts/class-wp-font-library.php' );
536 pd_maybe_require( ABSPATH . WPINC . '/fonts/class-wp-font-utils.php' );
537 pd_maybe_require( ABSPATH . WPINC . '/fonts.php' );
538 pd_maybe_require( ABSPATH . WPINC . '/class-wp-script-modules.php' );
539 pd_maybe_require( ABSPATH . WPINC . '/script-modules.php' );
540 pd_maybe_require( ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api.php' );
541 pd_maybe_require( ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api-directives-processor.php' );
542 pd_maybe_require( ABSPATH . WPINC . '/interactivity-api/interactivity-api.php' );
543 pd_maybe_require( ABSPATH . WPINC . '/class-wp-plugin-dependencies.php' );
544 pd_maybe_require( ABSPATH . WPINC . '/class-wp-url-pattern-prefixer.php' );
545 pd_maybe_require( ABSPATH . WPINC . '/class-wp-speculation-rules.php' );
546 pd_maybe_require( ABSPATH . WPINC . '/speculative-loading.php' );
547 pd_maybe_require( ABSPATH . WPINC . '/view-transitions.php' );
548
549 if ( function_exists( 'wp_script_modules' ) ) {
550 add_action( 'after_setup_theme', array( wp_script_modules(), 'add_hooks' ) );
551 }
552 if ( function_exists( 'wp_interactivity' ) ) {
553 add_action( 'after_setup_theme', array( wp_interactivity(), 'add_hooks' ) );
554 }
555
556 /* PD: Start bail out early */
557 // return;
558 /* PD: End bail out early */
559 $GLOBALS['wp_embed'] = new WP_Embed();
560
561 /**
562 * WordPress Textdomain Registry object.
563 *
564 * Used to support just-in-time translations for manually loaded text domains.
565 *
566 * @since 6.1.0
567 *
568 * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry.
569 */
570 if ( class_exists( '\WP_Textdomain_Registry' ) ) {
571 $GLOBALS['wp_textdomain_registry'] = new WP_Textdomain_Registry();
572 if( method_exists( $GLOBALS['wp_textdomain_registry'], 'init' ) ) {
573 // introduced in WP6.5
574 $GLOBALS['wp_textdomain_registry']->init();
575 }
576 }
577
578 // Load multisite-specific files.
579 if ( is_multisite() ) {
580 pd_maybe_require( ABSPATH . WPINC . '/ms-functions.php' );
581 pd_maybe_require( ABSPATH . WPINC . '/ms-default-filters.php' );
582 pd_maybe_require( ABSPATH . WPINC . '/ms-deprecated.php' );
583 }
584
585 // Define constants that rely on the API to obtain the default value.
586 // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
587 wp_plugin_directory_constants();
588
589 $GLOBALS['wp_plugin_paths'] = array();
590
591 // Load must-use plugins.
592 foreach ( wp_get_mu_plugins() as $mu_plugin ) {
593 $_wp_plugin_file = $mu_plugin;
594 include_once $mu_plugin;
595 $mu_plugin = $_wp_plugin_file; // Avoid stomping of the $mu_plugin variable in a plugin.
596
597 /**
598 * Fires once a single must-use plugin has loaded.
599 *
600 * @since 5.1.0
601 *
602 * @param string $mu_plugin Full path to the plugin's main file.
603 */
604 do_action( 'mu_plugin_loaded', $mu_plugin );
605 }
606 unset( $mu_plugin, $_wp_plugin_file );
607
608 // Load network activated plugins.
609 if ( is_multisite() ) {
610 foreach ( wp_get_active_network_plugins() as $network_plugin ) {
611 wp_register_plugin_realpath( $network_plugin );
612
613 $_wp_plugin_file = $network_plugin;
614 include_once $network_plugin;
615 $network_plugin = $_wp_plugin_file; // Avoid stomping of the $network_plugin variable in a plugin.
616
617 /**
618 * Fires once a single network-activated plugin has loaded.
619 *
620 * @since 5.1.0
621 *
622 * @param string $network_plugin Full path to the plugin's main file.
623 */
624 do_action( 'network_plugin_loaded', $network_plugin );
625 }
626 unset( $network_plugin, $_wp_plugin_file );
627 }
628
629 /**
630 * Fires once all must-use and network-activated plugins have loaded.
631 *
632 * @since 2.8.0
633 */
634 do_action( 'muplugins_loaded' );
635
636 if ( is_multisite() ) {
637 ms_cookie_constants();
638 }
639
640 // Define constants after multisite is loaded.
641 wp_cookie_constants();
642
643 // Define and enforce our SSL constants
644 wp_ssl_constants();
645
646 // Create common globals.
647 pd_maybe_require( ABSPATH . WPINC . '/vars.php' );
648
649 // Make taxonomies and posts available to plugins and themes.
650 // @plugin authors: warning: these get registered again on the init hook.
651 create_initial_taxonomies();
652 create_initial_post_types();
653
654 if ( function_exists( 'wp_start_scraping_edited_file_errors' ) ) {
655 wp_start_scraping_edited_file_errors();
656 }
657
658 // Register the default theme directory root
659 register_theme_directory( get_theme_root() );
660
661 /* PD: Start cache disable */
662
663 // Load active plugins.
664 // foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
665 // wp_register_plugin_realpath( $plugin );
666 // include_once( $plugin );
667 // }
668 // unset( $plugin );
669
670 /* PD: End cache disable */
671
672 // if ( ! is_multisite() && wp_is_fatal_error_handler_enabled() ) {
673 // // Handle users requesting a recovery mode link and initiating recovery mode.
674 // wp_recovery_mode()->initialize();
675 // }
676
677 // // To make get_plugin_data() available in a way that's compatible with plugins also loading this file, see #62244.
678 // require_once ABSPATH . 'wp-admin/includes/plugin.php';
679
680 // // Load active plugins.
681 // foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
682 // wp_register_plugin_realpath( $plugin );
683
684 // $plugin_data = get_plugin_data( $plugin, false, false );
685
686 // $textdomain = $plugin_data['TextDomain'];
687 // if ( $textdomain ) {
688 // if ( $plugin_data['DomainPath'] ) {
689 // $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] );
690 // } else {
691 // $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) );
692 // }
693 // }
694
695 // $_wp_plugin_file = $plugin;
696 // include_once $plugin;
697 // $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
698
699 // /**
700 // * Fires once a single activated plugin has loaded.
701 // *
702 // * @since 5.1.0
703 // *
704 // * @param string $plugin Full path to the plugin's main file.
705 // */
706 // do_action( 'plugin_loaded', $plugin );
707 // }
708 // unset( $plugin, $_wp_plugin_file, $plugin_data, $textdomain );
709
710 // Load pluggable functions.
711 pd_maybe_require( ABSPATH . WPINC . '/pluggable.php' );
712 pd_maybe_require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
713
714 // Set internal encoding.
715 wp_set_internal_encoding();
716
717 // Run wp_cache_postload() if object cache is enabled and the function exists.
718 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
719 wp_cache_postload();
720 }
721 /**
722 * Fires once activated plugins have loaded.
723 *
724 * Pluggable functions are also available at this point in the loading order.
725 *
726 * @since 1.5.0
727 */
728 do_action( 'plugins_loaded' );
729
730 // Define constants which affect functionality if not already defined.
731 wp_functionality_constants();
732
733 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
734 wp_magic_quotes();
735
736 /**
737 * Fires when comment cookies are sanitized.
738 *
739 * @since 2.0.11
740 */
741 do_action( 'sanitize_comment_cookies' );
742
743 /**
744 * WordPress Query object
745 * @global WP_Query $wp_the_query
746 * @since 2.0.0
747 */
748 $GLOBALS['wp_the_query'] = new WP_Query();
749
750 /**
751 * Holds the reference to @see $wp_the_query
752 * Use this global for WordPress queries
753 * @global WP_Query $wp_query
754 * @since 1.5.0
755 */
756 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
757
758 /**
759 * Holds the WordPress Rewrite object for creating pretty URLs
760 * @global WP_Rewrite $wp_rewrite
761 * @since 1.5.0
762 */
763 $GLOBALS['wp_rewrite'] = new WP_Rewrite();
764
765 /**
766 * WordPress Object
767 * @global WP $wp
768 * @since 2.0.0
769 */
770 $GLOBALS['wp'] = new WP();
771
772 /**
773 * WordPress Widget Factory Object
774 * @global WP_Widget_Factory $wp_widget_factory
775 * @since 2.8.0
776 */
777 $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
778
779 /**
780 * WordPress User Roles
781 * @global WP_Roles $wp_roles
782 * @since 2.0.0
783 */
784 $GLOBALS['wp_roles'] = new WP_Roles();
785
786 /**
787 * Fires before the theme is loaded.
788 *
789 * @since 2.6.0
790 */
791 do_action( 'setup_theme' );
792
793 // Define the template related constants.
794 wp_templating_constants();
795 if( function_exists( 'wp_set_template_globals' ) ) {
796 // introduced in WP6.5
797 wp_set_template_globals();
798 }
799
800 // Load the default text localization domain.
801 load_default_textdomain();
802
803 $locale = get_locale();
804 $locale_file = WP_LANG_DIR . "/$locale.php";
805 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
806 require( $locale_file );
807 unset( $locale_file );
808
809 /**
810 * WordPress Locale object for loading locale domain date and various strings.
811 * @global WP_Locale $wp_locale
812 * @since 2.1.0
813 */
814 $GLOBALS['wp_locale'] = new WP_Locale();
815
816 /**
817 * WordPress Locale Switcher object for switching locales.
818 *
819 * @since 4.7.0
820 *
821 * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
822 */
823 $GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
824 $GLOBALS['wp_locale_switcher']->init();
825
826 // Load the functions for the active theme, for both parent and child theme if applicable.
827 if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
828 foreach ( wp_get_active_and_valid_themes() as $theme ) {
829 $wp_theme = wp_get_theme( basename( $theme ) );
830
831 $wp_theme->load_textdomain();
832
833 if ( file_exists( $theme . '/functions.php' ) ) {
834 include $theme . '/functions.php';
835 }
836 }
837 }
838 unset( $theme, $wp_theme );
839
840 /**
841 * Fires after the theme is loaded.
842 *
843 * @since 3.0.0
844 */
845 do_action( 'after_setup_theme' );
846
847 // Create an instance of WP_Site_Health so that Cron events may fire.
848 if ( ! class_exists( 'WP_Site_Health' ) ) {
849 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
850 }
851 WP_Site_Health::get_instance();
852
853 // Set up current user.
854 $GLOBALS['wp']->init();
855
856 /**
857 * Fires after WordPress has finished loading but before any headers are sent.
858 *
859 * Most of WP is loaded at this stage, and the user is authenticated. WP continues
860 * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
861 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
862 *
863 * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
864 *
865 * @since 1.5.0
866 */
867 do_action( 'init' );
868
869 // Check site status
870 if ( is_multisite() ) {
871 if ( true !== ( $file = ms_site_check() ) ) {
872 require( $file );
873 die();
874 }
875 unset($file);
876 }
877
878 /**
879 * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
880 *
881 * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
882 * users not logged in.
883 *
884 * @link https://developer.wordpress.org/plugins/javascript/ajax
885 *
886 * @since 3.0.0
887 */
888 do_action( 'wp_loaded' );
889