Version Description
(2015-06-30) =
* Enhanced: Copyright updated.
* Fixed bug: Word trimming no longer adds extra closing tags at the end.
* Fixed bug: Presence of idna_convert
class no longer causes infinite redirects on some servers.
* Fixed bug: Warning of unterminated comment no longer thrown in PHP 5.5.
* Fixed bug: Added default value for "Unique Titles" option.
* Fixed bug: Having a the port number specified with the database host no longer causes issues with the mysqli
adapter in System Info on some servers.
* Fixed bug: Nested options of inline help controller no longer cause a fatal error.
* Fixed bug: Notices will no longer be displayed during rendering of feed items due to absence of required default values.
Download this release
Release Info
Developer | jeangalea |
Plugin | WP RSS Aggregator |
Version | 4.7.2 |
Comparing to | |
See all releases |
Code changes from version 4.7.1 to 4.7.2
- includes/admin-help.php +1 -1
- includes/deprecated-functions.php +1 -1
- includes/feed-access.php +2 -0
- includes/feed-display.php +4 -0
- includes/misc-functions.php +47 -4
- includes/system-info.php +60 -8
- includes/update.php +3 -0
- readme.txt +11 -1
- wp-rss-aggregator.php +4 -4
includes/admin-help.php
CHANGED
@@ -1003,7 +1003,7 @@ class WPRSS_Help {
|
|
1003 |
|
1004 |
foreach ( $array2 as $key => &$value ) {
|
1005 |
if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) {
|
1006 |
-
$merged[ $key ] = array_merge_recursive_distinct( $merged[ $key ], $value );
|
1007 |
} else {
|
1008 |
$merged[ $key ] = $value;
|
1009 |
}
|
1003 |
|
1004 |
foreach ( $array2 as $key => &$value ) {
|
1005 |
if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) {
|
1006 |
+
$merged[ $key ] = $this->array_merge_recursive_distinct( $merged[ $key ], $value );
|
1007 |
} else {
|
1008 |
$merged[ $key ] = $value;
|
1009 |
}
|
includes/deprecated-functions.php
CHANGED
@@ -80,4 +80,4 @@
|
|
80 |
// For testing query speed
|
81 |
// $time_start = microtime( true );
|
82 |
// wp_die(number_format( microtime( true ) - $time_start, 10 ));
|
83 |
-
|
80 |
// For testing query speed
|
81 |
// $time_start = microtime( true );
|
82 |
// wp_die(number_format( microtime( true ) - $time_start, 10 ));
|
83 |
+
*/
|
includes/feed-access.php
CHANGED
@@ -176,6 +176,7 @@ class WPRSS_SimplePie_File extends SimplePie_File {
|
|
176 |
$idn = new idna_convert();
|
177 |
$parsed = SimplePie_Misc::parse_url( $url );
|
178 |
$url = SimplePie_Misc::compress_parse_url( $parsed['scheme'], $idn->encode( $parsed['authority'] ), $parsed['path'], $parsed['query'], $parsed['fragment'] );
|
|
|
179 |
}
|
180 |
$this->url = $url;
|
181 |
$this->useragent = $useragent;
|
@@ -363,6 +364,7 @@ class WPRSS_SimplePie_File extends SimplePie_File {
|
|
363 |
$this->_certificate_file_path = $ca_path;
|
364 |
curl_setopt( $fp, CURLOPT_CAINFO, $this->_certificate_file_path );
|
365 |
}
|
|
|
366 |
|
367 |
return $this;
|
368 |
}
|
176 |
$idn = new idna_convert();
|
177 |
$parsed = SimplePie_Misc::parse_url( $url );
|
178 |
$url = SimplePie_Misc::compress_parse_url( $parsed['scheme'], $idn->encode( $parsed['authority'] ), $parsed['path'], $parsed['query'], $parsed['fragment'] );
|
179 |
+
wprss_log_obj('Converted IDNA URL', $url, null, WPRSS_LOG_LEVEL_SYSTEM);
|
180 |
}
|
181 |
$this->url = $url;
|
182 |
$this->useragent = $useragent;
|
364 |
$this->_certificate_file_path = $ca_path;
|
365 |
curl_setopt( $fp, CURLOPT_CAINFO, $this->_certificate_file_path );
|
366 |
}
|
367 |
+
do_action( 'wprss_before_curl_exec', $fp );
|
368 |
|
369 |
return $this;
|
370 |
}
|
includes/feed-display.php
CHANGED
@@ -56,6 +56,10 @@
|
|
56 |
$excerpts_settings = get_option( 'wprss_settings_excerpts' );
|
57 |
$thumbnails_settings = get_option( 'wprss_settings_thumbnails' );
|
58 |
|
|
|
|
|
|
|
|
|
59 |
$extra_options = apply_filters( 'wprss_template_extra_options', array(), $args);
|
60 |
|
61 |
// Normalize the source_link option
|
56 |
$excerpts_settings = get_option( 'wprss_settings_excerpts' );
|
57 |
$thumbnails_settings = get_option( 'wprss_settings_thumbnails' );
|
58 |
|
59 |
+
$args = wp_parse_args($args, array(
|
60 |
+
'link_before' => '',
|
61 |
+
'link_after' => ''
|
62 |
+
));
|
63 |
$extra_options = apply_filters( 'wprss_template_extra_options', array(), $args);
|
64 |
|
65 |
// Normalize the source_link option
|
includes/misc-functions.php
CHANGED
@@ -97,6 +97,40 @@ function wprss_media_sideload_image( $file, $post_id, $desc = null ) {
|
|
97 |
}
|
98 |
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
/**
|
101 |
* Trims the given text by a fixed number of words, and preserving HTML.
|
102 |
*
|
@@ -111,7 +145,7 @@ function wprss_media_sideload_image( $file, $post_id, $desc = null ) {
|
|
111 |
* @param array $allowed_tags The allows tags. Regular array of tag names.
|
112 |
* @return string The trimmed text.
|
113 |
*/
|
114 |
-
function wprss_trim_words( $text, $max_words, $allowed_tags = array() ) {
|
115 |
// See http://haacked.com/archive/2004/10/25/usingregularexpressionstomatchhtml.aspx/
|
116 |
$html_regex = <<<EOS
|
117 |
(</?(\w+)(?:(?:\s+\w+(?:\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?>)
|
@@ -120,6 +154,13 @@ EOS;
|
|
120 |
// Collapsing single-line white space
|
121 |
$text = preg_replace( '!\s+!', ' ', $text );
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
// Enum of tag types
|
124 |
$tag_type = array(
|
125 |
'opening' => 1,
|
@@ -175,16 +216,18 @@ EOS;
|
|
175 |
// Get the data
|
176 |
$tag_piece = $_piece[0];
|
177 |
$text_piece = $_piece[2];
|
|
|
178 |
// Compile all plain text together
|
179 |
$plain_text .= $text_piece[0];
|
180 |
// Check the tag and assign the proper tag type
|
181 |
$tag = $tag_piece[0];
|
182 |
$pieces[ $_idx ][1][2] =
|
183 |
-
( substr( $tag, 0, 2 ) === '</' )?
|
184 |
$tag_type['closing'] :
|
185 |
-
( substr( $tag, strlen( $tag ) -
|
|
|
186 |
$tag_type['self-closing'] :
|
187 |
-
$tag_type['opening'];
|
188 |
}
|
189 |
|
190 |
// Stock trimming of words
|
97 |
}
|
98 |
|
99 |
|
100 |
+
/**
|
101 |
+
* A list of void tags, e.g. tags that don't require a closing tag,
|
102 |
+
* also known as self-closing tags.
|
103 |
+
*
|
104 |
+
* @since 4.2.7
|
105 |
+
* @link http://stackoverflow.com/questions/13915201/what-tags-in-html5-are-acknowledged-of-being-self-closing
|
106 |
+
* @return array An array where values are tag names.
|
107 |
+
*/
|
108 |
+
function wprss_html5_get_void_tags() {
|
109 |
+
return apply_filters( 'wprss_html5_void_tags', array(
|
110 |
+
'area',
|
111 |
+
'base',
|
112 |
+
'br',
|
113 |
+
'col',
|
114 |
+
'command',
|
115 |
+
'embed',
|
116 |
+
'hr',
|
117 |
+
'img',
|
118 |
+
'input',
|
119 |
+
'keygen',
|
120 |
+
'link',
|
121 |
+
'meta',
|
122 |
+
'param',
|
123 |
+
'source',
|
124 |
+
'track',
|
125 |
+
'wbr',
|
126 |
+
'basefont',
|
127 |
+
'bgsound',
|
128 |
+
'frame',
|
129 |
+
'isindex'
|
130 |
+
));
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
/**
|
135 |
* Trims the given text by a fixed number of words, and preserving HTML.
|
136 |
*
|
145 |
* @param array $allowed_tags The allows tags. Regular array of tag names.
|
146 |
* @return string The trimmed text.
|
147 |
*/
|
148 |
+
function wprss_trim_words( $text, $max_words, $allowed_tags = array(), $self_closing_tags = null ) {
|
149 |
// See http://haacked.com/archive/2004/10/25/usingregularexpressionstomatchhtml.aspx/
|
150 |
$html_regex = <<<EOS
|
151 |
(</?(\w+)(?:(?:\s+\w+(?:\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?>)
|
154 |
// Collapsing single-line white space
|
155 |
$text = preg_replace( '!\s+!', ' ', $text );
|
156 |
|
157 |
+
// Tags that are always self-closing
|
158 |
+
if ( is_null( $self_closing_tags ) ) {
|
159 |
+
$self_closing_tags = function_exists('wprss_html5_get_void_tags')
|
160 |
+
? array_flip( wprss_html5_get_void_tags() )
|
161 |
+
: array();
|
162 |
+
}
|
163 |
+
|
164 |
// Enum of tag types
|
165 |
$tag_type = array(
|
166 |
'opening' => 1,
|
216 |
// Get the data
|
217 |
$tag_piece = $_piece[0];
|
218 |
$text_piece = $_piece[2];
|
219 |
+
$tag_name = $_piece[1][0];
|
220 |
// Compile all plain text together
|
221 |
$plain_text .= $text_piece[0];
|
222 |
// Check the tag and assign the proper tag type
|
223 |
$tag = $tag_piece[0];
|
224 |
$pieces[ $_idx ][1][2] =
|
225 |
+
( substr( $tag, 0, 2 ) === '</' ) ?
|
226 |
$tag_type['closing'] :
|
227 |
+
( (substr( $tag, strlen( $tag ) - 2, 2 ) === '/>'
|
228 |
+
|| array_key_exists( $tag_name, $self_closing_tags)) ?
|
229 |
$tag_type['self-closing'] :
|
230 |
+
$tag_type['opening'] );
|
231 |
}
|
232 |
|
233 |
// Stock trimming of words
|
includes/system-info.php
CHANGED
@@ -65,15 +65,12 @@ WordPress Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
|
|
65 |
<?php echo $browser ; ?>
|
66 |
|
67 |
PHP Version: <?php echo PHP_VERSION . "\n"; ?>
|
68 |
-
MySQL Version: <?php
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
} else {
|
73 |
-
$mysql = mysql_connect( DB_HOST, DB_USER, DB_PASSWORD );
|
74 |
-
echo mysql_get_server_info( $mysql ) . " (mysql)\n";
|
75 |
-
}
|
76 |
?>
|
|
|
77 |
Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
|
78 |
|
79 |
PHP Safe Mode: <?php echo ini_get( 'safe_mode' ) ? "Yes" : "No\n"; ?>
|
@@ -192,3 +189,58 @@ if ( get_bloginfo( 'version' ) < '3.4' ) {
|
|
192 |
exit;
|
193 |
}
|
194 |
add_action( 'wprss_download_sysinfo', 'wprss_generate_sysinfo_download' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
<?php echo $browser ; ?>
|
66 |
|
67 |
PHP Version: <?php echo PHP_VERSION . "\n"; ?>
|
68 |
+
MySQL Version: <?php if ( $server_info = wprss_sysinfo_get_db_server() )
|
69 |
+
echo sprintf( '%1$s (%2$s)', $server_info['server_info'], $server_info['extension'] );
|
70 |
+
else
|
71 |
+
_e( 'Could not determine database driver version', WPRSS_TEXT_DOMAIN );
|
|
|
|
|
|
|
|
|
72 |
?>
|
73 |
+
|
74 |
Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
|
75 |
|
76 |
PHP Safe Mode: <?php echo ini_get( 'safe_mode' ) ? "Yes" : "No\n"; ?>
|
189 |
exit;
|
190 |
}
|
191 |
add_action( 'wprss_download_sysinfo', 'wprss_generate_sysinfo_download' );
|
192 |
+
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Retrieves information about the DB server.
|
196 |
+
*
|
197 |
+
* Will use WordPress configuration by default;
|
198 |
+
* Currently, the following members are present in the result:
|
199 |
+
* - 'extension': The extension that is used to connect. Possible values: 'mysqli', 'mysql'.
|
200 |
+
* - 'server_info': The version number of the database engine, i.e. '5.6.22'.
|
201 |
+
*
|
202 |
+
* @since 4.7.2
|
203 |
+
* @param null|string $host The address of the database host, to which to connect.
|
204 |
+
* May contain the port number in standard URI format.
|
205 |
+
* Default: value of the DB_HOST constant, if defined, otherwise null.
|
206 |
+
* @param null|string $username The username to be used for connecting to the databse.
|
207 |
+
* Default: value of the DB_USER constant, if defined, otherwise null.
|
208 |
+
* @param null|string $password The password to be used for connecting to the database.
|
209 |
+
* Default: value of the DB_PASSWORD constant, if defined, otherwise null.
|
210 |
+
* @param null|int $port An integer, representing the port, at which to connect to the DB server.
|
211 |
+
* Default: auto-determined from host.
|
212 |
+
* @return array|null An array, containing the following indexes, if successful: 'extension', 'server_info'.
|
213 |
+
* Otherwise, null.
|
214 |
+
*/
|
215 |
+
function wprss_sysinfo_get_db_server( $host = null, $username = null, $password = null, $port = null ) {
|
216 |
+
$result = array();
|
217 |
+
|
218 |
+
if ( is_null( $host ) && defined( 'DB_HOST') ) $host = DB_HOST;
|
219 |
+
if ( is_null( $username ) && defined( 'DB_USER') ) $username = DB_USER;
|
220 |
+
if ( is_null( $password ) && defined( 'DB_PASSWORD') ) $password = DB_PASSWORD;
|
221 |
+
|
222 |
+
$server_address = explode( ':', $host, 2 );
|
223 |
+
$host = $server_address[0];
|
224 |
+
$port = is_null( $port )
|
225 |
+
? ( isset( $server_address[1] ) ? $server_address[1] : null )
|
226 |
+
: $port;
|
227 |
+
$port = $port ? intval( (string)$port ) : null;
|
228 |
+
|
229 |
+
if ( function_exists( 'mysqli_get_server_info' ) ){
|
230 |
+
$mysqli = new mysqli( $host, $username, $password, '', $port );
|
231 |
+
$result['extension'] = 'mysqli';
|
232 |
+
$result['server_info'] = $mysqli->server_info;
|
233 |
+
return $result;
|
234 |
+
}
|
235 |
+
|
236 |
+
if ( function_exists( 'mysql_connect' ) ) {
|
237 |
+
if ( $port ) $host = implode ( ':', array( $host, $port ) );
|
238 |
+
|
239 |
+
$mysql = mysql_connect( $host, $username, $password );
|
240 |
+
$result['extension'] = 'mysql';
|
241 |
+
$result['server_info'] = mysql_get_server_info( $mysql );
|
242 |
+
return $result;
|
243 |
+
}
|
244 |
+
|
245 |
+
return null;
|
246 |
+
}
|
includes/update.php
CHANGED
@@ -239,6 +239,9 @@
|
|
239 |
|
240 |
// From 4.2.4
|
241 |
'authors_enable' => 0,
|
|
|
|
|
|
|
242 |
)
|
243 |
);
|
244 |
|
239 |
|
240 |
// From 4.2.4
|
241 |
'authors_enable' => 0,
|
242 |
+
|
243 |
+
// From 4.7.2
|
244 |
+
'unique_titles' => 0,
|
245 |
)
|
246 |
);
|
247 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Plugin URI: http://www.wprssaggregator.com
|
|
4 |
Tags: rss, feeds, aggregation, rss to post, autoblog aggregator, rss import, feed aggregator, rss aggregator, multiple rss feeds, multi rss feeds, rss multi importer, feed import, feed import, multiple feed import, feed aggregation, rss feader, feed reader, feed to post, multiple feeds, multi feed importer, multi feed import, multi import, autoblogging, autoblogger, rss feeder, rss post importer, autoblog aggregator, autoblog, autopost, content curation, feedwordpress, wp rss multi import, hungryfeed, wp-o-matic, rss feed, rss feed to post, rss retriever, syndication
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 4.7.
|
8 |
License: GPLv2 or later
|
9 |
The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
|
10 |
|
@@ -169,6 +169,16 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
|
|
169 |
|
170 |
== Changelog ==
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
= 4.7.1 (2015-04-23) =
|
173 |
* Fixed bug: No warning will be thrown when fetching feeds.
|
174 |
|
4 |
Tags: rss, feeds, aggregation, rss to post, autoblog aggregator, rss import, feed aggregator, rss aggregator, multiple rss feeds, multi rss feeds, rss multi importer, feed import, feed import, multiple feed import, feed aggregation, rss feader, feed reader, feed to post, multiple feeds, multi feed importer, multi feed import, multi import, autoblogging, autoblogger, rss feeder, rss post importer, autoblog aggregator, autoblog, autopost, content curation, feedwordpress, wp rss multi import, hungryfeed, wp-o-matic, rss feed, rss feed to post, rss retriever, syndication
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 4.7.2
|
8 |
License: GPLv2 or later
|
9 |
The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
|
10 |
|
169 |
|
170 |
== Changelog ==
|
171 |
|
172 |
+
= 4.7.2 (2015-06-30) =
|
173 |
+
* Enhanced: Copyright updated.
|
174 |
+
* Fixed bug: Word trimming no longer adds extra closing tags at the end.
|
175 |
+
* Fixed bug: Presence of `idna_convert` class no longer causes infinite redirects on some servers.
|
176 |
+
* Fixed bug: Warning of unterminated comment no longer thrown in PHP 5.5.
|
177 |
+
* Fixed bug: Added default value for "Unique Titles" option.
|
178 |
+
* Fixed bug: Having a the port number specified with the database host no longer causes issues with the `mysqli` adapter in System Info on some servers.
|
179 |
+
* Fixed bug: Nested options of inline help controller no longer cause a fatal error.
|
180 |
+
* Fixed bug: Notices will no longer be displayed during rendering of feed items due to absence of required default values.
|
181 |
+
|
182 |
= 4.7.1 (2015-04-23) =
|
183 |
* Fixed bug: No warning will be thrown when fetching feeds.
|
184 |
|
wp-rss-aggregator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP RSS Aggregator
|
4 |
Plugin URI: http://www.wprssaggregator.com
|
5 |
Description: Imports and aggregates multiple RSS Feeds using SimplePie
|
6 |
-
Version: 4.7.
|
7 |
Author: Jean Galea
|
8 |
Author URI: http://www.wprssaggregator.com
|
9 |
License: GPLv2
|
@@ -11,7 +11,7 @@
|
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
-
Copyright 2012-2015 Jean Galea (email : info@
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
17 |
the Free Software Foundation; either version 2 of the License, or
|
@@ -29,7 +29,7 @@
|
|
29 |
|
30 |
/**
|
31 |
* @package WPRSSAggregator
|
32 |
-
* @version 4.7.
|
33 |
* @since 1.0
|
34 |
* @author Jean Galea <info@wprssaggregator.com>
|
35 |
* @copyright Copyright (c) 2012-2015, Jean Galea
|
@@ -43,7 +43,7 @@
|
|
43 |
|
44 |
// Set the version number of the plugin.
|
45 |
if( !defined( 'WPRSS_VERSION' ) )
|
46 |
-
define( 'WPRSS_VERSION', '4.7.
|
47 |
|
48 |
// Set the database version number of the plugin.
|
49 |
if( !defined( 'WPRSS_DB_VERSION' ) )
|
3 |
Plugin Name: WP RSS Aggregator
|
4 |
Plugin URI: http://www.wprssaggregator.com
|
5 |
Description: Imports and aggregates multiple RSS Feeds using SimplePie
|
6 |
+
Version: 4.7.2
|
7 |
Author: Jean Galea
|
8 |
Author URI: http://www.wprssaggregator.com
|
9 |
License: GPLv2
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
+
Copyright 2012-2015 Jean Galea (email : info@wprssaggregator.com)
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
17 |
the Free Software Foundation; either version 2 of the License, or
|
29 |
|
30 |
/**
|
31 |
* @package WPRSSAggregator
|
32 |
+
* @version 4.7.2
|
33 |
* @since 1.0
|
34 |
* @author Jean Galea <info@wprssaggregator.com>
|
35 |
* @copyright Copyright (c) 2012-2015, Jean Galea
|
43 |
|
44 |
// Set the version number of the plugin.
|
45 |
if( !defined( 'WPRSS_VERSION' ) )
|
46 |
+
define( 'WPRSS_VERSION', '4.7.2', true );
|
47 |
|
48 |
// Set the database version number of the plugin.
|
49 |
if( !defined( 'WPRSS_DB_VERSION' ) )
|