WordPress Popular Posts - Version 6.0.5

Version Description

  • Fixes yet another issue where excerpts may output broken HTML under certain conditions (thanks dxylott54!)
  • Updates .pot file.

Release notes

Download this release

Release Info

Developer hcabrera
Plugin Icon 128x128 WordPress Popular Posts
Version 6.0.5
Comparing to
See all releases

Code changes from version 6.0.4 to 6.0.5

i18n/wordpress-popular-posts.pot CHANGED
@@ -5,7 +5,7 @@ msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Popular Posts\n"
7
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-popular-posts\n"
8
- "POT-Creation-Date: 2022-08-28 10:31-0400\n"
9
  "PO-Revision-Date: 2015-04-24 13:30-0430\n"
10
  "Last-Translator: Héctor Cabrera <hcabrerab@gmail.com>\n"
11
  "Language-Team: Héctor Cabrera <me@cabrerahector.com>\n"
@@ -445,7 +445,7 @@ msgid "Support"
445
  msgstr ""
446
 
447
  #: src/Admin/Admin.php:744 src/Admin/Admin.php:1130 src/Admin/Admin.php:1134
448
- #: src/Output.php:804
449
  #, php-format
450
  msgid "%s view"
451
  msgid_plural "%s views"
@@ -453,7 +453,7 @@ msgstr[0] ""
453
  msgstr[1] ""
454
 
455
  #: src/Admin/Admin.php:744 src/Admin/Admin.php:1132 src/Admin/Admin.php:1134
456
- #: src/Output.php:787
457
  #, php-format
458
  msgid "%s comment"
459
  msgid_plural "%s comments"
@@ -844,34 +844,34 @@ msgstr ""
844
  msgid "Sorry. No data so far."
845
  msgstr ""
846
 
847
- #: src/Output.php:622
848
  #, php-format
849
  msgid "%s ago"
850
  msgstr ""
851
 
852
- #: src/Output.php:798
853
  #, php-format
854
  msgid "%s view per day"
855
  msgid_plural "%s views per day"
856
  msgstr[0] ""
857
  msgstr[1] ""
858
 
859
- #: src/Output.php:816
860
  #, php-format
861
  msgid "by %s"
862
  msgstr ""
863
 
864
- #: src/Output.php:821
865
  #, php-format
866
  msgid "posted %s"
867
  msgstr ""
868
 
869
- #: src/Output.php:821
870
  #, php-format
871
  msgid "posted on %s"
872
  msgstr ""
873
 
874
- #: src/Output.php:826
875
  #, php-format
876
  msgid "under %s"
877
  msgstr ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Popular Posts\n"
7
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-popular-posts\n"
8
+ "POT-Creation-Date: 2022-09-04 10:15-0400\n"
9
  "PO-Revision-Date: 2015-04-24 13:30-0430\n"
10
  "Last-Translator: Héctor Cabrera <hcabrerab@gmail.com>\n"
11
  "Language-Team: Héctor Cabrera <me@cabrerahector.com>\n"
445
  msgstr ""
446
 
447
  #: src/Admin/Admin.php:744 src/Admin/Admin.php:1130 src/Admin/Admin.php:1134
448
+ #: src/Output.php:810
449
  #, php-format
450
  msgid "%s view"
451
  msgid_plural "%s views"
453
  msgstr[1] ""
454
 
455
  #: src/Admin/Admin.php:744 src/Admin/Admin.php:1132 src/Admin/Admin.php:1134
456
+ #: src/Output.php:793
457
  #, php-format
458
  msgid "%s comment"
459
  msgid_plural "%s comments"
844
  msgid "Sorry. No data so far."
845
  msgstr ""
846
 
847
+ #: src/Output.php:628
848
  #, php-format
849
  msgid "%s ago"
850
  msgstr ""
851
 
852
+ #: src/Output.php:804
853
  #, php-format
854
  msgid "%s view per day"
855
  msgid_plural "%s views per day"
856
  msgstr[0] ""
857
  msgstr[1] ""
858
 
859
+ #: src/Output.php:822
860
  #, php-format
861
  msgid "by %s"
862
  msgstr ""
863
 
864
+ #: src/Output.php:827
865
  #, php-format
866
  msgid "posted %s"
867
  msgstr ""
868
 
869
+ #: src/Output.php:827
870
  #, php-format
871
  msgid "posted on %s"
872
  msgstr ""
873
 
874
+ #: src/Output.php:832
875
  #, php-format
876
  msgid "under %s"
