Skip to content

Commit 30caafa

Browse files
Bootstrap/Load: Remove duplicate leading slashes on inclusion of various files under ABSPATH.
Props dmsnell, birgire, szepe.viktor. Fixes #46327. git-svn-id: https://develop.svn.wordpress.org/trunk@45190 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5f93c86 commit 30caafa

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

src/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313

1414
if ( file_exists( ABSPATH . 'wp-includes/js/dist/edit-post.js' ) ) {
15-
require_once ABSPATH . '/_index.php';
15+
require_once ABSPATH . '_index.php';
1616
return;
1717
}
1818

src/wp-admin/includes/ajax-actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3620,7 +3620,7 @@ function wp_ajax_crop_image() {
36203620

36213621
switch ( $context ) {
36223622
case 'site-icon':
3623-
require_once ABSPATH . '/wp-admin/includes/class-wp-site-icon.php';
3623+
require_once ABSPATH . 'wp-admin/includes/class-wp-site-icon.php';
36243624
$wp_site_icon = new WP_Site_Icon();
36253625

36263626
// Skip creating a new attachment if the attachment is a Site Icon.

src/wp-admin/includes/class-wp-debug-data.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,9 @@ static function debug_data() {
666666
);
667667

668668
// Check if a .htaccess file exists.
669-
if ( is_file( ABSPATH . '/.htaccess' ) ) {
669+
if ( is_file( ABSPATH . '.htaccess' ) ) {
670670
// If the file exists, grab the content of it.
671-
$htaccess_content = file_get_contents( ABSPATH . '/.htaccess' );
671+
$htaccess_content = file_get_contents( ABSPATH . '.htaccess' );
672672

673673
// Filter away the core WordPress rules.
674674
$filtered_htaccess_content = trim( preg_replace( '/\# BEGIN WordPress[\s\S]+?# END WordPress/si', '', $htaccess_content ) );

src/wp-admin/includes/class-wp-site-health-auto-updates.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,10 @@ function test_all_files_writable() {
350350
if ( 'wp-content' == substr( $file, 0, 10 ) ) {
351351
continue;
352352
}
353-
if ( ! file_exists( ABSPATH . '/' . $file ) ) {
353+
if ( ! file_exists( ABSPATH . $file ) ) {
354354
continue;
355355
}
356-
if ( ! is_writable( ABSPATH . '/' . $file ) ) {
356+
if ( ! is_writable( ABSPATH . $file ) ) {
357357
$unwritable_files[] = $file;
358358
}
359359
}

src/wp-includes/class-wp-customize-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public function __construct( $args = array() ) {
402402

403403
// Add theme update notices.
404404
if ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) ) {
405-
require_once ABSPATH . '/wp-admin/includes/update.php';
405+
require_once ABSPATH . 'wp-admin/includes/update.php';
406406
add_action( 'customize_controls_print_footer_scripts', 'wp_print_admin_notice_templates' );
407407
}
408408
}

src/wp-includes/class-wp-customize-widgets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ public function get_available_widgets() {
949949
}
950950

951951
global $wp_registered_widgets, $wp_registered_widget_controls;
952-
require_once ABSPATH . '/wp-admin/includes/widgets.php'; // for next_widget_id_number()
952+
require_once ABSPATH . 'wp-admin/includes/widgets.php'; // for next_widget_id_number()
953953

954954
$sort = $wp_registered_widgets;
955955
usort( $sort, array( $this, '_sort_name_callback' ) );

src/wp-includes/customize/class-wp-widget-form-customize-control.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function to_json() {
9696
}
9797

9898
// Get the widget_control and widget_content.
99-
require_once ABSPATH . '/wp-admin/includes/widgets.php';
99+
require_once ABSPATH . 'wp-admin/includes/widgets.php';
100100

101101
$widget = $wp_registered_widgets[ $this->widget_id ];
102102
if ( ! isset( $widget['params'][0] ) ) {

src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ public function prepare_item_for_response( $post, $request ) {
16141614
if ( is_post_type_viewable( $post_type_obj ) && $post_type_obj->public ) {
16151615

16161616
if ( ! function_exists( 'get_sample_permalink' ) ) {
1617-
require_once ABSPATH . '/wp-admin/includes/post.php';
1617+
require_once ABSPATH . 'wp-admin/includes/post.php';
16181618
}
16191619

16201620
$sample_permalink = get_sample_permalink( $post->ID, $post->post_title, '' );

src/wp-includes/update.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ function wp_update_themes( $extra_stats = array() ) {
595595
* @since 3.7.0
596596
*/
597597
function wp_maybe_auto_update() {
598-
include_once( ABSPATH . '/wp-admin/includes/admin.php' );
599-
include_once( ABSPATH . '/wp-admin/includes/class-wp-upgrader.php' );
598+
include_once( ABSPATH . 'wp-admin/includes/admin.php' );
599+
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
600600

601601
$upgrader = new WP_Automatic_Updater;
602602
$upgrader->run();

0 commit comments

Comments
 (0)