Skip to content

Commit e114dfb

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@59634 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 964c5d3 commit e114dfb

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

src/wp-admin/admin-post.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
define( 'WP_ADMIN', true );
1414
}
1515

16-
if ( defined( 'ABSPATH' ) ) {
17-
require_once ABSPATH . 'wp-load.php';
18-
} else {
19-
require_once dirname( __DIR__ ) . '/wp-load.php';
20-
}
16+
/** Load WordPress Bootstrap */
17+
require_once dirname( __DIR__ ) . '/wp-load.php';
2118

2219
/** Allow for cross-domain requests (from the front end). */
2320
send_origin_headers();

src/wp-admin/admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
define( 'WP_LOAD_IMPORTERS', true );
3232
}
3333

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

3637
nocache_headers();

src/wp-admin/async-upload.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
define( 'WP_ADMIN', true );
1515
}
1616

17-
if ( defined( 'ABSPATH' ) ) {
18-
require_once ABSPATH . 'wp-load.php';
19-
} else {
20-
require_once dirname( __DIR__ ) . '/wp-load.php';
21-
}
17+
/** Load WordPress Bootstrap */
18+
require_once dirname( __DIR__ ) . '/wp-load.php';
2219

2320
require_once ABSPATH . 'wp-admin/admin.php';
2421

src/wp-includes/ms-files.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
define( 'MS_FILES_REQUEST', true );
1212
define( 'SHORTINIT', true );
13+
14+
/** Load WordPress Bootstrap */
1315
require_once dirname( __DIR__ ) . '/wp-load.php';
1416

1517
if ( ! is_multisite() ) {

0 commit comments

Comments
 (0)