plugin_sandbox_scrape

函数
plugin_sandbox_scrape ( $plugin )
参数
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Required:
定义位置
相关方法
plugins_apiplugin_basenameprint_head_scriptsplugins_urlplugin_dir_path
引入
3.0.0
弃用
-

plugin_sandbox_scrape: 该函数用于对插件沙盒的HTML内容进行净化和验证。它需要一个参数:$content,这是需要净化和验证的HTML内容: 该函数返回经过净化和验证的内容。

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

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 19:32:59

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: