Upgrader: Make clearing the Plugin and Theme update caches optional during install and upgrade proceedures. See #22704

git-svn-id: https://develop.svn.wordpress.org/trunk@25272 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2013-09-06 01:32:09 +00:00
parent 760d5825ad
commit 9095e4b866
3 changed files with 130 additions and 79 deletions
+4 -2
View File
@@ -110,9 +110,11 @@ function wp_get_theme( $stylesheet = null, $theme_root = null ) {
* Clears the cache held by get_theme_roots() and WP_Theme.
*
* @since 3.5.0
* @param bool $clear_update_cache Whether to clear the Theme updates cache
*/
function wp_clean_themes_cache() {
delete_site_transient('update_themes');
function wp_clean_themes_cache( $clear_update_cache = true ) {
if ( $clear_update_cache )
delete_site_transient( 'update_themes' );
search_theme_directories( true );
foreach ( wp_get_themes( array( 'errors' => null ) ) as $theme )
$theme->cache_delete();