Top 10 – Popular posts plugin for WordPress - Version 1.9.9.1

Version Description

New default style, new shortcodes, responsive admin interface, option to disable counts from non-admin and lots more... Refer to the Changeog for more details

=

Download this release

Release Info

Developer Ajay
Plugin Icon 128x128 Top 10 – Popular posts plugin for WordPress
Version 1.9.9.1
Comparing to
See all releases

Code changes from version 1.9.9 to 1.9.9.1

Files changed (2) hide show
  1. readme.txt +6 -2
  2. top-10.php +7 -7
readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- === Top 10 - Popular posts plugin for WordPress ===
2
  Tags: top 10, counter, popular posts, top posts, daily popular, page views, statistics
3
  Contributors: Ajay
4
  Donate link: http://ajaydsouza.com/donate/
@@ -51,12 +51,15 @@ If you're looking for a plugin to display related, look no further than my other
51
 
52
  == Upgrade Notice ==
53
 
54
- = 1.9.9 =
55
  New default style, new shortcodes, responsive admin interface, option to disable counts from non-admin and lots more...
56
  Refer to the Changeog for more details
57
 
58
  == Changelog ==
59
 
 
 
 
60
  = 1.9.9 =
61
  * New: Default style to make those popular posts a little pretty. Choose **Thumbnails inline, before title** under 'Thumbnail options'
62
  * New: Option to disable display of counts to non-admins. Check out the option 'Show number of views to non-admins'
@@ -375,3 +378,4 @@ Replace `{$cpt}` by the slug of your custom post type. E.g. to make the columns
375
  `
376
  add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sortable' );
377
  `
 
1
+ === Top 10 - Popular posts plugin for WordPress ===
2
  Tags: top 10, counter, popular posts, top posts, daily popular, page views, statistics
3
  Contributors: Ajay
4
  Donate link: http://ajaydsouza.com/donate/
51
 
52
  == Upgrade Notice ==
53
 
54
+ = 1.9.9.1 =
55
  New default style, new shortcodes, responsive admin interface, option to disable counts from non-admin and lots more...
56
  Refer to the Changeog for more details
57
 
58
  == Changelog ==
59
 
60
+ = 1.9.9.1 =
61
+ * Fixed: Maintenance cron wasn't running properly
62
+
63
  = 1.9.9 =
64
  * New: Default style to make those popular posts a little pretty. Choose **Thumbnails inline, before title** under 'Thumbnail options'
65
  * New: Option to disable display of counts to non-admins. Check out the option 'Show number of views to non-admins'
378
  `
379
  add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sortable' );
380
  `
381
+
top-10.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Top 10
4
- Version: 1.9.9
5
  Plugin URI: http://ajaydsouza.com/wordpress/plugins/top-10/
6
  Description: Count daily and total visits per post and display the most popular posts based on the number of views. Based on the plugin by <a href="http://weblogtoolscollection.com">Mark Ghosh</a>
7
  Author: Ajay D'Souza
@@ -1123,19 +1123,19 @@ function tptn_max_formatted_content($content, $MaxLength = -1) {
1123
  * @access public
1124
  * @return void
1125
  */
1126
- function ald_tptn() {
1127
- global $tptn_settings;
 
 
1128
 
1129
  $current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );
1130
  $current_date = strtotime ( '-90 DAY' , strtotime ( $current_time ) );
1131
  $current_date = date ( 'Y-m-j' , $current_date );
1132
 
1133
- $resultscount = $wpdb->get_row( $wpdb->prepare( "DELETE FROM {$table_name_daily} dp_date <= '%s' ", $current_date ) );
1134
-
1135
 
1136
- //tptn_trunc_count(true);
1137
  }
1138
- add_action('ald_tptn_hook', 'ald_tptn');
1139
 
1140
 
1141
  /**
1
  <?php
2
  /*
3
  Plugin Name: Top 10
4
+ Version: 1.9.9.1
5
  Plugin URI: http://ajaydsouza.com/wordpress/plugins/top-10/
6
  Description: Count daily and total visits per post and display the most popular posts based on the number of views. Based on the plugin by <a href="http://weblogtoolscollection.com">Mark Ghosh</a>
7
  Author: Ajay D'Souza
1123
  * @access public
1124
  * @return void
1125
  */
1126
+ function ald_tptn_cron() {
1127
+ global $tptn_settings, $wpdb;
1128
+
1129
+ $table_name_daily = $wpdb->prefix . "top_ten_daily";
1130
 
1131
  $current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );
1132
  $current_date = strtotime ( '-90 DAY' , strtotime ( $current_time ) );
1133
  $current_date = date ( 'Y-m-j' , $current_date );
1134
 
1135
+ $resultscount = $wpdb->query( $wpdb->prepare( "DELETE FROM {$table_name_daily} WHERE dp_date <= '%s' ", $current_date ) );
 
1136
 
 
1137
  }
1138
+ add_action('ald_tptn_hook', 'ald_tptn_cron');
1139
 
1140
 
1141
  /**