Clear WP_Theme caches on update. fixes #20331.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-03-30 14:46:52 +00:00
parent 70aa7f9607
commit 2a29da4d31
1 changed files with 9 additions and 0 deletions

View File

@ -412,6 +412,7 @@ class Plugin_Upgrader extends WP_Upgrader {
// Force refresh of plugin update information // Force refresh of plugin update information
delete_site_transient('update_plugins'); delete_site_transient('update_plugins');
wp_cache_delete( 'plugins', 'plugins' );
return true; return true;
} }
@ -456,6 +457,7 @@ class Plugin_Upgrader extends WP_Upgrader {
// Force refresh of plugin update information // Force refresh of plugin update information
delete_site_transient('update_plugins'); delete_site_transient('update_plugins');
wp_cache_delete( 'plugins', 'plugins' );
} }
function bulk_upgrade($plugins) { function bulk_upgrade($plugins) {
@ -537,6 +539,7 @@ class Plugin_Upgrader extends WP_Upgrader {
// Force refresh of plugin update information // Force refresh of plugin update information
delete_site_transient('update_plugins'); delete_site_transient('update_plugins');
wp_cache_delete( 'plugins', 'plugins' );
return $results; return $results;
} }
@ -763,6 +766,8 @@ class Theme_Upgrader extends WP_Upgrader {
// Force refresh of theme update information // Force refresh of theme update information
delete_site_transient('update_themes'); delete_site_transient('update_themes');
foreach ( wp_get_themes() as $theme )
$theme->cache_delete();
return true; return true;
} }
@ -809,6 +814,8 @@ class Theme_Upgrader extends WP_Upgrader {
// Force refresh of theme update information // Force refresh of theme update information
delete_site_transient('update_themes'); delete_site_transient('update_themes');
foreach ( wp_get_themes() as $theme )
$theme->cache_delete();
return true; return true;
} }
@ -896,6 +903,8 @@ class Theme_Upgrader extends WP_Upgrader {
// Force refresh of theme update information // Force refresh of theme update information
delete_site_transient('update_themes'); delete_site_transient('update_themes');
foreach ( wp_get_themes() as $theme )
$theme->cache_delete();
return $results; return $results;
} }