Index: public_html/wp-admin/plugins.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- public_html/wp-admin/plugins.php	(revision 23116)
+++ public_html/wp-admin/plugins.php	(revision )
@@ -144,7 +144,7 @@
 			@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
 			// Go back to "sandbox" scope so we get the same errors as before
 			function plugin_sandbox_scrape( $plugin ) {
-				include( WP_PLUGIN_DIR . '/' . $plugin );
+				wp_load_plugin( WP_PLUGIN_DIR . '/' . $plugin );
 			}
 			plugin_sandbox_scrape( $plugin );
 			do_action('activate_' . $plugin);
Index: public_html/wp-settings.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- public_html/wp-settings.php	(revision 23116)
+++ public_html/wp-settings.php	(revision )
@@ -156,14 +156,14 @@
 
 // Load must-use plugins.
 foreach ( wp_get_mu_plugins() as $mu_plugin ) {
-	include_once( $mu_plugin );
+  wp_load_plugin( $mu_plugin, 'mu-plugin' );
 }
 unset( $mu_plugin );
 
 // Load network activated plugins.
 if ( is_multisite() ) {
 	foreach( wp_get_active_network_plugins() as $network_plugin ) {
-		include_once( $network_plugin );
+    wp_load_plugin( $network_plugin, 'network-plugin' );
 	}
 	unset( $network_plugin );
 }
@@ -192,7 +192,7 @@
 
 // Load active plugins.
 foreach ( wp_get_active_and_valid_plugins() as $plugin )
-	include_once( $plugin );
+  wp_load_plugin( $plugin );
 unset( $plugin );
 
 // Load pluggable functions.
Index: public_html/wp-admin/includes/plugin.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- public_html/wp-admin/includes/plugin.php	(revision 23116)
+++ public_html/wp-admin/includes/plugin.php	(revision )
@@ -859,7 +859,7 @@
 		update_option('uninstall_plugins', $uninstallable_plugins);
 		unset($uninstallable_plugins);
 
-		include WP_PLUGIN_DIR . '/' . $file;
+    wp_load_plugin( WP_PLUGIN_DIR . '/' . $file );
 
 		add_action( 'uninstall_' . $file, $callable );
 		do_action( 'uninstall_' . $file );
Index: public_html/wp-includes/load.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- public_html/wp-includes/load.php	(revision 23116)
+++ public_html/wp-includes/load.php	(revision )
@@ -759,3 +759,28 @@
 
 	$wp_locale = new WP_Locale();
 }
+
+/**
+ * Load plugin while setting $wp_plugin_file during the loading of the plugin
+ *
+ * @global string $wp_plugin_file Full filename for the currently loading plugin.
+ * @global string $wp_plugin_type One of 'plugin', 'mu-plugin' or 'network-plugin'
+ * @global string $wp_plugin_slug The 'slug' WordPress will store to identify this plugin
+ *
+ * @since 3.6
+ *
+ * @param string $plugin_file Full path and filename of plugin's entry point file.
+ * @param string $plugin_type Type of plugin loaded; plugin, mu-plugin or network-plugin.
+ */
+function wp_load_plugin( $plugin_file, $plugin_type = 'plugin' ) {
+  global $wp_plugin_file, $wp_plugin_type, $wp_plugin_slug;
+  $wp_plugin_type = $plugin_type;
+  /*
+   * @todo: Verify next 2 lines is correct logic for plugin slug for 100% of use-cases.
+   */
+  $dir = preg_quote( 'mu-plugin' == $plugin_type ? WPMU_PLUGIN_DIR : WP_PLUGIN_DIR );
+  $wp_plugin_slug = preg_replace( "#^{$dir}/(.+)$#", '$1', str_replace( '\\', '/', $plugin_file ) );
+  include_once( $wp_plugin_file = $plugin_file );
+  unset( $wp_plugin_file, $wp_plugin_type, $wp_plugin_slug );
+}
+
