wp_cache_themes_persistently filter-hookWP 3.4.0

Filters whether to get the cache of the registered theme directories.

Usage

add_filter( 'wp_cache_themes_persistently', 'wp_kama_cache_themes_persistently_filter', 10, 2 );

/**
 * Function for `wp_cache_themes_persistently` filter-hook.
 * 
 * @param bool   $cache_expiration Whether to get the cache of the theme directories.
 * @param string $context          The class or function name calling the filter.
 *
 * @return bool
 */
function wp_kama_cache_themes_persistently_filter( $cache_expiration, $context ){

	// filter...
	return $cache_expiration;
}
$cache_expiration(true|false)
Whether to get the cache of the theme directories.
Default: false
$context(string)
The class or function name calling the filter.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

search_theme_directories()
wp_cache_themes_persistently
WP_Theme::__construct()
wp_cache_themes_persistently
wp-includes/theme.php 487
$cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' );
wp-includes/class-wp-theme.php 255
self::$persistently_cache = apply_filters( 'wp_cache_themes_persistently', false, 'WP_Theme' );

Where the hook is used in WordPress

Usage not found.