plugin_sandbox_scrape

The timeline below displays how wordpress function plugin_sandbox_scrape has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

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;
}

WordPress Version: 5.8

/**
 * Load 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;
}

WordPress Version: 5.2

/**
 * Load 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 WP_PLUGIN_DIR . '/' . $plugin;
}

WordPress Version: 5.1

/**
 * Load 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)
{
    wp_register_plugin_realpath(WP_PLUGIN_DIR . '/' . $plugin);
    include WP_PLUGIN_DIR . '/' . $plugin;
}

WordPress Version: 4.9

/**
 * Load 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 Plugin file to load.
 */
function plugin_sandbox_scrape($plugin)
{
    wp_register_plugin_realpath(WP_PLUGIN_DIR . '/' . $plugin);
    include WP_PLUGIN_DIR . '/' . $plugin;
}

WordPress Version: 4.4

/**
 * @param string $plugin
 */
function plugin_sandbox_scrape($plugin)
{
    wp_register_plugin_realpath(WP_PLUGIN_DIR . '/' . $plugin);
    include WP_PLUGIN_DIR . '/' . $plugin;
}

WordPress Version: 4.3

//Ensure that Fatal errors are displayed.
// Go back to "sandbox" scope so we get the same errors as before
/**
 * @param string $plugin
 */
function plugin_sandbox_scrape($plugin)
{
    wp_register_plugin_realpath(WP_PLUGIN_DIR . '/' . $plugin);
    include WP_PLUGIN_DIR . '/' . $plugin;
}

WordPress Version: 3.9

//Ensure that Fatal errors are displayed.
// Go back to "sandbox" scope so we get the same errors as before
function plugin_sandbox_scrape($plugin)
{
    wp_register_plugin_realpath(WP_PLUGIN_DIR . '/' . $plugin);
    include WP_PLUGIN_DIR . '/' . $plugin;
}

WordPress Version: 3.7

//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;
}