WordPress Version: 6.1
/**
* Loads a given plugin attempt to generate errors.
*
* @since 3.0.0
* @since 4.4.0 Function was moved into the `wp-admin/includes/plugin.php` file.
*
* @param string $plugin Path to the plugin file relative to the plugins directory.
*/
function plugin_sandbox_scrape($plugin)
{
if (!defined('WP_SANDBOX_SCRAPING')) {
define('WP_SANDBOX_SCRAPING', true);
}
wp_register_plugin_realpath(WP_PLUGIN_DIR . '/' . $plugin);
include_once WP_PLUGIN_DIR . '/' . $plugin;
}