Top 10 – Popular posts plugin for WordPress - Version 3.2.2

Version Description

Release post: https://webberzone.com/blog/top-10-v3-2-0/

  • Enhancements/Modifications:

    • Dashboard widget will display the number of posts set in the Top 10 Settings page
  • Bug fixes:

    • Tax query parameter was not set in Top_Ten_Query
    • post_type parameter was not set in Top_Ten_Query
    • Parse error in some PHP installs prevented the plugin from being activated
    • Fixed missing stylesheet error when text_only style is selected
    • Only from categories option in the Widget now takes a comma-separated ID list only as the autocomplete was not compatible with the new widget interface
Download this release

Release Info

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

Code changes from version 3.2.1 to 3.2.2

README.md CHANGED
@@ -12,7 +12,7 @@ __Requires:__ 5.6
12
 
13
  __Tested up to:__ 6.0
14
 
15
- __Requires PHP:__ 7.1
16
 
17
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
18
 
12
 
13
  __Tested up to:__ 6.0
14
 
15
+ __Requires PHP:__ 7.2
16
 
17
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
18
 
css/text-only.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .tptn-text-only {
2
+ clear: both;
3
+ }
css/text-only.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .tptn-text-only{clear:both}
includes/admin/admin-dashboard.php CHANGED
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
24
  * @param bool $widget Is this a WordPress widget.
25
  * @return Formatted list of popular posts
26
  */
