plugin_sandbox_scrape

函数


plugin_sandbox_scrape ( $plugin )
参数
  • (string)
    $plugin
    Path to the plugin file relative to the plugins directory.
    Required:
定义位置
  • wp-admin/includes/plugin.php
    , line 2308
引入
3.0.0
弃用

加载给定的插件尝试以生成错误。

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