Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-feed.php

    r11787 r17928  
    55
    66class WP_Feed_Cache extends SimplePie_Cache {
    7     /**
    8      * Don't call the constructor. Please.
    9      *
    10      * @access private
    11      */
    12     function WP_Feed_Cache() {
    13         trigger_error('Please call SimplePie_Cache::create() instead of the constructor', E_USER_ERROR);
    14     }
    15 
    167    /**
    178     * Create a new SimplePie_Cache object
     
    3021    var $lifetime = 43200; //Default lifetime in cache of 12 hours
    3122
    32     function WP_Feed_Cache_Transient($location, $filename, $extension) {
     23    function __construct($location, $filename, $extension) {
    3324        $this->name = 'feed_' . $filename;
    3425        $this->mod_name = 'feed_mod_' . $filename;
     
    6657class WP_SimplePie_File extends SimplePie_File {
    6758
    68     function WP_SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
     59    function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
    6960        $this->url = $url;
    7061        $this->timeout = $timeout;
     
    9081                $this->success = false;
    9182            } else {
    92                 $this->headers = $res['headers'];
    93                 $this->body = $res['body'];
    94                 $this->status_code = $res['response']['code'];
     83                $this->headers = wp_remote_retrieve_headers( $res );
     84                $this->body = wp_remote_retrieve_body( $res );
     85                $this->status_code = wp_remote_retrieve_response_code( $res );
    9586            }
    9687        } else {
Note: See TracChangeset for help on using the changeset viewer.