On this page
plugin_sandbox_scrape( string $plugin )
Loads a given plugin attempt to generate errors.
Parameters
$pluginstring Required-
Path to the plugin file relative to the plugins directory.
Source
File: wp-admin/includes/plugin.php. View all references
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;
}
Related
Uses
| Uses | Description |
|---|---|
| wp_register_plugin_realpath() wp-includes/plugin.php | Register a plugin’s real path. |
Used By
| Used By | Description |
|---|---|
| resume_plugin() wp-admin/includes/plugin.php | Tries to resume a single plugin. |
| activate_plugin() wp-admin/includes/plugin.php | Attempts activation of plugin in a “sandbox” and redirects on success. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/plugin_sandbox_scrape