On this page
wp_clean_update_cache()
Clears existing update caches for plugins, themes, and core.
Source
File: wp-includes/update.php. View all references
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' );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_clean_plugins_cache() wp-admin/includes/plugin.php | Clears the plugins cache used by get_plugins() and by default, the plugin updates cache. |
| wp_clean_themes_cache() wp-includes/theme.php | Clears the cache held by get_theme_roots() and WP_Theme. |
| delete_site_transient() wp-includes/option.php | Deletes a site transient. |
Used By
| Used By | Description |
|---|---|
| WP_Automatic_Updater::run() wp-admin/includes/class-wp-automatic-updater.php | Kicks off the background update process, looping through all pending updates. |
| Language_Pack_Upgrader::bulk_upgrade() wp-admin/includes/class-language-pack-upgrader.php | Bulk upgrade language packs. |
Changelog
| Version | Description |
|---|---|
| 4.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_clean_update_cache