<?php
-if ( !class_exists('SimplePie') )
+if ( ! class_exists( 'SimplePie', false ) )
require_once( ABSPATH . WPINC . '/class-simplepie.php' );
class WP_Feed_Cache extends SimplePie_Cache {
*
* @static
* @access public
+ *
+ * @param string $location URL location (scheme is used to determine handler).
+ * @param string $filename Unique identifier for cache object.
+ * @param string $extension 'spi' or 'spc'.
+ * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients.
*/
public function create($location, $filename, $extension) {
return new WP_Feed_Cache_Transient($location, $filename, $extension);
public $mod_name;
public $lifetime = 43200; //Default lifetime in cache of 12 hours
+ /**
+ * Class instantiator.
+ *
+ * @param string $location URL location (scheme is used to determine handler).
+ * @param string $filename Unique identifier for cache object.
+ * @param string $extension 'spi' or 'spc'.
+ */
public function __construct($location, $filename, $extension) {
$this->name = 'feed_' . $filename;
$this->mod_name = 'feed_mod_' . $filename;
/**
* @access public
+ *
+ * @param SimplePie $data Data to save.
+ * @return true Always true.
*/
public function save($data) {
if ( $data instanceof SimplePie ) {