Edit File by line
/home/zeestwma/richards...
File: wp-settings.php
[500] Fix | Delete
// Define constants after multisite is loaded.
[501] Fix | Delete
wp_cookie_constants();
[502] Fix | Delete
[503] Fix | Delete
// Define and enforce our SSL constants.
[504] Fix | Delete
wp_ssl_constants();
[505] Fix | Delete
[506] Fix | Delete
// Create common globals.
[507] Fix | Delete
require ABSPATH . WPINC . '/vars.php';
[508] Fix | Delete
[509] Fix | Delete
// Make taxonomies and posts available to plugins and themes.
[510] Fix | Delete
// @plugin authors: warning: these get registered again on the init hook.
[511] Fix | Delete
create_initial_taxonomies();
[512] Fix | Delete
create_initial_post_types();
[513] Fix | Delete
[514] Fix | Delete
wp_start_scraping_edited_file_errors();
[515] Fix | Delete
[516] Fix | Delete
// Register the default theme directory root.
[517] Fix | Delete
register_theme_directory( get_theme_root() );
[518] Fix | Delete
[519] Fix | Delete
if ( ! is_multisite() && wp_is_fatal_error_handler_enabled() ) {
[520] Fix | Delete
// Handle users requesting a recovery mode link and initiating recovery mode.
[521] Fix | Delete
wp_recovery_mode()->initialize();
[522] Fix | Delete
}
[523] Fix | Delete
[524] Fix | Delete
// To make get_plugin_data() available in a way that's compatible with plugins also loading this file, see #62244.
[525] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/plugin.php';
[526] Fix | Delete
[527] Fix | Delete
// Load active plugins.
[528] Fix | Delete
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
[529] Fix | Delete
wp_register_plugin_realpath( $plugin );
[530] Fix | Delete
[531] Fix | Delete
$plugin_data = get_plugin_data( $plugin, false, false );
[532] Fix | Delete
[533] Fix | Delete
$textdomain = $plugin_data['TextDomain'];
[534] Fix | Delete
if ( $textdomain ) {
[535] Fix | Delete
if ( $plugin_data['DomainPath'] ) {
[536] Fix | Delete
$GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] );
[537] Fix | Delete
} else {
[538] Fix | Delete
$GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) );
[539] Fix | Delete
}
[540] Fix | Delete
}
[541] Fix | Delete
[542] Fix | Delete
$_wp_plugin_file = $plugin;
[543] Fix | Delete
include_once $plugin;
[544] Fix | Delete
$plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
[545] Fix | Delete
[546] Fix | Delete
/**
[547] Fix | Delete
* Fires once a single activated plugin has loaded.
[548] Fix | Delete
*
[549] Fix | Delete
* @since 5.1.0
[550] Fix | Delete
*
[551] Fix | Delete
* @param string $plugin Full path to the plugin's main file.
[552] Fix | Delete
*/
[553] Fix | Delete
do_action( 'plugin_loaded', $plugin );
[554] Fix | Delete
}
[555] Fix | Delete
unset( $plugin, $_wp_plugin_file, $plugin_data, $textdomain );
[556] Fix | Delete
[557] Fix | Delete
// Load pluggable functions.
[558] Fix | Delete
require ABSPATH . WPINC . '/pluggable.php';
[559] Fix | Delete
require ABSPATH . WPINC . '/pluggable-deprecated.php';
[560] Fix | Delete
[561] Fix | Delete
// Set internal encoding.
[562] Fix | Delete
wp_set_internal_encoding();
[563] Fix | Delete
[564] Fix | Delete
// Run wp_cache_postload() if object cache is enabled and the function exists.
[565] Fix | Delete
if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
[566] Fix | Delete
wp_cache_postload();
[567] Fix | Delete
}
[568] Fix | Delete
[569] Fix | Delete
/**
[570] Fix | Delete
* Fires once activated plugins have loaded.
[571] Fix | Delete
*
[572] Fix | Delete
* Pluggable functions are also available at this point in the loading order.
[573] Fix | Delete
*
[574] Fix | Delete
* @since 1.5.0
[575] Fix | Delete
*/
[576] Fix | Delete
do_action( 'plugins_loaded' );
[577] Fix | Delete
[578] Fix | Delete
// Define constants which affect functionality if not already defined.
[579] Fix | Delete
wp_functionality_constants();
[580] Fix | Delete
[581] Fix | Delete
// Add magic quotes and set up $_REQUEST ( $_GET + $_POST ).
[582] Fix | Delete
wp_magic_quotes();
[583] Fix | Delete
[584] Fix | Delete
/**
[585] Fix | Delete
* Fires when comment cookies are sanitized.
[586] Fix | Delete
*
[587] Fix | Delete
* @since 2.0.11
[588] Fix | Delete
*/
[589] Fix | Delete
do_action( 'sanitize_comment_cookies' );
[590] Fix | Delete
[591] Fix | Delete
/**
[592] Fix | Delete
* WordPress Query object
[593] Fix | Delete
*
[594] Fix | Delete
* @since 2.0.0
[595] Fix | Delete
*
[596] Fix | Delete
* @global WP_Query $wp_the_query WordPress Query object.
[597] Fix | Delete
*/
[598] Fix | Delete
$GLOBALS['wp_the_query'] = new WP_Query();
[599] Fix | Delete
[600] Fix | Delete
/**
[601] Fix | Delete
* Holds the reference to {@see $wp_the_query}.
[602] Fix | Delete
* Use this global for WordPress queries
[603] Fix | Delete
*
[604] Fix | Delete
* @since 1.5.0
[605] Fix | Delete
*
[606] Fix | Delete
* @global WP_Query $wp_query WordPress Query object.
[607] Fix | Delete
*/
[608] Fix | Delete
$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
[609] Fix | Delete
[610] Fix | Delete
/**
[611] Fix | Delete
* Holds the WordPress Rewrite object for creating pretty URLs
[612] Fix | Delete
*
[613] Fix | Delete
* @since 1.5.0
[614] Fix | Delete
*
[615] Fix | Delete
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
[616] Fix | Delete
*/
[617] Fix | Delete
$GLOBALS['wp_rewrite'] = new WP_Rewrite();
[618] Fix | Delete
[619] Fix | Delete
/**
[620] Fix | Delete
* WordPress Object
[621] Fix | Delete
*
[622] Fix | Delete
* @since 2.0.0
[623] Fix | Delete
*
[624] Fix | Delete
* @global WP $wp Current WordPress environment instance.
[625] Fix | Delete
*/
[626] Fix | Delete
$GLOBALS['wp'] = new WP();
[627] Fix | Delete
[628] Fix | Delete
/**
[629] Fix | Delete
* WordPress Widget Factory Object
[630] Fix | Delete
*
[631] Fix | Delete
* @since 2.8.0
[632] Fix | Delete
*
[633] Fix | Delete
* @global WP_Widget_Factory $wp_widget_factory
[634] Fix | Delete
*/
[635] Fix | Delete
$GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
[636] Fix | Delete
[637] Fix | Delete
/**
[638] Fix | Delete
* WordPress User Roles
[639] Fix | Delete
*
[640] Fix | Delete
* @since 2.0.0
[641] Fix | Delete
*
[642] Fix | Delete
* @global WP_Roles $wp_roles WordPress role management object.
[643] Fix | Delete
*/
[644] Fix | Delete
$GLOBALS['wp_roles'] = new WP_Roles();
[645] Fix | Delete
[646] Fix | Delete
/**
[647] Fix | Delete
* Fires before the theme is loaded.
[648] Fix | Delete
*
[649] Fix | Delete
* @since 2.6.0
[650] Fix | Delete
*/
[651] Fix | Delete
do_action( 'setup_theme' );
[652] Fix | Delete
[653] Fix | Delete
// Define the template related constants and globals.
[654] Fix | Delete
wp_templating_constants();
[655] Fix | Delete
wp_set_template_globals();
[656] Fix | Delete
[657] Fix | Delete
// Load the default text localization domain.
[658] Fix | Delete
load_default_textdomain();
[659] Fix | Delete
[660] Fix | Delete
$locale = get_locale();
[661] Fix | Delete
$locale_file = WP_LANG_DIR . "/$locale.php";
[662] Fix | Delete
if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
[663] Fix | Delete
require $locale_file;
[664] Fix | Delete
}
[665] Fix | Delete
unset( $locale_file );
[666] Fix | Delete
[667] Fix | Delete
/**
[668] Fix | Delete
* WordPress Locale object for loading locale domain date and various strings.
[669] Fix | Delete
*
[670] Fix | Delete
* @since 2.1.0
[671] Fix | Delete
*
[672] Fix | Delete
* @global WP_Locale $wp_locale WordPress date and time locale object.
[673] Fix | Delete
*/
[674] Fix | Delete
$GLOBALS['wp_locale'] = new WP_Locale();
[675] Fix | Delete
[676] Fix | Delete
/**
[677] Fix | Delete
* WordPress Locale Switcher object for switching locales.
[678] Fix | Delete
*
[679] Fix | Delete
* @since 4.7.0
[680] Fix | Delete
*
[681] Fix | Delete
* @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
[682] Fix | Delete
*/
[683] Fix | Delete
$GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
[684] Fix | Delete
$GLOBALS['wp_locale_switcher']->init();
[685] Fix | Delete
[686] Fix | Delete
// Load the functions for the active theme, for both parent and child theme if applicable.
[687] Fix | Delete
foreach ( wp_get_active_and_valid_themes() as $theme ) {
[688] Fix | Delete
$wp_theme = wp_get_theme( basename( $theme ) );
[689] Fix | Delete
[690] Fix | Delete
$wp_theme->load_textdomain();
[691] Fix | Delete
[692] Fix | Delete
if ( file_exists( $theme . '/functions.php' ) ) {
[693] Fix | Delete
include $theme . '/functions.php';
[694] Fix | Delete
}
[695] Fix | Delete
}
[696] Fix | Delete
unset( $theme, $wp_theme );
[697] Fix | Delete
[698] Fix | Delete
/**
[699] Fix | Delete
* Fires after the theme is loaded.
[700] Fix | Delete
*
[701] Fix | Delete
* @since 3.0.0
[702] Fix | Delete
*/
[703] Fix | Delete
do_action( 'after_setup_theme' );
[704] Fix | Delete
[705] Fix | Delete
// Create an instance of WP_Site_Health so that Cron events may fire.
[706] Fix | Delete
if ( ! class_exists( 'WP_Site_Health' ) ) {
[707] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
[708] Fix | Delete
}
[709] Fix | Delete
WP_Site_Health::get_instance();
[710] Fix | Delete
[711] Fix | Delete
// Set up current user.
[712] Fix | Delete
$GLOBALS['wp']->init();
[713] Fix | Delete
[714] Fix | Delete
/**
[715] Fix | Delete
* Fires after WordPress has finished loading but before any headers are sent.
[716] Fix | Delete
*
[717] Fix | Delete
* Most of WP is loaded at this stage, and the user is authenticated. WP continues
[718] Fix | Delete
* to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
[719] Fix | Delete
* themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
[720] Fix | Delete
*
[721] Fix | Delete
* If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
[722] Fix | Delete
*
[723] Fix | Delete
* @since 1.5.0
[724] Fix | Delete
*/
[725] Fix | Delete
do_action( 'init' );
[726] Fix | Delete
[727] Fix | Delete
// Check site status.
[728] Fix | Delete
if ( is_multisite() ) {
[729] Fix | Delete
$file = ms_site_check();
[730] Fix | Delete
if ( true !== $file ) {
[731] Fix | Delete
require $file;
[732] Fix | Delete
die();
[733] Fix | Delete
}
[734] Fix | Delete
unset( $file );
[735] Fix | Delete
}
[736] Fix | Delete
[737] Fix | Delete
/**
[738] Fix | Delete
* This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
[739] Fix | Delete
*
[740] Fix | Delete
* Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
[741] Fix | Delete
* users not logged in.
[742] Fix | Delete
*
[743] Fix | Delete
* @link https://developer.wordpress.org/plugins/javascript/ajax
[744] Fix | Delete
*
[745] Fix | Delete
* @since 3.0.0
[746] Fix | Delete
*/
[747] Fix | Delete
do_action( 'wp_loaded' );
[748] Fix | Delete
[749] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function