Make WordPress Core

Ticket #29154: 29154.diff

File 29154.diff, 655 bytes (added by jdgrimes, 10 years ago)
  • src/wp-includes/plugin.php

     
    653653function plugin_basename( $file ) {
    654654        global $wp_plugin_paths;
    655655
     656        $file = wp_normalize_path( $file );
     657
    656658        foreach ( $wp_plugin_paths as $dir => $realdir ) {
    657659                if ( strpos( $file, $realdir ) === 0 ) {
    658660                        $file = $dir . substr( $file, strlen( $realdir ) );
     
    659661                }
    660662        }
    661663
    662         $file = wp_normalize_path( $file );
    663664        $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
    664665        $mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
    665666