plugin_sandbox_scrape()

最后更新于:2021-11-27 18:46:57

plugin_sandbox_scrape( string$plugin)

Load a given plugin attempt to generate errors.

参数

$plugin

(string) (Required) Path to the plugin file relative to the plugins directory.

源文件

文件: gc-admin/includes/plugin.php

function plugin_sandbox_scrape( $plugin ) {
	if ( ! defined( 'GC_SANDBOX_SCRAPING' ) ) {
		define( 'GC_SANDBOX_SCRAPING', true );
	}

	gc_register_plugin_realpath( GC_PLUGIN_DIR . '/' . $plugin );
	include_once GC_PLUGIN_DIR . '/' . $plugin;
}