Bootstrap/Load: Remove duplicate leading slashes on inclusion of various files under `ABSPATH`.

Props dmsnell, birgire, szepe.viktor.
Fixes #46327.
Built from https://develop.svn.wordpress.org/trunk@45190


git-svn-id: http://core.svn.wordpress.org/trunk@44999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-04-13 04:46:52 +00:00
parent b2a9bb4e78
commit b6471e9be4
9 changed files with 12 additions and 12 deletions

View File

@ -3620,7 +3620,7 @@ function wp_ajax_crop_image() {
switch ( $context ) {
case 'site-icon':
require_once ABSPATH . '/wp-admin/includes/class-wp-site-icon.php';
require_once ABSPATH . 'wp-admin/includes/class-wp-site-icon.php';
$wp_site_icon = new WP_Site_Icon();
// Skip creating a new attachment if the attachment is a Site Icon.

View File

@ -666,9 +666,9 @@ class WP_Debug_Data {
);
// Check if a .htaccess file exists.
if ( is_file( ABSPATH . '/.htaccess' ) ) {
if ( is_file( ABSPATH . '.htaccess' ) ) {
// If the file exists, grab the content of it.
$htaccess_content = file_get_contents( ABSPATH . '/.htaccess' );
$htaccess_content = file_get_contents( ABSPATH . '.htaccess' );
// Filter away the core WordPress rules.
$filtered_htaccess_content = trim( preg_replace( '/\# BEGIN WordPress[\s\S]+?# END WordPress/si', '', $htaccess_content ) );

View File

@ -350,10 +350,10 @@ class WP_Site_Health_Auto_Updates {
if ( 'wp-content' == substr( $file, 0, 10 ) ) {
continue;
}
if ( ! file_exists( ABSPATH . '/' . $file ) ) {
if ( ! file_exists( ABSPATH . $file ) ) {
continue;
}
if ( ! is_writable( ABSPATH . '/' . $file ) ) {
if ( ! is_writable( ABSPATH . $file ) ) {
$unwritable_files[] = $file;
}
}

View File

@ -402,7 +402,7 @@ final class WP_Customize_Manager {
// Add theme update notices.
if ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) ) {
require_once ABSPATH . '/wp-admin/includes/update.php';
require_once ABSPATH . 'wp-admin/includes/update.php';
add_action( 'customize_controls_print_footer_scripts', 'wp_print_admin_notice_templates' );
}
}

View File

@ -949,7 +949,7 @@ final class WP_Customize_Widgets {
}
global $wp_registered_widgets, $wp_registered_widget_controls;
require_once ABSPATH . '/wp-admin/includes/widgets.php'; // for next_widget_id_number()
require_once ABSPATH . 'wp-admin/includes/widgets.php'; // for next_widget_id_number()
$sort = $wp_registered_widgets;
usort( $sort, array( $this, '_sort_name_callback' ) );

View File

@ -96,7 +96,7 @@ class WP_Widget_Form_Customize_Control extends WP_Customize_Control {
}
// Get the widget_control and widget_content.
require_once ABSPATH . '/wp-admin/includes/widgets.php';
require_once ABSPATH . 'wp-admin/includes/widgets.php';
$widget = $wp_registered_widgets[ $this->widget_id ];
if ( ! isset( $widget['params'][0] ) ) {

View File

@ -1614,7 +1614,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
if ( is_post_type_viewable( $post_type_obj ) && $post_type_obj->public ) {
if ( ! function_exists( 'get_sample_permalink' ) ) {
require_once ABSPATH . '/wp-admin/includes/post.php';
require_once ABSPATH . 'wp-admin/includes/post.php';
}
$sample_permalink = get_sample_permalink( $post->ID, $post->post_title, '' );

View File

@ -595,8 +595,8 @@ function wp_update_themes( $extra_stats = array() ) {
* @since 3.7.0
*/
function wp_maybe_auto_update() {
include_once( ABSPATH . '/wp-admin/includes/admin.php' );
include_once( ABSPATH . '/wp-admin/includes/class-wp-upgrader.php' );
include_once( ABSPATH . 'wp-admin/includes/admin.php' );
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
$upgrader = new WP_Automatic_Updater;
$upgrader->run();

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta3-45189';
$wp_version = '5.2-beta3-45190';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.