WP RSS Aggregator - Version 4.13.1

Version Description

(2018-04-30) = Changed: Disabled Twig cache due to tmp permission issues and false-positive suspicious file reporting by hosts. Changed: The list template's pagination option is now set to disabled by default, matching previous versions. Fixed: Re-added missing HTML classes in the list template that had broken user custom CSS styles. Fixed: Added a polyfill for the gettext() function for sites that don't have the PHP gettext extension enabled. Fixed: Re-added a function that was removed in v4.13, and marked it as deprecated. Fixed: Feed item dates were not using the site's timezone. Fixed: The styles for the legacy rendering system used by the Excerpts & Thumbnails addon were outdated.

Download this release

Release Info

Developer markzahra
Plugin Icon 128x128 WP RSS Aggregator
Version 4.13.1
Comparing to
See all releases

Code changes from version 4.13 to 4.13.1

CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ 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.13] - 2019-04-24
8
  ### Added
9
  * Introduced feed templates.
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.13.1] - 2018-04-30
8
+ ### Changed
9
+ * Disabled Twig cache due to tmp permission issues and false-positive suspicious file reporting by hosts.
10
+ * The list template's pagination option is now set to disabled by default, matching previous versions.
11
+
12
+ ### Fixed
13
+ * Re-added missing HTML classes in the list template that had broken user custom CSS styles.
14
+ * Added a polyfill for the `gettext()` function for sites that don't have the PHP `gettext` extension enabled.
15
+ * Re-added a function that was removed in v4.13, and marked it as deprecated.
16
+ * Fixed feed item dates not using the site's timezone.
17
+ * Fixed styles for the legacy rendering system used by the Excerpts & Thumbnails addon.
18
+
19
  ## [4.13] - 2019-04-24
20
  ### Added
21
  * Introduced feed templates.
css/legacy-styles.css CHANGED
@@ -1,6 +1,27 @@
1
- .wprss-feed-meta > span:not(:last-child):after {
2
- content: " | ";
 
 
 
3
  }
4
- .wprss-feed-meta > span {
5
- font-size: 85%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  }
1
+ li.feed-item { margin-bottom: 10px; }
2
+
3
+ .thumbnail-excerpt {
4
+ overflow:hidden;
5
+ margin-bottom: 5px;
6
  }
7
+
8
+ .thumbnail-excerpt img {
9
+ max-width:100%; float:left; margin-top: 0.5em; margin-right:10px;
10
+ }
11
+
12
+ .green {
13
+ color: #0BD600;
14
+ }
15
+
16
+ .nav-links {
17
+ overflow: hidden;
18
+ margin-bottom: 20px;
19
+ }
20
+
21
+ div.wprss-feed-meta > span {
22
+ font-size: 90%;
23
+ clear: both;
24
+ }
25
+ div.wprss-feed-meta > span:not(:last-child):after {
26
+ content: ' | ';
27
  }
css/templates/list/styles.css CHANGED
@@ -1,45 +1,29 @@
1
- /* The container for the list template output */
2
- div.wpra-list-template {
3
- font-size: 100%;
4
- }
5
-
6
  /* An item in the list */
7
- div.wpra-list-template ul.wpra-item-list > li.wpra-item {
8
- margin-bottom: 8px;
9
- }
10
-
11
- /* The item's title and link */
12
- div.wpra-list-template ul.wpra-item-list > li.wpra-item div.wpra-item-link {
13
- display: inline-block;
14
- vertical-align: text-top;
15
- line-height: 1.4em;
16
- }
17
-
18
- /* The container for source, date and author */
19
- div.wpra-list-template ul.wpra-item-list > li.wpra-item > div.wprss-feed-meta {
20
- line-height: 1.6em;
21
  }
22
 
23
  /* Separators between source, date and author */
24
- div.wpra-list-template ul.wpra-item-list > li.wpra-item > div.wprss-feed-meta > span {
25
- font-size: 85%;
26
  clear: both;
27
  }
28
- div.wpra-list-template ul.wpra-item-list > li.wpra-item > div.wprss-feed-meta > span:not(:last-child):after {
29
  content: ' | ';
30
  }
31
 
32
  /* Bullet types */
33
- ul.wpra-item-list {
34
  list-style: none;
35
  }
36
- ul.wpra-item-list:not(.wpra-item-list--bullets) li {
37
  margin-left: 0;
38
  }
