Introduce wp_clean_themes_cache() for upgrades and testing. fixes #20954.

git-svn-id: https://develop.svn.wordpress.org/trunk@21080 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-06-14 14:24:25 +00:00
parent ae215d1321
commit 38bc915f96
2 changed files with 15 additions and 12 deletions

View File

@@ -763,10 +763,7 @@ class Theme_Upgrader extends WP_Upgrader {
return $this->result;
// Force refresh of theme update information
delete_site_transient('update_themes');
search_theme_directories( true );
foreach ( wp_get_themes() as $theme )
$theme->cache_delete();
wp_clean_themes_cache();
return true;
}
@@ -812,10 +809,7 @@ class Theme_Upgrader extends WP_Upgrader {
return $this->result;
// Force refresh of theme update information
delete_site_transient('update_themes');
search_theme_directories( true );
foreach ( wp_get_themes() as $theme )
$theme->cache_delete();
wp_clean_themes_cache();
return true;
}
@@ -902,10 +896,7 @@ class Theme_Upgrader extends WP_Upgrader {
remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
// Force refresh of theme update information
delete_site_transient('update_themes');
search_theme_directories( true );
foreach ( wp_get_themes() as $theme )
$theme->cache_delete();
wp_clean_themes_cache();
return $results;
}