WordPress开发者和主题制作者的搜索引擎



plugin_sandbox_scrape ›

Since3.0.0
已弃用n/a
plugin_sandbox_scrape ( $plugin )
参数:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Required: Yes
定义在:
文档:
Change Log:
  • 4.4.0

Load a given plugin attempt to generate errors.



源码

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