Top 10 – Popular posts plugin for WordPress - Version 2.6.2

Version Description

  • Enhancements:

    • Select a date range in the Popular Posts listing page in the admin
  • Bug fixes:

    • Fixed "Published post date" setting was not working. Thanks @jherrerai
    • Modified PolyLang and WPML function implementations
Download this release

Release Info

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

Code changes from version 2.6.1 to 2.6.2

README.md CHANGED
@@ -1,13 +1,13 @@
 
 
1
  [![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/top-10.svg?style=flat-square)](https://wordpress.org/plugins/top-10/)
2
  [![License](https://img.shields.io/badge/license-GPL_v2%2B-orange.svg?style=flat-square)](http://opensource.org/licenses/GPL-2.0)
3
  [![WordPress Tested](https://img.shields.io/wordpress/v/top-10.svg?style=flat-square)](https://wordpress.org/plugins/top-10/)
4
  [![Build Status](https://travis-ci.org/WebberZone/top-10.svg?branch=master)](https://travis-ci.org/WebberZone/top-10)
5
 
6
- # Top 10 - Popular posts plugin for WordPress
7
-
8
  __Requires:__ 4.5
9
 
10
- __Tested up to:__ 5.0
11
 
12
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
13
 
@@ -32,9 +32,9 @@ Top 10 also has powerful API and is fully extendable with WordPress actions and
32
  * **Widget ready**: Sidebar widgets available for daily popular and overall popular posts. Highly customizable widgets to control what you want to display in the list of posts
33
  * **Shortcodes**: The plugin includes two shortcodes `[tptn_list]` and `[tptn_views]` to display the posts list and the number of views respectively
34
  * **Thumbnail support**
35
- * Support for WordPress post thumbnails. Top 10 will create a custom image size (`tptn_thumbnail`) with the dimensions specified in the Settings page
36
- * Auto-extract the first image in your post to be displayed as a thumbnail
37
- * Manually enter the URL of the thumbnail via [WordPress meta fields](http://codex.wordpress.org/Custom_Fields). Specify this using the meta box in your Edit screens.
38
  * **Exclusions**: Exclude posts from select categories from appearing in the top posts list. Also exclude posts by ID from appearing in the list
39
  * **Styles**: The output is wrapped in CSS classes which allows you to easily style the list. You can enter your custom CSS styles from within WordPress Admin area or use the style included.
40
  * **Admin interface**: View list of daily and/or overall popular posts from within the dashboard. Top 10 also adds two sortable columns to your All Posts and All Pages pages in your WordPress Admin area
@@ -49,8 +49,8 @@ I spend a significant amount of my free time maintaining, updating and more impo
49
 
50
  Top 10 is available for [translation directly on WordPress.org](https://translate.wordpress.org/projects/wp-plugins/top-10). Check out the official [Translator Handbook](https://make.wordpress.org/polyglots/handbook/rosetta/theme-plugin-directories/) to contribute.
51
 
52
-
53
  ## Screenshots
 
54
  ![Style Options](https://raw.github.com/WebberZone/top-10/master/wporg-assets/screenshot-5.png)
55
  _Top 10 settings page - Styles Options_
56
 
@@ -59,6 +59,7 @@ For more screenshots visit the [WordPress plugin page](http://wordpress.org/plug
59
  ## Installation
60
 
61
  ### WordPress install (the easy way)
 
62
  1. Navigate to Plugins within your WordPress Admin Area
63
 
64
  2. Click "Add new" and in the search box enter "Top 10"
@@ -66,6 +67,7 @@ For more screenshots visit the [WordPress plugin page](http://wordpress.org/plug
66
  3. Find the plugin in the list (usually the first result) and click "Install Now"
67
 
68
  ### Manual install
 
69
  1. Download the plugin
70
 
71
  2. Extract the contents of top-10.zip to wp-content/plugins/ folder. You should get a folder called top-10.
@@ -78,15 +80,12 @@ For more screenshots visit the [WordPress plugin page](http://wordpress.org/plug
78
 
79
  6. Go to **Top 10 » View Popular Posts** to view the list of popular posts
80
 
81
-
82
  ## Frequently Asked Questions
83
 
84
  Check out the [FAQ on the plugin page](http://wordpress.org/plugins/top-10/faq/) and the [FAQ on the WebberZone knowledgebase](https://webberzone.com/support/section/top-10/).
85
 
86
  If your question isn't listed there, please create a new post at the [WordPress.org support forum](http://wordpress.org/support/plugin/top-10). It is the fastest way to get support as I monitor the forums regularly. I also provide [premium *paid* support via email](https://webberzone.com/support/).
87
 
88
-
89
  ## About this repository
90
 
91
  This GitHub repository always holds the latest development version of the plugin. If you're looking for an official WordPress release, you can find this on the [WordPress.org repository](http://wordpress.org/plugins/top-10). In addition to stable releases, latest beta versions are made available under [releases](https://github.com/WebberZone/top-10/releases).
92
-
1
+ # Top 10 - Popular posts plugin for WordPress
2
+
3
  [![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/top-10.svg?style=flat-square)](https://wordpress.org/plugins/top-10/)
4
  [![License](https://img.shields.io/badge/license-GPL_v2%2B-orange.svg?style=flat-square)](http://opensource.org/licenses/GPL-2.0)
5
  [![WordPress Tested](https://img.shields.io/wordpress/v/top-10.svg?style=flat-square)](https://wordpress.org/plugins/top-10/)
6
  [![Build Status](https://travis-ci.org/WebberZone/top-10.svg?branch=master)](https://travis-ci.org/WebberZone/top-10)
7
 
 
 
8
  __Requires:__ 4.5
9
 
10
+ __Tested up to:__ 5.1
11
 
12
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
13
 
32
  * **Widget ready**: Sidebar widgets available for daily popular and overall popular posts. Highly customizable widgets to control what you want to display in the list of posts
33
  * **Shortcodes**: The plugin includes two shortcodes `[tptn_list]` and `[tptn_views]` to display the posts list and the number of views respectively
34
  * **Thumbnail support**
35
+ * Support for WordPress post thumbnails. Top 10 will create a custom image size (`tptn_thumbnail`) with the dimensions specified in the Settings page
36
+ * Auto-extract the first image in your post to be displayed as a thumbnail
37
+ * Manually enter the URL of the thumbnail via [WordPress meta fields](http://codex.wordpress.org/Custom_Fields). Specify this using the meta box in your Edit screens.
38
  * **Exclusions**: Exclude posts from select categories from appearing in the top posts list. Also exclude posts by ID from appearing in the list
39
  * **Styles**: The output is wrapped in CSS classes which allows you to easily style the list. You can enter your custom CSS styles from within WordPress Admin area or use the style included.
40
  * **Admin interface**: View list of daily and/or overall popular posts from within the dashboard. Top 10 also adds two sortable columns to your All Posts and All Pages pages in your WordPress Admin area
49
 
50
  Top 10 is available for [translation directly on WordPress.org](https://translate.wordpress.org/projects/wp-plugins/top-10). Check out the official [Translator Handbook](https://make.wordpress.org/polyglots/handbook/rosetta/theme-plugin-directories/) to contribute.
51
 
 
52
  ## Screenshots
53
+
54
  ![Style Options](https://raw.github.com/WebberZone/top-10/master/wporg-assets/screenshot-5.png)
55
  _Top 10 settings page - Styles Options_
56
 
59
  ## Installation
60
 
61
  ### WordPress install (the easy way)
62
+
63
  1. Navigate to Plugins within your WordPress Admin Area
64
 
65
  2. Click "Add new" and in the search box enter "Top 10"
67
  3. Find the plugin in the list (usually the first result) and click "Install Now"
68
 
69
  ### Manual install
70
+
71
  1. Download the plugin
72
 
73
  2. Extract the contents of top-10.zip to wp-content/plugins/ folder. You should get a folder called top-10.
80
 
81
  6. Go to **Top 10 » View Popular Posts** to view the list of popular posts
82
 
 
83
  ## Frequently Asked Questions
84
 
85
  Check out the [FAQ on the plugin page](http://wordpress.org/plugins/top-10/faq/) and the [FAQ on the WebberZone knowledgebase](https://webberzone.com/support/section/top-10/).
86
 
87
  If your question isn't listed there, please create a new post at the [WordPress.org support forum](http://wordpress.org/support/plugin/top-10). It is the fastest way to get support as I monitor the forums regularly. I also provide [premium *paid* support via email](https://webberzone.com/support/).
88
 
 
89
  ## About this repository
90
 
91
  This GitHub repository always holds the latest development version of the plugin. If you're looking for an official WordPress release, you can find this on the [WordPress.org repository](http://wordpress.org/plugins/top-10). In addition to stable releases, latest beta versions are made available under [releases](https://github.com/WebberZone/top-10/releases).
 
includes/admin/admin.php CHANGED
@@ -219,9 +219,39 @@ function tptn_adminhead() {
219
  });
220
  });
221
 
222
- $('.datepicker').datepicker({
223
- dateFormat: 'd M yy'
224
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
 
226
 
227
  });
219
  });
220
  });
221
 
222
+ $( function() {
223
+ var dateFormat = 'dd M yy',
224
+ from = $( "#datepicker-from" )
225
+ .datepicker({
226
+ changeMonth: true,
227
+ maxDate: 0,
228
+ dateFormat: dateFormat
229
+ })
230
+ .on( "change", function() {
231
+ to.datepicker( "option", "minDate", getDate( this ) );
232
+ }),
233
+ to = $( "#datepicker-to" )
234
+ .datepicker({
235
+ changeMonth: true,
236
+ maxDate: 0,
237
+ dateFormat: dateFormat
238
+ })
239
+ .on( "change", function() {
240
+ from.datepicker( "option", "maxDate", getDate( this ) );
241
+ });
242
+
243
+ function getDate( element ) {
244
+ var date;
245
+ try {
246
+ date = $.datepicker.parseDate( dateFormat, element.value );
247
+ } catch( error ) {
248
+ date = null;
249
+ }
250
+
251
+ return date;
252
+ }
253
+ } );
254
+
255
 
256
 
257
  });
includes/admin/class-top-ten-statistics-table.php CHANGED
@@ -64,7 +64,8 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
64
 
65
  $blog_id = get_current_blog_id();
66
 
67
- $from_date = tptn_get_from_date( $args['post-date-filter'] );
 
68
 
69
  /* Start creating the SQL */
70
  $table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
@@ -86,11 +87,12 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
86
  $join .= $wpdb->prepare(
87
  " LEFT JOIN (
88
  SELECT * FROM {$table_name_daily} " . // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
89
- 'WHERE DATE(ttd.dp_date) = DATE(%s)
90
  ) AS ttd
91
  ON ttt.postnumber=ttd.postnumber
92
  ',
93
- $from_date
 
94
  );
95
 
96
  // Create the base WHERE clause.
@@ -99,7 +101,7 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
99
  $where .= " AND ($wpdb->posts.post_type <> 'revision' ) "; // No revisions.
100
 
101
  /* If search argument is set, do a search for it. */
102
- if ( isset( $args['search'] ) ) {
103
  $where .= $wpdb->prepare( " AND $wpdb->posts.post_title LIKE %s ", '%' . $wpdb->esc_like( $args['search'] ) . '%' );
104
  }
105
 
@@ -454,8 +456,11 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
454
  $current_time = current_time( 'timestamp', 0 );
455
  $current_date = gmdate( 'd M Y', $current_time );
456
 
457
- $post_date = isset( $_REQUEST['post-date-filter'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter'] ) ) : $current_date; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
458
- echo '<input type="text" id="datepicker" class="datepicker" name="post-date-filter" value="' . esc_attr( $post_date ) . '" />';
 
 
 
459
 
460
  $post_types = get_post_types(
461
  array(
@@ -475,7 +480,7 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
475
  }
476
  ?>
477
  <option value="<?php echo esc_attr( $post_type ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_attr( $post_type ); ?></option>
478
- <?php
479
  }
480
 
481
  echo '</select>';
64
 
65
  $blog_id = get_current_blog_id();
66
 
67
+ $from_date = tptn_get_from_date( $args['post-date-filter-from'], 1, 0 );
68
+ $to_date = tptn_get_from_date( $args['post-date-filter-to'], 1, 0 );
69
 
70
  /* Start creating the SQL */
71
  $table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
87
  $join .= $wpdb->prepare(
88
  " LEFT JOIN (
89
  SELECT * FROM {$table_name_daily} " . // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
90
+ 'WHERE DATE(ttd.dp_date) >= DATE(%s) AND DATE(ttd.dp_date) <= DATE(%s)
91
  ) AS ttd
92
  ON ttt.postnumber=ttd.postnumber
93
  ',
94
+ $from_date,
95
+ $to_date
96
  );
97
 
98
  // Create the base WHERE clause.
101
  $where .= " AND ($wpdb->posts.post_type <> 'revision' ) "; // No revisions.
102
 
103
  /* If search argument is set, do a search for it. */
104
+ if ( ! empty( $args['search'] ) ) {
105
  $where .= $wpdb->prepare( " AND $wpdb->posts.post_title LIKE %s ", '%' . $wpdb->esc_like( $args['search'] ) . '%' );
106
  }
107
 
456
  $current_time = current_time( 'timestamp', 0 );
457
  $current_date = gmdate( 'd M Y', $current_time );
458
 
459
+ $post_date_from = isset( $_REQUEST['post-date-filter-from'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter-from'] ) ) : $current_date; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
460
+ echo '<input type="text" id="datepicker-from" name="post-date-filter-from" value="' . esc_attr( $post_date_from ) . '" size="11" />';
461
+
462
+ $post_date_to = isset( $_REQUEST['post-date-filter-to'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter-to'] ) ) : $current_date; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
463
+ echo '<input type="text" id="datepicker-to" name="post-date-filter-to" value="' . esc_attr( $post_date_to ) . '" size="11" />';
464
 
465
  $post_types = get_post_types(
466
  array(
480
  }
481
  ?>
482
  <option value="<?php echo esc_attr( $post_type ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_attr( $post_type ); ?></option>
483
+ <?php
484
  }
485
 
486
  echo '</select>';
includes/admin/class-top-ten-statistics.php CHANGED
@@ -90,8 +90,12 @@ class Top_Ten_Statistics {
90
  }
91
 
92
  // If this is a post date filter?
93
- if ( isset( $_REQUEST['post-date-filter'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
94
- $args['post-date-filter'] = sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
 
 
 
 
95
  }
96
 
97
  $this->pop_posts_obj->prepare_items( $args );
90
  }
91
 
92
  // If this is a post date filter?
93
+ if ( isset( $_REQUEST['post-date-filter-to'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
94
+ $args['post-date-filter-to'] = sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter-to'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
95
+ }
96
+
97
+ if ( isset( $_REQUEST['post-date-filter-from'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
98
+ $args['post-date-filter-from'] = sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter-from'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
99
  }
100
 
101
  $this->pop_posts_obj->prepare_items( $args );
includes/admin/default-settings.php CHANGED
@@ -206,7 +206,7 @@ function tptn_settings_counter() {
206
  ),
207
  'count_disp_form_zero' => array(
208
  'id' => 'count_disp_form_zero',
209
- 'name' => esc_html__( 'What do display when there are no visits?', 'top-10' ),
210
  /* translators: 1: Opening a tag, 2: Closing a tag, 3: Opening code tage, 4. Closing code tag. */
211
  'desc' => esc_html__( "This text applies only when there are 0 hits for the post and it isn't a single page. e.g. if you display post views on the homepage or archives then this text will be used. To override this, just enter the same text as above option.", 'top-10' ),
212
  'type' => 'textarea',
@@ -389,7 +389,7 @@ function tptn_settings_list() {
389
  'id' => 'blank_output',
390
  'name' => esc_html__( 'Show when no posts are found', 'top-10' ),
391
  /* translators: 1: Code. */
392
- 'desc' => sprintf( esc_html__( 'If you choose to disable this, please add %1$s to your template file where you want it displayed', 'top-10' ), "<code>&lt;?php if ( function_exists( 'echo_wherego' ) ) { echo_wherego(); } ?&gt;</code>" ),
393
  'type' => 'radio',
394
  'default' => 'blank',
395
  'options' => array(
206
  ),
207
  'count_disp_form_zero' => array(
208
  'id' => 'count_disp_form_zero',
209
+ 'name' => esc_html__( 'What to display when there are no visits?', 'top-10' ),
210
  /* translators: 1: Opening a tag, 2: Closing a tag, 3: Opening code tage, 4. Closing code tag. */
211
  'desc' => esc_html__( "This text applies only when there are 0 hits for the post and it isn't a single page. e.g. if you display post views on the homepage or archives then this text will be used. To override this, just enter the same text as above option.", 'top-10' ),
212
  'type' => 'textarea',
389
  'id' => 'blank_output',
390
  'name' => esc_html__( 'Show when no posts are found', 'top-10' ),
391
  /* translators: 1: Code. */
392
+ 'desc' => '',
393
  'type' => 'radio',
394
  'default' => 'blank',
395
  'options' => array(
includes/l10n.php CHANGED
@@ -38,11 +38,17 @@ function tptn_object_id_cur_lang( $post_id ) {
38
  $return_original_if_missing = apply_filters( 'tptn_wpml_return_original', $return_original_if_missing, $post_id );
39
 
40
  if ( function_exists( 'pll_get_post' ) ) {
41
- $post_id = pll_get_post( $post_id );
42
- } elseif ( function_exists( 'wpml_object_id_filter' ) ) {
43
- $post_id = wpml_object_id_filter( $post_id, 'any', $return_original_if_missing );
 
 
 
44
  } elseif ( function_exists( 'icl_object_id' ) ) {
45
- $post_id = icl_object_id( $post_id, 'any', $return_original_if_missing );
 
 
 
46
  }
47
 
48
  /**
38
  $return_original_if_missing = apply_filters( 'tptn_wpml_return_original', $return_original_if_missing, $post_id );
39
 
40
  if ( function_exists( 'pll_get_post' ) ) {
41
+ $lang_id = pll_get_post( $post_id );
42
+ if ( $lang_id ) {
43
+ $post_id = $lang_id;
44
+ }
45
+ } elseif ( function_exists( 'wpml_object_id' ) ) {
46
+ $post_id = apply_filters( 'wpml_object_id', $post_id, get_post_type( $post_id ), $return_original_if_missing );
47
  } elseif ( function_exists( 'icl_object_id' ) ) {
48
+ $lang_id = icl_object_id( $post_id, get_post_type( $post_id ), $return_original_if_missing );
49
+ if ( $lang_id ) {
50
+ $post_id = $lang_id;
51
+ }
52
  }
53
 
54
  /**
includes/public/display-posts.php CHANGED
@@ -373,7 +373,7 @@ function get_tptn_pop_posts( $args = array() ) {
373
 
374
  // How old should the posts be?
375
  if ( $args['how_old'] ) {
376
- $where .= $wpdb->prepare( " AND $wpdb->posts.post_date > %s ", gmdate( 'Y-m-d H:m:s', $current_time - ( $args['how_old'] * DAY_IN_SECONDS ) ) );
377
  }
378
 
379
  // Create the base GROUP BY clause.
373
 
374
  // How old should the posts be?
375
  if ( $args['how_old'] ) {
376
+ $where .= $wpdb->prepare( " AND $wpdb->posts.post_date > %s ", gmdate( 'Y-m-d H:m:s', current_time( 'timestamp', 0 ) - ( $args['how_old'] * DAY_IN_SECONDS ) ) );
377
  }
378
 
379
  // Create the base GROUP BY clause.
languages/top-10-en_US.mo CHANGED
Binary file
languages/top-10-en_US.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Top 10\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2019-02-11 12:07+0530\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
8
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
@@ -44,7 +44,7 @@ msgid "Popular posts by <a href=\"%s\" target=\"_blank\">Top 10 plugin</a>"
44
  msgstr ""
45
 
46
  #: includes/admin/admin-dashboard.php:127 includes/admin/admin.php:44
47
- #: includes/admin/class-top-ten-statistics.php:124
48
  msgid "Popular Posts"
49
  msgstr ""
50
 
@@ -113,7 +113,7 @@ msgstr ""
113
  msgid "Top 10"
114
  msgstr ""
115
 
116
- #: includes/admin/admin.php:34 includes/admin/admin.php:336
117
  msgid "Settings"
118
  msgstr ""
119
 
@@ -137,7 +137,7 @@ msgstr ""
137
  msgid "New information not saved. Do you wish to leave the page?"
138
  msgstr ""
139
 
140
- #: includes/admin/admin.php:290
141
  #, php-format
142
  msgid ""
143
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
@@ -145,15 +145,15 @@ msgid ""
145
  "\"_blank\">WordPress.org</a>"
146
  msgstr ""
147
 
148
- #: includes/admin/admin.php:358 includes/admin/sidebar.php:55
149
  msgid "Support"
150
  msgstr ""
151
 
152
- #: includes/admin/admin.php:359
153
  msgid "Donate"
154
  msgstr ""
155
 
156
- #: includes/admin/admin.php:360
157
  msgid "Contribute"
158
  msgstr ""
159
 
@@ -173,74 +173,74 @@ msgstr ""
173
  msgid "All post types"
174
  msgstr ""
175
 
176
- #: includes/admin/class-top-ten-statistics-table.php:213
177
  msgid "No popular posts available."
178
  msgstr ""
179
 
180
- #: includes/admin/class-top-ten-statistics-table.php:264
181
  msgid "View"
182
  msgstr ""
183
 
184
- #: includes/admin/class-top-ten-statistics-table.php:265
185
  msgid "Edit"
186
  msgstr ""
187
 
188
- #: includes/admin/class-top-ten-statistics-table.php:266
189
  msgid "Delete"
190
  msgstr ""
191
 
192
- #: includes/admin/class-top-ten-statistics-table.php:289
193
  msgid "Y/m/d g:i:s a"
194
  msgstr ""
195
 
196
- #: includes/admin/class-top-ten-statistics-table.php:297
197
  #, php-format
198
  msgid "%s ago"
199
  msgstr ""
200
 
201
- #: includes/admin/class-top-ten-statistics-table.php:299
202
  msgid "Y/m/d"
203
  msgstr ""
204
 
205
- #: includes/admin/class-top-ten-statistics-table.php:338
206
  #: includes/modules/class-top-ten-count-widget.php:53
207
  #: includes/modules/class-top-ten-widget.php:80
208
  msgid "Title"
209
  msgstr ""
210
 
211
- #: includes/admin/class-top-ten-statistics-table.php:339
212
  msgid "Total visits"
213
  msgstr ""
214
 
215
- #: includes/admin/class-top-ten-statistics-table.php:340
216
  msgid "Daily visits"
217
  msgstr ""
218
 
219
- #: includes/admin/class-top-ten-statistics-table.php:341
220
  msgid "Post type"
221
  msgstr ""
222
 
223
- #: includes/admin/class-top-ten-statistics-table.php:342
224
  msgid "Author"
225
  msgstr ""
226
 
227
- #: includes/admin/class-top-ten-statistics-table.php:343
228
  msgid "Date"
229
  msgstr ""
230
 
231
- #: includes/admin/class-top-ten-statistics-table.php:377
232
  msgid "Delete Count"
233
  msgstr ""
234
 
235
- #: includes/admin/class-top-ten-statistics-table.php:424
236
  msgid "Are you sure you want to do this"
237
  msgstr ""
238
 
239
- #: includes/admin/class-top-ten-statistics-table.php:489
240
  msgid "Filter"
241
  msgstr ""
242
 
243
- #: includes/admin/class-top-ten-statistics.php:99
244
  msgid "Search Table"
245
  msgstr ""
246
 
@@ -364,7 +364,6 @@ msgid "Display number of views on"
364
  msgstr ""
365
 
366
  #: includes/admin/default-settings.php:183
367
- #: includes/admin/default-settings.php:392
368
  #, php-format
369
  msgid ""
370
  "If you choose to disable this, please add %1$s to your template file where "
@@ -411,7 +410,7 @@ msgid ""
411
  msgstr ""
412
 
413
  #: includes/admin/default-settings.php:209
414
- msgid "What do display when there are no visits?"
415
  msgstr ""
416
 
417
  #: includes/admin/default-settings.php:211
2
  msgstr ""
3
  "Project-Id-Version: Top 10\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-03-02 13:07+0000\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
8
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
44
  msgstr ""
45
 
46
  #: includes/admin/admin-dashboard.php:127 includes/admin/admin.php:44
47
+ #: includes/admin/class-top-ten-statistics.php:128
48
  msgid "Popular Posts"
49
  msgstr ""
50
 
113
  msgid "Top 10"
114
  msgstr ""
115
 
116
+ #: includes/admin/admin.php:34 includes/admin/admin.php:366
117
  msgid "Settings"
118
  msgstr ""
119
 
137
  msgid "New information not saved. Do you wish to leave the page?"
138
  msgstr ""
139
 
140
+ #: includes/admin/admin.php:320
141
  #, php-format
142
  msgid ""
143
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
145
  "\"_blank\">WordPress.org</a>"
146
  msgstr ""
147
 
148
+ #: includes/admin/admin.php:388 includes/admin/sidebar.php:55
149
  msgid "Support"
150
  msgstr ""
151
 
152
+ #: includes/admin/admin.php:389
153
  msgid "Donate"
154
  msgstr ""
155
 
156
+ #: includes/admin/admin.php:390
157
  msgid "Contribute"
158
  msgstr ""
159
 
173
  msgid "All post types"
174
  msgstr ""
175
 
176
+ #: includes/admin/class-top-ten-statistics-table.php:215
177
  msgid "No popular posts available."
178
  msgstr ""
179
 
180
+ #: includes/admin/class-top-ten-statistics-table.php:266
181
  msgid "View"
182
  msgstr ""
183
 
184
+ #: includes/admin/class-top-ten-statistics-table.php:267
185
  msgid "Edit"
186
  msgstr ""
187
 
188
+ #: includes/admin/class-top-ten-statistics-table.php:268
189
  msgid "Delete"
190
  msgstr ""
191
 
192
+ #: includes/admin/class-top-ten-statistics-table.php:291
193
  msgid "Y/m/d g:i:s a"
194
  msgstr ""
195
 
196
+ #: includes/admin/class-top-ten-statistics-table.php:299
197
  #, php-format
198
  msgid "%s ago"
199
  msgstr ""
200
 
201
+ #: includes/admin/class-top-ten-statistics-table.php:301
202
  msgid "Y/m/d"
203
  msgstr ""
204
 
205
+ #: includes/admin/class-top-ten-statistics-table.php:340
206
  #: includes/modules/class-top-ten-count-widget.php:53
207
  #: includes/modules/class-top-ten-widget.php:80
208
  msgid "Title"
209
  msgstr ""
210
 
211
+ #: includes/admin/class-top-ten-statistics-table.php:341
212
  msgid "Total visits"
213
  msgstr ""
214
 
215
+ #: includes/admin/class-top-ten-statistics-table.php:342
216
  msgid "Daily visits"
217
  msgstr ""
218
 
219
+ #: includes/admin/class-top-ten-statistics-table.php:343
220
  msgid "Post type"
221
  msgstr ""
222
 
223
+ #: includes/admin/class-top-ten-statistics-table.php:344
224
  msgid "Author"
225
  msgstr ""
226
 
227
+ #: includes/admin/class-top-ten-statistics-table.php:345
228
  msgid "Date"
229
  msgstr ""
230
 
231
+ #: includes/admin/class-top-ten-statistics-table.php:379
232
  msgid "Delete Count"
233
  msgstr ""
234
 
235
+ #: includes/admin/class-top-ten-statistics-table.php:426
236
  msgid "Are you sure you want to do this"
237
  msgstr ""
238
 
239
+ #: includes/admin/class-top-ten-statistics-table.php:494
240
  msgid "Filter"
241
  msgstr ""
242
 
243
+ #: includes/admin/class-top-ten-statistics.php:103
244
  msgid "Search Table"
245
  msgstr ""
246
 
364
  msgstr ""
365
 
366
  #: includes/admin/default-settings.php:183
 
367
  #, php-format
368
  msgid ""
369
  "If you choose to disable this, please add %1$s to your template file where "
410
  msgstr ""
411
 
412
  #: includes/admin/default-settings.php:209
413
+ msgid "What to display when there are no visits?"
414
  msgstr ""
415
 
416
  #: includes/admin/default-settings.php:211
languages/top-10-en_US.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Top 10\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2019-02-11 12:07+0530\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
9
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
@@ -45,7 +45,7 @@ msgid "Popular posts by <a href=\"%s\" target=\"_blank\">Top 10 plugin</a>"
45
  msgstr ""
46
 
47
  #: includes/admin/admin-dashboard.php:127 includes/admin/admin.php:44
48
- #: includes/admin/class-top-ten-statistics.php:124
49
  msgid "Popular Posts"
50
  msgstr ""
51
 
@@ -114,7 +114,7 @@ msgstr ""
114
  msgid "Top 10"
115
  msgstr ""
116
 
117
- #: includes/admin/admin.php:34 includes/admin/admin.php:336
118
  msgid "Settings"
119
  msgstr ""
120
 
@@ -138,7 +138,7 @@ msgstr ""
138
  msgid "New information not saved. Do you wish to leave the page?"
139
  msgstr ""
140
 
141
- #: includes/admin/admin.php:290
142
  #, php-format
143
  msgid ""
144
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
@@ -146,15 +146,15 @@ msgid ""
146
  "\"_blank\">WordPress.org</a>"
147
  msgstr ""
148
 
149
- #: includes/admin/admin.php:358 includes/admin/sidebar.php:55
150
  msgid "Support"
151
  msgstr ""
152
 
153
- #: includes/admin/admin.php:359
154
  msgid "Donate"
155
  msgstr ""
156
 
157
- #: includes/admin/admin.php:360
158
  msgid "Contribute"
159
  msgstr ""
160
 
@@ -174,74 +174,74 @@ msgstr ""
174
  msgid "All post types"
175
  msgstr ""
176
 
177
- #: includes/admin/class-top-ten-statistics-table.php:213
178
  msgid "No popular posts available."
179
  msgstr ""
180
 
181
- #: includes/admin/class-top-ten-statistics-table.php:264
182
  msgid "View"
183
  msgstr ""
184
 
185
- #: includes/admin/class-top-ten-statistics-table.php:265
186
  msgid "Edit"
187
  msgstr ""
188
 
189
- #: includes/admin/class-top-ten-statistics-table.php:266
190
  msgid "Delete"
191
  msgstr ""
192
 
193
- #: includes/admin/class-top-ten-statistics-table.php:289
194
  msgid "Y/m/d g:i:s a"
195
  msgstr ""
196
 
197
- #: includes/admin/class-top-ten-statistics-table.php:297
198
  #, php-format
199
  msgid "%s ago"
200
  msgstr ""
201
 
202
- #: includes/admin/class-top-ten-statistics-table.php:299
203
  msgid "Y/m/d"
204
  msgstr ""
205
 
206
- #: includes/admin/class-top-ten-statistics-table.php:338
207
  #: includes/modules/class-top-ten-count-widget.php:53
208
  #: includes/modules/class-top-ten-widget.php:80
209
  msgid "Title"
210
  msgstr ""
211
 
212
- #: includes/admin/class-top-ten-statistics-table.php:339
213
  msgid "Total visits"
214
  msgstr ""
215
 
216
- #: includes/admin/class-top-ten-statistics-table.php:340
217
  msgid "Daily visits"
218
  msgstr ""
219
 
220
- #: includes/admin/class-top-ten-statistics-table.php:341
221
  msgid "Post type"
222
  msgstr ""
223
 
224
- #: includes/admin/class-top-ten-statistics-table.php:342
225
  msgid "Author"
226
  msgstr ""
227
 
228
- #: includes/admin/class-top-ten-statistics-table.php:343
229
  msgid "Date"
230
  msgstr ""
231
 
232
- #: includes/admin/class-top-ten-statistics-table.php:377
233
  msgid "Delete Count"
234
  msgstr ""
235
 
236
- #: includes/admin/class-top-ten-statistics-table.php:424
237
  msgid "Are you sure you want to do this"
238
  msgstr ""
239
 
240
- #: includes/admin/class-top-ten-statistics-table.php:489
241
  msgid "Filter"
242
  msgstr ""
243
 
244
- #: includes/admin/class-top-ten-statistics.php:99
245
  msgid "Search Table"
246
  msgstr ""
247
 
@@ -365,7 +365,6 @@ msgid "Display number of views on"
365
  msgstr ""
366
 
367
  #: includes/admin/default-settings.php:183
368
- #: includes/admin/default-settings.php:392
369
  #, php-format
370
  msgid ""
371
  "If you choose to disable this, please add %1$s to your template file where "
@@ -412,7 +411,7 @@ msgid ""
412
  msgstr ""
413
 
414
  #: includes/admin/default-settings.php:209
415
- msgid "What do display when there are no visits?"
416
  msgstr ""
417
 
418
  #: includes/admin/default-settings.php:211
3
  msgstr ""
4
  "Project-Id-Version: Top 10\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2019-03-02 13:07+0000\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
9
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
45
  msgstr ""
46
 
47
  #: includes/admin/admin-dashboard.php:127 includes/admin/admin.php:44
48
+ #: includes/admin/class-top-ten-statistics.php:128
49
  msgid "Popular Posts"
50
  msgstr ""
51
 
114
  msgid "Top 10"
115
  msgstr ""
116
 
117
+ #: includes/admin/admin.php:34 includes/admin/admin.php:366
118
  msgid "Settings"
119
  msgstr ""
120
 
138
  msgid "New information not saved. Do you wish to leave the page?"
139
  msgstr ""
140
 
141
+ #: includes/admin/admin.php:320
142
  #, php-format
143
  msgid ""
144
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
146
  "\"_blank\">WordPress.org</a>"
147
  msgstr ""
148
 
149
+ #: includes/admin/admin.php:388 includes/admin/sidebar.php:55
150
  msgid "Support"
151
  msgstr ""
152
 
153
+ #: includes/admin/admin.php:389
154
  msgid "Donate"
155
  msgstr ""
156
 
157
+ #: includes/admin/admin.php:390
158
  msgid "Contribute"
159
  msgstr ""
160
 
174
  msgid "All post types"
175
  msgstr ""
176
 
177
+ #: includes/admin/class-top-ten-statistics-table.php:215
178
  msgid "No popular posts available."
179
  msgstr ""
180
 
181
+ #: includes/admin/class-top-ten-statistics-table.php:266
182
  msgid "View"
183
  msgstr ""
184
 
185
+ #: includes/admin/class-top-ten-statistics-table.php:267
186
  msgid "Edit"
187
  msgstr ""
188
 
189
+ #: includes/admin/class-top-ten-statistics-table.php:268
190
  msgid "Delete"
191
  msgstr ""
192
 
193
+ #: includes/admin/class-top-ten-statistics-table.php:291
194
  msgid "Y/m/d g:i:s a"
195
  msgstr ""
196
 
197
+ #: includes/admin/class-top-ten-statistics-table.php:299
198
  #, php-format
199
  msgid "%s ago"
200
  msgstr ""
201
 
202
+ #: includes/admin/class-top-ten-statistics-table.php:301
203
  msgid "Y/m/d"
204
  msgstr ""
205
 
206
+ #: includes/admin/class-top-ten-statistics-table.php:340
207
  #: includes/modules/class-top-ten-count-widget.php:53
208
  #: includes/modules/class-top-ten-widget.php:80
209
  msgid "Title"
210
  msgstr ""
211
 
212
+ #: includes/admin/class-top-ten-statistics-table.php:341
213
  msgid "Total visits"
214
  msgstr ""
215
 
216
+ #: includes/admin/class-top-ten-statistics-table.php:342
217
  msgid "Daily visits"
218
  msgstr ""
219
 
220
+ #: includes/admin/class-top-ten-statistics-table.php:343
221
  msgid "Post type"
222
  msgstr ""
223
 
224
+ #: includes/admin/class-top-ten-statistics-table.php:344
225
  msgid "Author"
226
  msgstr ""
227
 
228
+ #: includes/admin/class-top-ten-statistics-table.php:345
229
  msgid "Date"
230
  msgstr ""
231
 
232
+ #: includes/admin/class-top-ten-statistics-table.php:379
233
  msgid "Delete Count"
234
  msgstr ""
235
 
236
+ #: includes/admin/class-top-ten-statistics-table.php:426
237
  msgid "Are you sure you want to do this"
238
  msgstr ""
239
 
240
+ #: includes/admin/class-top-ten-statistics-table.php:494
241
  msgid "Filter"
242
  msgstr ""
243
 
244
+ #: includes/admin/class-top-ten-statistics.php:103
245
  msgid "Search Table"
246
  msgstr ""
247
 
365
  msgstr ""
366
 
367
  #: includes/admin/default-settings.php:183
 
368
  #, php-format
369
  msgid ""
370
  "If you choose to disable this, please add %1$s to your template file where "
411
  msgstr ""
412
 
413
  #: includes/admin/default-settings.php:209
414
+ msgid "What to display when there are no visits?"
415
  msgstr ""
416
 
417
  #: includes/admin/default-settings.php:211
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
  Stable tag: trunk
6
  Requires at least: 4.5
7
- Tested up to: 5.0
8
  License: GPLv2 or later
9
 
10
  Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.
@@ -170,6 +170,15 @@ add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sorta
170
 
171
  == Changelog ==
172
 
 
 
 
 
 
 
 
 
 
173
  = 2.6.1 =
174
 
175
  * Bug fixes:
@@ -308,7 +317,7 @@ For previous changelog entries, please refer to the separate changelog.txt file
308
 
309
  == Upgrade Notice ==
310
 
311
- = 2.6.1 =
312
- * Major release! Several new features and bug fixes. Please verify your settings after upgrade.
313
  Check the Changelog for more details
314
 
4
  Donate link: https://ajaydsouza.com/donate/
5
  Stable tag: trunk
6
  Requires at least: 4.5
7
+ Tested up to: 5.1
8
  License: GPLv2 or later
9
 
10
  Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.
170
 
171
  == Changelog ==
172
 
173
+ = 2.6.2 =
174
+
175
+ * Enhancements:
176
+ * Select a date range in the Popular Posts listing page in the admin
177
+
178
+ * Bug fixes:
179
+ * Fixed "Published post date" setting was not working. Thanks [@jherrerai](https://github.com/jherrerai)
180
+ * Modified PolyLang and WPML function implementations
181
+
182
  = 2.6.1 =
183
 
184
  * Bug fixes:
317
 
318
  == Upgrade Notice ==
319
 
320
+ = 2.6.2 =
321
+ * Bug fix release! Please verify your settings after upgrade.
322
  Check the Changelog for more details
323
 
top-10.php CHANGED
@@ -14,7 +14,7 @@
14
  * Plugin Name: Top 10
15
  * Plugin URI: https://webberzone.com/plugins/top-10/
16
  * Description: Count daily and total visits per post and display the most popular posts based on the number of views
17
- * Version: 2.6.1
18
  * Author: Ajay D'Souza
19
  * Author URI: https://webberzone.com
20
  * License: GPL-2.0+
14
  * Plugin Name: Top 10
15
  * Plugin URI: https://webberzone.com/plugins/top-10/
16
  * Description: Count daily and total visits per post and display the most popular posts based on the number of views
17
+ * Version: 2.6.2
18
  * Author: Ajay D'Souza
19
  * Author URI: https://webberzone.com
20
  * License: GPL-2.0+