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. git-svn-id: https://develop.svn.wordpress.org/trunk@37207 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1694407e0d
commit
75fe71a13f
@ -8,7 +8,10 @@
|
|||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
/** Set ABSPATH for execution */
|
/** Set ABSPATH for execution */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
|
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
define( 'WPINC', 'wp-includes' );
|
define( 'WPINC', 'wp-includes' );
|
||||||
|
|
||||||
$load = $_GET['load'];
|
$load = $_GET['load'];
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
/** Set ABSPATH for execution */
|
/** Set ABSPATH for execution */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
|
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
define( 'WPINC', 'wp-includes' );
|
define( 'WPINC', 'wp-includes' );
|
||||||
|
|
||||||
require( ABSPATH . 'wp-admin/includes/noop.php' );
|
require( ABSPATH . 'wp-admin/includes/noop.php' );
|
||||||
|
@ -28,7 +28,9 @@ define('WP_SETUP_CONFIG', true);
|
|||||||
*/
|
*/
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
|
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
require( ABSPATH . 'wp-settings.php' );
|
require( ABSPATH . 'wp-settings.php' );
|
||||||
|
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** Define ABSPATH as this file's directory */
|
/** Define ABSPATH as this file's directory */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
|
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 );
|
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 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user