39
- ul.wpra-item-list--bullets.wpra-item-list--default {
40
  list-style-type: disc;
41
  }
42
- ul.wpra-item-list--bullets.wpra-item-list--numbers {
43
  list-style: decimal;
44
  }
45
 
@@ -70,4 +54,3 @@ ul.wpra-item-list--bullets.wpra-item-list--numbers {
70
  content: '';
71
  clear: both;
72
  }
73
-
 
 
 
 
 
1
  /* An item in the list */
2
+ div.wpra-list-template .wpra-item-list > li.wpra-item {
3
+ margin-top: 0px;
4
+ margin-bottom: 10px;
 
 
 
 
 
 
 
 
 
 
 
5
  }
6
 
7
  /* Separators between source, date and author */
8
+ div.wpra-list-template .wpra-item-list > li.wpra-item > div.wprss-feed-meta > span {
9
+ font-size: 90%;
10
  clear: both;
11
  }
12
+ div.wpra-list-template .wpra-item-list > li.wpra-item > div.wprss-feed-meta > span:not(:last-child):after {
13
  content: ' | ';
14
  }
15
 
16
  /* Bullet types */
17
+ .wpra-item-list {
18
  list-style: none;
19
  }
20
+ .wpra-item-list:not(.wpra-item-list--bullets) li {
21
  margin-left: 0;
22
  }
23
+ .wpra-item-list--bullets.wpra-item-list--default {
24
  list-style-type: disc;
25
  }
26
+ .wpra-item-list--bullets.wpra-item-list--numbers {
27
  list-style: decimal;
28
  }
29
 
54
  content: '';
55
  clear: both;
56
  }
 
includes/Aventura/Wprss/Core/ServiceProvider.php CHANGED
@@ -172,7 +172,7 @@ class ServiceProvider extends AbstractComponentServiceProvider implements Servic
172
  $config = $this->_normalizeConfig($config, array(
173
  'plugin' => $c->get($this->_p('plugin')),
174
  'log_file_path' => WPRSS_LOG_FILE . '-' . get_current_blog_id() . WPRSS_LOG_FILE_EXT,
175
- 'level_threshold' => wprss_log_get_level()
176
  ));
177
  $service = new Component\Logger($config);
178
  $this->_prepareComponent($service);
172
  $config = $this->_normalizeConfig($config, array(
173
  'plugin' => $c->get($this->_p('plugin')),
174
  'log_file_path' => WPRSS_LOG_FILE . '-' . get_current_blog_id() . WPRSS_LOG_FILE_EXT,
175
+ 'level_threshold' => WPRSS_LOG_LEVEL_ERROR,
176
  ));
177
  $service = new Component\Logger($config);
178
  $this->_prepareComponent($service);
includes/deprecated.php CHANGED
@@ -36,3 +36,18 @@ function wprss_modify_link_builder_query($query)
36
 
37
  return $query;
38
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  return $query;
38
  }
39
+
40
+ /**
41
+ * @deprecated Replaced by PSR Logging since 4.13
42
+ */
43
+ function wprss_log_get_level()
44
+ {
45
+ return 'Error';
46
+ }
47
+
48
+ // Polyfill gettext using the WordPress __() function, for Twig
49
+ if (!function_exists('\gettext')) {
50
+ function gettext() {
51
+ return call_user_func_array('__', func_get_args());
52
+ }
53
+ }
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === WP RSS Aggregator ===
2
- Contributors: RebelCode, jeangalea, markzahra, Mekku, xedin.unknown,
3
  Plugin URI: https://www.wprssaggregator.com
4
  Tags: RSS import, RSS aggregator, feed import, content curation, feed to post
5
  Requires at least: 4.0 or higher
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4 or higher
8
- Stable tag: 4.13
9
  License: GPLv3
10
 
11
  WP RSS Aggregator is the original & most popular WordPress solution for importing RSS feeds, auto-blogging, content curation & aggregation.
