wppaste
WordPress

WP_Feed_Cache_Transient::__construct( string $location, string $name, Base::TYPE_FEED|Base::TYPE_IMAGE $type )

Since
2.8.0, 3.2.0, 6.7.0
Source
wp-includes/class-wp-feed-cache-transient.php:57
Creates a new (transient) cache object.

Parameters

$locationstring
URL location (scheme is used to determine handler).
$namestring
Unique identifier for cache object.
$typeBase::TYPE_FEED|Base::TYPE_IMAGE
Either TYPE_FEED ('spc') for SimplePie data, or TYPE_IMAGE ('spi') for image data.

Hooks fired · 1

One hook fires while WP_Feed_Cache_Transient::__construct() runs, in this order:

  1. apply_filters( wp_feed_cache_transient_lifetime )filterline 70 (+13 into the body)

    Filters the transient lifetime of the feed cache.

Uses · 1

  • apply_filters()Calls the callback functions that have been added to a filter hook.

Used by · 1

Source

	public function __construct( $location, $name, $type ) {		$this->name     = 'feed_' . $name;		$this->mod_name = 'feed_mod_' . $name; 		$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 $name     Unique identifier for the cache object.		 */		$this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $name );	}

History

Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.7.0
Parameter names have been updated to be in line with the SimplePie\Cache\Base interface.from the docblock
3.2.0
Updated to use a PHP5 constructor.from the docblock
2.8.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/class-wp-feed-cache-transient.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.