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



plugin_sandbox_scrape › WordPress Function

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

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