Commit 201d79b06e for wordpress.org
commit 201d79b06ef73bd04404979c3512d90bb2b6390c
Author: Sergey Biryukov <sergeybiryukov.ru@gmail.com>
Date: Thu Jan 16 16:18:24 2025 +0000
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
diff --git a/wp-admin/admin-post.php b/wp-admin/admin-post.php
index be32e0710a..f880c41ac2 100644
--- a/wp-admin/admin-post.php
+++ b/wp-admin/admin-post.php
@@ -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();
diff --git a/wp-admin/admin.php b/wp-admin/admin.php
index 630765f77d..dac51ba1aa 100644
--- a/wp-admin/admin.php
+++ b/wp-admin/admin.php
@@ -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();
diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php
index a146f6a48a..683fd83248 100644
--- a/wp-admin/async-upload.php
+++ b/wp-admin/async-upload.php
@@ -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';
diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php
index 2efe452faf..42826ede61 100644
--- a/wp-includes/ms-files.php
+++ b/wp-includes/ms-files.php
@@ -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() ) {
diff --git a/wp-includes/version.php b/wp-includes/version.php
index cc8c7e7dd5..2e781766ea 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -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.