From 201d79b06ef73bd04404979c3512d90bb2b6390c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 16 Jan 2025 16:18:24 +0000 Subject: [PATCH] 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 --- wp-admin/admin-post.php | 7 ++----- wp-admin/admin.php | 1 + wp-admin/async-upload.php | 7 ++----- wp-includes/ms-files.php | 2 ++ wp-includes/version.php | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) 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.