WP_Feed_Cache_Transient::__construct( string $location, string $filename, string $extension )

In this article

Constructor.

Parameters

$locationstringrequired
URL location (scheme is used to determine handler).
$filenamestringrequired
Unique identifier for cache object.
$extensionstringrequired
'spi' or 'spc'.

Source

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.

Changelog

VersionDescription
3.2.0Updated to use a PHP5 constructor.
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.