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