diff --git wp-includes/functions.php wp-includes/functions.php
index c4dc1e7..94b1c58 100644
--- wp-includes/functions.php
+++ wp-includes/functions.php
@@ -1429,6 +1429,21 @@ function path_join( $base, $path ) {
 }
 
 /**
+ * Normalize a filesystem path
+ *
+ * Replaces backslashes with forward slashes for Windows systems, and ensures
+ * no duplicate slashes exist.
+ *
+ * @param string $path Path to normalize
+ * @return string Normalized path
+ */
+function wp_normalize_path( $path ) {
+	$path = str_replace( '\\', '/', $path );
+	$path = preg_replace( '|/+|','/', $path );
+	return $path;
+}
+
+/**
  * Determines a writable directory for temporary files.
  * Function's preference is the return value of <code>sys_get_temp_dir()</code>,
  * followed by your PHP temporary upload directory, followed by WP_CONTENT_DIR,
diff --git wp-includes/plugin.php wp-includes/plugin.php
index 03c4ac3..c8029f4 100644
--- wp-includes/plugin.php
+++ wp-includes/plugin.php
@@ -574,15 +574,31 @@ function remove_all_actions($tag, $priority = false) {
  * @uses WP_PLUGIN_DIR
  */
 function plugin_basename($file) {
-	$file = str_replace('\\','/',$file); // sanitize for Win32 installs
-	$file = preg_replace('|/+|','/', $file); // remove any duplicate slash
-	$plugin_dir = str_replace('\\','/',WP_PLUGIN_DIR); // sanitize for Win32 installs
-	$plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash
-	$mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs
-	$mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash
+	global $wp_plugin_paths;
+	$original_file = $file;
+
+	foreach ($wp_plugin_paths as $dir => $realdir) {
+		if (strpos($file, $realdir) === 0) {
+			$file = $dir . substr( $file, strlen( $realdir ) );
+		}
+	}
+
+	$file = wp_normalize_path($file);
+	$plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
+	$mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
+
 	$file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir
 	$file = trim($file, '/');
-	return $file;
+
+	/**
+	 * Filter the plugin's basename.
+	 *
+	 * @since 3.7.0
+	 *
+	 * @param string $file Resolved basename.
+	 * @param string $original_file Filename passed into the function.
+	 */
+	return apply_filters( 'plugin_basename', $file, $original_file );
 }
 
 /**
diff --git wp-settings.php wp-settings.php
index 24aee93..2618326 100644
--- wp-settings.php
+++ wp-settings.php
@@ -194,9 +194,18 @@ create_initial_post_types();
 register_theme_directory( get_theme_root() );
 
 // Load active plugins.
-foreach ( wp_get_active_and_valid_plugins() as $plugin )
+$wp_plugin_paths = array();
+foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
+	$plugin_path = wp_normalize_path( dirname( $plugin ) );
+	$plugin_realpath = wp_normalize_path( dirname( realpath( $plugin ) ) );
+
+	if ( $plugin_path !== $plugin_realpath ) {
+		$wp_plugin_paths[ $plugin_path ] = $plugin_realpath;
+	}
+
 	include_once( $plugin );
-unset( $plugin );
+}
+unset( $plugin, $plugin_path, $plugin_realpath );
 
 // Load pluggable functions.
 require( ABSPATH . WPINC . '/pluggable.php' );
