Make WordPress Core

Ticket #48082: 48082-1.patch

File 48082-1.patch, 83.8 KB (added by ayeshrajans, 5 years ago)
  • src/_index.php

    diff --git a/src/_index.php b/src/_index.php
    index 86334797d6..8ec930efd2 100644
    a b  
    1414define( 'WP_USE_THEMES', true );
    1515
    1616/** Loads the WordPress Environment and Template */
    17 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
     17require( __DIR__ . '/wp-blog-header.php' );
  • src/index.php

    diff --git a/src/index.php b/src/index.php
    index 9e8f9ec856..80cc9c13b9 100644
    a b  
    88
    99/** Define ABSPATH as this file's directory */
    1010if ( ! defined( 'ABSPATH' ) ) {
    11         define( 'ABSPATH', dirname( __FILE__ ) . '/' );
     11        define( 'ABSPATH', __DIR__ . '/' );
    1212}
    1313
    1414if ( file_exists( ABSPATH . 'wp-includes/js/dist/edit-post.js' ) ) {
  • src/js/_enqueues/vendor/tinymce/wp-tinymce.php

    diff --git a/src/js/_enqueues/vendor/tinymce/wp-tinymce.php b/src/js/_enqueues/vendor/tinymce/wp-tinymce.php
    index 3d7b2347f6..fa89ca9272 100644
    a b  
    1111 */
    1212error_reporting( 0 );
    1313
    14 $basepath = dirname( __FILE__ );
     14$basepath = __DIR__;
    1515
    1616function get_file( $path ) {
    1717
  • src/wp-activate.php

    diff --git a/src/wp-activate.php b/src/wp-activate.php
    index 7107352d53..7bf2bc36c3 100644
    a b  
    99define( 'WP_INSTALLING', true );
    1010
    1111/** Sets up the WordPress Environment. */
    12 require( dirname( __FILE__ ) . '/wp-load.php' );
     12require( __DIR__ . '/wp-load.php' );
    1313
    14 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
     14require( __DIR__ . '/wp-blog-header.php' );
    1515
    1616if ( ! is_multisite() ) {
    1717        wp_redirect( wp_registration_url() );
  • src/wp-admin/_index.php

    diff --git a/src/wp-admin/_index.php b/src/wp-admin/_index.php
    index 9389409e88..e771483d37 100644
    a b  
    77 */
    88
    99/** Load WordPress Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212/** Load WordPress dashboard API */
    1313require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
  • src/wp-admin/about.php

    diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php
    index f5d86a9892..dc053e5e52 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212/* translators: Page title of the About WordPress page in the admin. */
    1313$title = _x( 'About', 'page title' );
  • src/wp-admin/admin-ajax.php

    diff --git a/src/wp-admin/admin-ajax.php b/src/wp-admin/admin-ajax.php
    index 7d9266d80f..897abd63f4 100644
    a b  
    1919}
    2020
    2121/** Load WordPress Bootstrap */
    22 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     22require_once(dirname( __DIR__) . '/wp-load.php' );
    2323
    2424/** Allow for cross-domain requests (from the front end). */
    2525send_origin_headers();
  • src/wp-admin/admin-header.php

    diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php
    index 631bc67ef3..85d38258e9 100644
    a b  
    88
    99header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    1010if ( ! defined( 'WP_ADMIN' ) ) {
    11         require_once( dirname( __FILE__ ) . '/admin.php' );
     11        require_once( __DIR__ . '/admin.php' );
    1212}
    1313
    1414/**
  • src/wp-admin/admin-post.php

    diff --git a/src/wp-admin/admin-post.php b/src/wp-admin/admin-post.php
    index 48e76feec5..a7fe166be0 100644
    a b  
    1616if ( defined( 'ABSPATH' ) ) {
    1717        require_once( ABSPATH . 'wp-load.php' );
    1818} else {
    19         require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     19        require_once(dirname( __DIR__) . '/wp-load.php' );
    2020}
    2121
    2222/** Allow for cross-domain requests (from the front end). */
  • src/wp-admin/admin.php

    diff --git a/src/wp-admin/admin.php b/src/wp-admin/admin.php
    index 5f8916ed41..9942733e04 100644
    a b  
    3131        define( 'WP_LOAD_IMPORTERS', true );
    3232}
    3333
    34 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     34require_once(dirname( __DIR__) . '/wp-load.php' );
    3535
    3636nocache_headers();
    3737
  • src/wp-admin/async-upload.php

    diff --git a/src/wp-admin/async-upload.php b/src/wp-admin/async-upload.php
    index 4d37f7f644..7e1f2655e7 100644
    a b  
    1717if ( defined( 'ABSPATH' ) ) {
    1818        require_once( ABSPATH . 'wp-load.php' );
    1919} else {
    20         require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     20        require_once(dirname( __DIR__) . '/wp-load.php' );
    2121}
    2222
    2323require_once( ABSPATH . 'wp-admin/admin.php' );
  • src/wp-admin/comment.php

    diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php
    index ee7a514be4..1b593ad285 100644
    a b  
    77 */
    88
    99/** Load WordPress Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212$parent_file  = 'edit-comments.php';
    1313$submenu_file = 'edit-comments.php';
  • src/wp-admin/credits.php

    diff --git a/src/wp-admin/credits.php b/src/wp-admin/credits.php
    index 8940a78481..46adc6d48b 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
    11 require_once( dirname( __FILE__ ) . '/includes/credits.php' );
     10require_once( __DIR__ . '/admin.php' );
     11require_once( __DIR__ . '/includes/credits.php' );
    1212
    1313$title = __( 'Credits' );
    1414
  • src/wp-admin/customize.php

    diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php
    index d0f39a5ba5..eaea4b32b2 100644
    a b  
    1010define( 'IFRAME_REQUEST', true );
    1111
    1212/** Load WordPress Administration Bootstrap */
    13 require_once( dirname( __FILE__ ) . '/admin.php' );
     13require_once( __DIR__ . '/admin.php' );
    1414
    1515if ( ! current_user_can( 'customize' ) ) {
    1616        wp_die(
  • src/wp-admin/edit-comments.php

    diff --git a/src/wp-admin/edit-comments.php b/src/wp-admin/edit-comments.php
    index 0bd3b7a09d..4f2946dabd 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111if ( ! current_user_can( 'edit_posts' ) ) {
    1212        wp_die(
    1313                '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
  • src/wp-admin/edit-tags.php

    diff --git a/src/wp-admin/edit-tags.php b/src/wp-admin/edit-tags.php
    index 80ab3ffdd8..692b080e15 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! $taxnow ) {
    1313        wp_die( __( 'Invalid taxonomy.' ) );
  • src/wp-admin/edit.php

    diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php
    index a8c2265d20..769c83589a 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! $typenow ) {
    1313        wp_die( __( 'Invalid post type.' ) );
  • src/wp-admin/erase-personal-data.php

    diff --git a/src/wp-admin/erase-personal-data.php b/src/wp-admin/erase-personal-data.php
    index dc80022eef..b5e6a40f3c 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'erase_others_personal_data' ) || ! current_user_can( 'delete_users' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to erase data on this site.' ) );
  • src/wp-admin/export-personal-data.php

    diff --git a/src/wp-admin/export-personal-data.php b/src/wp-admin/export-personal-data.php
    index a4eef779c2..fcf0e63b2d 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'export_others_personal_data' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to export personal data on this site.' ) );
  • src/wp-admin/export.php

    diff --git a/src/wp-admin/export.php b/src/wp-admin/export.php
    index 759723456e..ba3e57d55d 100644
    a b  
    77 */
    88
    99/** Load WordPress Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'export' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to export the content of this site.' ) );
  • src/wp-admin/freedoms.php

    diff --git a/src/wp-admin/freedoms.php b/src/wp-admin/freedoms.php
    index fe8f1868f9..b836b290ca 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212// This file was used to also display the Privacy tab on the About screen from 4.9.6 until 5.3.0.
    1313if ( isset( $_GET['privacy-notice'] ) ) {
  • src/wp-admin/import.php

    diff --git a/src/wp-admin/import.php b/src/wp-admin/import.php
    index 6da936405f..a0b60fcde9 100644
    a b  
    99define( 'WP_LOAD_IMPORTERS', true );
    1010
    1111/** Load WordPress Bootstrap */
    12 require_once( dirname( __FILE__ ) . '/admin.php' );
     12require_once( __DIR__ . '/admin.php' );
    1313
    1414if ( ! current_user_can( 'import' ) ) {
    1515        wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) );
  • src/wp-admin/includes/class-ftp.php

    diff --git a/src/wp-admin/includes/class-ftp.php b/src/wp-admin/includes/class-ftp.php
    index 3bfa469d20..3d19172371 100644
    a b function PopError(){ 
    903903        $mod_sockets = extension_loaded( 'sockets' );
    904904}
    905905
    906 require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
     906require_once __DIR__ . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
    907907
    908908if ( $mod_sockets ) {
    909909        class ftp extends ftp_sockets {}
  • src/wp-admin/index.php

    diff --git a/src/wp-admin/index.php b/src/wp-admin/index.php
    index 6db93a9df4..d874b11df0 100644
    a b  
    66 * please refer to wp-admin/_index.php.
    77 */
    88
    9 if ( file_exists( dirname( __FILE__ ) . '/../wp-includes/js/dist/edit-post.js' ) ) {
    10         require_once dirname( __FILE__ ) . '/_index.php';
     9if ( file_exists( __DIR__ . '/../wp-includes/js/dist/edit-post.js' ) ) {
     10        require_once __DIR__ . '/_index.php';
    1111        return;
    1212}
    1313
    14 require_once dirname( dirname( __FILE__ ) ) . '/index.php';
     14require_once dirname( __DIR__) . '/index.php';
  • src/wp-admin/install-helper.php

    diff --git a/src/wp-admin/install-helper.php b/src/wp-admin/install-helper.php
    index c13f302784..72894a14c6 100644
    a b  
    3535 */
    3636
    3737/** Load WordPress Bootstrap */
    38 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     38require_once(dirname( __DIR__) . '/wp-load.php' );
    3939
    4040if ( ! function_exists( 'maybe_create_table' ) ) :
    4141        /**
  • src/wp-admin/install.php

    diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php
    index 68408c9c41..85e3259e1e 100644
    a b  
    3333define( 'WP_INSTALLING', true );
    3434
    3535/** Load WordPress Bootstrap */
    36 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     36require_once(dirname( __DIR__) . '/wp-load.php' );
    3737
    3838/** Load WordPress Administration Upgrade API */
    3939require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
  • src/wp-admin/link-add.php

    diff --git a/src/wp-admin/link-add.php b/src/wp-admin/link-add.php
    index ff617d5777..d2159dc724 100644
    a b  
    77 */
    88
    99/** Load WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_links' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) );
  • src/wp-admin/link-manager.php

    diff --git a/src/wp-admin/link-manager.php b/src/wp-admin/link-manager.php
    index e8418ea0ec..38cfb9c9e3 100644
    a b  
    77 */
    88
    99/** Load WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111if ( ! current_user_can( 'manage_links' ) ) {
    1212        wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
    1313}
  • src/wp-admin/link.php

    diff --git a/src/wp-admin/link.php b/src/wp-admin/link.php
    index ef5b26a515..284eb5f855 100644
    a b  
    1010 */
    1111
    1212/** Load WordPress Administration Bootstrap */
    13 require_once( dirname( __FILE__ ) . '/admin.php' );
     13require_once( __DIR__ . '/admin.php' );
    1414
    1515wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
    1616
  • src/wp-admin/load-scripts.php

    diff --git a/src/wp-admin/load-scripts.php b/src/wp-admin/load-scripts.php
    index bdb5fa5cec..49e0319cab 100644
    a b  
    99
    1010/** Set ABSPATH for execution */
    1111if ( ! defined( 'ABSPATH' ) ) {
    12         define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     12        define( 'ABSPATH', dirname( __DIR__) . '/' );
    1313}
    1414
    1515define( 'WPINC', 'wp-includes' );
  • src/wp-admin/load-styles.php

    diff --git a/src/wp-admin/load-styles.php b/src/wp-admin/load-styles.php
    index 8b3cc0d75f..5e324c0df6 100644
    a b  
    99
    1010/** Set ABSPATH for execution */
    1111if ( ! defined( 'ABSPATH' ) ) {
    12         define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     12        define( 'ABSPATH', dirname( __DIR__) . '/' );
    1313}
    1414
    1515define( 'WPINC', 'wp-includes' );
  • src/wp-admin/maint/repair.php

    diff --git a/src/wp-admin/maint/repair.php b/src/wp-admin/maint/repair.php
    index 070a91b118..b298684e7d 100644
    a b  
    77 */
    88define( 'WP_REPAIRING', true );
    99
    10 require_once( dirname( dirname( dirname( __FILE__ ) ) ) . '/wp-load.php' );
     10require_once(dirname( dirname( __DIR__) ) . '/wp-load.php' );
    1111
    1212header( 'Content-Type: text/html; charset=utf-8' );
    1313?>
  • src/wp-admin/media-new.php

    diff --git a/src/wp-admin/media-new.php b/src/wp-admin/media-new.php
    index 0cc82a5fd4..de4b2335b5 100644
    a b  
    1010 */
    1111
    1212/** Load WordPress Administration Bootstrap */
    13 require_once( dirname( __FILE__ ) . '/admin.php' );
     13require_once( __DIR__ . '/admin.php' );
    1414
    1515if ( ! current_user_can( 'upload_files' ) ) {
    1616        wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
  • src/wp-admin/media-upload.php

    diff --git a/src/wp-admin/media-upload.php b/src/wp-admin/media-upload.php
    index 2354cf629d..4b0eaa2629 100644
    a b  
    1414}
    1515
    1616/** Load WordPress Administration Bootstrap */
    17 require_once( dirname( __FILE__ ) . '/admin.php' );
     17require_once( __DIR__ . '/admin.php' );
    1818
    1919if ( ! current_user_can( 'upload_files' ) ) {
    2020        wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
  • src/wp-admin/media.php

    diff --git a/src/wp-admin/media.php b/src/wp-admin/media.php
    index 1e09eda2f8..8d8c039cec 100644
    a b  
    77 */
    88
    99/** Load WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212$parent_file  = 'upload.php';
    1313$submenu_file = 'upload.php';
  • src/wp-admin/moderation.php

    diff --git a/src/wp-admin/moderation.php b/src/wp-admin/moderation.php
    index ae375df3e7..0e1c95cff5 100644
    a b  
    77 * @package WordPress
    88 * @subpackage Administration
    99 */
    10 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     10require_once(dirname( __DIR__) . '/wp-load.php' );
    1111wp_redirect( admin_url( 'edit-comments.php?comment_status=moderated' ) );
    1212exit;
  • src/wp-admin/ms-admin.php

    diff --git a/src/wp-admin/ms-admin.php b/src/wp-admin/ms-admin.php
    index 35e21e971a..2e1478d2fe 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url() );
    1313exit;
  • src/wp-admin/ms-delete-site.php

    diff --git a/src/wp-admin/ms-delete-site.php b/src/wp-admin/ms-delete-site.php
    index 3cb1574356..a8e4c2e117 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! is_multisite() ) {
    1313        wp_die( __( 'Multisite support is not enabled.' ) );
  • src/wp-admin/ms-edit.php

    diff --git a/src/wp-admin/ms-edit.php b/src/wp-admin/ms-edit.php
    index 5c405e6f73..00a2d9353b 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url() );
    1313exit;
  • src/wp-admin/ms-options.php

    diff --git a/src/wp-admin/ms-options.php b/src/wp-admin/ms-options.php
    index 6bf5eb6b1b..34d6fcec67 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url( 'settings.php' ) );
  • src/wp-admin/ms-sites.php

    diff --git a/src/wp-admin/ms-sites.php b/src/wp-admin/ms-sites.php
    index 79602cb07f..1025bac1be 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url( 'sites.php' ) );
    1313exit;
  • src/wp-admin/ms-themes.php

    diff --git a/src/wp-admin/ms-themes.php b/src/wp-admin/ms-themes.php
    index 4b86ac9684..94b51035cf 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url( 'themes.php' ) );
    1313exit;
  • src/wp-admin/ms-upgrade-network.php

    diff --git a/src/wp-admin/ms-upgrade-network.php b/src/wp-admin/ms-upgrade-network.php
    index 892ab964c7..3730349eb8 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url( 'upgrade.php' ) );
    1313exit;
  • src/wp-admin/ms-users.php

    diff --git a/src/wp-admin/ms-users.php b/src/wp-admin/ms-users.php
    index 1b00514ec3..cd0a0e54de 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_redirect( network_admin_url( 'users.php' ) );
    1313exit;
  • src/wp-admin/my-sites.php

    diff --git a/src/wp-admin/my-sites.php b/src/wp-admin/my-sites.php
    index 0d925b4184..79dbf9690b 100644
    a b  
    77 * @since 3.0.0
    88 */
    99
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! is_multisite() ) {
    1313        wp_die( __( 'Multisite support is not enabled.' ) );
  • src/wp-admin/nav-menus.php

    diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
    index 3312a30443..e15fc492f0 100644
    a b  
    1010 */
    1111
    1212/** Load WordPress Administration Bootstrap */
    13 require_once( dirname( __FILE__ ) . '/admin.php' );
     13require_once( __DIR__ . '/admin.php' );
    1414
    1515// Load all the nav menu interface functions
    1616require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' );
  • src/wp-admin/network.php

    diff --git a/src/wp-admin/network.php b/src/wp-admin/network.php
    index a3409622a0..2c57d7aadf 100644
    a b  
    1313define( 'WP_INSTALLING_NETWORK', true );
    1414
    1515/** WordPress Administration Bootstrap */
    16 require_once( dirname( __FILE__ ) . '/admin.php' );
     16require_once( __DIR__ . '/admin.php' );
    1717
    1818if ( ! current_user_can( 'setup_network' ) ) {
    1919        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
     
    3030        }
    3131}
    3232
    33 require_once( dirname( __FILE__ ) . '/includes/network.php' );
     33require_once( __DIR__ . '/includes/network.php' );
    3434
    3535// We need to create references to ms global tables to enable Network.
    3636foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) {
  • src/wp-admin/network/about.php

    diff --git a/src/wp-admin/network/about.php b/src/wp-admin/network/about.php
    index 829fa1beef..892f2937d2 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/about.php' );
  • src/wp-admin/network/admin.php

    diff --git a/src/wp-admin/network/admin.php b/src/wp-admin/network/admin.php
    index 693fa5aa11..e746f3ac9a 100644
    a b  
    1010define( 'WP_NETWORK_ADMIN', true );
    1111
    1212/** Load WordPress Administration Bootstrap */
    13 require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
     13require_once(dirname( __DIR__) . '/admin.php' );
    1414
    1515// Do not remove this check. It is required by individual network admin pages.
    1616if ( ! is_multisite() ) {
  • src/wp-admin/network/credits.php

    diff --git a/src/wp-admin/network/credits.php b/src/wp-admin/network/credits.php
    index 75ee6e7337..db3de9c9bc 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/credits.php' );
  • src/wp-admin/network/edit.php

    diff --git a/src/wp-admin/network/edit.php b/src/wp-admin/network/edit.php
    index 51381e40bf..107d886c24 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313$action = ( isset( $_GET['action'] ) ) ? $_GET['action'] : '';
    1414
  • src/wp-admin/network/freedoms.php

    diff --git a/src/wp-admin/network/freedoms.php b/src/wp-admin/network/freedoms.php
    index 9afbe82f34..c209054715 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/freedoms.php' );
  • src/wp-admin/network/index.php

    diff --git a/src/wp-admin/network/index.php b/src/wp-admin/network/index.php
    index fbc169bd21..bbbf19c495 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313/** Load WordPress dashboard API */
    1414require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
  • src/wp-admin/network/plugin-editor.php

    diff --git a/src/wp-admin/network/plugin-editor.php b/src/wp-admin/network/plugin-editor.php
    index 7171e7252c..11f5af2459 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/plugin-editor.php' );
  • src/wp-admin/network/plugin-install.php

    diff --git a/src/wp-admin/network/plugin-install.php b/src/wp-admin/network/plugin-install.php
    index f771f63a88..d1ed6ce76f 100644
    a b  
    1212}
    1313
    1414/** Load WordPress Administration Bootstrap */
    15 require_once( dirname( __FILE__ ) . '/admin.php' );
     15require_once( __DIR__ . '/admin.php' );
    1616
    1717require( ABSPATH . 'wp-admin/plugin-install.php' );
  • src/wp-admin/network/plugins.php

    diff --git a/src/wp-admin/network/plugins.php b/src/wp-admin/network/plugins.php
    index 56c3debd01..49b5316912 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/plugins.php' );
  • src/wp-admin/network/privacy.php

    diff --git a/src/wp-admin/network/privacy.php b/src/wp-admin/network/privacy.php
    index 5cba05d37d..a126cd586f 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/privacy.php' );
  • src/wp-admin/network/profile.php

    diff --git a/src/wp-admin/network/profile.php b/src/wp-admin/network/profile.php
    index 240ef980a4..f070b2021b 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/profile.php' );
  • src/wp-admin/network/settings.php

    diff --git a/src/wp-admin/network/settings.php b/src/wp-admin/network/settings.php
    index c100a665f3..206432aa0f 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313/** WordPress Translation Installation API */
    1414require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
  • src/wp-admin/network/setup.php

    diff --git a/src/wp-admin/network/setup.php b/src/wp-admin/network/setup.php
    index 9a642bbb92..e9d77e1643 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/network.php' );
  • src/wp-admin/network/site-info.php

    diff --git a/src/wp-admin/network/site-info.php b/src/wp-admin/network/site-info.php
    index 2bcc1c58a3..419cbb9999 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_sites' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
  • src/wp-admin/network/site-new.php

    diff --git a/src/wp-admin/network/site-new.php b/src/wp-admin/network/site-new.php
    index d86058e0f4..4cf1e21274 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313/** WordPress Translation Installation API */
    1414require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
  • src/wp-admin/network/site-settings.php

    diff --git a/src/wp-admin/network/site-settings.php b/src/wp-admin/network/site-settings.php
    index 7c3cae7200..7694d9dc09 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_sites' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
  • src/wp-admin/network/site-themes.php

    diff --git a/src/wp-admin/network/site-themes.php b/src/wp-admin/network/site-themes.php
    index fc1a79805f..21494a4f0e 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_sites' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) );
  • src/wp-admin/network/site-users.php

    diff --git a/src/wp-admin/network/site-users.php b/src/wp-admin/network/site-users.php
    index 5113025776..bff3495727 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_sites' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to edit this site.' ), 403 );
  • src/wp-admin/network/sites.php

    diff --git a/src/wp-admin/network/sites.php b/src/wp-admin/network/sites.php
    index bfd5a1d4bd..5f5ae820c0 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_sites' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
  • src/wp-admin/network/theme-editor.php

    diff --git a/src/wp-admin/network/theme-editor.php b/src/wp-admin/network/theme-editor.php
    index c28c9675cc..e5083855d8 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/theme-editor.php' );
  • src/wp-admin/network/theme-install.php

    diff --git a/src/wp-admin/network/theme-install.php b/src/wp-admin/network/theme-install.php
    index 486c74780b..9647412046 100644
    a b  
    1212}
    1313
    1414/** Load WordPress Administration Bootstrap */
    15 require_once( dirname( __FILE__ ) . '/admin.php' );
     15require_once( __DIR__ . '/admin.php' );
    1616
    1717require( ABSPATH . 'wp-admin/theme-install.php' );
  • src/wp-admin/network/themes.php

    diff --git a/src/wp-admin/network/themes.php b/src/wp-admin/network/themes.php
    index f7711f034d..2d7bda8932 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_network_themes' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) );
  • src/wp-admin/network/update-core.php

    diff --git a/src/wp-admin/network/update-core.php b/src/wp-admin/network/update-core.php
    index 55f2aca32a..492321cb9a 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/update-core.php' );
  • src/wp-admin/network/update.php

    diff --git a/src/wp-admin/network/update.php b/src/wp-admin/network/update.php
    index 62dc7a96e7..d32d49490c 100644
    a b  
    1212}
    1313
    1414/** Load WordPress Administration Bootstrap */
    15 require_once( dirname( __FILE__ ) . '/admin.php' );
     15require_once( __DIR__ . '/admin.php' );
    1616
    1717require( ABSPATH . 'wp-admin/update.php' );
  • src/wp-admin/network/upgrade.php

    diff --git a/src/wp-admin/network/upgrade.php b/src/wp-admin/network/upgrade.php
    index e594a17555..39cca1f165 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require_once( ABSPATH . WPINC . '/http.php' );
    1414
  • src/wp-admin/network/user-edit.php

    diff --git a/src/wp-admin/network/user-edit.php b/src/wp-admin/network/user-edit.php
    index ef3c2720f1..c594c19e24 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/user-edit.php' );
  • src/wp-admin/network/user-new.php

    diff --git a/src/wp-admin/network/user-new.php b/src/wp-admin/network/user-new.php
    index 2bb2de1ed7..54f42dad22 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'create_users' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to add users to this network.' ) );
  • src/wp-admin/network/users.php

    diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php
    index 9c5bcc0ca4..c49c642798 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'manage_network_users' ) ) {
    1414        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
  • src/wp-admin/options-discussion.php

    diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php
    index b9e037a00e..21a7a8820e 100644
    a b  
    66 * @subpackage Administration
    77 */
    88/** WordPress Administration Bootstrap */
    9 require_once( dirname( __FILE__ ) . '/admin.php' );
     9require_once( __DIR__ . '/admin.php' );
    1010
    1111if ( ! current_user_can( 'manage_options' ) ) {
    1212        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
  • src/wp-admin/options-general.php

    diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php
    index d5c3d167c4..8937d0944f 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212/** WordPress Translation Installation API */
    1313require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
  • src/wp-admin/options-media.php

    diff --git a/src/wp-admin/options-media.php b/src/wp-admin/options-media.php
    index 4cc5e4c5ef..04596b01c7 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
  • src/wp-admin/options-permalink.php

    diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php
    index 2b6e08101c..5b83e8f55b 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
  • src/wp-admin/options-privacy.php

    diff --git a/src/wp-admin/options-privacy.php b/src/wp-admin/options-privacy.php
    index 875809843f..c02279d161 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_privacy_options' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage privacy on this site.' ) );
  • src/wp-admin/options-reading.php

    diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php
    index 662954ea24..3a289b00f1 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
  • src/wp-admin/options-writing.php

    diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php
    index 1ea19cd129..46751294eb 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
  • src/wp-admin/options.php

    diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
    index 1aaad130b4..4e57d672b9 100644
    a b  
    1616 */
    1717
    1818/** WordPress Administration Bootstrap */
    19 require_once( dirname( __FILE__ ) . '/admin.php' );
     19require_once( __DIR__ . '/admin.php' );
    2020
    2121$title       = __( 'Settings' );
    2222$this_file   = 'options.php';
  • src/wp-admin/plugin-editor.php

    diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php
    index 0b44fbb499..70007b87f1 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( is_multisite() && ! is_network_admin() ) {
    1313        wp_redirect( network_admin_url( 'plugin-editor.php' ) );
  • src/wp-admin/plugin-install.php

    diff --git a/src/wp-admin/plugin-install.php b/src/wp-admin/plugin-install.php
    index 52dd791684..9d8f750e37 100644
    a b  
    1313/**
    1414 * WordPress Administration Bootstrap.
    1515 */
    16 require_once( dirname( __FILE__ ) . '/admin.php' );
     16require_once( __DIR__ . '/admin.php' );
    1717
    1818if ( ! current_user_can( 'install_plugins' ) ) {
    1919        wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
  • src/wp-admin/plugins.php

    diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php
    index eb80edcd4b..7a2c875b31 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'activate_plugins' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) );
  • src/wp-admin/post-new.php

    diff --git a/src/wp-admin/post-new.php b/src/wp-admin/post-new.php
    index a93a11bffe..04a6833cca 100644
    a b  
    77 */
    88
    99/** Load WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212/**
    1313 * @global string  $post_type
  • src/wp-admin/post.php

    diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php
    index 5f8634980b..59e3db60d5 100644
    a b  
    99 */
    1010
    1111/** WordPress Administration Bootstrap */
    12 require_once( dirname( __FILE__ ) . '/admin.php' );
     12require_once( __DIR__ . '/admin.php' );
    1313
    1414$parent_file  = 'edit.php';
    1515$submenu_file = 'edit.php';
  • src/wp-admin/press-this.php

    diff --git a/src/wp-admin/press-this.php b/src/wp-admin/press-this.php
    index 0f00dee40b..0a1ce62df3 100644
    a b  
    99define( 'IFRAME_REQUEST', true );
    1010
    1111/** WordPress Administration Bootstrap */
    12 require_once( dirname( __FILE__ ) . '/admin.php' );
     12require_once( __DIR__ . '/admin.php' );
    1313
    1414function wp_load_press_this() {
    1515        $plugin_slug = 'press-this';
  • src/wp-admin/privacy-policy-guide.php

    diff --git a/src/wp-admin/privacy-policy-guide.php b/src/wp-admin/privacy-policy-guide.php
    index f3d8703f88..4a875c24f8 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_privacy_options' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to manage privacy on this site.' ) );
  • src/wp-admin/privacy.php

    diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php
    index 075f6b89bf..5dbf4c8f46 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212$title = __( 'Privacy' );
    1313
  • src/wp-admin/profile.php

    diff --git a/src/wp-admin/profile.php b/src/wp-admin/profile.php
    index 577925aba7..6e340d8b55 100644
    a b  
    1515define( 'IS_PROFILE_PAGE', true );
    1616
    1717/** Load User Editing Page */
    18 require_once( dirname( __FILE__ ) . '/user-edit.php' );
     18require_once( __DIR__ . '/user-edit.php' );
  • src/wp-admin/revision.php

    diff --git a/src/wp-admin/revision.php b/src/wp-admin/revision.php
    index 2d435a6c34..fa3563fac0 100644
    a b  
    1010 */
    1111
    1212/** WordPress Administration Bootstrap */
    13 require_once( dirname( __FILE__ ) . '/admin.php' );
     13require_once( __DIR__ . '/admin.php' );
    1414
    1515require ABSPATH . 'wp-admin/includes/revision.php';
    1616
  • src/wp-admin/setup-config.php

    diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php
    index f9be50f05a..7060f830f2 100644
    a b  
    2727error_reporting( 0 );
    2828
    2929if ( ! defined( 'ABSPATH' ) ) {
    30         define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
     30        define( 'ABSPATH', dirname( __DIR__) . '/' );
    3131}
    3232
    3333require( ABSPATH . 'wp-settings.php' );
  • src/wp-admin/site-health-info.php

    diff --git a/src/wp-admin/site-health-info.php b/src/wp-admin/site-health-info.php
    index 34471a0968..b8169acc55 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212$title = __( 'Site Health Info' );
    1313
  • src/wp-admin/site-health.php

    diff --git a/src/wp-admin/site-health.php b/src/wp-admin/site-health.php
    index 9e3a847f6a..8191a15647 100644
    a b  
    77 */
    88
    99if ( isset( $_GET['tab'] ) && 'debug' === $_GET['tab'] ) {
    10         require_once( dirname( __FILE__ ) . '/site-health-info.php' );
     10        require_once( __DIR__ . '/site-health-info.php' );
    1111        return;
    1212}
    1313
    1414/** WordPress Administration Bootstrap */
    15 require_once( dirname( __FILE__ ) . '/admin.php' );
     15require_once( __DIR__ . '/admin.php' );
    1616
    1717$title = __( 'Site Health Status' );
    1818
  • src/wp-admin/term.php

    diff --git a/src/wp-admin/term.php b/src/wp-admin/term.php
    index ec8b359d5d..21207d4238 100644
    a b  
    88 */
    99
    1010/** WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( empty( $_REQUEST['tag_ID'] ) ) {
    1414        $sendback = admin_url( 'edit-tags.php' );
  • src/wp-admin/theme-editor.php

    diff --git a/src/wp-admin/theme-editor.php b/src/wp-admin/theme-editor.php
    index c958353e1f..43c9d56b72 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( is_multisite() && ! is_network_admin() ) {
    1313        wp_redirect( network_admin_url( 'theme-editor.php' ) );
  • src/wp-admin/theme-install.php

    diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php
    index b77e85054a..4cd6eaaef0 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111require( ABSPATH . 'wp-admin/includes/theme-install.php' );
    1212
    1313wp_reset_vars( array( 'tab' ) );
  • src/wp-admin/themes.php

    diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php
    index 082819611b..4b9835a7c5 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    1313        wp_die(
  • src/wp-admin/tools.php

    diff --git a/src/wp-admin/tools.php b/src/wp-admin/tools.php
    index bbc95ee4fa..0028923e91 100644
    a b  
    1919}
    2020
    2121/** WordPress Administration Bootstrap */
    22 require_once( dirname( __FILE__ ) . '/admin.php' );
     22require_once( __DIR__ . '/admin.php' );
    2323
    2424// The privacy policy guide used to be outputted from here. Since WP 5.3 it is in wp-admin/privacy-policy-guide.php.
    2525if ( isset( $_GET['wp-privacy-policy-guide'] ) ) {
  • src/wp-admin/update-core.php

    diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
    index e2696ebf62..2c6a7d6395 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_enqueue_style( 'plugin-install' );
    1313wp_enqueue_script( 'plugin-install' );
  • src/wp-admin/update.php

    diff --git a/src/wp-admin/update.php b/src/wp-admin/update.php
    index 5a70aa87d9..e778fe6046 100644
    a b  
    1111}
    1212
    1313/** WordPress Administration Bootstrap */
    14 require_once( dirname( __FILE__ ) . '/admin.php' );
     14require_once( __DIR__ . '/admin.php' );
    1515
    1616include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
    1717
  • src/wp-admin/upgrade.php

    diff --git a/src/wp-admin/upgrade.php b/src/wp-admin/upgrade.php
    index 67555f4fe9..5a8f928552 100644
    a b  
    1515define( 'WP_INSTALLING', true );
    1616
    1717/** Load WordPress Bootstrap */
    18 require( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     18require(dirname( __DIR__) . '/wp-load.php' );
    1919
    2020nocache_headers();
    2121
  • src/wp-admin/upload.php

    diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php
    index f399eaf446..d013beb155 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'upload_files' ) ) {
    1313        wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
  • src/wp-admin/user-edit.php

    diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php
    index 70f6ef1a3d..33e20ec249 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) );
    1313
  • src/wp-admin/user-new.php

    diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php
    index d8c76e6758..2ee610530f 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212if ( is_multisite() ) {
    1313        if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
  • src/wp-admin/user/about.php

    diff --git a/src/wp-admin/user/about.php b/src/wp-admin/user/about.php
    index b7943550e9..97e66bb808 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/about.php' );
  • src/wp-admin/user/admin.php

    diff --git a/src/wp-admin/user/admin.php b/src/wp-admin/user/admin.php
    index 9df8f2029e..93140ff994 100644
    a b  
    99
    1010define( 'WP_USER_ADMIN', true );
    1111
    12 require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
     12require_once(dirname( __DIR__) . '/admin.php' );
    1313
    1414if ( ! is_multisite() ) {
    1515        wp_redirect( admin_url() );
  • src/wp-admin/user/credits.php

    diff --git a/src/wp-admin/user/credits.php b/src/wp-admin/user/credits.php
    index 2b4021acb9..0dc832b26c 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/credits.php' );
  • src/wp-admin/user/freedoms.php

    diff --git a/src/wp-admin/user/freedoms.php b/src/wp-admin/user/freedoms.php
    index d2b77b5615..2dc15917c8 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/freedoms.php' );
  • src/wp-admin/user/index.php

    diff --git a/src/wp-admin/user/index.php b/src/wp-admin/user/index.php
    index 7cff6a7053..0df579db61 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/index.php' );
  • src/wp-admin/user/privacy.php

    diff --git a/src/wp-admin/user/privacy.php b/src/wp-admin/user/privacy.php
    index 8b28eea618..c0d02d3e63 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/privacy.php' );
  • src/wp-admin/user/profile.php

    diff --git a/src/wp-admin/user/profile.php b/src/wp-admin/user/profile.php
    index 2f70709906..75eb433570 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/profile.php' );
  • src/wp-admin/user/user-edit.php

    diff --git a/src/wp-admin/user/user-edit.php b/src/wp-admin/user/user-edit.php
    index 0819573f6f..f38d5c698b 100644
    a b  
    88 */
    99
    1010/** Load WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313require( ABSPATH . 'wp-admin/user-edit.php' );
  • src/wp-admin/users.php

    diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php
    index 884b143a15..8eb2c8b82d 100644
    a b  
    88 */
    99
    1010/** WordPress Administration Bootstrap */
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
     11require_once( __DIR__ . '/admin.php' );
    1212
    1313if ( ! current_user_can( 'list_users' ) ) {
    1414        wp_die(
  • src/wp-admin/widgets.php

    diff --git a/src/wp-admin/widgets.php b/src/wp-admin/widgets.php
    index 6882b53232..40b98e77cb 100644
    a b  
    77 */
    88
    99/** WordPress Administration Bootstrap */
    10 require_once( dirname( __FILE__ ) . '/admin.php' );
     10require_once( __DIR__ . '/admin.php' );
    1111
    1212/** WordPress Administration Widgets API */
    1313require_once( ABSPATH . 'wp-admin/includes/widgets.php' );
  • src/wp-blog-header.php

    diff --git a/src/wp-blog-header.php b/src/wp-blog-header.php
    index a8b1efc7b5..4d1ce36fa9 100644
    a b  
    1010        $wp_did_header = true;
    1111
    1212        // Load the WordPress library.
    13         require_once( dirname( __FILE__ ) . '/wp-load.php' );
     13        require_once( __DIR__ . '/wp-load.php' );
    1414
    1515        // Set up the WordPress query.
    1616        wp();
  • src/wp-comments-post.php

    diff --git a/src/wp-comments-post.php b/src/wp-comments-post.php
    index fe03cb7296..70ce9756f9 100644
    a b  
    1818}
    1919
    2020/** Sets up the WordPress Environment. */
    21 require( dirname( __FILE__ ) . '/wp-load.php' );
     21require( __DIR__ . '/wp-load.php' );
    2222
    2323nocache_headers();
    2424
  • src/wp-cron.php

    diff --git a/src/wp-cron.php b/src/wp-cron.php
    index 1a944c216e..e4aeb3d6b5 100644
    a b  
    3838
    3939if ( ! defined( 'ABSPATH' ) ) {
    4040        /** Set up WordPress environment */
    41         require_once( dirname( __FILE__ ) . '/wp-load.php' );
     41        require_once( __DIR__ . '/wp-load.php' );
    4242}
    4343
    4444/**
  • src/wp-includes/ID3/getid3.lib.php

    diff --git a/src/wp-includes/ID3/getid3.lib.php b/src/wp-includes/ID3/getid3.lib.php
    index 1d51e8c4f3..f1b9fb7b34 100644
    a b public static function GetDataImageSize($imgData, &$imageinfo=array()) { 
    14861486                        }
    14871487
    14881488                        // yes this is ugly, feel free to suggest a better way
    1489                         if (include_once(dirname(__FILE__).'/getid3.php')) {
     1489                        if (include_once( __DIR__ . '/getid3.php')) {
    14901490                                if ($getid3_temp = new getID3()) {
    14911491                                        if ($getid3_temp_tempdir = $getid3_temp->tempdir) {
    14921492                                                $tempdir = $getid3_temp_tempdir;
  • src/wp-includes/ID3/getid3.php

    diff --git a/src/wp-includes/ID3/getid3.php b/src/wp-includes/ID3/getid3.php
    index cb25253e22..f2471d20b6 100644
    a b  
    1515}
    1616// Get base path of getID3() - ONCE
    1717if (!defined('GETID3_INCLUDEPATH')) {
    18         define('GETID3_INCLUDEPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
     18        define('GETID3_INCLUDEPATH', __DIR__ . DIRECTORY_SEPARATOR);
    1919}
    2020// Workaround Bug #39923 (https://bugs.php.net/bug.php?id=39923)
    2121if (!defined('IMG_JPG') && defined('IMAGETYPE_JPEG')) {
  • src/wp-includes/SimplePie/Misc.php

    diff --git a/src/wp-includes/SimplePie/Misc.php b/src/wp-includes/SimplePie/Misc.php
    index 1c1b618414..c918577565 100644
    a b function embed_wmedia(width, height, link) { 
    21622162         */
    21632163        public static function get_build()
    21642164        {
    2165                 $root = dirname(dirname(__FILE__));
     2165                $root = dirname( __DIR__);
    21662166                if (file_exists($root . '/.git/index'))
    21672167                {
    21682168                        return filemtime($root . '/.git/index');
    public static function get_build() 
    21792179                        }
    21802180                        return $time;
    21812181                }
    2182                 elseif (file_exists(dirname(__FILE__) . '/Core.php'))
     2182                elseif (file_exists( __DIR__ . '/Core.php'))
    21832183                {
    2184                         return filemtime(dirname(__FILE__) . '/Core.php');
     2184                        return filemtime( __DIR__ . '/Core.php');
    21852185                }
    21862186                else
    21872187                {
  • src/wp-includes/Text/Diff.php

    diff --git a/src/wp-includes/Text/Diff.php b/src/wp-includes/Text/Diff.php
    index edcdd3ac3a..2d3b0cdd28 100644
    a b function __construct( $engine, $params ) 
    4848        }
    4949
    5050        // WP #7391
    51         require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php';
     51        require_once __DIR__ . '/Diff/Engine/' . $engine . '.php';
    5252        $class = 'Text_Diff_Engine_' . $engine;
    5353        $diff_engine = new $class();
    5454
  • src/wp-includes/Text/Diff/Renderer/inline.php

    diff --git a/src/wp-includes/Text/Diff/Renderer/inline.php b/src/wp-includes/Text/Diff/Renderer/inline.php
    index 392bd57cff..203583f367 100644
    a b  
    1414/** Text_Diff_Renderer */
    1515
    1616// WP #7391
    17 require_once dirname(dirname(__FILE__)) . '/Renderer.php';
     17require_once dirname( __DIR__) . '/Renderer.php';
    1818
    1919/**
    2020 * "Inline" diff renderer.
  • src/wp-includes/class-phpmailer.php

    diff --git a/src/wp-includes/class-phpmailer.php b/src/wp-includes/class-phpmailer.php
    index 8772db2842..b7c1338b75 100644
    a b public function setLanguage($langcode = 'en', $lang_path = '') 
    17961796        );
    17971797        if (empty($lang_path)) {
    17981798            // Calculate an absolute path so it can work if CWD is not here
    1799             $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
     1799            $lang_path = __DIR__ . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
    18001800        }
    18011801        //Validate $langcode
    18021802        if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
  • src/wp-includes/class-requests.php

    diff --git a/src/wp-includes/class-requests.php b/src/wp-includes/class-requests.php
    index bb266189c1..030d5d1311 100644
    a b public static function autoloader($class) { 
    142142                }
    143143
    144144                $file = str_replace('_', '/', $class);
    145                 if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) {
    146                         require_once(dirname(__FILE__) . '/' . $file . '.php');
     145                if (file_exists( __DIR__ . '/' . $file . '.php')) {
     146                        require_once( __DIR__ . '/' . $file . '.php');
    147147                }
    148148        }
    149149
    public static function get_certificate_path() { 
    537537                        return Requests::$certificate_path;
    538538                }
    539539
    540                 return dirname(__FILE__) . '/Requests/Transport/cacert.pem';
     540                return __DIR__ . '/Requests/Transport/cacert.pem';
    541541        }
    542542
    543543        /**
  • src/wp-includes/ms-files.php

    diff --git a/src/wp-includes/ms-files.php b/src/wp-includes/ms-files.php
    index 0f2c0798c8..07f8695a53 100644
    a b  
    99 */
    1010
    1111define( 'SHORTINIT', true );
    12 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     12require_once(dirname( __DIR__) . '/wp-load.php' );
    1313
    1414if ( ! is_multisite() ) {
    1515        die( 'Multisite support not enabled' );
  • src/wp-includes/plugin.php

    diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php
    index 1f6cacd5b4..047f8b8c77 100644
    a b  
    2222 */
    2323
    2424// Initialize the filter globals.
    25 require( dirname( __FILE__ ) . '/class-wp-hook.php' );
     25require( __DIR__ . '/class-wp-hook.php' );
    2626
    2727/** @var WP_Hook[] $wp_filter */
    2828global $wp_filter, $wp_actions, $wp_current_filter;
  • src/wp-includes/pomo/mo.php

    diff --git a/src/wp-includes/pomo/mo.php b/src/wp-includes/pomo/mo.php
    index 836af801cd..324aa3f4fe 100644
    a b  
    77 * @subpackage mo
    88 */
    99
    10 require_once dirname( __FILE__ ) . '/translations.php';
    11 require_once dirname( __FILE__ ) . '/streams.php';
     10require_once __DIR__ . '/translations.php';
     11require_once __DIR__ . '/streams.php';
    1212
    1313if ( ! class_exists( 'MO', false ) ) :
    1414        class MO extends Gettext_Translations {
  • src/wp-includes/pomo/po.php

    diff --git a/src/wp-includes/pomo/po.php b/src/wp-includes/pomo/po.php
    index f5ddf5f4eb..88fe3774ad 100644
    a b  
    77 * @subpackage po
    88 */
    99
    10 require_once dirname( __FILE__ ) . '/translations.php';
     10require_once __DIR__ . '/translations.php';
    1111
    1212if ( ! defined( 'PO_MAX_LINE_LEN' ) ) {
    1313        define( 'PO_MAX_LINE_LEN', 79 );
  • src/wp-includes/pomo/translations.php

    diff --git a/src/wp-includes/pomo/translations.php b/src/wp-includes/pomo/translations.php
    index be9081a2fc..cb65dcdf62 100644
    a b  
    77 * @subpackage translations
    88 */
    99
    10 require_once dirname( __FILE__ ) . '/plural-forms.php';
    11 require_once dirname( __FILE__ ) . '/entry.php';
     10require_once __DIR__ . '/plural-forms.php';
     11require_once __DIR__ . '/entry.php';
    1212
    1313if ( ! class_exists( 'Translations', false ) ) :
    1414        class Translations {
  • src/wp-includes/random_compat/random.php

    diff --git a/src/wp-includes/random_compat/random.php b/src/wp-includes/random_compat/random.php
    index df74c8a4b6..eda52041ad 100644
    a b  
    5252    define('RANDOM_COMPAT_READ_BUFFER', 8);
    5353}
    5454
    55 $RandomCompatDIR = dirname(__FILE__);
     55$RandomCompatDIR = __DIR__;
    5656
    5757require_once $RandomCompatDIR . '/byte_safe_strings.php';
    5858require_once $RandomCompatDIR . '/cast_to_int.php';
  • src/wp-includes/sodium_compat/autoload.php

    diff --git a/src/wp-includes/sodium_compat/autoload.php b/src/wp-includes/sodium_compat/autoload.php
    index de2683daee..a3d1824253 100644
    a b function sodiumCompatAutoloader($class) 
    2424        // Replace the namespace prefix with the base directory, replace namespace
    2525        // separators with directory separators in the relative class name, append
    2626        // with .php
    27         $file = dirname(__FILE__) . '/src/' . str_replace('_', '/', $relative_class) . '.php';
     27        $file = __DIR__ . '/src/' . str_replace('_', '/', $relative_class) . '.php';
    2828        // if the file exists, require it
    2929        if (file_exists($file)) {
    3030            require_once $file;
    function sodiumCompatAutoloader($class) 
    3737    spl_autoload_register('sodiumCompatAutoloader');
    3838}
    3939
    40 require_once dirname(__FILE__) . '/src/SodiumException.php';
     40require_once __DIR__ . '/src/SodiumException.php';
    4141if (PHP_VERSION_ID >= 50300) {
    4242    // Namespaces didn't exist before 5.3.0, so don't even try to use this
    4343    // unless PHP >= 5.3.0
    44     require_once dirname(__FILE__) . '/lib/namespaced.php';
    45     require_once dirname(__FILE__) . '/lib/sodium_compat.php';
     44    require_once __DIR__ . '/lib/namespaced.php';
     45    require_once __DIR__ . '/lib/sodium_compat.php';
    4646}
    4747if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) {
    48     require_once dirname(__FILE__) . '/lib/php72compat.php';
     48    require_once __DIR__ . '/lib/php72compat.php';
    4949}
  • src/wp-includes/sodium_compat/lib/sodium_compat.php

    diff --git a/src/wp-includes/sodium_compat/lib/sodium_compat.php b/src/wp-includes/sodium_compat/lib/sodium_compat.php
    index ec5e5b5b51..c72d1de0e4 100644
    a b function randombytes_random16() 
    820820}
    821821
    822822if (!defined('\\Sodium\\CRYPTO_AUTH_BYTES')) {
    823     require_once dirname(__FILE__) . '/constants.php';
     823    require_once __DIR__ . '/constants.php';
    824824}
  • src/wp-includes/widgets/class-wp-widget-text.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-text.php b/src/wp-includes/widgets/class-wp-widget-text.php
    index 642556ce99..fdb83112fb 100644
    a b public function update( $new_instance, $old_instance ) { 
    417417         * @since 4.9.3
    418418         */
    419419        public function enqueue_preview_scripts() {
    420                 require_once dirname( dirname( __FILE__ ) ) . '/media.php';
     420                require_once dirname( __DIR__) . '/media.php';
    421421
    422422                wp_playlist_scripts( 'audio' );
    423423                wp_playlist_scripts( 'video' );
  • src/wp-links-opml.php

    diff --git a/src/wp-links-opml.php b/src/wp-links-opml.php
    index 12d35b008a..536cbe8488 100644
    a b  
    1212 * @package WordPress
    1313 */
    1414
    15 require_once( dirname( __FILE__ ) . '/wp-load.php' );
     15require_once( __DIR__ . '/wp-load.php' );
    1616
    1717header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
    1818$link_cat = '';
  • src/wp-load.php

    diff --git a/src/wp-load.php b/src/wp-load.php
    index 2b8830b580..9a2ad60ec3 100644
    a b  
    1818
    1919/** Define ABSPATH as this file's directory */
    2020if ( ! defined( 'ABSPATH' ) ) {
    21         define( 'ABSPATH', dirname( __FILE__ ) . '/' );
     21        define( 'ABSPATH', __DIR__ . '/' );
    2222}
    2323
    2424error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index c57f0a26ce..f90ca5839f 100644
    a b  
    99 */
    1010
    1111/** Make sure that the WordPress bootstrap has run before continuing. */
    12 require( dirname( __FILE__ ) . '/wp-load.php' );
     12require( __DIR__ . '/wp-load.php' );
    1313
    1414// Redirect to HTTPS login if forced to use SSL.
    1515if ( force_ssl_admin() && ! is_ssl() ) {
  • src/wp-mail.php

    diff --git a/src/wp-mail.php b/src/wp-mail.php
    index 00a296bf3a..1588b89f4d 100644
    a b  
    88 */
    99
    1010/** Make sure that the WordPress bootstrap has run before continuing. */
    11 require( dirname( __FILE__ ) . '/wp-load.php' );
     11require( __DIR__ . '/wp-load.php' );
    1212
    1313/** This filter is documented in wp-admin/options.php */
    1414if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) {
  • src/wp-signup.php

    diff --git a/src/wp-signup.php b/src/wp-signup.php
    index 8457c7059e..c73904373e 100644
    a b  
    11<?php
    22
    33/** Sets up the WordPress Environment. */
    4 require( dirname( __FILE__ ) . '/wp-load.php' );
     4require( __DIR__ . '/wp-load.php' );
    55
    66add_action( 'wp_head', 'wp_no_robots' );
    77
    8 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
     8require( __DIR__ . '/wp-blog-header.php' );
    99
    1010nocache_headers();
    1111
  • src/wp-trackback.php

    diff --git a/src/wp-trackback.php b/src/wp-trackback.php
    index 6bc8495a9f..ae40ded7ec 100644
    a b  
    99 */
    1010
    1111if ( empty( $wp ) ) {
    12         require_once( dirname( __FILE__ ) . '/wp-load.php' );
     12        require_once( __DIR__ . '/wp-load.php' );
    1313        wp( array( 'tb' => '1' ) );
    1414}
    1515
  • src/xmlrpc.php

    diff --git a/src/xmlrpc.php b/src/xmlrpc.php
    index b36b21e951..20bbb8bab5 100644
    a b  
    2727}
    2828
    2929/** Include the bootstrap for setting up WordPress environment */
    30 include( dirname( __FILE__ ) . '/wp-load.php' );
     30include( __DIR__ . '/wp-load.php' );
    3131
    3232if ( isset( $_GET['rsd'] ) ) { // http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
    3333        header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
  • tests/phpunit/data/themedir1/camelCase/index.php

    diff --git a/tests/phpunit/data/themedir1/camelCase/index.php b/tests/phpunit/data/themedir1/camelCase/index.php
    index 93de08260b..2f83cff6bd 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
  • tests/phpunit/data/themedir1/sandbox/functions.php

    diff --git a/tests/phpunit/data/themedir1/sandbox/functions.php b/tests/phpunit/data/themedir1/sandbox/functions.php
    index 1c8413d3a1..d26884a98f 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/sandbox/index.php

    diff --git a/tests/phpunit/data/themedir1/sandbox/index.php b/tests/phpunit/data/themedir1/sandbox/index.php
    index 1c8413d3a1..d26884a98f 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/theme1-dupe/functions.php

    diff --git a/tests/phpunit/data/themedir1/theme1-dupe/functions.php b/tests/phpunit/data/themedir1/theme1-dupe/functions.php
    index 1c8413d3a1..d26884a98f 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/theme1-dupe/index.php

    diff --git a/tests/phpunit/data/themedir1/theme1-dupe/index.php b/tests/phpunit/data/themedir1/theme1-dupe/index.php
    index 1c8413d3a1..d26884a98f 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/theme1/functions.php

    diff --git a/tests/phpunit/data/themedir1/theme1/functions.php b/tests/phpunit/data/themedir1/theme1/functions.php
    index 1c8413d3a1..d26884a98f 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/theme1/index.php

    diff --git a/tests/phpunit/data/themedir1/theme1/index.php b/tests/phpunit/data/themedir1/theme1/index.php
    index 1c8413d3a1..d26884a98f 100644
    a b  
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/includes/abstract-testcase.php

    diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php
    index f1c08657cb..159afe5eb3 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/factory.php';
    4 require_once dirname( __FILE__ ) . '/trac.php';
     3require_once __DIR__ . '/factory.php';
     4require_once __DIR__ . '/trac.php';
    55
    66/**
    77 * Defines a basic fixture to run multiple tests.
  • tests/phpunit/includes/bootstrap.php

    diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
    index 68e8b60792..4bd443be11 100644
    a b  
    77 * Compatibility with PHPUnit 6+
    88 */
    99if ( class_exists( 'PHPUnit\Runner\Version' ) ) {
    10         require_once dirname( __FILE__ ) . '/phpunit6/compat.php';
     10        require_once __DIR__ . '/phpunit6/compat.php';
    1111}
    1212
    1313if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) {
    1414        $config_file_path = WP_TESTS_CONFIG_FILE_PATH;
    1515} else {
    16         $config_file_path = dirname( dirname( __FILE__ ) );
     16        $config_file_path = dirname( __DIR__);
    1717        if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) {
    1818                // Support the config file from the root of the develop repository.
    1919                if ( basename( $config_file_path ) === 'phpunit' && basename( dirname( $config_file_path ) ) === 'tests' ) {
     
    3535}
    3636
    3737require_once $config_file_path;
    38 require_once dirname( __FILE__ ) . '/functions.php';
     38require_once __DIR__ . '/functions.php';
    3939
    4040if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) {
    4141        printf(
     
    5454tests_reset__SERVER();
    5555
    5656define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
    57 define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/../data' );
    58 define( 'DIR_TESTROOT', realpath( dirname( dirname( __FILE__ ) ) ) );
     57define( 'DIR_TESTDATA', __DIR__ . '/../data' );
     58define( 'DIR_TESTROOT', realpath( dirname( __DIR__) ) );
    5959
    6060define( 'WP_LANG_DIR', DIR_TESTDATA . '/languages' );
    6161
     
    8181$multisite = $multisite || ( defined( 'MULTISITE' ) && MULTISITE );
    8282
    8383// Override the PHPMailer
    84 require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
     84require_once( __DIR__ . '/mock-mailer.php' );
    8585$phpmailer = new MockPHPMailer( true );
    8686
    8787if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
     
    9494}
    9595
    9696if ( '1' !== getenv( 'WP_TESTS_SKIP_INSTALL' ) ) {
    97         system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );
     97        system( WP_PHP_BINARY . ' ' . escapeshellarg( __DIR__ . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );
    9898        if ( 0 !== $retval ) {
    9999                exit( $retval );
    100100        }
    function wp_tests_options( $value ) { 
    136136_delete_all_posts();
    137137
    138138if ( version_compare( tests_get_phpunit_version(), '7.0', '>=' ) ) {
    139         require dirname( __FILE__ ) . '/phpunit7/testcase.php';
     139        require __DIR__ . '/phpunit7/testcase.php';
    140140} else {
    141         require dirname( __FILE__ ) . '/testcase.php';
     141        require __DIR__ . '/testcase.php';
    142142}
    143143
    144 require dirname( __FILE__ ) . '/testcase-rest-api.php';
    145 require dirname( __FILE__ ) . '/testcase-rest-controller.php';
    146 require dirname( __FILE__ ) . '/testcase-rest-post-type-controller.php';
    147 require dirname( __FILE__ ) . '/testcase-xmlrpc.php';
    148 require dirname( __FILE__ ) . '/testcase-ajax.php';
    149 require dirname( __FILE__ ) . '/testcase-canonical.php';
    150 require dirname( __FILE__ ) . '/exceptions.php';
    151 require dirname( __FILE__ ) . '/utils.php';
    152 require dirname( __FILE__ ) . '/spy-rest-server.php';
    153 require dirname( __FILE__ ) . '/class-wp-rest-test-search-handler.php';
    154 require dirname( __FILE__ ) . '/class-wp-fake-block-type.php';
     144require __DIR__ . '/testcase-rest-api.php';
     145require __DIR__ . '/testcase-rest-controller.php';
     146require __DIR__ . '/testcase-rest-post-type-controller.php';
     147require __DIR__ . '/testcase-xmlrpc.php';
     148require __DIR__ . '/testcase-ajax.php';
     149require __DIR__ . '/testcase-canonical.php';
     150require __DIR__ . '/exceptions.php';
     151require __DIR__ . '/utils.php';
     152require __DIR__ . '/spy-rest-server.php';
     153require __DIR__ . '/class-wp-rest-test-search-handler.php';
     154require __DIR__ . '/class-wp-fake-block-type.php';
    155155
    156156/**
    157157 * A class to handle additional command line arguments passed to the script.
  • tests/phpunit/includes/factory.php

    diff --git a/tests/phpunit/includes/factory.php b/tests/phpunit/includes/factory.php
    index 91d7da750e..7c98853219 100644
    a b  
    11<?php
    22
    3 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-thing.php' );
    4 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-post.php' );
    5 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-bookmark.php' );
    6 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-attachment.php' );
    7 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-user.php' );
    8 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-comment.php' );
    9 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-blog.php' );
    10 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-network.php' );
    11 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-for-term.php' );
    12 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-generator-sequence.php' );
    13 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-callback-after-create.php' );
    14 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory.php' );
     3require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-thing.php' );
     4require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-post.php' );
     5require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-bookmark.php' );
     6require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-attachment.php' );
     7require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-user.php' );
     8require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-comment.php' );
     9require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-blog.php' );
     10require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-network.php' );
     11require_once( __DIR__ . '/factory/class-wp-unittest-factory-for-term.php' );
     12require_once( __DIR__ . '/factory/class-wp-unittest-generator-sequence.php' );
     13require_once( __DIR__ . '/factory/class-wp-unittest-factory-callback-after-create.php' );
     14require_once( __DIR__ . '/factory/class-wp-unittest-factory.php' );
  • tests/phpunit/includes/install.php

    diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php
    index d07079e501..d493d343ef 100644
    a b  
    1111
    1212define( 'WP_INSTALLING', true );
    1313require_once $config_file_path;
    14 require_once dirname( __FILE__ ) . '/functions.php';
     14require_once __DIR__ . '/functions.php';
    1515
    1616// Set the theme to our special empty theme, to avoid interference from the current Twenty* theme.
    1717if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
     
    3333
    3434// Override the PHPMailer
    3535global $phpmailer;
    36 require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
     36require_once( __DIR__ . '/mock-mailer.php' );
    3737$phpmailer = new MockPHPMailer();
    3838
    39 register_theme_directory( dirname( __FILE__ ) . '/../data/themedir1' );
     39register_theme_directory( __DIR__ . '/../data/themedir1' );
    4040
    4141/*
    4242 * default_storage_engine and storage_engine are the same option, but storage_engine
  • tests/phpunit/includes/listener-loader.php

    diff --git a/tests/phpunit/includes/listener-loader.php b/tests/phpunit/includes/listener-loader.php
    index 3e3731f98b..1f86fefc06 100644
    a b  
    11<?php
    22
    33if ( version_compare( tests_get_phpunit_version(), '7.0', '>=' ) ) {
    4         require dirname( __FILE__ ) . '/phpunit7/speed-trap-listener.php';
     4        require __DIR__ . '/phpunit7/speed-trap-listener.php';
    55} else {
    6         require dirname( __FILE__ ) . '/speed-trap-listener.php';
     6        require __DIR__ . '/speed-trap-listener.php';
    77}
  • tests/phpunit/includes/phpunit7/testcase.php

    diff --git a/tests/phpunit/includes/phpunit7/testcase.php b/tests/phpunit/includes/phpunit7/testcase.php
    index 9edc885e6a..071c31491a 100644
    a b  
    11<?php
    22
    3 require_once dirname( dirname( __FILE__ ) ) . '/abstract-testcase.php';
     3require_once dirname( __DIR__) . '/abstract-testcase.php';
    44
    55/**
    66 * Defines a basic fixture to run multiple tests.
  • tests/phpunit/includes/testcase.php

    diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php
    index 964af64ca3..7689d0e48c 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/abstract-testcase.php';
     3require_once __DIR__ . '/abstract-testcase.php';
    44
    55/**
    66 * Defines a basic fixture to run multiple tests.
  • tests/phpunit/tests/canonical/noRewrite.php

    diff --git a/tests/phpunit/tests/canonical/noRewrite.php b/tests/phpunit/tests/canonical/noRewrite.php
    index 0c2a027cfc..0251baa51f 100644
    a b  
    11<?php
    22
    3 require_once dirname( dirname( __FILE__ ) ) . '/canonical.php';
     3require_once dirname( __DIR__) . '/canonical.php';
    44
    55/**
    66 * @group canonical
  • tests/phpunit/tests/db/charset.php

    diff --git a/tests/phpunit/tests/db/charset.php b/tests/phpunit/tests/db/charset.php
    index 3089ec9a74..dd7d518bf6 100644
    a b class Tests_DB_Charset extends WP_UnitTestCase { 
    2525        public static function setUpBeforeClass() {
    2626                parent::setUpBeforeClass();
    2727
    28                 require_once( dirname( dirname( __FILE__ ) ) . '/db.php' );
     28                require_once(dirname( __DIR__) . '/db.php' );
    2929
    3030                self::$_wpdb = new WpdbExposedMethodsForTesting();
    3131
  • tests/phpunit/tests/filesystem/base.php

    diff --git a/tests/phpunit/tests/filesystem/base.php b/tests/phpunit/tests/filesystem/base.php
    index 356be3c9e0..4d63fdd99e 100644
    a b function filter_fs_method( $method ) { 
    2424                return 'MockFS';
    2525        }
    2626        function filter_abstraction_file( $file ) {
    27                 return dirname( dirname( dirname( __FILE__ ) ) ) . '/includes/mock-fs.php';
     27                return dirname( dirname( __DIR__) ) . '/includes/mock-fs.php';
    2828        }
    2929
    3030        function test_is_MockFS_sane() {
  • tests/phpunit/tests/filesystem/findFolder.php

    diff --git a/tests/phpunit/tests/filesystem/findFolder.php b/tests/phpunit/tests/filesystem/findFolder.php
    index 9f754a7c55..903c6af9b7 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * @group filesystem
  • tests/phpunit/tests/http/curl.php

    diff --git a/tests/phpunit/tests/http/curl.php b/tests/phpunit/tests/http/curl.php
    index f64cace2b7..271e6dd698 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * @group http
  • tests/phpunit/tests/http/streams.php

    diff --git a/tests/phpunit/tests/http/streams.php b/tests/phpunit/tests/http/streams.php
    index 2c6922f901..61fcc11925 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * @group http
  • tests/phpunit/tests/image/editor.php

    diff --git a/tests/phpunit/tests/image/editor.php b/tests/phpunit/tests/image/editor.php
    index 35242ad3e0..888d9dc1f4 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * Test the WP_Image_Editor base class
  • tests/phpunit/tests/image/editorGd.php

    diff --git a/tests/phpunit/tests/image/editorGd.php b/tests/phpunit/tests/image/editorGd.php
    index fdd0e9c96a..5bbe4d2478 100644
    a b  
    77 * @group media
    88 * @group wp-image-editor-gd
    99 */
    10 require_once( dirname( __FILE__ ) . '/base.php' );
     10require_once( __DIR__ . '/base.php' );
    1111
    1212class Tests_Image_Editor_GD extends WP_Image_UnitTestCase {
    1313
  • tests/phpunit/tests/image/editorImagick.php

    diff --git a/tests/phpunit/tests/image/editorImagick.php b/tests/phpunit/tests/image/editorImagick.php
    index ac531ff942..e8ff8ecc9a 100644
    a b  
    77 * @group media
    88 * @group wp-image-editor-imagick
    99 */
    10 require_once( dirname( __FILE__ ) . '/base.php' );
     10require_once( __DIR__ . '/base.php' );
    1111
    1212class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase {
    1313
  • tests/phpunit/tests/image/resize.php

    diff --git a/tests/phpunit/tests/image/resize.php b/tests/phpunit/tests/image/resize.php
    index 2cbd5a2505..2df3b3c25c 100644
    a b  
    66 * @group upload
    77 * @group resize
    88 */
    9 require_once( dirname( __FILE__ ) . '/base.php' );
     9require_once( __DIR__ . '/base.php' );
    1010
    1111abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase {
    1212
  • tests/phpunit/tests/image/resizeGd.php

    diff --git a/tests/phpunit/tests/image/resizeGd.php b/tests/phpunit/tests/image/resizeGd.php
    index 5d1c614c34..37a2282ca6 100644
    a b  
    66 * @group upload
    77 * @group resize
    88 */
    9 require_once( dirname( __FILE__ ) . '/resize.php' );
     9require_once( __DIR__ . '/resize.php' );
    1010
    1111class Test_Image_Resize_GD extends WP_Tests_Image_Resize_UnitTestCase {
    1212
  • tests/phpunit/tests/image/resizeImagick.php

    diff --git a/tests/phpunit/tests/image/resizeImagick.php b/tests/phpunit/tests/image/resizeImagick.php
    index d611e38e14..dd424be2bd 100644
    a b  
    66 * @group upload
    77 * @group resize
    88 */
    9 require_once( dirname( __FILE__ ) . '/resize.php' );
     9require_once( __DIR__ . '/resize.php' );
    1010
    1111class Test_Image_Resize_Imagick extends WP_Tests_Image_Resize_UnitTestCase {
    1212
  • tests/phpunit/tests/import/import.php

    diff --git a/tests/phpunit/tests/import/import.php b/tests/phpunit/tests/import/import.php
    index e005826a18..88dee19985 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * @group import
  • tests/phpunit/tests/import/parser.php

    diff --git a/tests/phpunit/tests/import/parser.php b/tests/phpunit/tests/import/parser.php
    index 8b198f31e4..be7b141d27 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * @group import
  • tests/phpunit/tests/import/postmeta.php

    diff --git a/tests/phpunit/tests/import/postmeta.php b/tests/phpunit/tests/import/postmeta.php
    index dcae22d0bd..e712531ea2 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/base.php';
     3require_once __DIR__ . '/base.php';
    44
    55/**
    66 * @group import
  • tests/phpunit/tests/pomo/pluralForms.php

    diff --git a/tests/phpunit/tests/pomo/pluralForms.php b/tests/phpunit/tests/pomo/pluralForms.php
    index 2cd283cf95..ce69704d0f 100644
    a b public function test_regression( $lang, $nplurals, $expression ) { 
    7878                        $this->markTestSkipped( 'Lambda functions are deprecated in PHP 7.2' );
    7979                }
    8080
    81                 require_once dirname( dirname( dirname( __FILE__ ) ) ) . '/includes/plural-form-function.php';
     81                require_once dirname( dirname( __DIR__) ) . '/includes/plural-form-function.php';
    8282
    8383                $parenthesized = self::parenthesize_plural_expression( $expression );
    8484                $old_style     = tests_make_plural_form_function( $nplurals, $parenthesized );
  • tests/phpunit/tests/query/verboseRewriteRules.php

    diff --git a/tests/phpunit/tests/query/verboseRewriteRules.php b/tests/phpunit/tests/query/verboseRewriteRules.php
    index 5414a51a9a..88f2ef38ac 100644
    a b  
    11<?php
    22
    3 require_once dirname( __FILE__ ) . '/conditionals.php';
     3require_once __DIR__ . '/conditionals.php';
    44
    55/**
    66 * @group query
  • tests/phpunit/wp-mail-real-test.php

    diff --git a/tests/phpunit/wp-mail-real-test.php b/tests/phpunit/wp-mail-real-test.php
    index 67da30ef86..6a91067235 100644
    a b  
    1010if ( is_callable( 'getopt' ) ) {
    1111        $opts = getopt( $options );
    1212} else {
    13         include( dirname( __FILE__ ) . '/wp-testlib/getopt.php' );
     13        include( __DIR__ . '/wp-testlib/getopt.php' );
    1414        $opts = getoptParser::getopt( $options );
    1515}
    1616
    17 define( 'DIR_TESTROOT', realpath( dirname( __FILE__ ) ) );
     17define( 'DIR_TESTROOT', realpath( __DIR__) );
    1818
    1919define( 'TEST_WP', true );
    2020define( 'WP_DEBUG', array_key_exists( 'd', $opts ) );
  • wp-config-sample.php

    diff --git a/wp-config-sample.php b/wp-config-sample.php
    index ed8f9fc0e5..bd4a63cc5c 100644
    a b  
    8383
    8484/** Absolute path to the WordPress directory. */
    8585if ( ! defined( 'ABSPATH' ) ) {
    86         define( 'ABSPATH', dirname( __FILE__ ) . '/' );
     86        define( 'ABSPATH', __DIR__ . '/' );
    8787}
    8888
    8989/** Sets up WordPress vars and included files. */
  • wp-tests-config-sample.php

    diff --git a/wp-tests-config-sample.php b/wp-tests-config-sample.php
    index 2f6c515912..7a030d25fb 100644
    a b  
    22
    33/* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
    44if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
    5         define( 'ABSPATH', dirname( __FILE__ ) . '/build/' );
     5        define( 'ABSPATH', __DIR__ . '/build/' );
    66} else {
    7         define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
     7        define( 'ABSPATH', __DIR__ . '/src/' );
    88}
    99
    1010/*