mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-14 05:40:30 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user