WP_Feed_Cache_Transient::save()publicWP 2.8.0

Sets the transient.

Метод класса: WP_Feed_Cache_Transient{}

Хуков нет.

Возвращает

true. Always true.

Использование

$WP_Feed_Cache_Transient = new WP_Feed_Cache_Transient();
$WP_Feed_Cache_Transient->save( $data );
$data(SimplePie) (обязательный)
Data to save.

Список изменений

С версии 2.8.0 Введена.

Код WP_Feed_Cache_Transient::save() WP 6.5.2

public function save( $data ) {
	if ( $data instanceof SimplePie ) {
		$data = $data->data;
	}

	set_transient( $this->name, $data, $this->lifetime );
	set_transient( $this->mod_name, time(), $this->lifetime );
	return true;
}