• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress core a2z

WordPress core a2z

WordPress core only

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / wp_clean_themes_cache() – Clears the cache held by get_theme_roots() and WP_Theme.

You appear to be a bot. Output may be restricted

Description

Clears the cache held by get_theme_roots() and WP_Theme.

Usage

wp_clean_themes_cache( $clear_update_cache );

Parameters

$clear_update_cache
( bool ) optional default: 1 – Whether to clear the theme updates cache.

Returns

void

Source

File name: wordpress/wp-includes/theme.php
Lines:

1 to 9 of 9
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();
  }
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Function name: wp_clean_themes_cache
Plugin ref: WordPress
Version: 5.7.1
Sourcefile: wp-includes/theme.php
File ref: wp-includes/theme.php
Deprecated?: No
API Letters: C,T,W

Footer

WP-a2z
WordPress core a2z
WordPress core only
WordPress 5.7.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  core.wp-a2z.org
© Copyright WP-a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites