wp_clean_plugins_cache() - WordPress 函数参考中文文档

返回介绍

wp_clean_plugins_cache()

发布于 2017-09-11 字数1677 浏览 780 评论 0

wp_clean_plugins_cache( bool $clear_update_cache = true )

Clears the Plugins cache used by get_plugins() and by default, the Plugin Update cache.


描述


参数

$clear_update_cache

(bool)
(Optional)
Whether to clear the Plugin updates cache

Default value: true


源代码

File: wp-admin/includes/plugin.php

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

更新日志

Version 描述
3.7.0 Introduced.

相关函数

Uses

  • wp-includes/cache.php:
    wp_cache_delete()
  • wp-includes/option.php:
    delete_site_transient()

Used By

  • wp-includes/update.php:
    wp_clean_update_cache()
  • wp-admin/includes/class-wp-automatic-updater.php:
    WP_Automatic_Updater::run()
  • wp-admin/includes/class-plugin-upgrader.php:
    Plugin_Upgrader::bulk_upgrade()
  • wp-admin/includes/class-plugin-upgrader.php:
    Plugin_Upgrader::install()
  • wp-admin/includes/class-plugin-upgrader.php:
    Plugin_Upgrader::upgrade()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!