Ticket #36669: update-simplepie.patch
File update-simplepie.patch, 86.6 KB (added by , 8 years ago) |
---|
-
wp-includes/SimplePie/Author.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Cache/Base.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Cache/DB.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Cache/File.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 136 135 */ 137 136 public function mtime() 138 137 { 139 if (file_exists($this->name)) 140 { 141 return filemtime($this->name); 142 } 143 return false; 138 return @filemtime($this->name); 144 139 } 145 140 146 141 /** … … 150 145 */ 151 146 public function touch() 152 147 { 153 if (file_exists($this->name)) 154 { 155 return touch($this->name); 156 } 157 return false; 148 return @touch($this->name); 158 149 } 159 150 160 151 /** -
wp-includes/SimplePie/Cache/Memcache.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 95 94 'prefix' => 'simplepie_', 96 95 ), 97 96 ); 98 $parsed = SimplePie_Cache::parse_URL($location); 99 $this->options['host'] = empty($parsed['host']) ? $this->options['host'] : $parsed['host']; 100 $this->options['port'] = empty($parsed['port']) ? $this->options['port'] : $parsed['port']; 101 $this->options['extras'] = array_merge($this->options['extras'], $parsed['extras']); 97 $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location)); 98 102 99 $this->name = $this->options['extras']['prefix'] . md5("$name:$type"); 103 100 104 101 $this->cache = new Memcache(); … … 147 144 148 145 if ($data !== false) 149 146 { 150 // essentially ignore the mtime because Memcache expires on it 's own147 // essentially ignore the mtime because Memcache expires on its own 151 148 return time(); 152 149 } 153 150 … … 165 162 166 163 if ($data !== false) 167 164 { 168 return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this-> duration);165 return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']); 169 166 } 170 167 171 168 return false; -
wp-includes/SimplePie/Cache/Memcached.php
1 <?php 2 /** 3 * SimplePie 4 * 5 * A PHP-Based RSS and Atom Feed Framework. 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 * 8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without modification, are 12 * permitted provided that the following conditions are met: 13 * 14 * * Redistributions of source code must retain the above copyright notice, this list of 15 * conditions and the following disclaimer. 16 * 17 * * Redistributions in binary form must reproduce the above copyright notice, this list 18 * of conditions and the following disclaimer in the documentation and/or other materials 19 * provided with the distribution. 20 * 21 * * Neither the name of the SimplePie Team nor the names of its contributors may be used 22 * to endorse or promote products derived from this software without specific prior 23 * written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 26 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 27 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 28 * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 * @package SimplePie 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 37 * @author Ryan Parman 38 * @author Geoffrey Sneddon 39 * @author Ryan McCue 40 * @link http://simplepie.org/ SimplePie 41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 42 */ 43 44 /** 45 * Caches data to memcached 46 * 47 * Registered for URLs with the "memcached" protocol 48 * 49 * For example, `memcached://localhost:11211/?timeout=3600&prefix=sp_` will 50 * connect to memcached on `localhost` on port 11211. All tables will be 51 * prefixed with `sp_` and data will expire after 3600 seconds 52 * 53 * @package SimplePie 54 * @subpackage Caching 55 * @author Paul L. McNeely 56 * @uses Memcached 57 */ 58 class SimplePie_Cache_Memcached implements SimplePie_Cache_Base 59 { 60 /** 61 * Memcached instance 62 * @var Memcached 63 */ 64 protected $cache; 65 66 /** 67 * Options 68 * @var array 69 */ 70 protected $options; 71 72 /** 73 * Cache name 74 * @var string 75 */ 76 protected $name; 77 78 /** 79 * Create a new cache object 80 * @param string $location Location string (from SimplePie::$cache_location) 81 * @param string $name Unique ID for the cache 82 * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data 83 */ 84 public function __construct($location, $name, $type) { 85 $this->options = array( 86 'host' => '127.0.0.1', 87 'port' => 11211, 88 'extras' => array( 89 'timeout' => 3600, // one hour 90 'prefix' => 'simplepie_', 91 ), 92 ); 93 $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location)); 94 95 $this->name = $this->options['extras']['prefix'] . md5("$name:$type"); 96 97 $this->cache = new Memcached(); 98 $this->cache->addServer($this->options['host'], (int)$this->options['port']); 99 } 100 101 /** 102 * Save data to the cache 103 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property 104 * @return bool Successfulness 105 */ 106 public function save($data) { 107 if ($data instanceof SimplePie) { 108 $data = $data->data; 109 } 110 111 return $this->setData(serialize($data)); 112 } 113 114 /** 115 * Retrieve the data saved to the cache 116 * @return array Data for SimplePie::$data 117 */ 118 public function load() { 119 $data = $this->cache->get($this->name); 120 121 if ($data !== false) { 122 return unserialize($data); 123 } 124 return false; 125 } 126 127 /** 128 * Retrieve the last modified time for the cache 129 * @return int Timestamp 130 */ 131 public function mtime() { 132 $data = $this->cache->get($this->name . '_mtime'); 133 return (int) $data; 134 } 135 136 /** 137 * Set the last modified time to the current time 138 * @return bool Success status 139 */ 140 public function touch() { 141 $data = $this->cache->get($this->name); 142 return $this->setData($data); 143 } 144 145 /** 146 * Remove the cache 147 * @return bool Success status 148 */ 149 public function unlink() { 150 return $this->cache->delete($this->name, 0); 151 } 152 153 /** 154 * Set the last modified time and data to Memcached 155 * @return bool Success status 156 */ 157 private function setData($data) { 158 159 if ($data !== false) { 160 $this->cache->set($this->name . '_mtime', time(), (int)$this->options['extras']['timeout']); 161 return $this->cache->set($this->name, $data, (int)$this->options['extras']['timeout']); 162 } 163 164 return false; 165 } 166 } -
wp-includes/SimplePie/Cache/MySQL.php
Property changes on: wp-includes/SimplePie/Cache/Memcached.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 94 93 'path' => '', 95 94 'extras' => array( 96 95 'prefix' => '', 96 'cache_purge_time' => 2592000 97 97 ), 98 98 ); 99 $this->options = array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location)); 99 100 $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location)); 100 101 101 102 // Path is prefixed with a "/" 102 103 $this->options['dbname'] = substr($this->options['path'], 1); … … 130 131 $query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'cache_data` (`id` TEXT CHARACTER SET utf8 NOT NULL, `items` SMALLINT NOT NULL DEFAULT 0, `data` BLOB NOT NULL, `mtime` INT UNSIGNED NOT NULL, UNIQUE (`id`(125)))'); 131 132 if ($query === false) 132 133 { 134 trigger_error("Can't create " . $this->options['extras']['prefix'] . "cache_data table, check permissions", E_USER_WARNING); 133 135 $this->mysql = null; 136 return; 134 137 } 135 138 } 136 139 137 140 if (!in_array($this->options['extras']['prefix'] . 'items', $db)) 138 141 { 139 $query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` TEXT CHARACTER SET utf8NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))');142 $query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` MEDIUMBLOB NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))'); 140 143 if ($query === false) 141 144 { 145 trigger_error("Can't create " . $this->options['extras']['prefix'] . "items table, check permissions", E_USER_WARNING); 142 146 $this->mysql = null; 147 return; 143 148 } 144 149 } 145 150 } … … 157 162 return false; 158 163 } 159 164 165 $query = $this->mysql->prepare('DELETE i, cd FROM `' . $this->options['extras']['prefix'] . 'cache_data` cd, ' . 166 '`' . $this->options['extras']['prefix'] . 'items` i ' . 167 'WHERE cd.id = i.feed_id ' . 168 'AND cd.mtime < (unix_timestamp() - :purge_time)'); 169 $query->bindValue(':purge_time', $this->options['extras']['cache_purge_time']); 170 171 if (!$query->execute()) 172 { 173 return false; 174 } 175 160 176 if ($data instanceof SimplePie) 161 177 { 162 178 $data = clone $data; -
wp-includes/SimplePie/Cache/Redis.php
1 <?php 2 3 /** 4 * SimplePie Redis Cache Extension 5 * 6 * @package SimplePie 7 * @author Jan Kozak <galvani78@gmail.com> 8 * @link http://galvani.cz/ 9 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 10 * @version 0.2.9 11 */ 12 13 14 /** 15 * Caches data to redis 16 * 17 * Registered for URLs with the "redis" protocol 18 * 19 * For example, `redis://localhost:6379/?timeout=3600&prefix=sp_&dbIndex=0` will 20 * connect to redis on `localhost` on port 6379. All tables will be 21 * prefixed with `simple_primary-` and data will expire after 3600 seconds 22 * 23 * @package SimplePie 24 * @subpackage Caching 25 * @uses Redis 26 */ 27 class SimplePie_Cache_Redis implements SimplePie_Cache_Base { 28 /** 29 * Redis instance 30 * 31 * @var \Redis 32 */ 33 protected $cache; 34 35 /** 36 * Options 37 * 38 * @var array 39 */ 40 protected $options; 41 42 /** 43 * Cache name 44 * 45 * @var string 46 */ 47 protected $name; 48 49 /** 50 * Cache Data 51 * 52 * @var type 53 */ 54 protected $data; 55 56 /** 57 * Create a new cache object 58 * 59 * @param string $location Location string (from SimplePie::$cache_location) 60 * @param string $name Unique ID for the cache 61 * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data 62 */ 63 public function __construct($location, $name, $options = null) { 64 //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance(); 65 $parsed = SimplePie_Cache::parse_URL($location); 66 $redis = new Redis(); 67 $redis->connect($parsed['host'], $parsed['port']); 68 $this->cache = $redis; 69 70 if (!is_null($options) && is_array($options)) { 71 $this->options = $options; 72 } else { 73 $this->options = array ( 74 'prefix' => 'rss:simple_primary:', 75 'expire' => 0, 76 ); 77 } 78 79 $this->name = $this->options['prefix'] . $name; 80 } 81 82 /** 83 * @param \Redis $cache 84 */ 85 public function setRedisClient(\Redis $cache) { 86 $this->cache = $cache; 87 } 88 89 /** 90 * Save data to the cache 91 * 92 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property 93 * @return bool Successfulness 94 */ 95 public function save($data) { 96 if ($data instanceof SimplePie) { 97 $data = $data->data; 98 } 99 $response = $this->cache->set($this->name, serialize($data)); 100 if ($this->options['expire']) { 101 $this->cache->expire($this->name, $this->options['expire']); 102 } 103 104 return $response; 105 } 106 107 /** 108 * Retrieve the data saved to the cache 109 * 110 * @return array Data for SimplePie::$data 111 */ 112 public function load() { 113 $data = $this->cache->get($this->name); 114 115 if ($data !== false) { 116 return unserialize($data); 117 } 118 return false; 119 } 120 121 /** 122 * Retrieve the last modified time for the cache 123 * 124 * @return int Timestamp 125 */ 126 public function mtime() { 127 128 $data = $this->cache->get($this->name); 129 130 if ($data !== false) { 131 return time(); 132 } 133 134 return false; 135 } 136 137 /** 138 * Set the last modified time to the current time 139 * 140 * @return bool Success status 141 */ 142 public function touch() { 143 144 $data = $this->cache->get($this->name); 145 146 if ($data !== false) { 147 $return = $this->cache->set($this->name, $data); 148 if ($this->options['expire']) { 149 return $this->cache->expire($this->name, $this->ttl); 150 } 151 return $return; 152 } 153 154 return false; 155 } 156 157 /** 158 * Remove the cache 159 * 160 * @return bool Success status 161 */ 162 public function unlink() { 163 return $this->cache->set($this->name, null); 164 } 165 166 } -
wp-includes/SimplePie/Cache.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 62 61 * @var array 63 62 */ 64 63 protected static $handlers = array( 65 'mysql' => 'SimplePie_Cache_MySQL', 66 'memcache' => 'SimplePie_Cache_Memcache', 64 'mysql' => 'SimplePie_Cache_MySQL', 65 'memcache' => 'SimplePie_Cache_Memcache', 66 'memcached' => 'SimplePie_Cache_Memcached', 67 'redis' => 'SimplePie_Cache_Redis' 67 68 ); 68 69 69 70 /** -
wp-includes/SimplePie/Caption.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Category.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Content/Type/Sniffer.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Copyright.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Core.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-20 09, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Credit.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Decode/HTML/Entities.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 169 168 case "\x09": 170 169 case "\x0A": 171 170 case "\x0B": 172 case "\x0B":173 171 case "\x0C": 174 172 case "\x20": 175 173 case "\x3C": -
wp-includes/SimplePie/Enclosure.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 451 450 /** 452 451 * Get the duration of the enclosure 453 452 * 454 * @param string$convert Convert seconds into hh:mm:ss453 * @param bool $convert Convert seconds into hh:mm:ss 455 454 * @return string|int|null 'hh:mm:ss' string if `$convert` was specified, otherwise integer (or null if none found) 456 455 */ 457 456 public function get_duration($convert = false) … … 942 941 * - `height` (integer): The height of the embedded media. Accepts any 943 942 * numeric pixel value (such as `360`) or `auto`. Defaults to `auto`, 944 943 * and it is recommended that you use this default. 945 * - `loop` (boolean): Do you want the media to loop when it s done?944 * - `loop` (boolean): Do you want the media to loop when it's done? 946 945 * Defaults to `false`. 947 946 * - `mediaplayer` (string): The location of the included 948 947 * `mediaplayer.swf` file. This allows for the playback of Flash Video -
wp-includes/SimplePie/Exception.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.4-dev 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/File.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 64 63 var $redirects = 0; 65 64 var $error; 66 65 var $method = SIMPLEPIE_FILE_SOURCE_NONE; 66 var $permanent_url; 67 67 68 public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false )68 public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false, $curl_options = array()) 69 69 { 70 70 if (class_exists('idna_convert')) 71 71 { … … 74 74 $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); 75 75 } 76 76 $this->url = $url; 77 $this->permanent_url = $url; 77 78 $this->useragent = $useragent; 78 79 if (preg_match('/^http(s)?:\/\//i', $url)) 79 80 { … … 102 103 curl_setopt($fp, CURLOPT_URL, $url); 103 104 curl_setopt($fp, CURLOPT_HEADER, 1); 104 105 curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1); 106 curl_setopt($fp, CURLOPT_FAILONERROR, 1); 105 107 curl_setopt($fp, CURLOPT_TIMEOUT, $timeout); 106 108 curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout); 107 109 curl_setopt($fp, CURLOPT_REFERER, $url); … … 112 114 curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); 113 115 curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); 114 116 } 117 foreach ($curl_options as $curl_param => $curl_value) { 118 curl_setopt($fp, $curl_param, $curl_value); 119 } 115 120 116 121 $this->headers = curl_exec($fp); 117 122 if (curl_errno($fp) === 23 || curl_errno($fp) === 61) … … 126 131 } 127 132 else 128 133 { 129 $info = curl_getinfo($fp); 134 // Use the updated url provided by curl_getinfo after any redirects. 135 if ($info = curl_getinfo($fp)) { 136 $this->url = $info['url']; 137 } 130 138 curl_close($fp); 131 139 $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1); 132 140 $this->headers = array_pop($this->headers); … … 140 148 { 141 149 $this->redirects++; 142 150 $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); 143 return $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); 151 $previousStatusCode = $this->status_code; 152 $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); 153 $this->permanent_url = ($previousStatusCode == 301) ? $location : $url; 154 return; 144 155 } 145 156 } 146 157 } … … 222 233 { 223 234 $this->redirects++; 224 235 $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); 225 return $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); 236 $previousStatusCode = $this->status_code; 237 $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); 238 $this->permanent_url = ($previousStatusCode == 301) ? $location : $url; 239 return; 226 240 } 227 241 if (isset($this->headers['content-encoding'])) 228 242 { … … 282 296 else 283 297 { 284 298 $this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS; 285 if ( !$this->body = file_get_contents($url))299 if (empty($url) || !($this->body = file_get_contents($url))) 286 300 { 287 301 $this->error = 'file_get_contents could not read the file'; 288 302 $this->success = false; -
wp-includes/SimplePie/HTTP/Parser.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/IRI.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 260 259 } 261 260 262 261 /** 262 * Clean up 263 */ 264 public function __destruct() { 265 $this->set_iri(null, true); 266 $this->set_path(null, true); 267 $this->set_authority(null, true); 268 } 269 270 /** 263 271 * Create a new IRI object by resolving a relative IRI 264 272 * 265 273 * Returns false if $base is not absolute, otherwise an IRI. … … 797 805 * @param string $iri 798 806 * @return bool 799 807 */ 800 public function set_iri($iri )808 public function set_iri($iri, $clear_cache = false) 801 809 { 802 810 static $cache; 811 if ($clear_cache) 812 { 813 $cache = null; 814 return; 815 } 803 816 if (!$cache) 804 817 { 805 818 $cache = array(); … … 879 892 * @param string $authority 880 893 * @return bool 881 894 */ 882 public function set_authority($authority )895 public function set_authority($authority, $clear_cache = false) 883 896 { 884 897 static $cache; 898 if ($clear_cache) 899 { 900 $cache = null; 901 return; 902 } 885 903 if (!$cache) 886 904 $cache = array(); 887 905 … … 1049 1067 * @param string $ipath 1050 1068 * @return bool 1051 1069 */ 1052 public function set_path($ipath )1070 public function set_path($ipath, $clear_cache = false) 1053 1071 { 1054 1072 static $cache; 1073 if ($clear_cache) 1074 { 1075 $cache = null; 1076 return; 1077 } 1055 1078 if (!$cache) 1056 1079 { 1057 1080 $cache = array(); -
wp-includes/SimplePie/Item.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 238 237 { 239 238 return $this->sanitize($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about'], SIMPLEPIE_CONSTRUCT_TEXT); 240 239 } 241 elseif (($return = $this->get_permalink()) !== null)242 {243 return $return;244 }245 elseif (($return = $this->get_title()) !== null)246 {247 return $return;248 }249 240 } 250 if ($this->get_permalink() !== null || $this->get_title() !== null) 251 { 252 return md5($this->get_permalink() . $this->get_title()); 253 } 254 else 255 { 256 return md5(serialize($this->data)); 257 } 241 return md5(serialize($this->data)); 258 242 } 259 243 260 244 /** … … 406 390 return null; 407 391 } 408 392 } 393 394 /** 395 * Get the media:thumbnail of the item 396 * 397 * Uses `<media:thumbnail>` 398 * 399 * 400 * @return array|null 401 */ 402 public function get_thumbnail() 403 { 404 if (!isset($this->data['thumbnail'])) 405 { 406 if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail')) 407 { 408 $this->data['thumbnail'] = $return[0]['attribs']['']; 409 } 410 else 411 { 412 $this->data['thumbnail'] = null; 413 } 414 } 415 return $this->data['thumbnail']; 416 } 409 417 410 418 /** 411 419 * Get a category for the item … … 446 454 $label = null; 447 455 if (isset($category['attribs']['']['term'])) 448 456 { 449 $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_ TEXT);457 $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_HTML); 450 458 } 451 459 if (isset($category['attribs']['']['scheme'])) 452 460 { 453 $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_ TEXT);461 $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_HTML); 454 462 } 455 463 if (isset($category['attribs']['']['label'])) 456 464 { 457 $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_ TEXT);465 $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_HTML); 458 466 } 459 467 $categories[] = $this->registry->create('Category', array($term, $scheme, $label)); 460 468 } … … 462 470 { 463 471 // This is really the label, but keep this as the term also for BC. 464 472 // Label will also work on retrieving because that falls back to term. 465 $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_ TEXT);473 $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML); 466 474 if (isset($category['attribs']['']['domain'])) 467 475 { 468 $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_ TEXT);476 $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_HTML); 469 477 } 470 478 else 471 479 { … … 475 483 } 476 484 foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) 477 485 { 478 $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_ TEXT), null, null));486 $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); 479 487 } 480 488 foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) 481 489 { 482 $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_ TEXT), null, null));490 $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); 483 491 } 484 492 485 493 if (!empty($categories)) … … 616 624 $email = null; 617 625 if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) 618 626 { 619 $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_ TEXT);627 $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML); 620 628 } 621 629 if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) 622 630 { … … 624 632 } 625 633 if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) 626 634 { 627 $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_ TEXT);635 $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML); 628 636 } 629 637 if ($name !== null || $email !== null || $uri !== null) 630 638 { … … 638 646 $email = null; 639 647 if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) 640 648 { 641 $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_ TEXT);649 $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML); 642 650 } 643 651 if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) 644 652 { … … 646 654 } 647 655 if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) 648 656 { 649 $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_ TEXT);657 $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML); 650 658 } 651 659 if ($name !== null || $email !== null || $url !== null) 652 660 { … … 655 663 } 656 664 if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'author')) 657 665 { 658 $authors[] = $this->registry->create('Author', array(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_ TEXT)));666 $authors[] = $this->registry->create('Author', array(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_HTML))); 659 667 } 660 668 foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author) 661 669 { 662 $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_ TEXT), null, null));670 $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); 663 671 } 664 672 foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author) 665 673 { 666 $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_ TEXT), null, null));674 $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); 667 675 } 668 676 foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author) 669 677 { 670 $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_ TEXT), null, null));678 $authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); 671 679 } 672 680 673 681 if (!empty($authors)) … … 738 746 { 739 747 $this->data['date']['raw'] = $return[0]['data']; 740 748 } 741 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ ATOM_10, 'updated'))749 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'pubDate')) 742 750 { 743 751 $this->data['date']['raw'] = $return[0]['data']; 744 752 } 745 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ ATOM_03, 'issued'))753 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'date')) 746 754 { 747 755 $this->data['date']['raw'] = $return[0]['data']; 748 756 } 749 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ ATOM_03, 'created'))757 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'date')) 750 758 { 751 759 $this->data['date']['raw'] = $return[0]['data']; 752 760 } 753 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_ 03, 'modified'))761 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated')) 754 762 { 755 763 $this->data['date']['raw'] = $return[0]['data']; 756 764 } 757 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ RSS_20, 'pubDate'))765 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'issued')) 758 766 { 759 767 $this->data['date']['raw'] = $return[0]['data']; 760 768 } 761 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ DC_11, 'date'))769 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'created')) 762 770 { 763 771 $this->data['date']['raw'] = $return[0]['data']; 764 772 } 765 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ DC_10, 'date'))773 elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'modified')) 766 774 { 767 775 $this->data['date']['raw'] = $return[0]['data']; 768 776 } … … 821 829 if (!empty($this->data['updated']['raw'])) 822 830 { 823 831 $parser = $this->registry->call('Parse_Date', 'get'); 824 $this->data['updated']['parsed'] = $parser->parse($this->data[' date']['raw']);832 $this->data['updated']['parsed'] = $parser->parse($this->data['updated']['raw']); 825 833 } 826 834 else 827 835 { … … 1080 1088 * 1081 1089 * @since Beta 2 1082 1090 * @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4). 1083 * @todo If an element exists at a level, but it 's value is empty, we should fall back to the value from the parent (if it exists).1091 * @todo If an element exists at a level, but its value is empty, we should fall back to the value from the parent (if it exists). 1084 1092 * @return array|null List of SimplePie_Enclosure items 1085 1093 */ 1086 1094 public function get_enclosures() … … 2658 2666 // PLAYER 2659 2667 if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) 2660 2668 { 2661 $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); 2669 if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'])) { 2670 $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); 2671 } 2662 2672 } 2663 2673 else 2664 2674 { … … 2733 2743 { 2734 2744 foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) 2735 2745 { 2736 $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); 2746 if (isset($thumbnail['attribs']['']['url'])) { 2747 $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); 2748 } 2737 2749 } 2738 2750 if (is_array($thumbnails)) 2739 2751 { -
wp-includes/SimplePie/Locator.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 121 120 { 122 121 if ($type & SIMPLEPIE_LOCATOR_LOCAL_EXTENSION && $working = $this->extension($this->local)) 123 122 { 124 return $working ;123 return $working[0]; 125 124 } 126 125 127 126 if ($type & SIMPLEPIE_LOCATOR_LOCAL_BODY && $working = $this->body($this->local)) 128 127 { 129 return $working ;128 return $working[0]; 130 129 } 131 130 132 131 if ($type & SIMPLEPIE_LOCATOR_REMOTE_EXTENSION && $working = $this->extension($this->elsewhere)) 133 132 { 134 return $working ;133 return $working[0]; 135 134 } 136 135 137 136 if ($type & SIMPLEPIE_LOCATOR_REMOTE_BODY && $working = $this->body($this->elsewhere)) 138 137 { 139 return $working ;138 return $working[0]; 140 139 } 141 140 } 142 141 return null; 143 142 } 144 143 145 public function is_feed($file )144 public function is_feed($file, $check_html = false) 146 145 { 147 146 if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) 148 147 { 149 148 $sniffer = $this->registry->create('Content_Type_Sniffer', array($file)); 150 149 $sniffed = $sniffer->get_type(); 151 if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) 150 $mime_types = array('application/rss+xml', 'application/rdf+xml', 151 'text/rdf', 'application/atom+xml', 'text/xml', 152 'application/xml', 'application/x-rss+xml'); 153 if ($check_html) 152 154 { 155 $mime_types[] = 'text/html'; 156 } 157 if (in_array($sniffed, $mime_types)) 158 { 153 159 return true; 154 160 } 155 161 else … … 242 248 continue; 243 249 } 244 250 245 if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !in_array('stylesheet', $rel) && $link->hasAttribute('type') && in_array(strtolower($this->registry->call('Misc', 'parse_mime', array($link->getAttribute('type')))), array(' application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href]))251 if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !in_array('stylesheet', $rel) && $link->hasAttribute('type') && in_array(strtolower($this->registry->call('Misc', 'parse_mime', array($link->getAttribute('type')))), array('text/html', 'application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href])) 246 252 { 247 253 $this->checked_feeds++; 248 254 $headers = array( … … 249 255 'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1', 250 256 ); 251 257 $feed = $this->registry->create('File', array($href, $this->timeout, 5, $headers, $this->useragent)); 252 if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed ))258 if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed, true)) 253 259 { 254 260 $feeds[$href] = $feed; 255 261 } … … 330 336 $feed = $this->registry->create('File', array($value, $this->timeout, 5, $headers, $this->useragent)); 331 337 if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) 332 338 { 333 return $feed;339 return array($feed); 334 340 } 335 341 else 336 342 { … … 358 364 $feed = $this->registry->create('File', array($value, $this->timeout, 5, null, $this->useragent)); 359 365 if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) 360 366 { 361 return $feed;367 return array($feed); 362 368 } 363 369 else 364 370 { -
wp-includes/SimplePie/Misc.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 138 137 foreach ($element['attribs'] as $key => $value) 139 138 { 140 139 $key = strtolower($key); 141 $full .= " $key=\"" . htmlspecialchars($value['data'] ) . '"';140 $full .= " $key=\"" . htmlspecialchars($value['data'], ENT_COMPAT, 'UTF-8') . '"'; 142 141 } 143 142 if ($element['self_closing']) 144 143 { … … 224 223 } 225 224 } 226 225 226 public static function array_merge_recursive($array1, $array2) 227 { 228 foreach ($array2 as $key => $value) 229 { 230 if (is_array($value)) 231 { 232 $array1[$key] = SimplePie_Misc::array_merge_recursive($array1[$key], $value); 233 } 234 else 235 { 236 $array1[$key] = $value; 237 } 238 } 239 240 return $array1; 241 } 242 227 243 public static function parse_url($url) 228 244 { 229 245 $iri = new SimplePie_IRI($url); -
wp-includes/SimplePie/Net/IPv6.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Parse/Date.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 173 172 'aug' => 8, 174 173 'august' => 8, 175 174 'sep' => 9, 176 'september' => 8,175 'september' => 9, 177 176 'oct' => 10, 178 177 'october' => 10, 179 178 'nov' => 11, … … 614 613 * 615 614 * @final 616 615 * @access public 617 * @param call able$callback616 * @param callback $callback 618 617 */ 619 618 public function add_callback($callback) 620 619 { … … 721 720 { 722 721 $output .= substr($string, $position, $pos - $position); 723 722 $position = $pos + 1; 724 if ($ string[$pos - 1] !== '\\')723 if ($pos === 0 || $string[$pos - 1] !== '\\') 725 724 { 726 725 $depth++; 727 726 while ($depth && $position < $length) -
wp-includes/SimplePie/Parser.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 75 74 $this->registry = $registry; 76 75 } 77 76 78 public function parse(&$data, $encoding )77 public function parse(&$data, $encoding, $url = '') 79 78 { 79 $position = 0; 80 while ($position = strpos($data, 'h-entry', $position + 7)) { 81 $start = $position < 200 ? 0 : $position - 200; 82 $check = substr($data, $start, 400); 83 if (preg_match('/class="[^"]*h-entry/', $check)) { 84 return $this->parse_microformats($data, $url); 85 } 86 } 87 80 88 // Use UTF-8 if we get passed US-ASCII, as every US-ASCII character is a UTF-8 character 81 89 if (strtoupper($encoding) === 'US-ASCII') 82 90 { … … 120 128 if ($declaration->parse()) 121 129 { 122 130 $data = substr($data, $pos + 2); 123 $data = '<?xml version="' . $declaration->version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' . $data;131 $data = '<?xml version="' . $declaration->version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' ."\n". $this->declare_html_entities() . $data; 124 132 } 125 133 else 126 134 { … … 404 412 } 405 413 return $cache[$string]; 406 414 } 407 } 415 416 private function parse_hcard($data) { 417 $name = ''; 418 $link = ''; 419 // Check if h-card is set and pass that information on in the link. 420 if (isset($data['type']) && in_array('h-card', $data['type'])) { 421 if (isset($data['properties']['name'][0])) { 422 $name = $data['properties']['name'][0]; 423 } 424 if (isset($data['properties']['url'][0])) { 425 $link = $data['properties']['url'][0]; 426 if ($name === '') { 427 $name = $link; 428 } 429 else { 430 // can't have commas in categories. 431 $name = str_replace(',', '', $name); 432 } 433 return '<a class="h-card" href="'.$link.'">'.$name.'</a>'; 434 } 435 } 436 return isset($data['value']) ? $data['value'] : ''; 437 } 438 439 private function parse_microformats(&$data, $url) { 440 if (!function_exists('Mf2\parse')) return false; 441 442 $feed_title = ''; 443 $icon = ''; 444 $author_cache = array(); 445 $items = array(); 446 $entries = array(); 447 $mf = Mf2\parse($data, $url); 448 // First look for an h-feed. 449 $h_feed = array(); 450 foreach ($mf['items'] as $mf_item) { 451 if (in_array('h-feed', $mf_item['type'])) { 452 $h_feed = $mf_item; 453 break; 454 } 455 // Also look for an h-feed in the children of each top level item. 456 if (!isset($mf_item['children'][0]['type'])) continue; 457 if (in_array('h-feed', $mf_item['children'][0]['type'])) { 458 $h_feed = $mf_item['children'][0]; 459 break; 460 } 461 } 462 if (isset($h_feed['children'])) { 463 $entries = $h_feed['children']; 464 // Also set the feed title and icon from the h-feed if available. 465 if (isset($mf['items'][0]['properties']['name'][0])) { 466 $feed_title = $mf['items'][0]['properties']['name'][0]; 467 } 468 if (isset($mf['items'][0]['properties']['author'][0])) { 469 $author = $mf['items'][0]['properties']['author'][0]; 470 if (is_array($author) && 471 isset($author['type']) && in_array('h-card', $author['type'])) { 472 if (isset($author['properties']['photo'][0])) { 473 $icon = $author['properties']['photo'][0]; 474 } 475 } 476 } 477 } 478 else { 479 $entries = $mf['items']; 480 } 481 for ($i = 0; $i < count($entries); $i++) { 482 $entry = $entries[$i]; 483 if (in_array('h-entry', $entry['type'])) { 484 $item = array(); 485 $description = ''; 486 if (isset($entry['properties']['url'][0])) { 487 $link = $entry['properties']['url'][0]; 488 $item['link'] = array(array('data' => $link)); 489 } 490 if (isset($entry['properties']['name'][0])) { 491 $title = $entry['properties']['name'][0]; 492 $item['title'] = array(array('data' => $title)); 493 } 494 if (isset($entry['properties']['author'][0])) { 495 // author is a special case, it can be plain text or an h-card array. 496 // If it's plain text it can also be a url that should be followed to 497 // get the actual h-card. 498 $author = $entry['properties']['author'][0]; 499 if (is_array($author)) { 500 $author = $this->parse_hcard($author); 501 } 502 else if (strpos($author, 'http') === 0) { 503 if (isset($author_cache[$author])) { 504 $author = $author_cache[$author]; 505 } 506 else { 507 $mf = Mf2\fetch($author); 508 foreach ($mf['items'] as $hcard) { 509 // Only interested in an h-card by itself in this case. 510 if (!in_array('h-card', $hcard['type'])) { 511 continue; 512 } 513 // It must have a url property matching what we fetched. 514 if (!isset($hcard['properties']['url']) || 515 !(in_array($author, $hcard['properties']['url']))) { 516 continue; 517 } 518 // Save parse_hcard the trouble of finding the correct url. 519 $hcard['properties']['url'][0] = $author; 520 // Cache this h-card for the next h-entry to check. 521 $author_cache[$author] = $this->parse_hcard($hcard, $author); 522 $author = $author_cache[$author]; 523 break; 524 } 525 } 526 } 527 $item['author'] = array(array('data' => $author)); 528 } 529 if (isset($entry['properties']['photo'][0])) { 530 // If a photo is also in content, don't need to add it again here. 531 $content = ''; 532 if (isset($entry['properties']['content'][0]['html'])) { 533 $content = $entry['properties']['content'][0]['html']; 534 } 535 $photo_list = array(); 536 for ($j = 0; $j < count($entry['properties']['photo']); $j++) { 537 $photo = $entry['properties']['photo'][$j]; 538 if (strpos($content, $photo) === false) { 539 $photo_list[] = $photo; 540 } 541 } 542 // When there's more than one photo show the first and use a lightbox. 543 $count = count($photo_list); 544 if ($count > 1) { 545 $description = '<p>'; 546 for ($j = 0; $j < $count; $j++) { 547 $hidden = $j === 0 ? '' : 'class="hidden" '; 548 $description .= '<a href="'.$photo_list[$j].'" '.$hidden. 549 'data-lightbox="image-set-'.$i.'">'. 550 '<img src="'.$photo_list[$j].'"></a>'; 551 } 552 $description .= '<br><b>'.$count.' photos</b></p>'; 553 } 554 else if ($count == 1) { 555 $description = '<p><img src="'.$photo_list[0].'"></p>'; 556 } 557 } 558 if (isset($entry['properties']['content'][0]['html'])) { 559 $description .= $entry['properties']['content'][0]['html']; 560 $item['description'] = array(array('data' => $description)); 561 } 562 if (isset($entry['properties']['category'])) { 563 $category_csv = ''; 564 // categories can also contain h-cards. 565 foreach ($entry['properties']['category'] as $category) { 566 if ($category_csv !== '') $category_csv .= ', '; 567 if (is_array($category)) { 568 $category_csv .= $this->parse_hcard($category); 569 } 570 else { 571 // can't have commas in categories. 572 $category_csv .= str_replace(',', '', $category); 573 } 574 } 575 $item['category'] = array(array('data' => $category_csv)); 576 } 577 if (isset($entry['properties']['published'][0])) { 578 $timestamp = strtotime($entry['properties']['published'][0]); 579 $pub_date = date('F j Y g:ia', $timestamp).' GMT'; 580 $item['pubDate'] = array(array('data' => $pub_date)); 581 } 582 $items[] = array('child' => array('' => $item)); 583 } 584 } 585 // Mimic RSS data format when storing microformats. 586 $link = array(array('data' => $url)); 587 $image = ''; 588 if ($icon !== '') { 589 array(array('child' => array('' => 590 array('url' => array(array('data' => $icon)))))); 591 } 592 // Use the a name given for the h-feed, or get the title from the html. 593 if ($feed_title !== '') { 594 $feed_title = array(array('data' => htmlspecialchars($feed_title))); 595 } 596 else if ($position = strpos($data, '<title>')) { 597 $start = $position < 200 ? 0 : $position - 200; 598 $check = substr($data, $start, 400); 599 $matches = array(); 600 if (preg_match('/<title>(.+)<\/title>/', $check, $matches)) { 601 $feed_title = array(array('data' => htmlspecialchars($matches[1]))); 602 } 603 } 604 $channel = array('channel' => array(array('child' => array('' => 605 array('link' => $link, 'image' => $image, 'title' => $feed_title, 606 'item' => $items))))); 607 $rss = array(array('attribs' => array('' => array('version' => '2.0')), 608 'child' => array('' => $channel))); 609 $this->data = array('child' => array('' => array('rss' => $rss))); 610 return true; 611 } 612 613 private function declare_html_entities() { 614 // This is required because the RSS specification says that entity-encoded 615 // html is allowed, but the xml specification says they must be declared. 616 return '<!DOCTYPE html [ <!ENTITY nbsp " "> <!ENTITY iexcl "¡"> <!ENTITY cent "¢"> <!ENTITY pound "£"> <!ENTITY curren "¤"> <!ENTITY yen "¥"> <!ENTITY brvbar "¦"> <!ENTITY sect "§"> <!ENTITY uml "¨"> <!ENTITY copy "©"> <!ENTITY ordf "ª"> <!ENTITY laquo "«"> <!ENTITY not "¬"> <!ENTITY shy "­"> <!ENTITY reg "®"> <!ENTITY macr "¯"> <!ENTITY deg "°"> <!ENTITY plusmn "±"> <!ENTITY sup2 "²"> <!ENTITY sup3 "³"> <!ENTITY acute "´"> <!ENTITY micro "µ"> <!ENTITY para "¶"> <!ENTITY middot "·"> <!ENTITY cedil "¸"> <!ENTITY sup1 "¹"> <!ENTITY ordm "º"> <!ENTITY raquo "»"> <!ENTITY frac14 "¼"> <!ENTITY frac12 "½"> <!ENTITY frac34 "¾"> <!ENTITY iquest "¿"> <!ENTITY Agrave "À"> <!ENTITY Aacute "Á"> <!ENTITY Acirc "Â"> <!ENTITY Atilde "Ã"> <!ENTITY Auml "Ä"> <!ENTITY Aring "Å"> <!ENTITY AElig "Æ"> <!ENTITY Ccedil "Ç"> <!ENTITY Egrave "È"> <!ENTITY Eacute "É"> <!ENTITY Ecirc "Ê"> <!ENTITY Euml "Ë"> <!ENTITY Igrave "Ì"> <!ENTITY Iacute "Í"> <!ENTITY Icirc "Î"> <!ENTITY Iuml "Ï"> <!ENTITY ETH "Ð"> <!ENTITY Ntilde "Ñ"> <!ENTITY Ograve "Ò"> <!ENTITY Oacute "Ó"> <!ENTITY Ocirc "Ô"> <!ENTITY Otilde "Õ"> <!ENTITY Ouml "Ö"> <!ENTITY times "×"> <!ENTITY Oslash "Ø"> <!ENTITY Ugrave "Ù"> <!ENTITY Uacute "Ú"> <!ENTITY Ucirc "Û"> <!ENTITY Uuml "Ü"> <!ENTITY Yacute "Ý"> <!ENTITY THORN "Þ"> <!ENTITY szlig "ß"> <!ENTITY agrave "à"> <!ENTITY aacute "á"> <!ENTITY acirc "â"> <!ENTITY atilde "ã"> <!ENTITY auml "ä"> <!ENTITY aring "å"> <!ENTITY aelig "æ"> <!ENTITY ccedil "ç"> <!ENTITY egrave "è"> <!ENTITY eacute "é"> <!ENTITY ecirc "ê"> <!ENTITY euml "ë"> <!ENTITY igrave "ì"> <!ENTITY iacute "í"> <!ENTITY icirc "î"> <!ENTITY iuml "ï"> <!ENTITY eth "ð"> <!ENTITY ntilde "ñ"> <!ENTITY ograve "ò"> <!ENTITY oacute "ó"> <!ENTITY ocirc "ô"> <!ENTITY otilde "õ"> <!ENTITY ouml "ö"> <!ENTITY divide "÷"> <!ENTITY oslash "ø"> <!ENTITY ugrave "ù"> <!ENTITY uacute "ú"> <!ENTITY ucirc "û"> <!ENTITY uuml "ü"> <!ENTITY yacute "ý"> <!ENTITY thorn "þ"> <!ENTITY yuml "ÿ"> <!ENTITY OElig "Œ"> <!ENTITY oelig "œ"> <!ENTITY Scaron "Š"> <!ENTITY scaron "š"> <!ENTITY Yuml "Ÿ"> <!ENTITY fnof "ƒ"> <!ENTITY circ "ˆ"> <!ENTITY tilde "˜"> <!ENTITY Alpha "Α"> <!ENTITY Beta "Β"> <!ENTITY Gamma "Γ"> <!ENTITY Epsilon "Ε"> <!ENTITY Zeta "Ζ"> <!ENTITY Eta "Η"> <!ENTITY Theta "Θ"> <!ENTITY Iota "Ι"> <!ENTITY Kappa "Κ"> <!ENTITY Lambda "Λ"> <!ENTITY Mu "Μ"> <!ENTITY Nu "Ν"> <!ENTITY Xi "Ξ"> <!ENTITY Omicron "Ο"> <!ENTITY Pi "Π"> <!ENTITY Rho "Ρ"> <!ENTITY Sigma "Σ"> <!ENTITY Tau "Τ"> <!ENTITY Upsilon "Υ"> <!ENTITY Phi "Φ"> <!ENTITY Chi "Χ"> <!ENTITY Psi "Ψ"> <!ENTITY Omega "Ω"> <!ENTITY alpha "α"> <!ENTITY beta "β"> <!ENTITY gamma "γ"> <!ENTITY delta "δ"> <!ENTITY epsilon "ε"> <!ENTITY zeta "ζ"> <!ENTITY eta "η"> <!ENTITY theta "θ"> <!ENTITY iota "ι"> <!ENTITY kappa "κ"> <!ENTITY lambda "λ"> <!ENTITY mu "μ"> <!ENTITY nu "ν"> <!ENTITY xi "ξ"> <!ENTITY omicron "ο"> <!ENTITY pi "π"> <!ENTITY rho "ρ"> <!ENTITY sigmaf "ς"> <!ENTITY sigma "σ"> <!ENTITY tau "τ"> <!ENTITY upsilon "υ"> <!ENTITY phi "φ"> <!ENTITY chi "χ"> <!ENTITY psi "ψ"> <!ENTITY omega "ω"> <!ENTITY thetasym "ϑ"> <!ENTITY upsih "ϒ"> <!ENTITY piv "ϖ"> <!ENTITY ensp " "> <!ENTITY emsp " "> <!ENTITY thinsp " "> <!ENTITY zwnj "‌"> <!ENTITY zwj "‍"> <!ENTITY lrm "‎"> <!ENTITY rlm "‏"> <!ENTITY ndash "–"> <!ENTITY mdash "—"> <!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY sbquo "‚"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY bdquo "„"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡"> <!ENTITY bull "•"> <!ENTITY hellip "…"> <!ENTITY permil "‰"> <!ENTITY prime "′"> <!ENTITY Prime "″"> <!ENTITY lsaquo "‹"> <!ENTITY rsaquo "›"> <!ENTITY oline "‾"> <!ENTITY frasl "⁄"> <!ENTITY euro "€"> <!ENTITY image "ℑ"> <!ENTITY weierp "℘"> <!ENTITY real "ℜ"> <!ENTITY trade "™"> <!ENTITY alefsym "ℵ"> <!ENTITY larr "←"> <!ENTITY uarr "↑"> <!ENTITY rarr "→"> <!ENTITY darr "↓"> <!ENTITY harr "↔"> <!ENTITY crarr "↵"> <!ENTITY lArr "⇐"> <!ENTITY uArr "⇑"> <!ENTITY rArr "⇒"> <!ENTITY dArr "⇓"> <!ENTITY hArr "⇔"> <!ENTITY forall "∀"> <!ENTITY part "∂"> <!ENTITY exist "∃"> <!ENTITY empty "∅"> <!ENTITY nabla "∇"> <!ENTITY isin "∈"> <!ENTITY notin "∉"> <!ENTITY ni "∋"> <!ENTITY prod "∏"> <!ENTITY sum "∑"> <!ENTITY minus "−"> <!ENTITY lowast "∗"> <!ENTITY radic "√"> <!ENTITY prop "∝"> <!ENTITY infin "∞"> <!ENTITY ang "∠"> <!ENTITY and "∧"> <!ENTITY or "∨"> <!ENTITY cap "∩"> <!ENTITY cup "∪"> <!ENTITY int "∫"> <!ENTITY there4 "∴"> <!ENTITY sim "∼"> <!ENTITY cong "≅"> <!ENTITY asymp "≈"> <!ENTITY ne "≠"> <!ENTITY equiv "≡"> <!ENTITY le "≤"> <!ENTITY ge "≥"> <!ENTITY sub "⊂"> <!ENTITY sup "⊃"> <!ENTITY nsub "⊄"> <!ENTITY sube "⊆"> <!ENTITY supe "⊇"> <!ENTITY oplus "⊕"> <!ENTITY otimes "⊗"> <!ENTITY perp "⊥"> <!ENTITY sdot "⋅"> <!ENTITY lceil "⌈"> <!ENTITY rceil "⌉"> <!ENTITY lfloor "⌊"> <!ENTITY rfloor "⌋"> <!ENTITY lang "〈"> <!ENTITY rang "〉"> <!ENTITY loz "◊"> <!ENTITY spades "♠"> <!ENTITY clubs "♣"> <!ENTITY hearts "♥"> <!ENTITY diams "♦"> ]>'; 617 } 618 } 619 No newline at end of file -
wp-includes/SimplePie/Rating.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Registry.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 113 112 */ 114 113 public function register($type, $class, $legacy = false) 115 114 { 116 if (! is_subclass_of($class, $this->default[$type]))115 if (!@is_subclass_of($class, $this->default[$type])) 117 116 { 118 117 return false; 119 118 } … … 222 221 $result = call_user_func_array(array($class, $method), $parameters); 223 222 return $result; 224 223 } 225 } 226 No newline at end of file 224 } -
wp-includes/SimplePie/Restriction.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/Sanitize.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue … … 61 60 var $image_handler = ''; 62 61 var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); 63 62 var $encode_instead_of_strip = false; 64 var $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); 63 var $strip_attributes = array('bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); 64 var $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none')); 65 65 var $strip_comments = false; 66 66 var $output_encoding = 'UTF-8'; 67 67 var $enable_cache = true; … … 160 160 $this->encode_instead_of_strip = (bool) $encode; 161 161 } 162 162 163 public function strip_attributes($attribs = array('bgsound', ' class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'))163 public function strip_attributes($attribs = array('bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')) 164 164 { 165 165 if ($attribs) 166 166 { … … 179 179 } 180 180 } 181 181 182 public function add_attributes($attribs = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none'))) 183 { 184 if ($attribs) 185 { 186 if (is_array($attribs)) 187 { 188 $this->add_attributes = $attribs; 189 } 190 else 191 { 192 $this->add_attributes = explode(',', $attribs); 193 } 194 } 195 else 196 { 197 $this->add_attributes = false; 198 } 199 } 200 182 201 public function strip_comments($strip = false) 183 202 { 184 203 $this->strip_comments = (bool) $strip; … … 249 268 250 269 if (!class_exists('DOMDocument')) 251 270 { 252 $this->registry->call('Misc', 'error', array('DOMDocument not found, unable to use sanitizer', E_USER_WARNING, __FILE__, __LINE__)); 253 return ''; 271 throw new SimplePie_Exception('DOMDocument not found, unable to use sanitizer'); 254 272 } 255 273 $document = new DOMDocument(); 256 274 $document->encoding = 'UTF-8'; 275 276 // See https://github.com/simplepie/simplepie/issues/334 277 $unique_tag = '#'.uniqid().'#'; 278 $data = trim($unique_tag . $data . $unique_tag); 279 257 280 $data = $this->preprocess($data, $type); 258 281 259 282 set_error_handler(array('SimplePie_Misc', 'silence_errors')); … … 260 283 $document->loadHTML($data); 261 284 restore_error_handler(); 262 285 286 $xpath = new DOMXPath($document); 287 263 288 // Strip comments 264 289 if ($this->strip_comments) 265 290 { 266 $xpath = new DOMXPath($document);267 291 $comments = $xpath->query('//comment()'); 268 292 269 293 foreach ($comments as $comment) … … 279 303 { 280 304 foreach ($this->strip_htmltags as $tag) 281 305 { 282 $this->strip_tag($tag, $document, $ type);306 $this->strip_tag($tag, $document, $xpath, $type); 283 307 } 284 308 } 285 309 … … 287 311 { 288 312 foreach ($this->strip_attributes as $attrib) 289 313 { 290 $this->strip_attr($attrib, $ document);314 $this->strip_attr($attrib, $xpath); 291 315 } 292 316 } 293 317 318 if ($this->add_attributes) 319 { 320 foreach ($this->add_attributes as $tag => $valuePairs) 321 { 322 $this->add_attr($tag, $valuePairs, $document); 323 } 324 } 325 294 326 // Replace relative URLs 295 327 $this->base = $base; 296 328 foreach ($this->replace_url_attributes as $element => $attributes) … … 334 366 } 335 367 } 336 368 337 // Remove the DOCTYPE338 // Seems to cause segfaulting if we don't do this339 if ($document->firstChild instanceof DOMDocumentType)340 {341 $document->removeChild($document->firstChild);342 }343 344 // Move everything from the body to the root345 $real_body = $document->getElementsByTagName('body')->item(0)->childNodes->item(0);346 $document->replaceChild($real_body, $document->firstChild);347 348 369 // Finally, convert to a HTML string 349 370 $data = trim($document->saveHTML()); 350 371 372 list($_, $data, $_) = explode($unique_tag, $data); 373 351 374 if ($this->remove_div) 352 375 { 353 376 $data = preg_replace('/^<div' . SIMPLEPIE_PCRE_XML_ATTRIBUTE . '>/', '', $data); … … 384 407 protected function preprocess($html, $type) 385 408 { 386 409 $ret = ''; 410 $html = preg_replace('%</?(?:html|body)[^>]*?'.'>%is', '', $html); 387 411 if ($type & ~SIMPLEPIE_CONSTRUCT_XHTML) 388 412 { 389 413 // Atom XHTML constructs are wrapped with a div by default … … 456 480 } 457 481 } 458 482 459 protected function strip_tag($tag, $document, $ type)483 protected function strip_tag($tag, $document, $xpath, $type) 460 484 { 461 $xpath = new DOMXPath($document);462 485 $elements = $xpath->query('body//' . $tag); 463 486 if ($this->encode_instead_of_strip) 464 487 { … … 541 564 } 542 565 } 543 566 544 protected function strip_attr($attrib, $ document)567 protected function strip_attr($attrib, $xpath) 545 568 { 546 $xpath = new DOMXPath($document);547 569 $elements = $xpath->query('//*[@' . $attrib . ']'); 548 570 549 571 foreach ($elements as $element) … … 551 573 $element->removeAttribute($attrib); 552 574 } 553 575 } 576 577 protected function add_attr($tag, $valuePairs, $document) 578 { 579 $elements = $document->getElementsByTagName($tag); 580 foreach ($elements as $element) 581 { 582 foreach ($valuePairs as $attrib => $value) 583 { 584 $element->setAttribute($attrib, $value); 585 } 586 } 587 } 554 588 } -
wp-includes/SimplePie/Source.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/XML/Declaration/Parser.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/SimplePie/gzdecode.php
5 5 * A PHP-Based RSS and Atom Feed Framework. 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * 11 11 * Redistribution and use in source and binary forms, with or without modification, are … … 33 33 * POSSIBILITY OF SUCH DAMAGE. 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 38 * @author Geoffrey Sneddon 40 39 * @author Ryan McCue -
wp-includes/class-simplepie.php
65 65 * A PHP-Based RSS and Atom Feed Framework. 66 66 * Takes the hard work out of managing a complete RSS/Atom solution. 67 67 * 68 * Copyright (c) 2004-201 2, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors68 * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors 69 69 * All rights reserved. 70 70 * 71 71 * Redistribution and use in source and binary forms, with or without modification, are … … 93 93 * POSSIBILITY OF SUCH DAMAGE. 94 94 * 95 95 * @package SimplePie 96 * @version 1.3.1 97 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 96 * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue 98 97 * @author Ryan Parman 99 98 * @author Geoffrey Sneddon 100 99 * @author Ryan McCue … … 102 101 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 103 102 */ 104 103 104 105 105 /** 106 106 * SimplePie Name 107 107 */ … … 110 110 /** 111 111 * SimplePie Version 112 112 */ 113 define('SIMPLEPIE_VERSION', '1. 3.1');113 define('SIMPLEPIE_VERSION', '1.4'); 114 114 115 115 /** 116 116 * SimplePie Build … … 3116 3116 } 3117 3117 } 3118 3118 } 3119 endif; 3120 No newline at end of file 3119 endif;