Version Description
- Fixes missing HTML decoding for custom HTML in widget.
- Puts LIMIT clause back to the outer query.
Download this release
Release Info
Developer | hcabrera |
Plugin | WordPress Popular Posts |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
- readme.txt +5 -1
- views/admin.php +2 -21
- wordpress-popular-posts.php +5 -5
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabr
|
|
4 |
Tags: popular, posts, widget, popularity, top
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0.1
|
7 |
-
Stable tag: 3.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -152,6 +152,10 @@ For the time being, the [Support Forum](http://wordpress.org/support/plugin/word
|
|
152 |
4. WordPress Popular Posts Stats panel.
|
153 |
|
154 |
== Changelog ==
|
|
|
|
|
|
|
|
|
155 |
= 3.2.0 =
|
156 |
* Adds check for jQuery.
|
157 |
* Fixes invalid parameter in htmlspecialchars().
|
4 |
Tags: popular, posts, widget, popularity, top
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0.1
|
7 |
+
Stable tag: 3.2.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
152 |
4. WordPress Popular Posts Stats panel.
|
153 |
|
154 |
== Changelog ==
|
155 |
+
= 3.2.1 =
|
156 |
+
* Fixes missing HTML decoding for custom HTML in widget.
|
157 |
+
* Puts LIMIT clause back to the outer query.
|
158 |
+
|
159 |
= 3.2.0 =
|
160 |
* Adds check for jQuery.
|
161 |
* Fixes invalid parameter in htmlspecialchars().
|
views/admin.php
CHANGED
@@ -767,27 +767,8 @@ if (empty($wpp_rand)) {
|
|
767 |
<p><?php _e( 'This version includes the following changes', $this->plugin_slug ); ?>:</p>
|
768 |
|
769 |
<ul>
|
770 |
-
<li>
|
771 |
-
<li>
|
772 |
-
<li>Switches AJAX update to POST method.</li>
|
773 |
-
<li>Removes href attribute from link when popular post is viewed.</li>
|
774 |
-
<li>Removes unnecesary ORDER BY clause in views/comments subquery.</li>
|
775 |
-
<li>Fixes Javascript console not working under IE8 (thanks, <a href="https://github.com/raphaelsaunier" target="_blank">@raphaelsaunier</a>!)</li>
|
776 |
-
<li>Fixes WPML compatibility bug storing post IDs as 0.</li>
|
777 |
-
<li>Removes wpp-upload.js since it was no longer in use.</li>
|
778 |
-
<li>Fixes undefined default thumbnail image (thanks, Lea Cohen!)</li>
|
779 |
-
<li>Fixes rating parameter returning false value.</li>
|
780 |
-
<li>Adds <em>Data Sampling</em> (thanks, <a href="https://github.com/kurtpayne" target="_blank">@kurtpayne</a>!)</li>
|
781 |
-
<li>Minor query optimizations.</li>
|
782 |
-
<li>Adds <em>{date}</em> (thanks, <a href="https://github.com/matsuoshi" target="_blank">@matsuoshi</a>!) and <em>{thumb_img}</em> tags to custom html.</li>
|
783 |
-
<li>Adds minute time option for caching.</li>
|
784 |
-
<li>Adds wpp_data_sampling filter.</li>
|
785 |
-
<li>Removes jQuery's DOM ready hook for AJAX views update.</li>
|
786 |
-
<li>Adds back missing GROUP BY clause.</li>
|
787 |
-
<li>Removes unnecesary HTML decoding for custom HTML (thanks, Lea Cohen!)</li>
|
788 |
-
<li>Translates category name when WPML is detected.</li>
|
789 |
-
<li>Adds list of available thumbnail sizes to the widget.</li>
|
790 |
-
<li>Other minor bugfixes and improvements.</li>
|
791 |
</ul>
|
792 |
|
793 |
</div>
|
767 |
<p><?php _e( 'This version includes the following changes', $this->plugin_slug ); ?>:</p>
|
768 |
|
769 |
<ul>
|
770 |
+
<li>Fixes missing HTML decoding for custom HTML in widget.</li>
|
771 |
+
<li>Puts LIMIT clause back to the outer query.</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
</ul>
|
773 |
|
774 |
</div>
|
wordpress-popular-posts.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WordPress Popular Posts
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wordpress-popular-posts
|
5 |
Description: WordPress Popular Posts is a highly customizable widget that displays the most popular posts on your blog
|
6 |
-
Version: 3.2.
|
7 |
Author: Hector Cabrera
|
8 |
Author URI: http://cabrerahector.com
|
9 |
Author Email: hcabrerab@gmail.com
|
@@ -61,7 +61,7 @@ if ( !class_exists('WordpressPopularPosts') ) {
|
|
61 |
* @since 1.3.0
|
62 |
* @var string
|
63 |
*/
|
64 |
-
private $version = '3.2.
|
65 |
|
66 |
/**
|
67 |
* Plugin identifier.
|
@@ -1635,7 +1635,7 @@ if ( !class_exists('WordpressPopularPosts') ) {
|
|
1635 |
if ( "comments" == $instance['order_by'] ) {
|
1636 |
|
1637 |
$fields .= ", c.comment_count AS 'comment_count'";
|
1638 |
-
$from = "(SELECT comment_post_ID AS 'id', COUNT(comment_post_ID) AS 'comment_count' FROM {$wpdb->comments} WHERE comment_date_gmt > DATE_SUB('{$now}', INTERVAL {$interval}) AND comment_approved = 1 GROUP BY id ORDER BY comment_count DESC
|
1639 |
$where .= " AND p.post_password = '' AND p.post_status = 'publish'";
|
1640 |
|
1641 |
if ( $instance['stats_tag']['views'] ) { // get views, too
|
@@ -1649,7 +1649,7 @@ if ( !class_exists('WordpressPopularPosts') ) {
|
|
1649 |
// ordered by views / avg
|
1650 |
else {
|
1651 |
|
1652 |
-
$from = "(SELECT postid, IFNULL(SUM(pageviews), 0) AS pageviews FROM {$prefix}summary WHERE last_viewed > DATE_SUB('{$now}', INTERVAL {$interval}) GROUP BY postid ORDER BY pageviews DESC
|
1653 |
$where .= " AND p.post_password = '' AND p.post_status = 'publish'";
|
1654 |
|
1655 |
// ordered by views
|
@@ -1675,7 +1675,7 @@ if ( !class_exists('WordpressPopularPosts') ) {
|
|
1675 |
|
1676 |
}
|
1677 |
|
1678 |
-
$query = "SELECT {$fields} FROM {$from} {$where} {$groupby} {$orderby};";
|
1679 |
|
1680 |
}
|
1681 |
|
3 |
Plugin Name: WordPress Popular Posts
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wordpress-popular-posts
|
5 |
Description: WordPress Popular Posts is a highly customizable widget that displays the most popular posts on your blog
|
6 |
+
Version: 3.2.1
|
7 |
Author: Hector Cabrera
|
8 |
Author URI: http://cabrerahector.com
|
9 |
Author Email: hcabrerab@gmail.com
|
61 |
* @since 1.3.0
|
62 |
* @var string
|
63 |
*/
|
64 |
+
private $version = '3.2.1';
|
65 |
|
66 |
/**
|
67 |
* Plugin identifier.
|
1635 |
if ( "comments" == $instance['order_by'] ) {
|
1636 |
|
1637 |
$fields .= ", c.comment_count AS 'comment_count'";
|
1638 |
+
$from = "(SELECT comment_post_ID AS 'id', COUNT(comment_post_ID) AS 'comment_count' FROM {$wpdb->comments} WHERE comment_date_gmt > DATE_SUB('{$now}', INTERVAL {$interval}) AND comment_approved = 1 GROUP BY id ORDER BY comment_count DESC) c LEFT JOIN {$wpdb->posts} p ON c.id = p.ID";
|
1639 |
$where .= " AND p.post_password = '' AND p.post_status = 'publish'";
|
1640 |
|
1641 |
if ( $instance['stats_tag']['views'] ) { // get views, too
|
1649 |
// ordered by views / avg
|
1650 |
else {
|
1651 |
|
1652 |
+
$from = "(SELECT postid, IFNULL(SUM(pageviews), 0) AS pageviews FROM {$prefix}summary WHERE last_viewed > DATE_SUB('{$now}', INTERVAL {$interval}) GROUP BY postid ORDER BY pageviews DESC) v LEFT JOIN {$wpdb->posts} p ON v.postid = p.ID";
|
1653 |
$where .= " AND p.post_password = '' AND p.post_status = 'publish'";
|
1654 |
|
1655 |
// ordered by views
|
1675 |
|
1676 |
}
|
1677 |
|
1678 |
+
$query = "SELECT {$fields} FROM {$from} {$where} {$groupby} {$orderby} {$limit};";
|
1679 |
|
1680 |
}
|
1681 |
|