Skip to content

Commit

Permalink
All: use native __DIR__ instead of dirname(__FILE__)
Browse files Browse the repository at this point in the history
Available since PHP 5.3, released in 2009.
  • Loading branch information
Krinkle committed Sep 8, 2023
1 parent eec00d6 commit 46433f1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$_POST['weblog_title'] = 'jQuery';
}

require_once dirname( __FILE__ ) . '/sites.php';
require_once __DIR__ . '/sites.php';

function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '' ) {
global $wpdb;
Expand Down
2 changes: 1 addition & 1 deletion mu-plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return;
}

require_once dirname( __FILE__ ) . '/../sites.php';
require_once __DIR__ . '/../sites.php';

$options = jquery_default_site_options();
$sites = jquery_sites();
Expand Down
1 change: 0 additions & 1 deletion plugins/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<?php
// Silence is golden.
?>
4 changes: 2 additions & 2 deletions sunrise.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once dirname( __FILE__ ) . '/sites.php';
require_once __DIR__ . '/sites.php';

// This is a single network configuration and the network is defined in config.php
if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
Expand Down Expand Up @@ -67,4 +67,4 @@
} );
}
}
}
}
4 changes: 2 additions & 2 deletions wp-config-sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
define('ABSPATH', __DIR__ . '/');

/** jQuery.com configuration file */
require( dirname( __FILE__ ) . '/jquery-wp-content/config.php' );
require( __DIR__ . '/jquery-wp-content/config.php' );

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

0 comments on commit 46433f1

Please sign in to comment.