函数原型
plugin_sandbox_scrape( string $plugin )
函数描述
Loads a given plugin attempt to generate errors.
是否弃用
未弃用
函数参数
-
$plugin
string
Required - Path to the plugin file relative to the plugins directory.
函数返回值
无
函数位置
File: wp-admin/includes/plugin.php.
函数源码
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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.4.0 | Function was moved into the wp-admin/includes/plugin.php file. |
| 3.0.0 | Introduced. |

