WordPress.org

Make WordPress Core

Ticket #48082: 48082.diff

File 48082.diff, 80.2 KB (added by desrosj, 2 years ago)
  • src/_index.php

     
    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

     
    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

     
    1111 */
    1212error_reporting( 0 );
    1313
    14 $basepath = dirname( __FILE__ );
     14$basepath = __DIR__;
    1515
    1616function get_file( $path ) {
    1717
  • src/wp-activate.php

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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/about.php

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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/network.php

     
    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/options-discussion.php

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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/about.php

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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/user-edit.php

     
    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

     
    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/users.php

     
    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

     
    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

     
    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

     
    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

     
    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/ms-files.php

     
    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

     
    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

     
    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

     
    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

     
    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/widgets/class-wp-widget-text.php

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
  • tests/phpunit/data/themedir1/sandbox/functions.php

     
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/sandbox/index.php

     
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/theme1/functions.php

     
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/data/themedir1/theme1/index.php

     
    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

     
    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

     
    22
    33// dummy theme
    44
    5 echo dirname(__FILE__).'/'.basename(__FILE__);
     5echo __DIR__ . '/' . basename(__FILE__);
    66
    77?>
  • tests/phpunit/includes/abstract-testcase.php

     
    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

     
    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        }
     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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

     
    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/*