From c384ed989f30071e159c15d092d3f392263f9df1 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 14 Feb 2015 11:39:27 +0000 Subject: [PATCH] Add inline documentation to clarify the reasoning behind the various conditions that control how WP is loaded. Props mattheweppelsheimer for the initial patch. Fixes #30935. Built from https://develop.svn.wordpress.org/trunk@31463 git-svn-id: http://core.svn.wordpress.org/trunk@31444 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-load.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 98c0f9674d..02cc279698 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31462'; +$wp_version = '4.2-alpha-31463'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-load.php b/wp-load.php index 9021ceb747..c022abcee5 100644 --- a/wp-load.php +++ b/wp-load.php @@ -23,6 +23,14 @@ define( 'ABSPATH', dirname(__FILE__) . '/' ); error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); +/* + * If wp-config.php exists in the WordPress root, or if it exists in the root and wp-settings.php + * doesn't, load wp-config.php. The secondary check for wp-settings.php has the added benefit + * of avoiding cases where the current directory is a nested installation, e.g. / is WordPress(a) + * and /blog/ is WordPress(b). + * + * If neither set of conditions is true, initiate loading the setup process. + */ if ( file_exists( ABSPATH . 'wp-config.php') ) { /** The config file resides in ABSPATH */