27
- function tptn_pop_display( $daily = false, $page = 0, $limit = false, $widget = false ) {
28
 
29
  if ( ! $limit ) {
30
  $limit = tptn_get_option( 'limit' );
@@ -92,7 +92,7 @@ function tptn_pop_display( $daily = false, $page = 0, $limit = false, $widget =
92
  * @since 1.1
93
  */
94
  function tptn_pop_dashboard() {
95
- echo tptn_pop_display( false, 0, 20, true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
96
  }
97
 
98
 
@@ -102,7 +102,7 @@ function tptn_pop_dashboard() {
102
  * @since 1.2
103
  */
104
  function tptn_pop_daily_dashboard() {
105
- echo tptn_pop_display( true, 0, 20, true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
106
  }
107
 
108
 
24
  * @param bool $widget Is this a WordPress widget.
25
  * @return Formatted list of popular posts
26
  */
27
+ function tptn_pop_display( $daily = false, $page = 0, $limit = false, $widget = true ) {
28
 
29
  if ( ! $limit ) {
30
  $limit = tptn_get_option( 'limit' );
92
  * @since 1.1
93
  */
94
  function tptn_pop_dashboard() {
95
+ echo tptn_pop_display( false ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
96
  }
97
 
98
 
102
  * @since 1.2
103
  */
104
  function tptn_pop_daily_dashboard() {
105
+ echo tptn_pop_display( true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
106
  }
107
 
108
 
includes/admin/admin.php CHANGED
@@ -245,7 +245,7 @@ function tptn_network_admin_menu_links() {
245
  esc_html__( 'Popular Posts', 'top-10' ),
246
  'manage_network_options',
247
  'tptn_network_pop_posts_page',
248
- array( $tptn_stats_screen, 'plugin_settings_page' ),
249
  );
250
  add_action( "load-$tptn_network_pop_posts_page", array( $tptn_stats_screen, 'screen_option' ) );
251
 
@@ -255,7 +255,7 @@ function tptn_network_admin_menu_links() {
255
  esc_html__( 'Tools', 'top-10' ),
256
  'manage_network_options',
257
  'tptn_network_tools_page',
258
- 'tptn_tools_page',
259
  );
260
  add_action( "load-$tptn_network_tools_page", 'tptn_settings_tools_help' );
261
 
245
  esc_html__( 'Popular Posts', 'top-10' ),
246
  'manage_network_options',
247
  'tptn_network_pop_posts_page',
248
+ array( $tptn_stats_screen, 'plugin_settings_page' )
249
  );
250
  add_action( "load-$tptn_network_pop_posts_page", array( $tptn_stats_screen, 'screen_option' ) );
251
 
255
  esc_html__( 'Tools', 'top-10' ),
256
  'manage_network_options',
257
  'tptn_network_tools_page',
258
+ 'tptn_tools_page'
259
  );
260
  add_action( "load-$tptn_network_tools_page", 'tptn_settings_tools_help' );
261
 
includes/class-top-ten-query.php CHANGED
@@ -172,7 +172,7 @@ if ( ! class_exists( 'Top_Ten_Query' ) ) :
172
  $args['posts_per_page'] = ( $args['strict_limit'] ) ? $args['limit'] : ( $args['limit'] * 3 );
173
  }
174
 
175
- if ( empty( 'post_type' ) ) {
176
 
177
  // If post_types is empty or contains a query string then use parse_str else consider it comma-separated.
178
  if ( ! empty( $args['post_types'] ) && is_array( $args['post_types'] ) ) {
@@ -252,6 +252,8 @@ if ( ! class_exists( 'Top_Ten_Query' ) ) :
252
  $tax_query['relation'] = apply_filters( 'top_ten_query_tax_query_relation', 'AND', $args );
253
  }
254
 
 
 
255
  // Set date_query.
256
  $date_query = array(
257
  array(
172
  $args['posts_per_page'] = ( $args['strict_limit'] ) ? $args['limit'] : ( $args['limit'] * 3 );
173
  }
174
 
175
+ if ( empty( $args['post_type'] ) ) {
176
 
177
  // If post_types is empty or contains a query string then use parse_str else consider it comma-separated.
178
  if ( ! empty( $args['post_types'] ) && is_array( $args['post_types'] ) ) {
252
  $tax_query['relation'] = apply_filters( 'top_ten_query_tax_query_relation', 'AND', $args );
253
  }
254
 
255
+ $args['tax_query'] = $tax_query; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query
256
+
257
  // Set date_query.
258
  $date_query = array(
259
  array(
includes/modules/class-top-ten-widget.php CHANGED
@@ -44,28 +44,29 @@ class Top_Ten_Widget extends WP_Widget {
44
  * @param array $instance Previously saved values from database.
45
  */
46
  public function form( $instance ) {
47
- $instance['title'] = isset( $instance['title'] ) ? $instance['title'] : '';
48
- $instance['limit'] = isset( $instance['limit'] ) ? $instance['limit'] : '';
49
- $instance['offset'] = isset( $instance['offset'] ) ? $instance['offset'] : '';
50
- $instance['disp_list_count'] = isset( $instance['disp_list_count'] ) ? $instance['disp_list_count'] : '';
51
- $instance['show_excerpt'] = isset( $instance['show_excerpt'] ) ? $instance['show_excerpt'] : '';
52
- $instance['show_author'] = isset( $instance['show_author'] ) ? $instance['show_author'] : '';
53
- $instance['show_date'] = isset( $instance['show_date'] ) ? $instance['show_date'] : '';
54
- $instance['post_thumb_op'] = isset( $instance['post_thumb_op'] ) ? $instance['post_thumb_op'] : 'text_only';
55
- $instance['thumb_height'] = isset( $instance['thumb_height'] ) ? $instance['thumb_height'] : '';
56
- $instance['thumb_width'] = isset( $instance['thumb_width'] ) ? $instance['thumb_width'] : '';
57
- $instance['daily'] = isset( $instance['daily'] ) ? $instance['daily'] : 'overall';
58
- $instance['daily_range'] = isset( $instance['daily_range'] ) ? $instance['daily_range'] : '';
59
- $instance['hour_range'] = isset( $instance['hour_range'] ) ? $instance['hour_range'] : '';
60
- $instance['include_categories'] = isset( $instance['include_categories'] ) ? $instance['include_categories'] : '';
61
- $instance['include_cat_ids'] = isset( $instance['include_cat_ids'] ) ? $instance['include_cat_ids'] : '';
62
- $instance['include_post_ids'] = isset( $instance['include_post_ids'] ) ? $instance['include_post_ids'] : '';
63
 
64
  // Parse the Post types.
65
  $post_types = array();
66
- if ( ! empty( $instance['post_types'] ) ) {
67
- $post_types = $instance['post_types'];
68
- parse_str( $post_types, $post_types ); // Save post types in $post_types variable.
 
 
69
  }
70
  $wp_post_types = get_post_types(
71
  array(
@@ -136,9 +137,10 @@ class Top_Ten_Widget extends WP_Widget {
136
  <input id="<?php echo esc_attr( $this->get_field_id( 'thumb_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_width' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['thumb_width'] ); ?>" />
137
  </p>
138
  <p>
139
- <label for="<?php echo esc_attr( $this->get_field_id( 'include_categories' ) ); ?>"><?php esc_html_e( 'Only from categories', 'top-10' ); ?>:</label>
140
- <input class="widefat category_autocomplete" id="<?php echo esc_attr( $this->get_field_id( 'include_categories' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'include_categories' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['include_categories'] ); ?>" />
141
- <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" name="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" value="<?php echo esc_attr( $instance['include_cat_ids'] ); ?>" />
 
142
  </p>
143
  <p>
144
  <label for="<?php echo esc_attr( $this->get_field_id( 'include_post_ids' ) ); ?>"><?php esc_html_e( 'Include IDs', 'top-10' ); ?></label>
@@ -210,15 +212,15 @@ class Top_Ten_Widget extends WP_Widget {
210
  'public' => true,
211
  )
212
  );
213
- $post_types = isset( $new_instance['post_types'] ) ? (array) $new_instance['post_types'] : array();
214
- $post_types = array_intersect( $wp_post_types, $post_types );
215
- $instance['post_types'] = http_build_query( $post_types, '', '&' );
216
 
217
  // Save include_categories.
218
- $include_categories = array_unique( str_getcsv( $new_instance['include_categories'] ) );
219
 
220
  foreach ( $include_categories as $cat_name ) {
221
- $cat = get_term_by( 'name', $cat_name, 'category' );
222
 
223
  if ( isset( $cat->term_taxonomy_id ) ) {
224
  $include_cat_ids[] = $cat->term_taxonomy_id;
@@ -368,4 +370,3 @@ function tptn_register_widget() {
368
  register_widget( 'Top_Ten_Widget' );
369
  }
370
  add_action( 'widgets_init', 'tptn_register_widget', 1 );
371
-
44
  * @param array $instance Previously saved values from database.
45
  */
46
  public function form( $instance ) {
47
+ $instance['title'] = isset( $instance['title'] ) ? $instance['title'] : '';
48
+ $instance['limit'] = isset( $instance['limit'] ) ? $instance['limit'] : '';
49
+ $instance['offset'] = isset( $instance['offset'] ) ? $instance['offset'] : '';
50
+ $instance['disp_list_count'] = isset( $instance['disp_list_count'] ) ? $instance['disp_list_count'] : '';
51
+ $instance['show_excerpt'] = isset( $instance['show_excerpt'] ) ? $instance['show_excerpt'] : '';
52
+ $instance['show_author'] = isset( $instance['show_author'] ) ? $instance['show_author'] : '';
53
+ $instance['show_date'] = isset( $instance['show_date'] ) ? $instance['show_date'] : '';
54
+ $instance['post_thumb_op'] = isset( $instance['post_thumb_op'] ) ? $instance['post_thumb_op'] : 'text_only';
55
+ $instance['thumb_height'] = isset( $instance['thumb_height'] ) ? $instance['thumb_height'] : '';
56
+ $instance['thumb_width'] = isset( $instance['thumb_width'] ) ? $instance['thumb_width'] : '';
57
+ $instance['daily'] = isset( $instance['daily'] ) ? $instance['daily'] : 'overall';
58
+ $instance['daily_range'] = isset( $instance['daily_range'] ) ? $instance['daily_range'] : '';
59
+ $instance['hour_range'] = isset( $instance['hour_range'] ) ? $instance['hour_range'] : '';
60
+ $instance['include_cat_ids'] = isset( $instance['include_cat_ids'] ) ? $instance['include_cat_ids'] : '';
61
+ $instance['include_post_ids'] = isset( $instance['include_post_ids'] ) ? $instance['include_post_ids'] : '';
 
62
 
63
  // Parse the Post types.
64
  $post_types = array();
65
+ // If post_types is empty or contains a query string then use parse_str else consider it comma-separated.
66
+ if ( ! empty( $instance['post_types'] ) && false === strpos( $instance['post_types'], '=' ) ) {
67
+ $post_types = explode( ',', $instance['post_types'] );
68
+ } elseif ( ! empty( $instance['post_types'] ) ) {
69
+ parse_str( $instance['post_types'], $post_types ); // Save post types in $post_types variable.
70
  }
71
  $wp_post_types = get_post_types(
72
  array(
137
  <input id="<?php echo esc_attr( $this->get_field_id( 'thumb_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_width' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['thumb_width'] ); ?>" />
138
  </p>
139
  <p>
140
+ <label for="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>">
141
+ <?php esc_html_e( 'Only from categories (comma-separated list of term taxonomy IDs)', 'top-10' ); ?>:
142
+ <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'include_cat_ids' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['include_cat_ids'] ); ?>" />
143
+ </label>
144
  </p>
145
  <p>
146
  <label for="<?php echo esc_attr( $this->get_field_id( 'include_post_ids' ) ); ?>"><?php esc_html_e( 'Include IDs', 'top-10' ); ?></label>
212
  'public' => true,
213
  )
214
  );
215
+ $post_types = isset( $new_instance['post_types'] ) ? $new_instance['post_types'] : array();
216
+ $post_types = array_intersect( $wp_post_types, (array) $post_types );
217
+ $instance['post_types'] = implode( ',', $post_types );
218
 
219
  // Save include_categories.
220
+ $include_categories = wp_parse_id_list( $new_instance['include_cat_ids'] );
221
 
222
  foreach ( $include_categories as $cat_name ) {
223
+ $cat = get_term_by( 'term_taxonomy_id', $cat_name );
224
 
225
  if ( isset( $cat->term_taxonomy_id ) ) {
226
  $include_cat_ids[] = $cat->term_taxonomy_id;
370
  register_widget( 'Top_Ten_Widget' );
371
  }
372
  add_action( 'widgets_init', 'tptn_register_widget', 1 );
 
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: 2022-09-19 15:40+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza\n"
8
  "Language-Team: Ajay D'Souza\n"
@@ -322,7 +322,7 @@ msgstr ""
322
 
323
  #: includes/admin/class-top-ten-statistics-table.php:443
324
  #: includes/modules/class-top-ten-count-widget.php:49
325
- #: includes/modules/class-top-ten-widget.php:79
326
  msgid "Title"
327
  msgstr ""
328
 
@@ -372,7 +372,7 @@ msgid "Enable trackers"
372
  msgstr ""
373
 
374
  #: includes/admin/default-settings.php:72
375
- #: includes/modules/class-top-ten-widget.php:93
376
  msgid "Overall"
377
  msgstr ""
378
 
@@ -676,7 +676,7 @@ msgid ""
676
  msgstr ""
677
 
678
  #: includes/admin/default-settings.php:335
679
- #: includes/modules/class-top-ten-widget.php:148
680
  msgid "Post types to include"
681
  msgstr ""
682
 
@@ -808,13 +808,13 @@ msgstr ""
808
 
809
  #: includes/admin/default-settings.php:451
810
  #: includes/blocks/popular-posts/src/edit.js:219
811
- #: includes/modules/class-top-ten-widget.php:118
812
  msgid "Show date"
813
  msgstr ""
814
 
815
  #: includes/admin/default-settings.php:458
816
  #: includes/blocks/popular-posts/src/edit.js:205
817
- #: includes/modules/class-top-ten-widget.php:114
818
  msgid "Show author"
819
  msgstr ""
820
 
@@ -893,12 +893,12 @@ msgid "I recommend using %1$s to regenerate all image sizes."
893
  msgstr ""
894
 
895
  #: includes/admin/default-settings.php:576
896
- #: includes/modules/class-top-ten-widget.php:135
897
  msgid "Thumbnail width"
898
  msgstr ""
899
 
900
  #: includes/admin/default-settings.php:584
901
- #: includes/modules/class-top-ten-widget.php:131
902
  msgid "Thumbnail height"
903
  msgstr ""
904
 
@@ -1648,7 +1648,7 @@ msgid "Maximum number of posts to display"
1648
  msgstr ""
1649
 
1650
  #: includes/blocks/popular-posts/src/edit.js:181
1651
- #: includes/modules/class-top-ten-widget.php:87
1652
  msgid "Offset"
1653
  msgstr ""
1654
 
@@ -1657,7 +1657,7 @@ msgid "Number of posts to skip from the top"
1657
  msgstr ""
1658
 
1659
  #: includes/blocks/popular-posts/src/edit.js:191
1660
- #: includes/modules/class-top-ten-widget.php:110
1661
  msgid "Show excerpt"
1662
  msgstr ""
1663
 
@@ -1686,7 +1686,7 @@ msgid "Date of post not displayed"
1686
  msgstr ""
1687
 
1688
  #: includes/blocks/popular-posts/src/edit.js:233
1689
- #: includes/modules/class-top-ten-widget.php:106
1690
  msgid "Show count"
1691
  msgstr ""
1692
 
@@ -1788,51 +1788,51 @@ msgstr ""
1788
  msgid "Display popular posts"
1789
  msgstr ""
1790
 
1791
- #: includes/modules/class-top-ten-widget.php:83
1792
  msgid "No. of posts"
1793
  msgstr ""
1794
 
1795
- #: includes/modules/class-top-ten-widget.php:91
1796
  msgid "Select period"
1797
  msgstr ""
1798
 
1799
- #: includes/modules/class-top-ten-widget.php:94
1800
  msgid "Custom time period (Enter below)"
1801
  msgstr ""
1802
 
1803
- #: includes/modules/class-top-ten-widget.php:98
1804
  msgid "Days"
1805
  msgstr ""
1806
 
1807
- #: includes/modules/class-top-ten-widget.php:101
1808
  msgid "Hours"
1809
  msgstr ""
1810
 
1811
- #: includes/modules/class-top-ten-widget.php:122
1812
  msgid "Thumbnail options"
1813
  msgstr ""
1814
 
1815
- #: includes/modules/class-top-ten-widget.php:124
1816
  msgid "Thumbnails inline, before title"
1817
  msgstr ""
1818
 
1819
- #: includes/modules/class-top-ten-widget.php:125
1820
  msgid "Thumbnails inline, after title"
1821
  msgstr ""
1822
 
1823
- #: includes/modules/class-top-ten-widget.php:126
1824
  msgid "Only thumbnails, no text"
1825
  msgstr ""
1826
 
1827
- #: includes/modules/class-top-ten-widget.php:127
1828
  msgid "No thumbnails, only text."
1829
  msgstr ""
1830
 
1831
- #: includes/modules/class-top-ten-widget.php:139
1832
- msgid "Only from categories"
1833
  msgstr ""
1834
 
1835
- #: includes/modules/class-top-ten-widget.php:144
1836
  msgid "Include IDs"
1837
  msgstr ""
1838
 
2
  msgstr ""
3
  "Project-Id-Version: Top 10\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2022-09-23 19:38+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza\n"
8
  "Language-Team: Ajay D'Souza\n"
322
 
323
  #: includes/admin/class-top-ten-statistics-table.php:443
324
  #: includes/modules/class-top-ten-count-widget.php:49
325
+ #: includes/modules/class-top-ten-widget.php:80
326
  msgid "Title"
327
  msgstr ""
328
 
372
  msgstr ""
373
 
374
  #: includes/admin/default-settings.php:72
375
+ #: includes/modules/class-top-ten-widget.php:94
376
  msgid "Overall"
377
  msgstr ""
378
 
676
  msgstr ""
677
 
678
  #: includes/admin/default-settings.php:335
679
+ #: includes/modules/class-top-ten-widget.php:150
680
  msgid "Post types to include"
681
  msgstr ""
682
 
808
 
809
  #: includes/admin/default-settings.php:451
810
  #: includes/blocks/popular-posts/src/edit.js:219
811
+ #: includes/modules/class-top-ten-widget.php:119
812
  msgid "Show date"
813
  msgstr ""
814
 
815
  #: includes/admin/default-settings.php:458
816
  #: includes/blocks/popular-posts/src/edit.js:205
817
+ #: includes/modules/class-top-ten-widget.php:115
818
  msgid "Show author"
819
  msgstr ""
820
 
893
  msgstr ""
894
 
895
  #: includes/admin/default-settings.php:576
896
+ #: includes/modules/class-top-ten-widget.php:136
897
  msgid "Thumbnail width"
898
  msgstr ""
899
 
900
  #: includes/admin/default-settings.php:584
901
+ #: includes/modules/class-top-ten-widget.php:132
902
  msgid "Thumbnail height"
903
  msgstr ""
904
 
1648
  msgstr ""
1649
 
1650
  #: includes/blocks/popular-posts/src/edit.js:181
1651
+ #: includes/modules/class-top-ten-widget.php:88
1652
  msgid "Offset"
1653
  msgstr ""
1654
 
1657
  msgstr ""
1658
 
1659
  #: includes/blocks/popular-posts/src/edit.js:191
1660
+ #: includes/modules/class-top-ten-widget.php:111
1661
  msgid "Show excerpt"
1662
  msgstr ""
1663
 
1686
  msgstr ""
1687
 
1688
  #: includes/blocks/popular-posts/src/edit.js:233
1689
+ #: includes/modules/class-top-ten-widget.php:107
1690
  msgid "Show count"
1691
  msgstr ""
1692
 
1788
  msgid "Display popular posts"
1789
  msgstr ""
1790
 
1791
+ #: includes/modules/class-top-ten-widget.php:84
1792
  msgid "No. of posts"
1793
  msgstr ""
1794
 
1795
+ #: includes/modules/class-top-ten-widget.php:92
1796
  msgid "Select period"
1797
  msgstr ""
1798
 
1799
+ #: includes/modules/class-top-ten-widget.php:95
1800
  msgid "Custom time period (Enter below)"
1801
  msgstr ""
1802
 
1803
+ #: includes/modules/class-top-ten-widget.php:99
1804
  msgid "Days"
1805
  msgstr ""
1806
 
1807
+ #: includes/modules/class-top-ten-widget.php:102
1808
  msgid "Hours"
1809
  msgstr ""
1810
 
1811
+ #: includes/modules/class-top-ten-widget.php:123
1812
  msgid "Thumbnail options"
1813
  msgstr ""
1814
 
1815
+ #: includes/modules/class-top-ten-widget.php:125
1816
  msgid "Thumbnails inline, before title"
1817
  msgstr ""
1818
 
1819
+ #: includes/modules/class-top-ten-widget.php:126
1820
  msgid "Thumbnails inline, after title"
1821
  msgstr ""
1822
 
1823
+ #: includes/modules/class-top-ten-widget.php:127
1824
  msgid "Only thumbnails, no text"
1825
  msgstr ""
1826
 
1827
+ #: includes/modules/class-top-ten-widget.php:128
1828
  msgid "No thumbnails, only text."
1829
  msgstr ""
1830
 
1831
+ #: includes/modules/class-top-ten-widget.php:141
1832
+ msgid "Only from categories (comma-separated list of term taxonomy IDs)"
1833
  msgstr ""
1834
 
1835
+ #: includes/modules/class-top-ten-widget.php:146
1836
  msgid "Include IDs"
1837
  msgstr ""
1838
 
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: 2022-09-19 15:40+0100\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza\n"
9
  "Language-Team: Ajay D'Souza\n"
@@ -323,7 +323,7 @@ msgstr ""
323
 
324
  #: includes/admin/class-top-ten-statistics-table.php:443
325
  #: includes/modules/class-top-ten-count-widget.php:49
326
- #: includes/modules/class-top-ten-widget.php:79
327
  msgid "Title"
328
  msgstr ""
329
 
@@ -373,7 +373,7 @@ msgid "Enable trackers"
373
  msgstr ""
374
 
375
  #: includes/admin/default-settings.php:72
376
- #: includes/modules/class-top-ten-widget.php:93
377
  msgid "Overall"
378
  msgstr ""
379
 
@@ -677,7 +677,7 @@ msgid ""
677
  msgstr ""
678
 
679
  #: includes/admin/default-settings.php:335
680
- #: includes/modules/class-top-ten-widget.php:148
681
  msgid "Post types to include"
682
  msgstr ""
683
 
@@ -809,13 +809,13 @@ msgstr ""
809
 
810
  #: includes/admin/default-settings.php:451
811
  #: includes/blocks/popular-posts/src/edit.js:219
812
- #: includes/modules/class-top-ten-widget.php:118
813
  msgid "Show date"
814
  msgstr ""
815
 
816
  #: includes/admin/default-settings.php:458
817
  #: includes/blocks/popular-posts/src/edit.js:205
818
- #: includes/modules/class-top-ten-widget.php:114
819
  msgid "Show author"
820
  msgstr ""
821
 
@@ -894,12 +894,12 @@ msgid "I recommend using %1$s to regenerate all image sizes."
894
  msgstr ""
895
 
896
  #: includes/admin/default-settings.php:576
897
- #: includes/modules/class-top-ten-widget.php:135
898
  msgid "Thumbnail width"
899
  msgstr ""
900
 
901
  #: includes/admin/default-settings.php:584
902
- #: includes/modules/class-top-ten-widget.php:131
903
  msgid "Thumbnail height"
904
  msgstr ""
905
 
@@ -1649,7 +1649,7 @@ msgid "Maximum number of posts to display"
1649
  msgstr ""
1650
 
1651
  #: includes/blocks/popular-posts/src/edit.js:181
1652
- #: includes/modules/class-top-ten-widget.php:87
1653
  msgid "Offset"
1654
  msgstr ""
1655
 
@@ -1658,7 +1658,7 @@ msgid "Number of posts to skip from the top"
1658
  msgstr ""
1659
 
1660
  #: includes/blocks/popular-posts/src/edit.js:191
1661
- #: includes/modules/class-top-ten-widget.php:110
1662
  msgid "Show excerpt"
1663
  msgstr ""
1664
 
@@ -1687,7 +1687,7 @@ msgid "Date of post not displayed"
1687
  msgstr ""
1688
 
1689
  #: includes/blocks/popular-posts/src/edit.js:233
1690
- #: includes/modules/class-top-ten-widget.php:106
1691
  msgid "Show count"
1692
  msgstr ""
1693
 
@@ -1789,51 +1789,51 @@ msgstr ""
1789
  msgid "Display popular posts"
1790
  msgstr ""
1791
 
1792
- #: includes/modules/class-top-ten-widget.php:83
1793
  msgid "No. of posts"
1794
  msgstr ""
1795
 
1796
- #: includes/modules/class-top-ten-widget.php:91
1797
  msgid "Select period"
1798
  msgstr ""
1799
 
1800
- #: includes/modules/class-top-ten-widget.php:94
1801
  msgid "Custom time period (Enter below)"
1802
  msgstr ""
1803
 
1804
- #: includes/modules/class-top-ten-widget.php:98
1805
  msgid "Days"
1806
  msgstr ""
1807
 
1808
- #: includes/modules/class-top-ten-widget.php:101
1809
  msgid "Hours"
1810
  msgstr ""
1811
 
1812
- #: includes/modules/class-top-ten-widget.php:122
1813
  msgid "Thumbnail options"
1814
  msgstr ""
1815
 
1816
- #: includes/modules/class-top-ten-widget.php:124
1817
  msgid "Thumbnails inline, before title"
1818
  msgstr ""
1819
 
1820
- #: includes/modules/class-top-ten-widget.php:125
1821
  msgid "Thumbnails inline, after title"
1822
  msgstr ""
1823
 
1824
- #: includes/modules/class-top-ten-widget.php:126
1825
  msgid "Only thumbnails, no text"
1826
  msgstr ""
1827
 
1828
- #: includes/modules/class-top-ten-widget.php:127
1829
  msgid "No thumbnails, only text."
1830
  msgstr ""
1831
 
1832
- #: includes/modules/class-top-ten-widget.php:139
1833
- msgid "Only from categories"
1834
  msgstr ""
1835
 
1836
- #: includes/modules/class-top-ten-widget.php:144
1837
  msgid "Include IDs"
1838
  msgstr ""
1839
 
3
  msgstr ""
4
  "Project-Id-Version: Top 10\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2022-09-23 19:38+0100\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza\n"
9
  "Language-Team: Ajay D'Souza\n"
323
 
324
  #: includes/admin/class-top-ten-statistics-table.php:443
325
  #: includes/modules/class-top-ten-count-widget.php:49
326
+ #: includes/modules/class-top-ten-widget.php:80
327
  msgid "Title"
328
  msgstr ""
329
 
373
  msgstr ""
374
 
375
  #: includes/admin/default-settings.php:72
376
+ #: includes/modules/class-top-ten-widget.php:94
377
  msgid "Overall"
378
  msgstr ""
379
 
677
  msgstr ""
678
 
679
  #: includes/admin/default-settings.php:335
680
+ #: includes/modules/class-top-ten-widget.php:150
681
  msgid "Post types to include"
682
  msgstr ""
683
 
809
 
810
  #: includes/admin/default-settings.php:451
811
  #: includes/blocks/popular-posts/src/edit.js:219
812
+ #: includes/modules/class-top-ten-widget.php:119
813
  msgid "Show date"
814
  msgstr ""
815
 
816
  #: includes/admin/default-settings.php:458
817
  #: includes/blocks/popular-posts/src/edit.js:205
818
+ #: includes/modules/class-top-ten-widget.php:115
819
  msgid "Show author"
820
  msgstr ""
821
 
894
  msgstr ""
895
 
896
  #: includes/admin/default-settings.php:576
897
+ #: includes/modules/class-top-ten-widget.php:136
898
  msgid "Thumbnail width"
899
  msgstr ""
900
 
901
  #: includes/admin/default-settings.php:584
902
+ #: includes/modules/class-top-ten-widget.php:132
903
  msgid "Thumbnail height"
904
  msgstr ""
905
 
1649
  msgstr ""
1650
 
1651
  #: includes/blocks/popular-posts/src/edit.js:181
1652
+ #: includes/modules/class-top-ten-widget.php:88
1653
  msgid "Offset"
1654
  msgstr ""
1655
 
1658
  msgstr ""
1659
 
1660
  #: includes/blocks/popular-posts/src/edit.js:191
1661
+ #: includes/modules/class-top-ten-widget.php:111
1662
  msgid "Show excerpt"
1663
  msgstr ""
1664
 
1687
  msgstr ""
1688
 
1689
  #: includes/blocks/popular-posts/src/edit.js:233
1690
+ #: includes/modules/class-top-ten-widget.php:107
1691
  msgid "Show count"
1692
  msgstr ""
1693
 
1789
  msgid "Display popular posts"
1790
  msgstr ""
1791
 
1792
+ #: includes/modules/class-top-ten-widget.php:84
1793
  msgid "No. of posts"
1794
  msgstr ""
1795
 
1796
+ #: includes/modules/class-top-ten-widget.php:92
1797
  msgid "Select period"
1798
  msgstr ""
1799
 
1800
+ #: includes/modules/class-top-ten-widget.php:95
1801
  msgid "Custom time period (Enter below)"
1802
  msgstr ""
1803
 
1804
+ #: includes/modules/class-top-ten-widget.php:99
1805
  msgid "Days"
1806
  msgstr ""
1807
 
1808
+ #: includes/modules/class-top-ten-widget.php:102
1809
  msgid "Hours"
1810
  msgstr ""
1811
 
1812
+ #: includes/modules/class-top-ten-widget.php:123
1813
  msgid "Thumbnail options"
1814
  msgstr ""
1815
 
1816
+ #: includes/modules/class-top-ten-widget.php:125
1817
  msgid "Thumbnails inline, before title"
1818
  msgstr ""
1819
 
1820
+ #: includes/modules/class-top-ten-widget.php:126
1821
  msgid "Thumbnails inline, after title"
1822
  msgstr ""
1823
 
1824
+ #: includes/modules/class-top-ten-widget.php:127
1825
  msgid "Only thumbnails, no text"
1826
  msgstr ""
1827
 
1828
+ #: includes/modules/class-top-ten-widget.php:128
1829
  msgid "No thumbnails, only text."
1830
  msgstr ""
1831
 
1832
+ #: includes/modules/class-top-ten-widget.php:141
1833
+ msgid "Only from categories (comma-separated list of term taxonomy IDs)"
1834
  msgstr ""
1835
 
1836
+ #: includes/modules/class-top-ten-widget.php:146
1837
  msgid "Include IDs"
1838
  msgstr ""
1839
 
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
  Tags: popular posts, top 10, counter, top posts, daily popular, page views, statistics, tracker
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
- Stable tag: 3.2.1
6
  Requires at least: 5.6
7
- Tested up to: 6.0
8
- Requires PHP: 7.1
9
  License: GPLv2 or later
10
 
11
  Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.
@@ -133,11 +133,23 @@ add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sorta
133
 
134
  == Changelog ==
135
 
136
- = 3.2.1 =
137
 
138
  Release post: [https://webberzone.com/blog/top-10-v3-2-0/](https://webberzone.com/blog/top-10-v3-2-0/)
139
 
140
- * Other Enhancements/Modifications:
 
 
 
 
 
 
 
 
 
 
 
 
141
  * Modified behaviour of Popular Posts page and Admin Dashboard widgets to limit to public post types
142
 
143
  * Bug fixes:
@@ -225,6 +237,6 @@ For previous changelog entries, please refer to the separate changelog.txt file
225
 
226
  == Upgrade Notice ==
227
 
228
- = 3.2.1 =
229
  Major release; Please check the plugin settings; Read all details in the release post
230
 
2
  Tags: popular posts, top 10, counter, top posts, daily popular, page views, statistics, tracker
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
+ Stable tag: 3.2.2
6
  Requires at least: 5.6
7
+ Tested up to: 6.1
8
+ Requires PHP: 7.2
9
  License: GPLv2 or later
10
 
11
  Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.
133
 
134
  == Changelog ==
135
 
136
+ = 3.2.2 =
137
 
138
  Release post: [https://webberzone.com/blog/top-10-v3-2-0/](https://webberzone.com/blog/top-10-v3-2-0/)
139
 
140
+ * Enhancements/Modifications:
141
+ * Dashboard widget will display the number of posts set in the Top 10 Settings page
142
+
143
+ * Bug fixes:
144
+ * Tax query parameter was not set in `Top_Ten_Query`
145
+ * `post_type` parameter was not set in `Top_Ten_Query`
146
+ * Parse error in some PHP installs prevented the plugin from being activated
147
+ * Fixed missing stylesheet error when text_only style is selected
148
+ * Only from categories option in the Widget now takes a comma-separated ID list only as the autocomplete was not compatible with the new widget interface
149
+
150
+ = 3.2.1 =
151
+
152
+ * Enhancements/Modifications:
153
  * Modified behaviour of Popular Posts page and Admin Dashboard widgets to limit to public post types
154
 
155
  * Bug fixes:
237
 
238
  == Upgrade Notice ==
239
 
240
+ = 3.2.2 =
241
  Major release; Please check the plugin settings; Read all details in the release post
242
 
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: 3.2.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: 3.2.2
18
  * Author: Ajay D'Souza
19
  * Author URI: https://webberzone.com
20
  * License: GPL-2.0+