On this page
WP_Feed_Cache_Transient::__construct( string $location, string $filename, string $extension )
Constructor.
Parameters
$locationstring Required-
URL location (scheme is used to determine handler).
$filenamestring Required-
Unique identifier for cache object.
$extensionstring Required-
'spi'or'spc'.
Source
File: wp-includes/class-wp-feed-cache-transient.php. View all references
public function __construct( $location, $filename, $extension ) {
$this->name = 'feed_' . $filename;
$this->mod_name = 'feed_mod_' . $filename;
$lifetime = $this->lifetime;
/**
* Filters the transient lifetime of the feed cache.
*
* @since 2.8.0
*
* @param int $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
* @param string $filename Unique identifier for the cache object.
*/
$this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename );
}
Hooks
- apply_filters( 'wp_feed_cache_transient_lifetime',
int $lifetime ,string $filename ) -
Filters the transient lifetime of the feed cache.
Related
Uses
| Uses | Description |
|---|---|
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| WP_Feed_Cache::create() wp-includes/class-wp-feed-cache.php | Creates a new SimplePie_Cache object. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_feed_cache_transient/__construct