WordPress.org

Make WordPress Core

Changeset 37207


Ignore:
Timestamp:
04/14/2016 05:52:02 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/load-scripts.php

    r36312 r37207  
    99
    1010/** Set ABSPATH for execution */
    11 define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
     11if ( ! defined( 'ABSPATH' ) ) {
     12    define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     13}
     14
    1215define( 'WPINC', 'wp-includes' );
    1316
  • trunk/src/wp-admin/load-styles.php

    r36341 r37207  
    99
    1010/** Set ABSPATH for execution */
    11 define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
     11if ( ! defined( 'ABSPATH' ) ) {
     12    define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     13}
     14
    1215define( 'WPINC', 'wp-includes' );
    1316
  • trunk/src/wp-admin/setup-config.php

    r36872 r37207  
    2929error_reporting(0);
    3030
    31 define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     31if ( ! defined( 'ABSPATH' ) ) {
     32    define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     33}
    3234
    3335require( ABSPATH . 'wp-settings.php' );
  • trunk/src/wp-load.php

    r35547 r37207  
    2020
    2121/** Define ABSPATH as this file's directory */
    22 define( 'ABSPATH', dirname(__FILE__) . '/' );
     22if ( ! defined( 'ABSPATH' ) ) {
     23    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
     24}
    2325
    2426error_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 );
Note: See TracChangeset for help on using the changeset viewer.