Changeset 27999
- Timestamp:
- 04/07/2014 08:14:34 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/plugin.php
r27294 r27999 639 639 * 640 640 * @param string $file Known path to the file. 641 * @return bool Whether the path was able to be registered. 641 642 */ 642 643 function wp_register_plugin_realpath( $file ) { 643 644 global $wp_plugin_paths; 644 645 646 // Normalize, but store as static to avoid recalculation of a constant value 647 static $wp_plugin_path, $wpmu_plugin_path; 648 if ( ! isset( $wp_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 -
trunk/src/wp-settings.php
r27158 r27999 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 }
Note: See TracChangeset
for help on using the changeset viewer.