Bootstrap/Load: Allow for ABSPATH to be defined outside of wp-load.php, e.g. in a script loaded via auto_prepend_file.

Props barry.
Fixes #26592.
Built from https://develop.svn.wordpress.org/trunk@37207


git-svn-id: http://core.svn.wordpress.org/trunk@37173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2016-04-14 17:53:28 +00:00
parent acf69202a1
commit 4074bcc6a1
5 changed files with 15 additions and 5 deletions

View File

@@ -19,7 +19,9 @@
*/
/** Define ABSPATH as this file's directory */
define( 'ABSPATH', dirname(__FILE__) . '/' );
if ( ! defined( 'ABSPATH' ) ) {
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 );