WordPress.org

Make WordPress Core

Changeset 28505


Ignore:
Timestamp:
05/19/2014 05:26:48 AM (7 years ago)
Author:
wonderboymusic
Message:

Add access modifiers to methods/members in WP_Feed_Cache, WP_SimplePie_File, and WP_Feed_Cache_Transient.

See #27881, #22234.

File:
1 edited

Legend:

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

    r25733 r28505  
    1111     * @access public
    1212     */
    13     function create($location, $filename, $extension) {
     13    public function create($location, $filename, $extension) {
    1414        return new WP_Feed_Cache_Transient($location, $filename, $extension);
    1515    }
     
    1717
    1818class WP_Feed_Cache_Transient {
    19     var $name;
    20     var $mod_name;
    21     var $lifetime = 43200; //Default lifetime in cache of 12 hours
     19    public $name;
     20    public $mod_name;
     21    public $lifetime = 43200; //Default lifetime in cache of 12 hours
    2222
    23     function __construct($location, $filename, $extension) {
     23    public function __construct($location, $filename, $extension) {
    2424        $this->name = 'feed_' . $filename;
    2525        $this->mod_name = 'feed_mod_' . $filename;
     
    3737    }
    3838
    39     function save($data) {
     39    public function save($data) {
    4040        if ( is_a($data, 'SimplePie') )
    4141            $data = $data->data;
     
    4646    }
    4747
    48     function load() {
     48    public function load() {
    4949        return get_transient($this->name);
    5050    }
    5151
    52     function mtime() {
     52    public function mtime() {
    5353        return get_transient($this->mod_name);
    5454    }
    5555
    56     function touch() {
     56    public function touch() {
    5757        return set_transient($this->mod_name, time(), $this->lifetime);
    5858    }
    5959
    60     function unlink() {
     60    public function unlink() {
    6161        delete_transient($this->name);
    6262        delete_transient($this->mod_name);
     
    6767class WP_SimplePie_File extends SimplePie_File {
    6868
    69     function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
     69    public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
    7070        $this->url = $url;
    7171        $this->timeout = $timeout;
Note: See TracChangeset for help on using the changeset viewer.