WP_Feed_Cache_Transient::__construct() public WP 2.8.0
Constructor.
{} Это метод класса: WP_Feed_Cache_Transient{}
Хуки из метода
Возвращает
Null. Ничего.
Использование
$WP_Feed_Cache_Transient = new WP_Feed_Cache_Transient(); $WP_Feed_Cache_Transient->__construct( $location, $filename, $extension );
- $location(строка) (обязательный)
- URL location (scheme is used to determine handler).
- $filename(строка) (обязательный)
- Unique identifier for cache object.
- $extension(строка) (обязательный)
- 'spi' or 'spc'.
Список изменений
С версии 2.8.0 | Введена. |
С версии 3.2.0 | Updated to use a PHP5 constructor. |
Код WP_Feed_Cache_Transient::__construct() WP Feed Cache Transient:: construct WP 5.6
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 );
}