Skip to content

Commit

Permalink
Upload: Remove redundant check for ABSPATH in `wp-admin/async-uploa…
Browse files Browse the repository at this point in the history
…d.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.

git-svn-id: https://develop.svn.wordpress.org/trunk@59634 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jan 16, 2025
1 parent 964c5d3 commit e114dfb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/wp-admin/admin-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
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();
Expand Down
1 change: 1 addition & 0 deletions src/wp-admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
define( 'WP_LOAD_IMPORTERS', true );
}

/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';

nocache_headers();
Expand Down
7 changes: 2 additions & 5 deletions src/wp-admin/async-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
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';

Expand Down
2 changes: 2 additions & 0 deletions src/wp-includes/ms-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) {
Expand Down

0 comments on commit e114dfb

Please sign in to comment.