Upload: Remove redundant check for ABSPATH in wp-admin/async-upload.php.

This aims to bring consistency with a similar fragment in other files, since relocating `wp-admin` or `wp-load.php` is not supported at this time.

Follow-up to [6659], [7971], [8315].

Props hussain896, swissspidy, knutsp, SergeyBiryukov.
Fixes #62809.
Built from https://develop.svn.wordpress.org/trunk@59634


git-svn-id: http://core.svn.wordpress.org/trunk@58997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-01-16 16:18:24 +00:00
parent 3579e69fe2
commit 201d79b06e
5 changed files with 8 additions and 11 deletions

View File

@ -13,11 +13,8 @@ if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
if ( defined( 'ABSPATH' ) ) {
require_once ABSPATH . 'wp-load.php';
} else {
require_once dirname( __DIR__ ) . '/wp-load.php';
}
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
/** Allow for cross-domain requests (from the front end). */
send_origin_headers();

View File

@ -31,6 +31,7 @@ if ( isset( $_GET['import'] ) && ! defined( 'WP_LOAD_IMPORTERS' ) ) {
define( 'WP_LOAD_IMPORTERS', true );
}
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
nocache_headers();

View File

@ -14,11 +14,8 @@ if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
if ( defined( 'ABSPATH' ) ) {
require_once ABSPATH . 'wp-load.php';
} else {
require_once dirname( __DIR__ ) . '/wp-load.php';
}
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
require_once ABSPATH . 'wp-admin/admin.php';

View File

@ -10,6 +10,8 @@
define( 'MS_FILES_REQUEST', true );
define( 'SHORTINIT', true );
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
if ( ! is_multisite() ) {

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59633';
$wp_version = '6.8-alpha-59634';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.