877
  msgstr ""
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: hcabrera
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
4
  Tags: popular, posts, widget, popularity, top
5
  Requires at least: 5.3
6
- Tested up to: 6.0.1
7
  Requires PHP: 7.2
8
- Stable tag: 6.0.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -109,6 +109,13 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
112
  = 6.0.4 =
113
 
114
  - Block: improves logic when toggling certain settings.
@@ -159,27 +166,6 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
159
 
160
  [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-6-0-php-5-support-dropped-minimum-supported-wordpress-changed/)
161
 
162
- = 5.5.1 =
163
-
164
- **If you're using a caching plugin flushing its cache after upgrading to this version is highly recommended.**
165
-
166
- - Fixes an issue where the WordPress Popular Posts block would, under specific conditions, output code that may break the page layout (thanks @shoelaced and @themosaurus for the report!)
167
- - Fixes minor variable declaration bug in wpp.js.min.
168
- - Cleans up inline style tag (thanks @gabu69 and Lohen Florent for the suggestions!)
169
- - Other minor fixes & changes.
170
-
171
- [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-5-5-qol-improvements-and-php-5-announcement/#minor-updates-and-hotfixes)
172
-
173
- = 5.5.0 =
174
-
175
- - Adds the Sort by Average Daily Views option from the classic widget to the WordPress Popular Posts block.
176
- - Adds the WordPress Date Format option from the classic widget to the WordPress Popular Posts block (please see announcements for details).
177
- - Adds new Content Tags: author_name and author_url.
178
- - Improves cached data garbage collection.
179
- - Other minor performances improvements and fixes.
180
-
181
- [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-5-5-qol-improvements-and-php-5-announcement/)
182
-
183
  [Full Changelog](https://github.com/cabrerahector/wordpress-popular-posts/blob/master/changelog.md)
184
 
185
  == Credits ==
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
4
  Tags: popular, posts, widget, popularity, top
5
  Requires at least: 5.3
6
+ Tested up to: 6.0.2
7
  Requires PHP: 7.2
8
+ Stable tag: 6.0.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
109
 
110
  == Changelog ==
111
 
112
+ = 6.0.5 =
113
+
114
+ - Fixes yet another issue where excerpts may output broken HTML under certain conditions (thanks dxylott54!)
115
+ - Updates .pot file.
116
+
117
+ [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-6-0-php-5-support-dropped-minimum-supported-wordpress-changed/#6.0.5)
118
+
119
  = 6.0.4 =
120
 
121
  - Block: improves logic when toggling certain settings.
166
 
167
  [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-6-0-php-5-support-dropped-minimum-supported-wordpress-changed/)
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  [Full Changelog](https://github.com/cabrerahector/wordpress-popular-posts/blob/master/changelog.md)
170
 
171
  == Credits ==
src/Output.php CHANGED
@@ -567,6 +567,12 @@ class Output {
567
  $excerpt = preg_replace('_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS', '', $excerpt);
568
  }
569
 
 
 
 
 
 
 
570
  $excerpt = trim($excerpt);
571
 
572
  }
567
  $excerpt = preg_replace('_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS', '', $excerpt);
568
  }
569
 
570
+ // remove HTML comments
571
+ $excerpt = preg_replace('/<!--.*?-->/ms', '', $excerpt);
572
+
573
+ // remove extra whitespaces
574
+ $excerpt = preg_replace('/\s\s+/', ' ', $excerpt);
575
+
576
  $excerpt = trim($excerpt);
577
 
578
  }
wordpress-popular-posts.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WordPress Popular Posts
17
  * Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
18
  * Description: A highly customizable widget that displays the most popular posts on your blog.
19
- * Version: 6.0.4
20
  * Requires at least: 5.3
21
  * Requires PHP: 7.2
22
  * Author: Hector Cabrera
@@ -31,7 +31,7 @@ if ( ! defined( 'WPINC' ) ) {
31
  die();
32
  }
33
 
34
- define('WPP_VERSION', '6.0.4');
35
 
36
  $wpp_main_plugin_file = __FILE__;
37
  // Load plugin bootstrap
16
  * Plugin Name: WordPress Popular Posts
17
  * Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
18
  * Description: A highly customizable widget that displays the most popular posts on your blog.
19
+ * Version: 6.0.5
20
  * Requires at least: 5.3
21
  * Requires PHP: 7.2
22
  * Author: Hector Cabrera
31
  die();
32
  }
33
 
34
+ define('WPP_VERSION', '6.0.5');
35
 
36
  $wpp_main_plugin_file = __FILE__;
37
  // Load plugin bootstrap