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:
parent
70aa7f9607
commit
2a29da4d31
|
@ -412,6 +412,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||
|
||||
// Force refresh of plugin update information
|
||||
delete_site_transient('update_plugins');
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -456,6 +457,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||
|
||||
// Force refresh of plugin update information
|
||||
delete_site_transient('update_plugins');
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
}
|
||||
|
||||
function bulk_upgrade($plugins) {
|
||||
|
@ -537,6 +539,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||
|
||||
// Force refresh of plugin update information
|
||||
delete_site_transient('update_plugins');
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
@ -763,6 +766,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||
|
||||
// Force refresh of theme update information
|
||||
delete_site_transient('update_themes');
|
||||
foreach ( wp_get_themes() as $theme )
|
||||
$theme->cache_delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -809,6 +814,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||
|
||||
// Force refresh of theme update information
|
||||
delete_site_transient('update_themes');
|
||||
foreach ( wp_get_themes() as $theme )
|
||||
$theme->cache_delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -896,6 +903,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||
|
||||
// Force refresh of theme update information
|
||||
delete_site_transient('update_themes');
|
||||
foreach ( wp_get_themes() as $theme )
|
||||
$theme->cache_delete();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue