wp_clean_plugins_cache

函数
wp_clean_plugins_cache ( $clear_update_cache = true )
参数
  • (bool) $clear_update_cache Whether to clear the plugin updates cache. Default true.
    Required:
    Default: true
定义位置
相关方法
clean_page_cacheclean_post_cachewp_clean_update_cacheclean_user_cachewp_clean_themes_cache
引入
3.7.0
弃用
-

wp_clean_plugins_cache: 这是一个清除已安装插件的缓存的函数。它可以用来确保对插件所做的任何改动都能立即反映在网站上。

清除get_plugins()使用的插件缓存,默认情况下,插件更新缓存。

function wp_clean_plugins_cache( $clear_update_cache = true ) {
	if ( $clear_update_cache ) {
		delete_site_transient( 'update_plugins' );
	}
	wp_cache_delete( 'plugins', 'plugins' );
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-05 14:32:54

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

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

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