Version Description
(2020-10-06) = Changed - Disabled SimplePie's HTML sanitization. - Updated jQuery code to be compatible with the upcoming update in WordPress. - Images without an extension can now be imported. - The image importing function now allows the image URL and local path to be changed via filters. - Changed how item importing is logged in the debugging log. The log now shows what hooks can reject an item.
Fixed
- WooCommerce Product type dropdown and accompanying options disappear while WP RSS Aggregator is active.
- Addressed notices about register_rest_route
being called incorrectly.
- The "Validate feed" link did not work.
- Sites on a multi-site network would see an error about a function not existing.
- Errors would not be properly rendered for non-fatal notices and warnings.
Release Info
Developer | Mekku |
Plugin | WP RSS Aggregator |
Version | 4.17.8 |
Comparing to | |
See all releases |
Code changes from version 4.17.7 to 4.17.8
- CHANGELOG.md +15 -0
- css/admin-3.8.css +0 -0
- css/admin-editor.css +0 -0
- css/admin-styles.css +0 -0
- css/admin-tracking-styles.css +0 -0
- css/colorbox.css +0 -0
- css/font-awesome.min.css +0 -0
- fonts/FontAwesome.otf +0 -0
- fonts/fontawesome-webfont.eot +0 -0
- fonts/fontawesome-webfont.svg +0 -0
- fonts/fontawesome-webfont.ttf +0 -0
- fonts/fontawesome-webfont.woff +0 -0
- images/colorbox/border.png +0 -0
- images/colorbox/controls.png +0 -0
- images/colorbox/ie6/borderBottomCenter.png +0 -0
- images/colorbox/ie6/borderBottomLeft.png +0 -0
- images/colorbox/ie6/borderBottomRight.png +0 -0
- images/colorbox/ie6/borderMiddleLeft.png +0 -0
- images/colorbox/ie6/borderMiddleRight.png +0 -0
- images/colorbox/ie6/borderTopCenter.png +0 -0
- images/colorbox/ie6/borderTopLeft.png +0 -0
- images/colorbox/ie6/borderTopRight.png +0 -0
- images/colorbox/loading.gif +0 -0
- images/colorbox/loading_background.png +0 -0
- images/colorbox/overlay.png +0 -0
- images/facebook.png +0 -0
- images/icon-adminmenu16-sprite.png +0 -0
- images/icon-adminpage32.png +0 -0
- images/twitter.png +0 -0
- includes/OPML.php +0 -0
- includes/admin-ajax-notice.php +0 -0
- includes/admin-display.php +0 -0
- includes/admin-editor.php +0 -0
- includes/admin-heartbeat.php +0 -0
- includes/admin-help-metaboxes.php +0 -0
- includes/admin-help-settings.php +0 -0
- includes/admin-help.php +0 -0
- includes/admin-log.php +0 -0
- includes/admin-metaboxes.php +0 -1
- includes/admin-options.php +0 -0
- includes/admin.php +4 -7
- includes/cpt-feeds.php +0 -0
- includes/cron-jobs.php +0 -0
- includes/fallback-mbstring.php +0 -0
- includes/feed-access.php +14 -0
- includes/feed-blacklist.php +0 -0
- includes/feed-importing-images.php +16 -0
- includes/feed-importing.php +24 -2
- includes/feed-processing.php +4 -0
- includes/feed-states.php +0 -0
- includes/functions.php +5 -1
- includes/image-caching.php +0 -0
- includes/libraries/WordPress-Readme-Parser/ReadmeParser.php +0 -0
- includes/libraries/browser.php +0 -0
- includes/libraries/php-markdown/markdown.php +0 -0
- includes/licensing.php +0 -0
- includes/misc-functions.php +40 -0
- includes/opml-importer.php +0 -0
- includes/readme.php +0 -0
- includes/roles-capabilities.php +0 -0
- includes/scripts.php +0 -0
- includes/system-info.php +0 -0
- includes/update.php +0 -0
- js/admin-addon-ajax.js +0 -0
- js/admin-custom-bulk-actions.js +0 -0
- js/admin-custom.js +4 -5
- js/admin-help.js +0 -0
- js/admin-license-manager.js +0 -0
- js/admin-licensing.js +0 -0
- js/admin/tools/logs.js +0 -8
- js/custom.js +0 -0
- js/editor.js +0 -0
- js/heartbeat.js +0 -0
- js/jquery-ui-timepicker-addon.js +0 -0
- js/jquery.colorbox-min.js +0 -0
- js/pointers.js +0 -0
- languages/wprss-it.mo +0 -0
- languages/wprss-it.po +0 -0
- languages/wprss-nl_NL.mo +0 -0
- languages/wprss-nl_NL.po +0 -0
- languages/wprss-pt_BR.mo +0 -0
- languages/wprss-pt_BR.po +0 -0
- languages/wprss-ru_RU.mo +0 -0
- languages/wprss-ru_RU.po +0 -0
- readme.txt +26 -1
- src/Modules/UpsellModule.php +38 -1
- src/RestApi/EndPointManager.php +3 -1
- src/Twig/Extensions/Date/TwigDateTranslator.php +5 -5
- templates/help-footer-js.php +0 -0
- templates/help-tooltip-content.php +0 -0
- templates/help-tooltip-handle.php +0 -0
- templates/wprss.css +0 -0
- uninstall.php +0 -0
- vendor/autoload.php +0 -0
- vendor/composer/ClassLoader.php +1 -1
- vendor/composer/LICENSE +0 -0
- vendor/composer/autoload_classmap.php +0 -0
- vendor/composer/autoload_namespaces.php +0 -0
- vendor/composer/autoload_psr4.php +0 -0
- vendor/composer/autoload_real.php +0 -0
- vendor/composer/autoload_static.php +0 -0
- vendor/composer/installed.json +0 -0
- vendor/dhii/collections-abstract-base/composer.json +0 -0
- vendor/dhii/collections-abstract-base/composer.lock +0 -0
- vendor/dhii/collections-abstract-base/src/AbstractCollection.php +0 -0
- vendor/dhii/collections-abstract-base/src/AbstractHasher.php +0 -0
- vendor/dhii/collections-abstract-base/src/AbstractIterableCollection.php +0 -0
- vendor/dhii/collections-abstract/composer.json +0 -0
- vendor/dhii/collections-abstract/composer.lock +0 -0
- vendor/dhii/collections-abstract/src/AbstractCallbackCollection.php +0 -0
- vendor/dhii/collections-abstract/src/AbstractCallbackCollectionBase.php +0 -0
- vendor/dhii/collections-abstract/src/AbstractCallbackIterator.php +0 -0
- vendor/dhii/collections-abstract/src/AbstractGenericAccessibleCollection.php +0 -0
- vendor/dhii/collections-abstract/src/AbstractGenericCollection.php +0 -0
- vendor/dhii/collections-abstract/src/AbstractGenericMutableCollection.php +0 -0
- vendor/dhii/collections-abstract/src/AbstractSearchableCollection.php +0 -0
- vendor/dhii/collections-abstract/src/AppendIterator.php +0 -0
- vendor/dhii/collections-abstract/src/CallbackIterator.php +0 -0
- vendor/dhii/collections-interface/composer.json +0 -0
- vendor/dhii/collections-interface/composer.lock +0 -0
- vendor/dhii/collections-interface/src/AccessibleCollectionInterface.php +0 -0
- vendor/dhii/collections-interface/src/CallbackIterableInterface.php +0 -0
- vendor/dhii/collections-interface/src/CallbackIteratorInterface.php +0 -0
- vendor/dhii/collections-interface/src/CollectionInterface.php +0 -0
- vendor/dhii/collections-interface/src/MutableCollectionInterface.php +0 -0
- vendor/dhii/collections-interface/src/SearchableCollectionInterface.php +0 -0
- vendor/dhii/collections-interface/src/SequenceIteratorIteratorInterface.php +0 -0
- vendor/dhii/collections-interface/src/SetInterface.php +0 -0
- vendor/dhii/stats-abstract/composer.json +0 -0
- vendor/dhii/stats-abstract/composer.lock +0 -0
- vendor/dhii/stats-abstract/src/AbstractAggregatableCollection.php +0 -0
- vendor/dhii/stats-abstract/src/AbstractAggregator.php +0 -0
- vendor/dhii/stats-interface/composer.json +0 -0
- vendor/dhii/stats-interface/composer.lock +0 -0
- vendor/dhii/stats-interface/src/AggregatorInterface.php +0 -0
- wp-rss-aggregator.php +38 -6
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
|
|
4 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
## [4.17.7] - 2020-08-12
|
8 |
### Added
|
9 |
* New HTML classes for pagination buttons.
|
4 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6 |
|
7 |
+
## [4.17.8] - 2020-10-06
|
8 |
+
### Changed
|
9 |
+
* Disabled SimplePie's HTML sanitization.
|
10 |
+
* Updated jQuery code to be compatible with the upcoming update in WordPress.
|
11 |
+
* Images without an extension can now be imported.
|
12 |
+
* The image importing function now allows the image URL and local path to be changed via filters.
|
13 |
+
* Changed how item importing is logged in the debugging log. The log now shows what hooks can reject an item.
|
14 |
+
|
15 |
+
### Fixed
|
16 |
+
* WooCommerce Product type dropdown and accompanying options disappear while WP RSS Aggregator is active.
|
17 |
+
* Addressed notices about `register_rest_route` being called incorrectly.
|
18 |
+
* The "Validate feed" link did not work.
|
19 |
+
* Sites on a multi-site network would see an error about a function not existing.
|
20 |
+
* Errors would not be properly rendered for non-fatal notices and warnings.
|
21 |
+
|
22 |
## [4.17.7] - 2020-08-12
|
23 |
### Added
|
24 |
* New HTML classes for pagination buttons.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -304,7 +304,6 @@
|
|
304 |
target="_blank">
|
305 |
<?= __('How to find an RSS feed', 'wprss') ?>
|
306 |
</a>
|
307 |
-
<script type="text/javascript">
|
308 |
<script type="text/javascript">
|
309 |
(function($){
|
310 |
// When the DOM is ready
|
304 |
target="_blank">
|
305 |
<?= __('How to find an RSS feed', 'wprss') ?>
|
306 |
</a>
|
|
|
307 |
<script type="text/javascript">
|
308 |
(function($){
|
309 |
// When the DOM is ready
|
File without changes
|
@@ -48,18 +48,16 @@
|
|
48 |
{
|
49 |
// Current action
|
50 |
if ( is_admin() && isset($_GET['action']) ) {
|
51 |
-
$classes .= 'action-'.$_GET['action'];
|
52 |
}
|
53 |
// Current post ID
|
54 |
if ( is_admin() && isset($_GET['post']) ) {
|
55 |
-
$classes .= ' ';
|
56 |
-
$classes .= 'post-'.$_GET['post'];
|
57 |
}
|
58 |
// New post type & listing page
|
59 |
if ( isset($_GET['post_type']) ) $post_type = $_GET['post_type'];
|
60 |
if ( isset($post_type) ) {
|
61 |
-
$classes .= ' ';
|
62 |
-
$classes .= 'post-type-'.$post_type;
|
63 |
}
|
64 |
// Editting a post type
|
65 |
if ( isset( $_GET['post'] ) ) {
|
@@ -69,8 +67,7 @@
|
|
69 |
$current_post_edit = get_post($post_query);
|
70 |
$current_post_type = $current_post_edit->post_type;
|
71 |
if ( !empty($current_post_type) ) {
|
72 |
-
$classes .= ' ';
|
73 |
-
$classes .= 'post-type-'.$current_post_type;
|
74 |
}
|
75 |
}
|
76 |
// Return the $classes array
|
48 |
{
|
49 |
// Current action
|
50 |
if ( is_admin() && isset($_GET['action']) ) {
|
51 |
+
$classes .= ' action-'.$_GET['action'];
|
52 |
}
|
53 |
// Current post ID
|
54 |
if ( is_admin() && isset($_GET['post']) ) {
|
55 |
+
$classes .= ' post-'.$_GET['post'];
|
|
|
56 |
}
|
57 |
// New post type & listing page
|
58 |
if ( isset($_GET['post_type']) ) $post_type = $_GET['post_type'];
|
59 |
if ( isset($post_type) ) {
|
60 |
+
$classes .= ' post-type-'.$post_type;
|
|
|
61 |
}
|
62 |
// Editting a post type
|
63 |
if ( isset( $_GET['post'] ) ) {
|
67 |
$current_post_edit = get_post($post_query);
|
68 |
$current_post_type = $current_post_edit->post_type;
|
69 |
if ( !empty($current_post_type) ) {
|
70 |
+
$classes .= ' post-type-'.$current_post_type;
|
|
|
71 |
}
|
72 |
}
|
73 |
// Return the $classes array
|
File without changes
|
File without changes
|
File without changes
|
@@ -10,6 +10,7 @@ class WPRSS_Feed_Access
|
|
10 |
{
|
11 |
|
12 |
const RESOURCE_CLASS = 'WPRSS_SimplePie_File';
|
|
|
13 |
const D_REDIRECTS = 5;
|
14 |
|
15 |
const SETTING_KEY_CERTIFICATE_PATH = 'certificate-path';
|
@@ -171,6 +172,7 @@ class WPRSS_Feed_Access
|
|
171 |
*/
|
172 |
public function set_feed_options($feed, $feedSourceId = null)
|
173 |
{
|
|
|
174 |
$feed->set_file_class( static::RESOURCE_CLASS );
|
175 |
$feed->set_useragent($this->get_useragent($feedSourceId));
|
176 |
WPRSS_SimplePie_File::set_default_certificate_file_path($this->get_certificate_file_path());
|
@@ -367,6 +369,18 @@ add_action('wprss_init', function() {
|
|
367 |
WPRSS_Feed_Access::instance();
|
368 |
});
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
|
371 |
/**
|
372 |
* A padding layer used to give WPRSS more control over fetching of feed resources.
|
10 |
{
|
11 |
|
12 |
const RESOURCE_CLASS = 'WPRSS_SimplePie_File';
|
13 |
+
const ITEM_CLASS = 'WPRSS_SimplePie_Item';
|
14 |
const D_REDIRECTS = 5;
|
15 |
|
16 |
const SETTING_KEY_CERTIFICATE_PATH = 'certificate-path';
|
172 |
*/
|
173 |
public function set_feed_options($feed, $feedSourceId = null)
|
174 |
{
|
175 |
+
$feed->set_item_class(static::ITEM_CLASS);
|
176 |
$feed->set_file_class( static::RESOURCE_CLASS );
|
177 |
$feed->set_useragent($this->get_useragent($feedSourceId));
|
178 |
WPRSS_SimplePie_File::set_default_certificate_file_path($this->get_certificate_file_path());
|
369 |
WPRSS_Feed_Access::instance();
|
370 |
});
|
371 |
|
372 |
+
class WPRSS_SimplePie_Item extends SimplePie_Item {
|
373 |
+
|
374 |
+
public function sanitize($data, $type, $base = '')
|
375 |
+
{
|
376 |
+
if ($type & (SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML | SIMPLEPIE_CONSTRUCT_MAYBE_HTML)) {
|
377 |
+
return $data;
|
378 |
+
}
|
379 |
+
|
380 |
+
return parent::sanitize($data, $type, $base);
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
|
385 |
/**
|
386 |
* A padding layer used to give WPRSS more control over fetching of feed resources.
|
File without changes
|
@@ -721,6 +721,8 @@ function wpra_media_sideload_image($url = null, $post_id = null, $attach = null,
|
|
721 |
|
722 |
try {
|
723 |
/* @var $img WPRSS_Image_Cache_Image */
|
|
|
|
|
724 |
$img = $images->get($url);
|
725 |
} catch (Exception $e) {
|
726 |
return new WP_Error('could_not_load_image', $e->getMessage(), $url);
|
@@ -770,6 +772,8 @@ function wpra_media_sideload_image($url = null, $post_id = null, $attach = null,
|
|
770 |
$parts = parse_url(trim($img->get_url()));
|
771 |
$baseName = uniqid($parts['host']);
|
772 |
|
|
|
|
|
773 |
if (!empty($filename)) {
|
774 |
// user given filename for title, add original URL extension
|
775 |
$baseName = $filename . "." . $ext;
|
@@ -823,6 +827,18 @@ function wpra_media_sideload_image($url = null, $post_id = null, $attach = null,
|
|
823 |
$image['ext'] = empty($image['ext']) ? $file_ext : $image['ext'];
|
824 |
$image['type'] = empty($image['type']) ? $mime_type : $image['type'];
|
825 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
return $image;
|
827 |
}, 10);
|
828 |
}
|
721 |
|
722 |
try {
|
723 |
/* @var $img WPRSS_Image_Cache_Image */
|
724 |
+
$url = apply_filters('wpra/images/url_to_download', $url);
|
725 |
+
|
726 |
$img = $images->get($url);
|
727 |
} catch (Exception $e) {
|
728 |
return new WP_Error('could_not_load_image', $e->getMessage(), $url);
|
772 |
$parts = parse_url(trim($img->get_url()));
|
773 |
$baseName = uniqid($parts['host']);
|
774 |
|
775 |
+
$parts['path'] = apply_filters('wpra/images/cache_path', $parts['path']);
|
776 |
+
|
777 |
if (!empty($filename)) {
|
778 |
// user given filename for title, add original URL extension
|
779 |
$baseName = $filename . "." . $ext;
|
827 |
$image['ext'] = empty($image['ext']) ? $file_ext : $image['ext'];
|
828 |
$image['type'] = empty($image['type']) ? $mime_type : $image['type'];
|
829 |
|
830 |
+
// If the image has a `proper_filename` and an `ext`
|
831 |
+
if (!empty($image['proper_filename']) && !empty($image['ext'])) {
|
832 |
+
$filename = strtolower($image['proper_filename']);
|
833 |
+
$extension = strtolower($image['ext']);
|
834 |
+
|
835 |
+
// Do a case insensitive check for the extension in the proper_filename. If not found, we
|
836 |
+
// add the extension
|
837 |
+
if (!preg_match('/'.$extension.'$/i', $filename)) {
|
838 |
+
$image['proper_filename'] .= '.' . $extension;
|
839 |
+
}
|
840 |
+
}
|
841 |
+
|
842 |
return $image;
|
843 |
}, 10);
|
844 |
}
|
@@ -563,7 +563,7 @@ function wprss_get_feed_cache_dir()
|
|
563 |
$permalink = $item->get_permalink(); // Link or enclosure URL
|
564 |
$permalink = htmlspecialchars_decode( $permalink ); // SimplePie encodes HTML special chars
|
565 |
|
566 |
-
$logger->debug('
|
567 |
|
568 |
$permalink = wprss_normalize_permalink( $permalink, $item, $feed_ID );
|
569 |
|
@@ -582,6 +582,23 @@ function wprss_get_feed_cache_dir()
|
|
582 |
$time_limit = wprss_get_item_import_time_limit();
|
583 |
set_time_limit( $time_limit );
|
584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
// Apply filters that determine if the feed item should be inserted into the DB or not.
|
586 |
$ogItem = $item;
|
587 |
$item = apply_filters( 'wprss_insert_post_item_conditionals', $item, $feed_ID, $permalink );
|
@@ -592,6 +609,8 @@ function wprss_get_feed_cache_dir()
|
|
592 |
|
593 |
// If the item is not NULL, continue to inserting the feed item post into the DB
|
594 |
if ( $item !== NULL && !is_bool($item) ) {
|
|
|
|
|
595 |
$post_status = 'publish';
|
596 |
|
597 |
// Get the date and GTM date and normalize if not valid dor not present
|
@@ -675,13 +694,16 @@ function wprss_get_feed_cache_dir()
|
|
675 |
// If the item is TRUE, then a hook function in the filter inserted the item.
|
676 |
// increment the inserted counter
|
677 |
elseif ( ( is_bool($item) && $item === TRUE ) || ( $still_update_count === TRUE && $item !== FALSE ) ) {
|
|
|
|
|
|
|
678 |
$items_inserted++;
|
679 |
} elseif (has_filter('wprss_insert_post_item_conditionals', 'wprss_kf_check_post_item_keywords')) {
|
680 |
$logger->info('Item "{0}" was rejected by your keyword or tag filtering.', [
|
681 |
$ogItem->get_title()
|
682 |
]);
|
683 |
} else {
|
684 |
-
$logger->notice('Item "{0}" was rejected by an add-on.', [
|
685 |
$ogItem->get_title()
|
686 |
]);
|
687 |
}
|
563 |
$permalink = $item->get_permalink(); // Link or enclosure URL
|
564 |
$permalink = htmlspecialchars_decode( $permalink ); // SimplePie encodes HTML special chars
|
565 |
|
566 |
+
$logger->debug('Beginning import for item "{0}"', [$item->get_title()]);
|
567 |
|
568 |
$permalink = wprss_normalize_permalink( $permalink, $item, $feed_ID );
|
569 |
|
582 |
$time_limit = wprss_get_item_import_time_limit();
|
583 |
set_time_limit( $time_limit );
|
584 |
|
585 |
+
global $wp_filter;
|
586 |
+
if (isset($wp_filter['wprss_insert_post_item_conditionals'])) {
|
587 |
+
$hook = $wp_filter['wprss_insert_post_item_conditionals'];
|
588 |
+
|
589 |
+
if (count($hook->callbacks) > 0) {
|
590 |
+
$logger->debug('Hooks for `wprss_insert_post_item_conditionals`:');
|
591 |
+
}
|
592 |
+
|
593 |
+
foreach ($hook->callbacks as $list) {
|
594 |
+
foreach ($list as $callback) {
|
595 |
+
$logger->debug('-> {0}', [wprss_format_hook_callback($callback)]);
|
596 |
+
}
|
597 |
+
}
|
598 |
+
}
|
599 |
+
|
600 |
+
$logger->debug('Checking conditionals ...');
|
601 |
+
|
602 |
// Apply filters that determine if the feed item should be inserted into the DB or not.
|
603 |
$ogItem = $item;
|
604 |
$item = apply_filters( 'wprss_insert_post_item_conditionals', $item, $feed_ID, $permalink );
|
609 |
|
610 |
// If the item is not NULL, continue to inserting the feed item post into the DB
|
611 |
if ( $item !== NULL && !is_bool($item) ) {
|
612 |
+
$logger->debug('Resuming insertion into DB');
|
613 |
+
|
614 |
$post_status = 'publish';
|
615 |
|
616 |
// Get the date and GTM date and normalize if not valid dor not present
|
694 |
// If the item is TRUE, then a hook function in the filter inserted the item.
|
695 |
// increment the inserted counter
|
696 |
elseif ( ( is_bool($item) && $item === TRUE ) || ( $still_update_count === TRUE && $item !== FALSE ) ) {
|
697 |
+
$logger->debug('Item "{0}" was imported by an add-on or filter', [
|
698 |
+
$ogItem->get_title(),
|
699 |
+
]);
|
700 |
$items_inserted++;
|
701 |
} elseif (has_filter('wprss_insert_post_item_conditionals', 'wprss_kf_check_post_item_keywords')) {
|
702 |
$logger->info('Item "{0}" was rejected by your keyword or tag filtering.', [
|
703 |
$ogItem->get_title()
|
704 |
]);
|
705 |
} else {
|
706 |
+
$logger->notice('Item "{0}" was rejected by an add-on or filter.', [
|
707 |
$ogItem->get_title()
|
708 |
]);
|
709 |
}
|
@@ -716,6 +716,10 @@
|
|
716 |
$difference = $age - $max_age;
|
717 |
|
718 |
if ( $difference <= 0 ) {
|
|
|
|
|
|
|
|
|
719 |
return NULL;
|
720 |
} else {
|
721 |
return $item;
|
716 |
$difference = $age - $max_age;
|
717 |
|
718 |
if ( $difference <= 0 ) {
|
719 |
+
wpra_get_logger()->debug('Item "{0}" was rejected by age limit settings.', [
|
720 |
+
$item->get_title()
|
721 |
+
]);
|
722 |
+
|
723 |
return NULL;
|
724 |
} else {
|
725 |
return $item;
|
File without changes
|
@@ -73,8 +73,12 @@ function wpra_safe_remote_get($url, $args)
|
|
73 |
*/
|
74 |
function wpra_get_plugin_state($basename)
|
75 |
{
|
|
|
|
|
|
|
|
|
76 |
// ACTIVE
|
77 |
-
if (is_plugin_active($basename)) {
|
78 |
return 2;
|
79 |
}
|
80 |
|
73 |
*/
|
74 |
function wpra_get_plugin_state($basename)
|
75 |
{
|
76 |
+
if (!function_exists('is_plugin_active') && file_exists(ABSPATH . 'wp-admin/includes/plugin.php')) {
|
77 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
78 |
+
}
|
79 |
+
|
80 |
// ACTIVE
|
81 |
+
if (function_exists('is_plugin_active') && is_plugin_active($basename)) {
|
82 |
return 2;
|
83 |
}
|
84 |
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -395,3 +395,43 @@ if (!function_exists('wprss_verify_nonce'))
|
|
395 |
: false;
|
396 |
}
|
397 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
: false;
|
396 |
}
|
397 |
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Formats a hook callback into a readable string.
|
401 |
+
*
|
402 |
+
* @param array $callback A callback entry.
|
403 |
+
*
|
404 |
+
* @return string The callback name.
|
405 |
+
*/
|
406 |
+
function wprss_format_hook_callback(array $callback)
|
407 |
+
{
|
408 |
+
// Break static strings: "Example::method"
|
409 |
+
// into arrays: ["Example", "method"]
|
410 |
+
if (is_string($callback['function']) && (strpos($callback['function'], '::') !== false)) {
|
411 |
+
$callback['function'] = explode('::', $callback['function']);
|
412 |
+
}
|
413 |
+
|
414 |
+
if (is_array($callback['function'])) {
|
415 |
+
if (is_object($callback['function'][0])) {
|
416 |
+
$class = get_class($callback['function'][0]);
|
417 |
+
$access = '->';
|
418 |
+
} else {
|
419 |
+
$class = $callback['function'][0];
|
420 |
+
$access = '::';
|
421 |
+
}
|
422 |
+
|
423 |
+
$callback['name'] = $class . $access . $callback['function'][1] . '()';
|
424 |
+
} elseif (is_object($callback['function'])) {
|
425 |
+
if (is_a($callback['function'], 'Closure')) {
|
426 |
+
$callback['name'] = 'Closure';
|
427 |
+
} else {
|
428 |
+
$class = get_class($callback['function']);
|
429 |
+
|
430 |
+
$callback['name'] = $class . '->__invoke()';
|
431 |
+
}
|
432 |
+
} else {
|
433 |
+
$callback['name'] = $callback['function'] . '()';
|
434 |
+
}
|
435 |
+
|
436 |
+
return $callback['name'];
|
437 |
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -160,8 +160,7 @@ function toggle_feed_state_ajax_callback(e) {
|
|
160 |
|
161 |
|
162 |
|
163 |
-
jQuery(window).load
|
164 |
-
|
165 |
|
166 |
function wprssParseDate(str){
|
167 |
var t = str.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
|
@@ -285,7 +284,7 @@ jQuery(window).load( function(){
|
|
285 |
* WP-like collapsing settings in metabox
|
286 |
*/
|
287 |
(function($, wprss_admin_custom){
|
288 |
-
$(window).load
|
289 |
|
290 |
// Adds the Bulk Add button
|
291 |
$('<a>').text( wprss_admin_custom.bulk_add ).attr('href', wprss_urls.import_export).addClass('add-new-h2').insertAfter( $('.add-new-h2') );
|
@@ -443,7 +442,7 @@ if ( !String.prototype.trim ) {
|
|
443 |
|
444 |
// For add-ons page
|
445 |
(function($) {
|
446 |
-
$(window).load
|
447 |
$('#add-ons .add-on-group').each(function(){
|
448 |
var $el = $(this),
|
449 |
h = 0;
|
@@ -492,7 +491,7 @@ if ( !String.prototype.trim ) {
|
|
492 |
linkEl.text(linkEl.text() + ' (' + count + ')')
|
493 |
|
494 |
// If there are no logs for this filter, disable it
|
495 |
-
if (count
|
496 |
filterEl.addClass('wpra-log-filter-disabled');
|
497 |
return;
|
498 |
}
|
160 |
|
161 |
|
162 |
|
163 |
+
jQuery(window).on('load', function() {
|
|
|
164 |
|
165 |
function wprssParseDate(str){
|
166 |
var t = str.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
|
284 |
* WP-like collapsing settings in metabox
|
285 |
*/
|
286 |
(function($, wprss_admin_custom){
|
287 |
+
$(window).on('load', function() {
|
288 |
|
289 |
// Adds the Bulk Add button
|
290 |
$('<a>').text( wprss_admin_custom.bulk_add ).attr('href', wprss_urls.import_export).addClass('add-new-h2').insertAfter( $('.add-new-h2') );
|
442 |
|
443 |
// For add-ons page
|
444 |
(function($) {
|
445 |
+
$(window).on('load', function() {
|
446 |
$('#add-ons .add-on-group').each(function(){
|
447 |
var $el = $(this),
|
448 |
h = 0;
|
491 |
linkEl.text(linkEl.text() + ' (' + count + ')')
|
492 |
|
493 |
// If there are no logs for this filter, disable it
|
494 |
+
if (count === 0) {
|
495 |
filterEl.addClass('wpra-log-filter-disabled');
|
496 |
return;
|
497 |
}
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,11 +1,3 @@
|
|
1 |
(function ($) {
|
2 |
|
3 |
-
$(document).ready(function () {
|
4 |
-
// Toggle the log options when the "Show options" link is clicked
|
5 |
-
$('#wprss-error-log-options-link').click(function (e) {
|
6 |
-
$('#wprss-error-log-options').slideToggle(200);
|
7 |
-
e.preventDefault();
|
8 |
-
});
|
9 |
-
});
|
10 |
-
|
11 |
})(jQuery);
|
1 |
(function ($) {
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
})(jQuery);
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -5,7 +5,7 @@ Tags: RSS import, RSS aggregator, feed import, content curation, feed to post, n
|
|
5 |
Requires at least: 4.0 or higher
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 4.17.
|
9 |
License: GPLv3
|
10 |
|
11 |
The most popular RSS aggregator for WordPress. Build a news aggregator with content from unlimited sources within minutes. Simple, robust & powerful.
|
@@ -253,6 +253,31 @@ Our complete Knowledge Base with FAQs can be found [here](https://kb.wprssaggreg
|
|
253 |
|
254 |
== Changelog ==
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
= 4.17.6 (2020-07-29) =
|
257 |
**Added**
|
258 |
- A link in the New/Edit Feed Source page on how to find an RSS feed.
|
5 |
Requires at least: 4.0 or higher
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 4.17.8
|
9 |
License: GPLv3
|
10 |
|
11 |
The most popular RSS aggregator for WordPress. Build a news aggregator with content from unlimited sources within minutes. Simple, robust & powerful.
|
253 |
|
254 |
== Changelog ==
|
255 |
|
256 |
+
= 4.17.8 (2020-10-06) =
|
257 |
+
**Changed**
|
258 |
+
- Disabled SimplePie's HTML sanitization.
|
259 |
+
- Updated jQuery code to be compatible with the upcoming update in WordPress.
|
260 |
+
- Images without an extension can now be imported.
|
261 |
+
- The image importing function now allows the image URL and local path to be changed via filters.
|
262 |
+
- Changed how item importing is logged in the debugging log. The log now shows what hooks can reject an item.
|
263 |
+
|
264 |
+
**Fixed**
|
265 |
+
- WooCommerce Product type dropdown and accompanying options disappear while WP RSS Aggregator is active.
|
266 |
+
- Addressed notices about `register_rest_route` being called incorrectly.
|
267 |
+
- The "Validate feed" link did not work.
|
268 |
+
- Sites on a multi-site network would see an error about a function not existing.
|
269 |
+
- Errors would not be properly rendered for non-fatal notices and warnings.
|
270 |
+
|
271 |
+
= 4.17.7 (2020-08-12)
|
272 |
+
**Added**
|
273 |
+
- New HTML classes for pagination buttons.
|
274 |
+
|
275 |
+
**Fixed**
|
276 |
+
- The featured image when using the Feed to Post add-on was not being saved.
|
277 |
+
|
278 |
+
**Changed**
|
279 |
+
- FeedBurner feeds no longer need to have "format=xml" at the end of the URL.
|
280 |
+
|
281 |
= 4.17.6 (2020-07-29) =
|
282 |
**Added**
|
283 |
- A link in the New/Edit Feed Source page on how to find an RSS feed.
|
@@ -42,6 +42,35 @@ class UpsellModule implements ModuleInterface
|
|
42 |
public function getFactories()
|
43 |
{
|
44 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/*
|
46 |
* The items to upsell.
|
47 |
*
|
@@ -197,7 +226,15 @@ class UpsellModule implements ModuleInterface
|
|
197 |
* @since 4.15.1
|
198 |
*/
|
199 |
'wpra/upsell/more_features_page/menu_label' => function (ContainerInterface $c) {
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
},
|
202 |
/*
|
203 |
* The icon for the "More Features" menu.
|
42 |
public function getFactories()
|
43 |
{
|
44 |
return array(
|
45 |
+
/**
|
46 |
+
* Retrieves the base names of known addons.
|
47 |
+
*
|
48 |
+
* @since 4.17.8
|
49 |
+
*/
|
50 |
+
'wpra/upsell/known_addons' => function () {
|
51 |
+
return [
|
52 |
+
'wp-rss-feed-to-post/wp-rss-feed-to-post.php',
|
53 |
+
'wp-rss-full-text-feeds/wp-rss-full-text.php',
|
54 |
+
'wp-rss-templates/wp-rss-templates.php',
|
55 |
+
'wp-rss-keyword-filtering/wp-rss-keyword-filtering.php',
|
56 |
+
'wp-rss-categories/wp-rss-categories.php',
|
57 |
+
'wp-rss-wordai/wp-rss-wordai.php',
|
58 |
+
'wp-rss-spinnerchief/wp-rss-spinnerchief.php',
|
59 |
+
];
|
60 |
+
},
|
61 |
+
/**
|
62 |
+
* Retrieves the base names of installed addons, irrespective of whether they are active or not.
|
63 |
+
*
|
64 |
+
* @since 4.17.8
|
65 |
+
*/
|
66 |
+
'wpra/upsell/installed_addons' => function (ContainerInterface $c) {
|
67 |
+
$addons = $c->get('wpra/upsell/known_addons');
|
68 |
+
|
69 |
+
return array_filter($addons, function ($basename) {
|
70 |
+
return wpra_get_plugin_state($basename) > 0;
|
71 |
+
});
|
72 |
+
},
|
73 |
+
|
74 |
/*
|
75 |
* The items to upsell.
|
76 |
*
|
226 |
* @since 4.15.1
|
227 |
*/
|
228 |
'wpra/upsell/more_features_page/menu_label' => function (ContainerInterface $c) {
|
229 |
+
$installed = $c->get('wpra/upsell/installed_addons');
|
230 |
+
|
231 |
+
$label = count($installed) > 0
|
232 |
+
? $c->get('wpra/upsell/more_features_page/title')
|
233 |
+
: __('Upgrade', 'wprss');
|
234 |
+
|
235 |
+
$icon = $c->get('wpra/upsell/more_features_page/menu_icon');
|
236 |
+
|
237 |
+
return $label . $icon;
|
238 |
},
|
239 |
/*
|
240 |
* The icon for the "More Features" menu.
|
@@ -80,7 +80,9 @@ class EndPointManager
|
|
80 |
protected function getPermissionCallback(ValidatorInterface $authValidator = null)
|
81 |
{
|
82 |
if ($authValidator === null) {
|
83 |
-
return
|
|
|
|
|
84 |
}
|
85 |
|
86 |
return function (WP_REST_Request $request) use ($authValidator) {
|
80 |
protected function getPermissionCallback(ValidatorInterface $authValidator = null)
|
81 |
{
|
82 |
if ($authValidator === null) {
|
83 |
+
return function () {
|
84 |
+
return true;
|
85 |
+
};
|
86 |
}
|
87 |
|
88 |
return function (WP_REST_Request $request) use ($authValidator) {
|
@@ -7,7 +7,7 @@ use Symfony\Component\Translation\TranslatorInterface;
|
|
7 |
/**
|
8 |
* Translator for Twig dates.
|
9 |
*
|
10 |
-
* @since
|
11 |
*/
|
12 |
class TwigDateTranslator implements TranslatorInterface
|
13 |
{
|
@@ -25,7 +25,7 @@ class TwigDateTranslator implements TranslatorInterface
|
|
25 |
/**
|
26 |
* @inheritDoc
|
27 |
*
|
28 |
-
* @since
|
29 |
*/
|
30 |
public function trans($id, array $parameters = [], $domain = null, $locale = null)
|
31 |
{
|
@@ -35,7 +35,7 @@ class TwigDateTranslator implements TranslatorInterface
|
|
35 |
/**
|
36 |
* @inheritDoc
|
37 |
*
|
38 |
-
* @since
|
39 |
*/
|
40 |
public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null)
|
41 |
{
|
@@ -97,7 +97,7 @@ class TwigDateTranslator implements TranslatorInterface
|
|
97 |
/**
|
98 |
* @inheritDoc
|
99 |
*
|
100 |
-
* @since
|
101 |
*/
|
102 |
public function setLocale($locale)
|
103 |
{
|
@@ -106,7 +106,7 @@ class TwigDateTranslator implements TranslatorInterface
|
|
106 |
/**
|
107 |
* @inheritDoc
|
108 |
*
|
109 |
-
* @since
|
110 |
*/
|
111 |
public function getLocale()
|
112 |
{
|
7 |
/**
|
8 |
* Translator for Twig dates.
|
9 |
*
|
10 |
+
* @since 4.17.6
|
11 |
*/
|
12 |
class TwigDateTranslator implements TranslatorInterface
|
13 |
{
|
25 |
/**
|
26 |
* @inheritDoc
|
27 |
*
|
28 |
+
* @since 4.17.6
|
29 |
*/
|
30 |
public function trans($id, array $parameters = [], $domain = null, $locale = null)
|
31 |
{
|
35 |
/**
|
36 |
* @inheritDoc
|
37 |
*
|
38 |
+
* @since 4.17.6
|
39 |
*/
|
40 |
public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null)
|
41 |
{
|
97 |
/**
|
98 |
* @inheritDoc
|
99 |
*
|
100 |
+
* @since 4.17.6
|
101 |
*/
|
102 |
public function setLocale($locale)
|
103 |
{
|
106 |
/**
|
107 |
* @inheritDoc
|
108 |
*
|
109 |
+
* @since 4.17.6
|
110 |
*/
|
111 |
public function getLocale()
|
112 |
{
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -60,7 +60,7 @@ class ClassLoader
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
63 |
-
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
}
|
65 |
|
66 |
return array();
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
63 |
+
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
64 |
}
|
65 |
|
66 |
return array();
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: WP RSS Aggregator
|
5 |
* Plugin URI: https://www.wprssaggregator.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpraplugin
|
6 |
* Description: Imports and aggregates multiple RSS Feeds.
|
7 |
-
* Version: 4.17.
|
8 |
* Author: RebelCode
|
9 |
* Author URI: https://www.wprssaggregator.com
|
10 |
* Text Domain: wprss
|
@@ -76,7 +76,7 @@ use RebelCode\Wpra\Core\Plugin;
|
|
76 |
|
77 |
// Set the version number of the plugin.
|
78 |
if( !defined( 'WPRSS_VERSION' ) )
|
79 |
-
define( 'WPRSS_VERSION', '4.17.
|
80 |
|
81 |
if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
|
82 |
define( 'WPRSS_WP_MIN_VERSION', '4.8' );
|
@@ -568,11 +568,15 @@ function wpra_display_error($message, $error)
|
|
568 |
<div style="padding-top: 10px; overflow-x: scroll;">
|
569 |
<strong><?php _e('Error Message:', 'wprss'); ?></strong>
|
570 |
<br/>
|
571 |
-
<pre
|
572 |
|
573 |
-
|
574 |
-
|
575 |
-
|
|
|
|
|
|
|
|
|
576 |
|
577 |
<strong><?php _e('Stack trace:', 'wprss'); ?></strong>
|
578 |
<br/>
|
@@ -586,6 +590,34 @@ function wpra_display_error($message, $error)
|
|
586 |
return ob_get_clean();
|
587 |
}
|
588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
/**
|
590 |
* Safely deactivates WP RSS Aggregator.
|
591 |
*
|
4 |
* Plugin Name: WP RSS Aggregator
|
5 |
* Plugin URI: https://www.wprssaggregator.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpraplugin
|
6 |
* Description: Imports and aggregates multiple RSS Feeds.
|
7 |
+
* Version: 4.17.8
|
8 |
* Author: RebelCode
|
9 |
* Author URI: https://www.wprssaggregator.com
|
10 |
* Text Domain: wprss
|
76 |
|
77 |
// Set the version number of the plugin.
|
78 |
if( !defined( 'WPRSS_VERSION' ) )
|
79 |
+
define( 'WPRSS_VERSION', '4.17.8' );
|
80 |
|
81 |
if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
|
82 |
define( 'WPRSS_WP_MIN_VERSION', '4.8' );
|
568 |
<div style="padding-top: 10px; overflow-x: scroll;">
|
569 |
<strong><?php _e('Error Message:', 'wprss'); ?></strong>
|
570 |
<br/>
|
571 |
+
<pre><?= $error->getMessage(); ?> (<?= wprss_error_path($error) ?>)</pre>
|
572 |
|
573 |
+
<?php
|
574 |
+
$prev = $error;
|
575 |
+
while ($prev = $prev->getPrevious()) : ?>
|
576 |
+
<strong><?php _e('Caused by:', 'wprss'); ?></strong>
|
577 |
+
<br/>
|
578 |
+
<pre><?= $prev->getMessage(); ?> (<?= wprss_error_path($prev) ?>)</pre>
|
579 |
+
<?php endwhile; ?>
|
580 |
|
581 |
<strong><?php _e('Stack trace:', 'wprss'); ?></strong>
|
582 |
<br/>
|
590 |
return ob_get_clean();
|
591 |
}
|
592 |
|
593 |
+
/**
|
594 |
+
* @since [*next-version*]
|
595 |
+
*
|
596 |
+
* @param Exception|Error $exception
|
597 |
+
*
|
598 |
+
* @return string
|
599 |
+
*/
|
600 |
+
function wprss_error_path($exception)
|
601 |
+
{
|
602 |
+
$file = $exception->getFile();
|
603 |
+
|
604 |
+
$pos = stripos($file, 'wp-content');
|
605 |
+
|
606 |
+
if ($pos === false) {
|
607 |
+
$pos = stripos($file, 'wp-includes');
|
608 |
+
}
|
609 |
+
|
610 |
+
if ($pos === false) {
|
611 |
+
$pos = stripos($file, 'wp-admin');
|
612 |
+
}
|
613 |
+
|
614 |
+
if ($pos !== false) {
|
615 |
+
$file = substr($file, $pos);
|
616 |
+
}
|
617 |
+
|
618 |
+
return $file . ':' . $exception->getLine();
|
619 |
+
}
|
620 |
+
|
621 |
/**
|
622 |
* Safely deactivates WP RSS Aggregator.
|
623 |
*
|