WordPress 4.3
[autoinstalls/wordpress.git] / wp-includes / class-feed.php
index 9aa144a52b91ce2dd0108be8ac57a3b751574054..6e109e161616be4e4919d15e555d9c0ffe3a0c05 100644 (file)
@@ -36,27 +36,43 @@ class WP_Feed_Cache_Transient {
                $this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename);
        }
 
+       /**
+        * @access public
+        */
        public function save($data) {
-               if ( is_a($data, 'SimplePie') )
+               if ( $data instanceof SimplePie ) {
                        $data = $data->data;
+               }
 
                set_transient($this->name, $data, $this->lifetime);
                set_transient($this->mod_name, time(), $this->lifetime);
                return true;
        }
 
+       /**
+        * @access public
+        */
        public function load() {
                return get_transient($this->name);
        }
 
+       /**
+        * @access public
+        */
        public function mtime() {
                return get_transient($this->mod_name);
        }
 
+       /**
+        * @access public
+        */
        public function touch() {
                return set_transient($this->mod_name, time(), $this->lifetime);
        }
 
+       /**
+        * @access public
+        */
        public function unlink() {
                delete_transient($this->name);
                delete_transient($this->mod_name);