清除插件,主题和核心的现有更新缓存。
原型
wp_clean_update_cache()
源文件
路径:wp-includes/update.php
<?php
...
function wp_clean_update_cache() {
if ( function_exists( 'wp_clean_plugins_cache' ) ) {
wp_clean_plugins_cache();
} else {
delete_site_transient( 'update_plugins' );
}
wp_clean_themes_cache();
delete_site_transient( 'update_core' );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_clean_update_cache/