Plugins: When loading a plugin in a "sandbox" on activation, do it once.

This avoids a fatal error if the plugin is already included, e.g. in unit tests.

Follow-up to [50787].

See #31104.

git-svn-id: https://develop.svn.wordpress.org/trunk@50788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-04-25 13:19:54 +00:00
parent 93290c44f6
commit 32ca843154

View File

@@ -2292,7 +2292,7 @@ function plugin_sandbox_scrape( $plugin ) {
}
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
include WP_PLUGIN_DIR . '/' . $plugin;
include_once WP_PLUGIN_DIR . '/' . $plugin;
}
/**