@@ -283,27 +283,11 @@ Our complete Knowledge Base with FAQs can be found [here](https://kb.wprssaggreg
283
 
284
  == Changelog ==
285
 
286
- = 4.13 (2019-04-24) =
287
- Added: Introduced feed templates.
288
- Added: Introduced a WP RSS Aggregator Gutenberg block.
289
- Added: Brand new debug log and logging system that stores logs in the database.
290
- Added: Items can now be added to the Blacklist manually.
291
- Changed: Refactored a lot of legacy code over to the new modular system.
292
- Changed: General display settings have been moved to the "Default" template type.
293
- Changed: Reorganized the general plugin settings. Advanced options are now under an advanced settings section.
294
- Changed: Removed the "Add New" menu item from the RSS Aggregator menu.
295
- Changed: The feed sources page now updates every 1 second.
296
- Changed: Updated the TinyMCE dialog options for inserting a shortcode on a page or post (Classic Editor).
297
- Changed: Updated administrator and editor role capabilities, fixing various permission bugs.
298
- Changed: Updated a lot of setting descriptions and tooltips.
299
- Changed: The help support beacon is now enabled by default.
300
- Fixed: Import errors no longer "freeze" feed sources in an infinite importing state.
301
- Fixed: Some import errors would not be logged due to script timeout or execution errors.
302
- Fixed: Feed to Post was not able to show feed items in the shortcode.
303
- Fixed: Deprecation notices on PHP 7.3.
304
- Fixed: The "Force feed" option was not properly being applied to feed sources.
305
- Fixed: A bug that caused perfectly good RSS feeds to trigger gzip errors.
306
- Fixed: The "Delete permanently & blacklist" row action was appearing for non-feed-item post types.
307
- Removed: The notice that asks users to leave a review was removed due to various bugs.
308
-
309
- [Browse the full changelog history.](https://www.wprssaggregator.com/extension/core-plugin/)
1
  === WP RSS Aggregator ===
2
+ Contributors: RebelCode, jeangalea, markzahra, Mekku, xedin.unknown,romlytvynenko
3
  Plugin URI: https://www.wprssaggregator.com
4
  Tags: RSS import, RSS aggregator, feed import, content curation, feed to post
5
  Requires at least: 4.0 or higher
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4 or higher
8
+ Stable tag: 4.13.1
9
  License: GPLv3
10
 
11
  WP RSS Aggregator is the original & most popular WordPress solution for importing RSS feeds, auto-blogging, content curation & aggregation.
283
 
284
  == Changelog ==
285
 
286
+ = 4.13.1 (2018-04-30) =
287
+ Changed: Disabled Twig cache due to tmp permission issues and false-positive suspicious file reporting by hosts.
288
+ Changed: The list template's pagination option is now set to disabled by default, matching previous versions.
289
+ Fixed: Re-added missing HTML classes in the list template that had broken user custom CSS styles.
290
+ Fixed: Added a polyfill for the `gettext()` function for sites that don't have the PHP `gettext` extension enabled.
291
+ Fixed: Re-added a function that was removed in v4.13, and marked it as deprecated.
292
+ Fixed: Feed item dates were not using the site's timezone.
293
+ Fixed: The styles for the legacy rendering system used by the Excerpts & Thumbnails addon were outdated.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Feeds/Models/WpPostFeedItem.php CHANGED
@@ -46,6 +46,13 @@ class WpPostFeedItem extends WpCptDataSet
46
  */
47
  const URL_KEY = 'url';
48
 
 
 
 
 
 
 
 
49
  /**
50
  * Constructor.
51
  *
@@ -111,7 +118,10 @@ class WpPostFeedItem extends WpCptDataSet
111
  */
112
  protected function wrapPostMetaDataSet(WP_Post $post, DataSetInterface $meta)
113
  {
114
- $wrapperData = [static::SOURCE_KEY => new WpPostFeedSource($meta['source_id'])];
 
 
 
115
 
116
  // Use the real WordPress post author if the meta author does not exist
117
  if (!isset($meta[static::AUTHOR_KEY]) || empty($meta[static::AUTHOR_KEY])) {
46
  */
47
  const URL_KEY = 'url';
48
 
49
+ /**
50
+ * The key to which to map the feed item timestamp.
51
+ *
52
+ * @since 4.13
53
+ */
54
+ const TIMESTAMP_KEY = 'timestamp';
55
+
56
  /**
57
  * Constructor.
58
  *
118
  */
119
  protected function wrapPostMetaDataSet(WP_Post $post, DataSetInterface $meta)
120
  {
121
+ $wrapperData = [
122
+ static::SOURCE_KEY => new WpPostFeedSource($meta['source_id']),
123
+ static::TIMESTAMP_KEY => strtotime($post->post_date_gmt),
124
+ ];
125
 
126
  // Use the real WordPress post author if the meta author does not exist
127
  if (!isset($meta[static::AUTHOR_KEY]) || empty($meta[static::AUTHOR_KEY])) {
src/Licensing/LicenseInterface.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- namespace RebelCode\Wpra\Core\Licensing;
4
-
5
- /**
6
- * Interface for objects that represent a license.
7
- *
8
- * @since 4.13
9
- */
10
- interface LicenseInterface
11
- {
12
- /**
13
- * Retrieves the license's key.
14
- *
15
- * @since 4.13
16
- *
17
- * @return string
18
- */
19
- public function getKey();
20
-
21
- /**
22
- * Retrieves the license's status.
23
- *
24
- * @since 4.13
25
- *
26
- * @return string
27
- */
28
- public function getStatus();
29
-
30
- /**
31
- * Retrieves the license's expiry timestamp.
32
- *
33
- * @since 4.13
34
- *
35
- * @return int
36
- */
37
- public function getExpiry();
38
-
39
- /**
40
- * Retrieves the information about the license holder.
41
- *
42
- * @since 4.13
43
- *
44
- * @return string
45
- */
46
- public function getHolder();
47
-
48
- /**
49
- * Retrieves the number of activations for this license.
50
- *
51
- * @since 4.13
52
- *
53
- * @return int
54
- */
55
- public function getActivationCount();
56
-
57
- /**
58
- * Retrieves the activation limit for this license.
59
- *
60
- * @since 4.13
61
- *
62
- * @return int
63
- */
64
- public function getActivationLimit();
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Licensing/LicenseManagerInterface.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- namespace RebelCode\Wpra\Core\Licensing;
4
-
5
- use Dhii\Validation\Exception\ValidationExceptionInterface;
6
- use RuntimeException;
7
-
8
- /**
9
- * Interface for objects that can activate and deactivate licenses.
10
- *
11
- * @since 4.13
12
- */
13
- interface LicenseManagerInterface
14
- {
15
- /**
16
- * Activates the given license.
17
- *
18
- * @since 4.13
19
- *
20
- * @param LicenseInterface $license The license to activate.
21
- *
22
- * @throws ValidationExceptionInterface If the license is invalid.
23
- * @throws RuntimeException If an error occurred and the license failed to be activated.
24
- */
25
- public function activate(LicenseInterface $license);
26
-
27
- /**
28
- * Deactivates the given license.
29
- *
30
- * @since 4.13
31
- *
32
- * @param LicenseInterface $license The license to deactivate.
33
- *
34
- * @throws ValidationExceptionInterface If the license is invalid.
35
- * @throws RuntimeException If an error occurred and the license failed to be deactivated.
36
- */
37
- public function deactivate(LicenseInterface $license);
38
-
39
- /**
40
- * Retrieves the information about a given license.
41
- *
42
- * @since 4.13
43
- *
44
- * @param LicenseInterface $license The license.
45
- *
46
- * @throws RuntimeException If an error occurred while retrieving the license info.
47
- */
48
- public function getInfo(LicenseInterface $license);
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Licensing/PluginUpdaterInterface.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace RebelCode\Wpra\Core\Licensing;
4
-
5
- /**
6
- * Description
7
- *
8
- * @since 4.13
9
- */
10
- interface PluginUpdaterInterface
11
- {
12
- /**
13
- * Description
14
- *
15
- * @since 4.13
16
- */
17
- public function getChangelog();
18
-
19
- /**
20
- *
21
- *
22
- * @since 4.13
23
- *
24
- * @return mixed
25
- */
26
- public function getVersion();
27
-
28
- /**
29
- *
30
- *
31
- * @since 4.13
32
- *
33
- * @return mixed
34
- */
35
- public function getDownloadUrl();
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Licensing/Updater.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
-
3
- namespace RebelCode\Wpra\Core\Licensing;
4
-
5
- use Dhii\Exception\CreateInvalidArgumentExceptionCapableTrait;
6
- use Dhii\I18n\StringTranslatingTrait;
7
- use Dhii\Util\Normalization\NormalizeArrayCapableTrait;
8
- use RebelCode\Wpra\Core\Wp\PluginInfo;
9
-
10
- class Updater
11
- {
12
- use NormalizeArrayCapableTrait;
13
-
14
- use CreateInvalidArgumentExceptionCapableTrait;
15
-
16
- use StringTranslatingTrait;
17
-
18
- protected $pluginSlug;
19
-
20
- protected $transient;
21
-
22
- protected $cacheEnabled;
23
-
24
- public function foo()
25
- {
26
- add_action('plugins_api', [$this, 'pluginsApi'], 15, 3);
27
- }
28
-
29
- public function pluginsApi($res, $action, $args)
30
- {
31
- if ($action !== 'plugin_information' || $args->slug !== 'my-plugin') {
32
- return false;
33
- }
34
-
35
- $info = $this->getPluginInfo($res, $action, $args);
36
-
37
- if (empty($info)) {
38
- return false;
39
- }
40
-
41
- return new PluginInfo();
42
- }
43
-
44
- protected function getPluginInfo($res, $action, $args)
45
- {
46
- $cache = $this->getCache();
47
- $info = ($this->cacheEnabled && $cache !== null)
48
- ? $cache
49
- : $this->fetchPluginInfo();
50
-
51
- if ($this->cacheEnabled) {
52
- $this->setCache($info);
53
- }
54
-
55
- return $info;
56
- }
57
-
58
- protected function getCache()
59
- {
60
- $cache = get_transient($this->transient);
61
-
62
- return ($cache === false)
63
- ? null
64
- : new PluginInfo($cache);
65
- }
66
-
67
- protected function setCache(PluginInfo $info)
68
- {
69
- set_transient($this->transient, $info->toArray(), DAY_IN_SECONDS);
70
-
71
- return $info;
72
- }
73
-
74
- /**
75
- * Fetches the plugin info from remote.
76
- *
77
- * @since 4.13
78
- *
79
- * @return object
80
- */
81
- abstract protected function fetchPluginInfo();
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Licensing/Updates/UpdateServerInterface.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
- namespace RebelCode\Wpra\Core\Licensing\Updates;
4
-
5
- use RebelCode\Wpra\Core\Wp\PluginInfo;
6
-
7
- interface UpdateServerInterface
8
- {
9
- /**
10
- *
11
- *
12
- * @since 4.13
13
- *
14
- * @return PluginInfo
15
- */
16
- public function getPluginInfo();
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Licensing/Updates/UpdaterInterface.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
-
3
- namespace RebelCode\Wpra\Core\Licensing\Updates;
4
-
5
- /**
6
- * Description
7
- *
8
- * @since 4.13
9
- */
10
- interface UpdaterInterface
11
- {
12
- /**
13
- * Description
14
- *
15
- * @since 4.13
16
- */
17
- public function method();
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Modules/FeedTemplatesModule.php CHANGED
@@ -282,7 +282,7 @@ class FeedTemplatesModule implements ModuleInterface
282
  'limit' => 15,
283
  'title_max_length' => 0,
284
  'title_is_link' => true,
285
- 'pagination' => true,
286
  'pagination_type' => 'default',
287
  'source_enabled' => true,
288
  'source_prefix' => __('Source:', 'wprss'),
282
  'limit' => 15,
283
  'title_max_length' => 0,
284
  'title_is_link' => true,
285
+ 'pagination' => false,
286
  'pagination_type' => 'default',
287
  'source_enabled' => true,
288
  'source_prefix' => __('Source:', 'wprss'),
src/Modules/TwigModule.php CHANGED
@@ -6,6 +6,7 @@ use Psr\Container\ContainerInterface;
6
  use RebelCode\Wpra\Core\Data\Collections\TwigTemplateCollection;
7
  use RebelCode\Wpra\Core\Twig\WpraExtension;
8
  use Twig\Environment as TwigEnvironment;
 
9
  use Twig\Extension\DebugExtension;
10
  use Twig\Extensions\DateExtension;
11
  use Twig\Extensions\I18nExtension;
@@ -68,7 +69,7 @@ class TwigModule implements ModuleInterface
68
  * @since 4.13
69
  */
70
  'wpra/twig/debug' => function () {
71
- return defined('WPRSS_DEBUG') && WPRSS_DEBUG;
72
  },
73
  /*
74
  * The twig cache enabler option.
@@ -76,14 +77,14 @@ class TwigModule implements ModuleInterface
76
  * @since 4.13
77
  */
78
  'wpra/twig/cache_enabled' => function (ContainerInterface $c) {
79
- return !$c->get('wpra/twig/debug');
80
  },
81
  /*
82
  * The path to the Twig cache.
83
  *
84
  * @since 4.13
85
  */
86
- 'wpra/twig/cache' => function (ContainerInterface $c) {
87
  return get_temp_dir() . 'wprss/twig-cache';
88
  },
89
  /*
@@ -94,7 +95,7 @@ class TwigModule implements ModuleInterface
94
  'wpra/twig/options' => function (ContainerInterface $c) {
95
  return [
96
  'debug' => $c->get('wpra/twig/debug'),
97
- 'cache' => $c->get('wpra/twig/cache_enabled') ? $c->get('wpra/twig/cache') : false,
98
  ];
99
  },
100
  /*
@@ -163,7 +164,7 @@ class TwigModule implements ModuleInterface
163
  {
164
  return [
165
  /*
166
- * Registers the Twig extensions.
167
  *
168
  * @since 4.13
169
  */
@@ -172,6 +173,10 @@ class TwigModule implements ModuleInterface
172
  $twig->addExtension($extension);
173
  }
174
 
 
 
 
 
175
  return $twig;
176
  }
177
  ];
6
  use RebelCode\Wpra\Core\Data\Collections\TwigTemplateCollection;
7
  use RebelCode\Wpra\Core\Twig\WpraExtension;
8
  use Twig\Environment as TwigEnvironment;
9
+ use Twig\Extension\CoreExtension;
10
  use Twig\Extension\DebugExtension;
11
  use Twig\Extensions\DateExtension;
12
  use Twig\Extensions\I18nExtension;
69
  * @since 4.13
70
  */
71
  'wpra/twig/debug' => function () {
72
+ return false;
73
  },
74
  /*
75
  * The twig cache enabler option.
77
  * @since 4.13
78
  */
79
  'wpra/twig/cache_enabled' => function (ContainerInterface $c) {
80
+ return false;
81
  },
82
  /*
83
  * The path to the Twig cache.
84
  *
85
  * @since 4.13
86
  */
87
+ 'wpra/twig/cache_dir' => function (ContainerInterface $c) {
88
  return get_temp_dir() . 'wprss/twig-cache';
89
  },
90
  /*
95
  'wpra/twig/options' => function (ContainerInterface $c) {
96
  return [
97
  'debug' => $c->get('wpra/twig/debug'),
98
+ 'cache' => $c->get('wpra/twig/cache_enabled'),
99
  ];
100
  },
101
  /*
164
  {
165
  return [
166
  /*
167
+ * Registers the Twig extensions for WPRA and sets the Twig timezone to match WordPress.
168
  *
169
  * @since 4.13
170
  */
173
  $twig->addExtension($extension);
174
  }
175
 
176
+ /* @var $twigCore CoreExtension */
177
+ $twigCore = $twig->getExtension('\Twig\Extension\CoreExtension');;
178
+ $twigCore->setTimezone($t = $c->get('wp/timezone'));
179
+
180
  return $twig;
181
  }
182
  ];
src/Modules/WpModule.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace RebelCode\Wpra\Core\Modules;
4
 
 
5
  use Psr\Container\ContainerInterface;
6
  use RebelCode\Wpra\Core\Wp\WpRolesProxy;
7
 
@@ -37,6 +38,33 @@ class WpModule implements ModuleInterface
37
  */
38
  'wp/roles' => function () {
39
  return new WpRolesProxy();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
  ];
42
  }
2
 
3
  namespace RebelCode\Wpra\Core\Modules;
4
 
5
+ use DateTimeZone;
6
  use Psr\Container\ContainerInterface;
7
  use RebelCode\Wpra\Core\Wp\WpRolesProxy;
8
 
38
  */
39
  'wp/roles' => function () {
40
  return new WpRolesProxy();
41
+ },
42
+ /*
43
+ * The WordPress timezone as a DateTimeZone object.
44
+ *
45
+ * @since 4.13.1
46
+ */
47
+ 'wp/timezone' => function (ContainerInterface $c) {
48
+ return new DateTimeZone($c->get('wp/timezone_name'));
49
+ },
50
+ /*
51
+ * The WordPress timezone name.
52
+ *
53
+ * @since 4.13.1
54
+ */
55
+ 'wp/timezone_name' => function () {
56
+ $timezone_string = get_option('timezone_string');
57
+
58
+ if (!empty($timezone_string)) {
59
+ return $timezone_string;
60
+ }
61
+
62
+ $offset = get_option('gmt_offset');
63
+ $hours = (int) $offset;
64
+ $minutes = ($offset - floor($offset)) * 60;
65
+ $offset = sprintf('%+03d:%02d', $hours, $minutes);
66
+
67
+ return $offset;
68
  }
69
  ];
70
  }
src/Templates/Feeds/Types/ListTemplateType.php CHANGED
@@ -83,7 +83,7 @@ class ListTemplateType extends AbstractWpraFeedTemplateType
83
  'pagination' => [
84
  'key' => 'pagination_enabled',
85
  'filter' => FILTER_VALIDATE_BOOLEAN,
86
- 'default' => true,
87
  ],
88
  'pagination_type' => [
89
  'filter' => 'enum',
83
  'pagination' => [
84
  'key' => 'pagination_enabled',
85
  'filter' => FILTER_VALIDATE_BOOLEAN,
86
+ 'default' => false,
87
  ],
88
  'pagination_type' => [
89
  'filter' => 'enum',
templates/feeds/list/feed-item.twig CHANGED
@@ -5,17 +5,15 @@
5
  {% endif %}
6
 
7
  {# Show the title #}
8
- <div class="wpra-item-link">
9
- {{ item_title | wpralink(item.permalink, options.title_is_link, options) }}
10
- {{ options.title_after }}
11
- </div>
12
 
13
  {# Prepare date HTML class and formatted strinng #}
14
- {% set date_str = item.date|date(options.date_format) %}
15
  {% set date_class = "feed-date" %}
16
  {# If time-ago format is used, use alternate format and HTML class #}
17
  {% if options.date_use_time_ago %}
18
- {% set date_str = date_str|time_diff %}
19
  {% set date_class = "time-ago" %}
20
  {% endif %}
21
 
5
  {% endif %}
6
 
7
  {# Show the title #}
8
+ {{ item_title | wpralink(item.permalink, options.title_is_link, options) }}
9
+ {{ options.title_after }}
 
 
10
 
11
  {# Prepare date HTML class and formatted strinng #}
12
+ {% set date_str = item.timestamp|date(options.date_format) %}
13
  {% set date_class = "feed-date" %}
14
  {# If time-ago format is used, use alternate format and HTML class #}
15
  {% if options.date_use_time_ago %}
16
+ {% set date_str = item.date|time_diff %}
17
  {% set date_class = "time-ago" %}
18
  {% endif %}
19
 
templates/feeds/list/feed-list.twig CHANGED
@@ -1,6 +1,6 @@
1
  {% set list_type = options.bullets_enabled and options.bullet_type == 'numbers' ? 'ol' : 'ul' %}
2
 
3
- <{{ list_type }} class="wpra-item-list {{ options.bullets_enabled ? 'wpra-item-list--bullets wpra-item-list--' ~ options.bullet_type : '' }}"
4
  start="{{ (pagination.page - 1) * pagination.items_per_page + 1}}">
5
  {% set hasItems = false %}
6
  {% for item in items %}
1
  {% set list_type = options.bullets_enabled and options.bullet_type == 'numbers' ? 'ol' : 'ul' %}
2
 
3
+ <{{ list_type }} class="wpra-item-list rss-aggregator {{ options.bullets_enabled ? 'wpra-item-list--bullets wpra-item-list--' ~ options.bullet_type : '' }}"
4
  start="{{ (pagination.page - 1) * pagination.items_per_page + 1}}">
5
  {% set hasItems = false %}
6
  {% for item in items %}
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit612105272fdcc9d91a19df6d72150aaa::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit84a969049c0b32ee346cab8a0b2d77d0::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit612105272fdcc9d91a19df6d72150aaa
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit612105272fdcc9d91a19df6d72150aaa
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit612105272fdcc9d91a19df6d72150aaa', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit612105272fdcc9d91a19df6d72150aaa', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit612105272fdcc9d91a19df6d72150aaa::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit612105272fdcc9d91a19df6d72150aaa
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit612105272fdcc9d91a19df6d72150aaa::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire612105272fdcc9d91a19df6d72150aaa($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire612105272fdcc9d91a19df6d72150aaa($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit84a969049c0b32ee346cab8a0b2d77d0
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit84a969049c0b32ee346cab8a0b2d77d0', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit84a969049c0b32ee346cab8a0b2d77d0', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit84a969049c0b32ee346cab8a0b2d77d0::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit84a969049c0b32ee346cab8a0b2d77d0::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire84a969049c0b32ee346cab8a0b2d77d0($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire84a969049c0b32ee346cab8a0b2d77d0($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit612105272fdcc9d91a19df6d72150aaa
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -194,9 +194,9 @@ class ComposerStaticInit612105272fdcc9d91a19df6d72150aaa
194
  public static function getInitializer(ClassLoader $loader)
195
  {
196
  return \Closure::bind(function () use ($loader) {
197
- $loader->prefixLengthsPsr4 = ComposerStaticInit612105272fdcc9d91a19df6d72150aaa::$prefixLengthsPsr4;
198
- $loader->prefixDirsPsr4 = ComposerStaticInit612105272fdcc9d91a19df6d72150aaa::$prefixDirsPsr4;
199
- $loader->prefixesPsr0 = ComposerStaticInit612105272fdcc9d91a19df6d72150aaa::$prefixesPsr0;
200
 
201
  }, null, ClassLoader::class);
202
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit84a969049c0b32ee346cab8a0b2d77d0
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
194
  public static function getInitializer(ClassLoader $loader)
195
  {
196
  return \Closure::bind(function () use ($loader) {
197
+ $loader->prefixLengthsPsr4 = ComposerStaticInit84a969049c0b32ee346cab8a0b2d77d0::$prefixLengthsPsr4;
198
+ $loader->prefixDirsPsr4 = ComposerStaticInit84a969049c0b32ee346cab8a0b2d77d0::$prefixDirsPsr4;
199
+ $loader->prefixesPsr0 = ComposerStaticInit84a969049c0b32ee346cab8a0b2d77d0::$prefixesPsr0;
200
 
201
  }, null, ClassLoader::class);
202
  }
wp-rss-aggregator.php CHANGED
@@ -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.13
8
  * Author: RebelCode
9
  * Author URI: https://www.wprssaggregator.com
10
  * Text Domain: wprss
@@ -63,7 +63,7 @@ use RebelCode\Wpra\Core\Plugin;
63
 
64
  // Set the version number of the plugin.
65
  if( !defined( 'WPRSS_VERSION' ) )
66
- define( 'WPRSS_VERSION', '4.13' );
67
 
68
  if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
69
  define( 'WPRSS_WP_MIN_VERSION', '4.0' );
@@ -185,6 +185,9 @@ wprss_autoloader()->add('Aventura\\Wprss\\Core\\DiagTest', WPRACORE_DIAG_TESTS_D
185
  /* Only function definitions, no effect! */
186
  require_once(WPRSS_INC . 'functions.php');
187
 
 
 
 
188
  /* SimplePie */
189
  require_once ( ABSPATH . WPINC . '/class-simplepie.php' );
190
 
@@ -197,9 +200,6 @@ require_once ( WPRSS_INC . 'di.php' );
197
  /* Load install, upgrade and migration code. */
198
  require_once ( WPRSS_INC . 'update.php' );
199
 
200
- /* Deprecated things */
201
- require_once(WPRSS_INC . 'deprecated.php');
202
-
203
  /* Load the file for setting capabilities of our post types */
204
  require_once ( WPRSS_INC . 'roles-capabilities.php' );
205
 
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.13.1
8
  * Author: RebelCode
9
  * Author URI: https://www.wprssaggregator.com
10
  * Text Domain: wprss
63
 
64
  // Set the version number of the plugin.
65
  if( !defined( 'WPRSS_VERSION' ) )
66
+ define( 'WPRSS_VERSION', '4.13.1' );
67
 
68
  if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
69
  define( 'WPRSS_WP_MIN_VERSION', '4.0' );
185
  /* Only function definitions, no effect! */
186
  require_once(WPRSS_INC . 'functions.php');
187
 
188
+ /* Deprecated functions */
189
+ require_once(WPRSS_INC . 'deprecated.php');
190
+
191
  /* SimplePie */
192
  require_once ( ABSPATH . WPINC . '/class-simplepie.php' );
193
 
200
  /* Load install, upgrade and migration code. */
201
  require_once ( WPRSS_INC . 'update.php' );
202
 
 
 
 
203
  /* Load the file for setting capabilities of our post types */
204
  require_once ( WPRSS_INC . 'roles-capabilities.php' );
205