mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
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:
@@ -106,6 +106,18 @@ function wp_get_theme( $stylesheet = null, $theme_root = null ) {
|
||||
return new WP_Theme( $stylesheet, $theme_root );
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the cache held by get_theme_roots() and WP_Theme.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*/
|
||||
function wp_clean_themes_cache() {
|
||||
delete_site_transient('update_themes');
|
||||
search_theme_directories( true );
|
||||
foreach ( wp_get_themes( array( 'errors' => null ) ) as $theme )
|
||||
$theme->cache_delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a child theme is in use.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user