WP_Feed_Cache_Transient::save
Saves data to the transient.
Method of the class: WP_Feed_Cache_Transient{}
No Hooks.
Returns
true. Always true.
Usage
$WP_Feed_Cache_Transient = new WP_Feed_Cache_Transient(); $WP_Feed_Cache_Transient->save( $data );
- $data(array|SimplePie\SimplePie) (required)
- Data to save. If passed a SimplePie object, only cache the
$dataproperty.
Changelog
| Since 2.8.0 | Introduced. |
WP_Feed_Cache_Transient::save() WP Feed Cache Transient::save code WP 7.0.1
public function save( $data ) {
if ( $data instanceof SimplePie\SimplePie ) {
$data = $data->data;
}
set_site_transient( $this->name, $data, $this->lifetime );
set_site_transient( $this->mod_name, time(), $this->lifetime );
return true;
}