wp_cache_themes_persistently

This action is documented in wp-includes/theme.php.

Description

apply_filters( 'wp_cache_themes_persistently', (bool) $false, (string) $wp_theme ); 

Parameters (2)

0. $false (bool) => false
The false.
1. $wp_theme (string) => 'WP_Theme'
The wp theme.

Usage

To run the hook, copy the example below.
  1. $false = apply_filters( 'wp_cache_themes_persistently', $false, $wp_theme ); 
  2.  
  3. if ( !empty( $false ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_cache_themes_persistently callback 
  2. function filter_wp_cache_themes_persistently( $false, $wp_theme ) { 
  3. // make filter magic happen here... 
  4. return $false
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_cache_themes_persistently', 'filter_wp_cache_themes_persistently', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_cache_themes_persistently', 'filter_wp_cache_themes_persistently', 10, 2 ); 

Defined (2)

The filter is defined in the following location(s).

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