diff --git wp-includes/plugin.php wp-includes/plugin.php
index f5d213d..8b8b166 100644
|
|
|
function plugin_basename( $file ) { |
| 642 | 642 | function wp_register_plugin_realpath( $file ) { |
| 643 | 643 | global $wp_plugin_paths; |
| 644 | 644 | |
| | 645 | // Normalize, but store as static to avoid constant recalculation of a |
| | 646 | // constant value |
| | 647 | static $wp_plugin_path, $wpmu_plugin_path; |
| | 648 | if ( empty( $wp_plugin_path ) || empty( $wpmu_plugin_path ) ) { |
| | 649 | $wp_plugin_path = wp_normalize_path( WP_PLUGIN_DIR ); |
| | 650 | $wpmu_plugin_path = wp_normalize_path( WPMU_PLUGIN_DIR ); |
| | 651 | } |
| | 652 | |
| 645 | 653 | $plugin_path = wp_normalize_path( dirname( $file ) ); |
| 646 | 654 | $plugin_realpath = wp_normalize_path( dirname( realpath( $file ) ) ); |
| 647 | 655 | |
| | 656 | if ( $plugin_path === $wp_plugin_path || $plugin_path === $wpmu_plugin_path ) { |
| | 657 | return false; |
| | 658 | } |
| | 659 | |
| 648 | 660 | if ( $plugin_path !== $plugin_realpath ) { |
| 649 | 661 | $wp_plugin_paths[ $plugin_path ] = $plugin_realpath; |
| 650 | 662 | } |
| | 663 | |
| | 664 | return true; |
| 651 | 665 | } |
| 652 | 666 | |
| 653 | 667 | /** |
diff --git wp-settings.php wp-settings.php
index aee35b3..9f73195 100644
|
|
|
$GLOBALS['wp_plugin_paths'] = array(); |
| 168 | 168 | |
| 169 | 169 | // Load must-use plugins. |
| 170 | 170 | foreach ( wp_get_mu_plugins() as $mu_plugin ) { |
| 171 | | wp_register_plugin_realpath( $mu_plugin ); |
| 172 | 171 | include_once( $mu_plugin ); |
| 173 | 172 | } |
| 174 | 173 | unset( $mu_plugin ); |