WordPress Popular Posts - Version 5.3.1

Version Description

  • wpp_get_views(): restores previous behavior where when no time range was set the function would return total views count (thanks @narolles!)
  • The WPP widget will now be loaded via AJAX by default (this affects new installs only.)
Download this release

Release Info

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

Code changes from version 5.3.0 to 5.3.1

readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: popular, posts, widget, popularity, top
5
  Requires at least: 4.9
6
  Tested up to: 5.7.1
7
  Requires PHP: 5.4
8
- Stable tag: 5.3.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -36,6 +36,12 @@ WordPress Popular Posts is a highly customizable widget that displays your most
36
  * **Localization** - [Translate WPP into your own language](https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#i-want-to-translate-your-plugin-into-my-language--help-you-update-a-translation-what-do-i-need-to-do).
37
  * **[WP-PostRatings](https://wordpress.org/plugins/wp-postratings/) support** - Show your visitors how your readers are rating your posts!
38
 
 
 
 
 
 
 
39
  **WordPress Popular Posts** is now also on [GitHub](https://github.com/cabrerahector/wordpress-popular-posts)!
40
 
41
  Looking for a **Recent Posts** widget just as featured-packed as WordPress Popular Posts? **Try [Recently](https://wordpress.org/plugins/recently/)**!
@@ -91,6 +97,11 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
94
  = 5.3.0 =
95
 
96
  - Improves compatibility with PHP 8.
@@ -204,5 +215,5 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
204
  * Flame graphic by freevector/Vecteezy.com.
205
 
206
  == Upgrade Notice ==
207
- = 4.1.2 =
208
  If you're using a caching plugin, flushing its cache after upgrading to this version is recommended.
5
  Requires at least: 4.9
6
  Tested up to: 5.7.1
7
  Requires PHP: 5.4
8
+ Stable tag: 5.3.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
36
  * **Localization** - [Translate WPP into your own language](https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#i-want-to-translate-your-plugin-into-my-language--help-you-update-a-translation-what-do-i-need-to-do).
37
  * **[WP-PostRatings](https://wordpress.org/plugins/wp-postratings/) support** - Show your visitors how your readers are rating your posts!
38
 
39
+ = Support the Project! =
40
+
41
+ If you'd like to support my work and efforts to creating and maintaining more open source projects your donations and messages of support mean a lot!
42
+
43
+ [Buy me a coffee](https://ko-fi.com/cabrerahector) | [PayPal Me](https://paypal.me/cabrerahector)
44
+
45
  **WordPress Popular Posts** is now also on [GitHub](https://github.com/cabrerahector/wordpress-popular-posts)!
46
 
47
  Looking for a **Recent Posts** widget just as featured-packed as WordPress Popular Posts? **Try [Recently](https://wordpress.org/plugins/recently/)**!
97
 
98
  == Changelog ==
99
 
100
+ = 5.3.1 =
101
+
102
+ - wpp_get_views(): restores previous behavior where when no time range was set the function would return total views count (thanks @narolles!)
103
+ - The WPP widget will now be loaded via AJAX by default (this affects new installs only.)
104
+
105
  = 5.3.0 =
106
 
107
  - Improves compatibility with PHP 8.
215
  * Flame graphic by freevector/Vecteezy.com.
216
 
217
  == Upgrade Notice ==
218
+ = 5.3.1 =
219
  If you're using a caching plugin, flushing its cache after upgrading to this version is recommended.
src/Settings.php CHANGED
@@ -98,7 +98,7 @@ class Settings {
98
  'freshness' => false
99
  ],
100
  'tools' => [
101
- 'ajax' => false,
102
  'css' => true,
103
  'link' => [
104
  'target' => '_self'
98
  'freshness' => false
99
  ],
100
  'tools' => [
101
+ 'ajax' => true,
102
  'css' => true,
103
  'link' => [
104
  'target' => '_self'
src/template-tags.php CHANGED
@@ -20,7 +20,7 @@ function wpp_get_views($id = NULL, $range = NULL, $number_format = true)
20
  return "-1";
21
 
22
  $args = [
23
- 'range' => 'last24hours',
24
  '_postID' => $id
25
  ];
26
 
@@ -35,7 +35,7 @@ function wpp_get_views($id = NULL, $range = NULL, $number_format = true)
35
  $args['time_quantity'] = $range['time_quantity'];
36
  } else {
37
  $range = is_string($range) ? trim($range) : null;
38
- $args['range'] = ! $range ? 'last24hours' : $range;
39
  }
40
 
41
  add_filter('wpp_query_fields', 'wpp_get_views_fields', 10, 2);
20
  return "-1";
21
 
22
  $args = [
23
+ 'range' => 'all',
24
  '_postID' => $id
25
  ];
26
 
35
  $args['time_quantity'] = $range['time_quantity'];
36
  } else {
37
  $range = is_string($range) ? trim($range) : null;
38
+ $args['range'] = ! $range ? 'all' : $range;
39
  }
40
 
41
  add_filter('wpp_query_fields', 'wpp_get_views_fields', 10, 2);
uninstall.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Hector Cabrera <me@cabrerahector.com>
7
  * @license GPL-2.0+
8
  * @link https://cabrerahector.com
9
- * @copyright 2008-2020 Hector Cabrera
10
  */
11
 
12
  // If uninstall is not called from WordPress, exit
6
  * @author Hector Cabrera <me@cabrerahector.com>
7
  * @license GPL-2.0+
8
  * @link https://cabrerahector.com
9
+ * @copyright 2008-2021 Hector Cabrera
10
  */
11
 
12
  // If uninstall is not called from WordPress, exit
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: 5.3.0
20
  * Author: Hector Cabrera
21
  * Author URI: https://cabrerahector.com/
22
  * License: GPL-2.0+
@@ -29,7 +29,7 @@ if ( ! defined( 'WPINC' ) ) {
29
  die();
30
  }
31
 
32
- define('WPP_VERSION', '5.3.0');
33
  define('WPP_MIN_PHP_VERSION', '5.4');
34
  define('WPP_MIN_WP_VERSION', '4.9');
35
 
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: 5.3.1
20
  * Author: Hector Cabrera
21
  * Author URI: https://cabrerahector.com/
22
  * License: GPL-2.0+
29
  die();
30
  }
31
 
32
+ define('WPP_VERSION', '5.3.1');
33
  define('WPP_MIN_PHP_VERSION', '5.4');
34
  define('WPP_MIN_WP_VERSION', '4.9');
35