Top 10 – Popular posts plugin for WordPress - Version 2.9.0

Version Description

Release post: https://webberzone.com/blog/top-10-v2-9-0/

  • Features:

    • Edit the total visits from the Top 10 > Popular Posts page
    • New shortcode setting include_cat_ids to limit top posts to selected categories/taxonomies. Use a comma separated list of term_taxonomy_id
    • New setting in widget to only include certain categories. Doesn't work with custom taxonomies
  • Enhancements:

    • Implemented CodeMirror to format custom styles box
    • Admin scripts are no longer loaded into the head - but using a separate JavaScript file
  • Bug fixes:

    • Fixed media lookup returning PHP errors/warnings in rare cases
    • Use current_time and gmdate as per latest WordPress Coding Standards
    • No more unnecessary form modified errors in the popular posts tables in Admin area
    • Fixed notices in PHP 7.4 when viewing popular posts listings
    • When editing posts, the count from the metabox will only be used if it is modified
Download this release

Release Info

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

Code changes from version 2.8.0 to 2.9.0

README.md CHANGED
@@ -5,9 +5,9 @@
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.8
9
 
10
- __Tested up to:__ 5.3
11
 
12
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
13
 
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.9
9
 
10
+ __Tested up to:__ 5.4
11
 
12
  __License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
13
 
changelog.txt CHANGED
@@ -1,5 +1,116 @@
1
  This file holds the archive of changelog entries
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 2.4.4 =
4
 
5
  * Enhancements:
1
  This file holds the archive of changelog entries
2
 
3
+ = 2.6.3 =
4
+
5
+ * Enhancements:
6
+ * `tptn_get_first_image` filter has additional attributes `$image_attributes[0], $postid, $thumb_width, $thumb_height`
7
+
8
+ * Bug fixes:
9
+ * Reverted PolyLang implementation that was broken in v2.6.2
10
+ * Delete deprecated settings on save
11
+ * Fix settings link in plugins listing page
12
+ * Fix exclude categories setting on save
13
+
14
+ = 2.6.2 =
15
+
16
+ * Enhancements:
17
+ * Select a date range in the Popular Posts listing page in the admin
18
+
19
+ * Bug fixes:
20
+ * Fixed "Published post date" setting was not working. Thanks [@jherrerai](https://github.com/jherrerai)
21
+ * Modified PolyLang and WPML function implementations
22
+
23
+ = 2.6.1 =
24
+
25
+ * Bug fixes:
26
+ * Fixed widget daily and hourly range not working which was broken in v2.6.0
27
+
28
+ = 2.6.0 =
29
+
30
+ * Features:
31
+ * New option to disable creation of image thumbnails. Find this under Thumbnail options
32
+ * Thumbnail HTML markup includes `srcset` and `sizes` attributes when available. Read [Responsive Images in WordPress 4.4](https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/)
33
+ * New option to turn on debug mode. You can turn this on when requesting support. Find it under the Counter/Tracker tab
34
+ * New option to add the tracker js file on all pages, not just singular pages. Helps with minification/concatenation
35
+ * New date filter in the Popular posts listing page to see the views on a particular date
36
+ * New option to turn ON/OFF the number formatting of the post counts. ON by default
37
+
38
+ * Enhancements:
39
+ * Load tracker in footer
40
+ * Renamed top-10-tracker.js to top-10-tracker.min.js
41
+
42
+ * Bug fixes:
43
+ * Only delete option if null value is passed to tptn_update_option
44
+ * "Exclude display on these post IDs" moved under Counter section
45
+
46
+ = 2.5.7 =
47
+
48
+ * Enhancements:
49
+ * Tools page now has the code to Recreate the PRIMARY KEY in case the button gives an error. You will need to run this in phpMyAdmin or Adminer
50
+
51
+ * Bug fixes:
52
+ * Fixed translation of " by " which had the incorrect text domain
53
+ * Post types to includes selects "post" in case no option is selected
54
+ * Unchecking all boxes of a "Display number of views on" setting would sometimes pick the default value
55
+
56
+ = 2.5.6 =
57
+
58
+ * Features:
59
+ * Added new button under Tools to recreate the PRIMARY KEYs
60
+
61
+ = 2.5.5 =
62
+
63
+ * Bug fixes:
64
+ * Fixed missing semi-colon in tracker code
65
+ * Multi-site tracking failed in old installs where the PRIMARY KEY was not properly updated in the database. DB version has been updated to 6.0 to initiate primary key across all installs
66
+
67
+ = 2.5.4 =
68
+
69
+ * Features:
70
+ * New button in the Tools page to delete the pre-2.5.x settings
71
+
72
+ * Enhancements:
73
+ * New function `tptn_trim_char` replaces `tptn_max_formatted_content` which should now support non-English characters as well
74
+ * Counts in the "Popular Posts" page are now number formatted
75
+
76
+ * Bug fixes:
77
+ * Fixed PHP Illegal string offset error
78
+
79
+ = 2.5.3 =
80
+
81
+ * Bug fixes:
82
+ * Fixed number of posts displayed in the popular posts list
83
+
84
+ = 2.5.2 =
85
+
86
+ * Bug fixes:
87
+ * Settings / Thumbnail / Thumbnail size did not display the correct option even though the admin had this correctly saved
88
+
89
+ = 2.5.1 =
90
+
91
+ * Bug fixes:
92
+ * Custom CSS did not get upgraded or saved properly
93
+ * Uninstalling the plugin will delete the settings properly
94
+
95
+ = 2.5.0 =
96
+
97
+ * Features:
98
+ * Upgrade old options to Settings API
99
+ * New widget to display the overall count i.e. visits across all your site posts
100
+ * Added a filter to override the number of days that maintenance considers to delete the database entries
101
+ * New option to disable tracking for logged in users. Find "Track logged-in users" under the "Counter/Tracker" tab in the settings screen
102
+
103
+ * Enhancements:
104
+ * Make $ajax_tptn_tracker global. Contributed by [@pkirk](https://github.com/pkirk)
105
+
106
+ * Bug fixes:
107
+ * Make sure that $post object is available in `tptn_pc_content` filter. Contributed by [@mtws](https://github.com/mtws)
108
+ * When editing Attachment post types, metabox should now save correctly
109
+ * Disable `top_ten_nonce` as it wasn't needed for front-end users and conflicted with caching plugins
110
+
111
+ * Deprecated:
112
+ * `tptn_default_options` (no replacement) and `tptn_read_options` (Use `tptn_get_settings` instead)
113
+
114
  = 2.4.4 =
115
 
116
  * Enhancements:
includes/admin/admin-columns.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
- * @copyright 2008-2019 Ajay D'Souza
10
  */
11
 
12
  /**** If this file is called directly, abort. ****/
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
+ * @copyright 2008-2020 Ajay D'Souza
10
  */
11
 
12
  /**** If this file is called directly, abort. ****/
includes/admin/admin-dashboard.php CHANGED
@@ -8,7 +8,7 @@
8
  * @author Ajay D'Souza <me@ajaydsouza.com>
9
  * @license GPL-2.0+
10
  * @link https://webberzone.com
11
- * @copyright 2008-2019 Ajay D'Souza
12
  */
13
 
14
  /**** If this file is called directly, abort. ****/
8
  * @author Ajay D'Souza <me@ajaydsouza.com>
9
  * @license GPL-2.0+
10
  * @link https://webberzone.com
11
+ * @copyright 2008-2020 Ajay D'Souza
12
  */
13
 
14
  /**** If this file is called directly, abort. ****/
includes/admin/admin-metabox.php CHANGED
@@ -8,7 +8,7 @@
8
  * @author Ajay D'Souza <me@ajaydsouza.com>
9
  * @license GPL-2.0+
10
  * @link https://webberzone.com
11
- * @copyright 2008-2019 Ajay D'Souza
12
  */
13
 
14
  /**** If this file is called directly, abort. ****/
@@ -21,10 +21,9 @@ if ( ! defined( 'WPINC' ) ) {
21
  *
22
  * @since 1.9.10
23
  *
24
- * @param text $post_type Post type.
25
- * @param object $post Post object.
26
  */
27
- function tptn_add_meta_box( $post_type, $post ) {
28
 
29
  // If metaboxes are disabled, then exit.
30
  if ( ! tptn_get_option( 'show_metabox' ) ) {
@@ -62,7 +61,7 @@ function tptn_add_meta_box( $post_type, $post ) {
62
  );
63
  }
64
  }
65
- add_action( 'add_meta_boxes', 'tptn_add_meta_box', 10, 2 );
66
 
67
 
68
  /**
@@ -109,6 +108,7 @@ function tptn_call_meta_box() {
109
  <label for="total_count"><strong><?php esc_html_e( 'Visit count:', 'top-10' ); ?></strong></label>
110
  <input type="text" id="total_count" name="total_count" value="<?php echo esc_attr( $total_count ); ?>" style="width:100%" />
111
  <em><?php esc_html_e( 'Enter a number above to update the visit count. Leaving the above box blank will set the count to zero', 'top-10' ); ?></em>
 
112
  </p>
113
 
114
  <?php
@@ -176,7 +176,7 @@ function tptn_save_meta_box( $post_id ) {
176
  }
177
 
178
  // If our nonce isn't there, or we can't verify it, bail.
179
- if ( ! isset( $_POST['tptn_meta_box_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['tptn_meta_box_nonce'] ), 'tptn_meta_box' ) ) { // Input var okay.
180
  return;
181
  }
182
 
@@ -186,9 +186,10 @@ function tptn_save_meta_box( $post_id ) {
186
  }
187
 
188
  // Update the posts view count.
189
- if ( isset( $_POST['total_count'] ) ) { // Input var okay.
190
- $total_count = intval( $_POST['total_count'] ); // Input var okay.
191
- $blog_id = get_current_blog_id();
 
192
 
193
  if ( 0 === $total_count ) {
194
  $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
@@ -198,7 +199,7 @@ function tptn_save_meta_box( $post_id ) {
198
  $blog_id
199
  )
200
  );
201
- } else {
202
  $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
203
  $wpdb->prepare(
204
  "INSERT INTO {$table_name} (postnumber, cntaccess, blog_id) VALUES( %d, %d, %d ) ON DUPLICATE KEY UPDATE cntaccess= %d ", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
@@ -212,8 +213,8 @@ function tptn_save_meta_box( $post_id ) {
212
  }
213
 
214
  // Update the thumbnail URL.
215
- if ( isset( $_POST['thumb_meta'] ) ) { // Input var okay.
216
- $thumb_meta = empty( $_POST['thumb_meta'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['thumb_meta'] ) ); // Input var okay.
217
  }
218
 
219
  if ( ! empty( $thumb_meta ) ) {
@@ -223,13 +224,13 @@ function tptn_save_meta_box( $post_id ) {
223
  }
224
 
225
  // Disable posts.
226
- if ( isset( $_POST['disable_here'] ) ) { // Input var okay.
227
  $tptn_post_meta['disable_here'] = 1;
228
  } else {
229
  $tptn_post_meta['disable_here'] = 0;
230
  }
231
 
232
- if ( isset( $_POST['exclude_this_post'] ) ) { // Input var okay.
233
  $tptn_post_meta['exclude_this_post'] = 1;
234
  } else {
235
  $tptn_post_meta['exclude_this_post'] = 0;
8
  * @author Ajay D'Souza <me@ajaydsouza.com>
9
  * @license GPL-2.0+
10
  * @link https://webberzone.com
11
+ * @copyright 2008-2020 Ajay D'Souza
12
  */
13
 
14
  /**** If this file is called directly, abort. ****/
21
  *
22
  * @since 1.9.10
23
  *
24
+ * @param text $post_type Post type.
 
25
  */
26
+ function tptn_add_meta_box( $post_type ) {
27
 
28
  // If metaboxes are disabled, then exit.
29
  if ( ! tptn_get_option( 'show_metabox' ) ) {
61
  );
62
  }
63
  }
64
+ add_action( 'add_meta_boxes', 'tptn_add_meta_box' );
65
 
66
 
67
  /**
108
  <label for="total_count"><strong><?php esc_html_e( 'Visit count:', 'top-10' ); ?></strong></label>
109
  <input type="text" id="total_count" name="total_count" value="<?php echo esc_attr( $total_count ); ?>" style="width:100%" />
110
  <em><?php esc_html_e( 'Enter a number above to update the visit count. Leaving the above box blank will set the count to zero', 'top-10' ); ?></em>
111
+ <input type="hidden" id="total_count_original" name="total_count_original" value="<?php echo esc_attr( $total_count ); ?>">
112
  </p>
113
 
114
  <?php
176
  }
177
 
178
  // If our nonce isn't there, or we can't verify it, bail.
179
+ if ( ! isset( $_POST['tptn_meta_box_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['tptn_meta_box_nonce'] ), 'tptn_meta_box' ) ) {
180
  return;
181
  }
182
 
186
  }
187
 
188
  // Update the posts view count.
189
+ if ( isset( $_POST['total_count'] ) && isset( $_POST['total_count_original'] ) ) {
190
+ $total_count = intval( $_POST['total_count'] );
191
+ $total_count_original = intval( $_POST['total_count_original'] );
192
+ $blog_id = get_current_blog_id();
193
 
194
  if ( 0 === $total_count ) {
195
  $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
199
  $blog_id
200
  )
201
  );
202
+ } elseif ( $total_count_original !== $total_count ) {
203
  $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
204
  $wpdb->prepare(
205
  "INSERT INTO {$table_name} (postnumber, cntaccess, blog_id) VALUES( %d, %d, %d ) ON DUPLICATE KEY UPDATE cntaccess= %d ", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
213
  }
214
 
215
  // Update the thumbnail URL.
216
+ if ( isset( $_POST['thumb_meta'] ) ) {
217
+ $thumb_meta = empty( $_POST['thumb_meta'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['thumb_meta'] ) );
218
  }
219
 
220
  if ( ! empty( $thumb_meta ) ) {
224
  }
225
 
226
  // Disable posts.
227
+ if ( isset( $_POST['disable_here'] ) ) {
228
  $tptn_post_meta['disable_here'] = 1;
229
  } else {
230
  $tptn_post_meta['disable_here'] = 0;
231
  }
232
 
233
+ if ( isset( $_POST['exclude_this_post'] ) ) {
234
  $tptn_post_meta['exclude_this_post'] = 1;
235
  } else {
236
  $tptn_post_meta['exclude_this_post'] = 0;
includes/admin/admin.php CHANGED
@@ -21,7 +21,11 @@ if ( ! defined( 'WPINC' ) ) {
21
  *
22
  * @since 2.5.0
23
  *
24
- * @global $tptn_settings_page
 
 
 
 
25
  * @return void
26
  */
27
  function tptn_add_admin_pages_links() {
@@ -29,243 +33,28 @@ function tptn_add_admin_pages_links() {
29
 
30
  $tptn_settings_page = add_menu_page( esc_html__( 'Top 10 Settings', 'top-10' ), esc_html__( 'Top 10', 'top-10' ), 'manage_options', 'tptn_options_page', 'tptn_options_page', 'dashicons-editor-ol' );
31
  add_action( "load-$tptn_settings_page", 'tptn_settings_help' ); // Load the settings contextual help.
32
- add_action( "admin_head-$tptn_settings_page", 'tptn_adminhead' ); // Load the admin head.
33
 
34
  $plugin_page = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Settings', 'top-10' ), esc_html__( 'Settings', 'top-10' ), 'manage_options', 'tptn_options_page', 'tptn_options_page' );
35
- add_action( 'admin_head-' . $plugin_page, 'tptn_adminhead' );
36
 
37
  // Initialise Top 10 Statistics pages.
38
  $tptn_stats_screen = new Top_Ten_Statistics();
39
 
40
  $tptn_settings_popular_posts = add_submenu_page( 'tptn_options_page', __( 'Top 10 Popular Posts', 'top-10' ), __( 'Popular Posts', 'top-10' ), 'manage_options', 'tptn_popular_posts', array( $tptn_stats_screen, 'plugin_settings_page' ) );
41
  add_action( "load-$tptn_settings_popular_posts", array( $tptn_stats_screen, 'screen_option' ) );
42
- add_action( 'admin_head-' . $tptn_settings_popular_posts, 'tptn_adminhead' );
43
 
44
  $tptn_settings_popular_posts_daily = add_submenu_page( 'tptn_options_page', __( 'Top 10 Daily Popular Posts', 'top-10' ), __( 'Daily Popular Posts', 'top-10' ), 'manage_options', 'tptn_popular_posts&orderby=daily_count&order=desc', array( $tptn_stats_screen, 'plugin_settings_page' ) );
45
  add_action( "load-$tptn_settings_popular_posts_daily", array( $tptn_stats_screen, 'screen_option' ) );
46
- add_action( 'admin_head-' . $tptn_settings_popular_posts_daily, 'tptn_adminhead' );
47
 
48
  // Add links to Tools pages.
49
  $tptn_settings_tools_help = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Tools', 'top-10' ), esc_html__( 'Tools', 'top-10' ), 'manage_options', 'tptn_tools_page', 'tptn_tools_page' );
50
  add_action( "load-$tptn_settings_tools_help", 'tptn_settings_tools_help' );
51
- add_action( 'admin_head-' . $tptn_settings_tools_help, 'tptn_adminhead' );
52
 
53
  $tptn_settings_exim_help = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Import Export Tables', 'top-10' ), esc_html__( 'Import/Export', 'top-10' ), 'manage_options', 'tptn_exim_page', 'tptn_exim_page' );
54
  add_action( "load-$tptn_settings_exim_help", 'tptn_settings_exim_help' );
55
- add_action( 'admin_head-' . $tptn_settings_exim_help, 'tptn_adminhead' );
56
  }
57
  add_action( 'admin_menu', 'tptn_add_admin_pages_links' );
58
 
59
 
60
- /**
61
- * Function to add CSS and JS to the Admin header.
62
- *
63
- * @since 2.5.0
64
- * @return void
65
- */
66
- function tptn_adminhead() {
67
- global $tptn_settings_popular_posts, $tptn_settings_popular_posts_daily, $tptn_network_pop_posts_page;
68
-
69
- wp_enqueue_script( 'jquery' );
70
- wp_enqueue_script( 'jquery-ui-autocomplete' );
71
- wp_enqueue_script( 'jquery-ui-tabs' );
72
- wp_enqueue_script( 'plugin-install' );
73
- wp_enqueue_script( 'jquery-ui-datepicker' );
74
- add_thickbox();
75
-
76
- $screen = get_current_screen();
77
-
78
- if ( $screen->id === $tptn_settings_popular_posts || $screen->id === $tptn_settings_popular_posts_daily || $screen->id === $tptn_network_pop_posts_page . '-network' ) {
79
- wp_enqueue_style(
80
- 'tptn-admin-ui-css',
81
- plugins_url( 'includes/admin/css/top-10-admin.min.css', TOP_TEN_PLUGIN_FILE ),
82
- false,
83
- '1.0',
84
- false
85
- );
86
- }
87
- ?>
88
- <script type="text/javascript">
89
- //<![CDATA[
90
- // Function to clear the cache.
91
- function clearCache() {
92
- /**** since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php ****/
93
- jQuery.post(ajaxurl, {
94
- action: 'tptn_clear_cache'
95
- }, function (response, textStatus, jqXHR) {
96
- alert(response.message);
97
- }, 'json');
98
- }
99
-
100
- // Function to add auto suggest.
101
- jQuery(document).ready(function($) {
102
- $.fn.tptnTagsSuggest = function( options ) {
103
-
104
- var cache;
105
- var last;
106
- var $element = $( this );
107
-
108
- var taxonomy = $element.attr( 'data-wp-taxonomy' ) || 'category';
109
-
110
- function split( val ) {
111
- return val.split( /,\s*/ );
112
- }
113
-
114
- function extractLast( term ) {
115
- return split( term ).pop();
116
- }
117
-
118
- $element.on( "keydown", function( event ) {
119
- // Don't navigate away from the field on tab when selecting an item.
120
- if ( event.keyCode === $.ui.keyCode.TAB &&
121
- $( this ).autocomplete( 'instance' ).menu.active ) {
122
- event.preventDefault();
123
- }
124
- })
125
- .autocomplete({
126
- minLength: 2,
127
- source: function( request, response ) {
128
- var term;
129
-
130
- if ( last === request.term ) {
131
- response( cache );
132
- return;
133
- }
134
-
135
- term = extractLast( request.term );
136
-
137
- if ( last === request.term ) {
138
- response( cache );
139
- return;
140
- }
141
-
142
- $.ajax({
143
- type: 'POST',
144
- dataType: 'json',
145
- url: '<?php echo admin_url( 'admin-ajax.php' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>',
146
- data: {
147
- action: 'tptn_tag_search',
148
- tax: taxonomy,
149
- q: term
150
- },
151
- success: function( data ) {
152
- cache = data;
153
-
154
- response( data );
155
- }
156
- });
157
-
158
- last = request.term;
159
-
160
- },
161
- search: function() {
162
- // Custom minLength.
163
- var term = extractLast( this.value );
164
-
165
- if ( term.length < 2 ) {
166
- return false;
167
- }
168
- },
169
- focus: function( event, ui ) {
170
- // Prevent value inserted on focus.
171
- event.preventDefault();
172
- },
173
- select: function( event, ui ) {
174
- var terms = split( this.value );
175
-
176
- // Remove the last user input.
177
- terms.pop();
178
-
179
- // Add the selected item.
180
- terms.push( ui.item.value );
181
-
182
- // Add placeholder to get the comma-and-space at the end.
183
- terms.push( "" );
184
- this.value = terms.join( ", " );
185
- return false;
186
- }
187
- });
188
-
189
- };
190
-
191
- $( '.category_autocomplete' ).each( function ( i, element ) {
192
- $( element ).tptnTagsSuggest();
193
- });
194
-
195
- // Prompt the user when they leave the page without saving the form.
196
- formmodified=0;
197
-
198
- $('form *').change(function(){
199
- formmodified=1;
200
- });
201
-
202
- window.onbeforeunload = confirmExit;
203
-
204
- function confirmExit() {
205
- if (formmodified == 1) {
206
- return "<?php esc_html__( 'New information not saved. Do you wish to leave the page?', 'where-did-they-go-from-here' ); ?>";
207
- }
208
- }
209
-
210
- $( "input[name='submit']" ).click( function() {
211
- formmodified = 0;
212
- });
213
-
214
- $( function() {
215
- $( "#post-body-content" ).tabs({
216
- create: function( event, ui ) {
217
- $( ui.tab.find("a") ).addClass( "nav-tab-active" );
218
- },
219
- activate: function( event, ui ) {
220
- $( ui.oldTab.find("a") ).removeClass( "nav-tab-active" );
221
- $( ui.newTab.find("a") ).addClass( "nav-tab-active" );
222
- }
223
- });
224
- });
225
-
226
- $( function() {
227
- var dateFormat = 'dd M yy',
228
- from = $( "#datepicker-from" )
229
- .datepicker({
230
- changeMonth: true,
231
- maxDate: 0,
232
- dateFormat: dateFormat
233
- })
234
- .on( "change", function() {
235
- to.datepicker( "option", "minDate", getDate( this ) );
236
- }),
237
- to = $( "#datepicker-to" )
238
- .datepicker({
239
- changeMonth: true,
240
- maxDate: 0,
241
- dateFormat: dateFormat
242
- })
243
- .on( "change", function() {
244
- from.datepicker( "option", "maxDate", getDate( this ) );
245
- });
246
-
247
- function getDate( element ) {
248
- var date;
249
- try {
250
- date = $.datepicker.parseDate( dateFormat, element.value );
251
- } catch( error ) {
252
- date = null;
253
- }
254
-
255
- return date;
256
- }
257
- } );
258
-
259
-
260
-
261
- });
262
-
263
- //]]>
264
- </script>
265
- <?php
266
- }
267
-
268
-
269
  /**
270
  * Customise the taxonomy columns.
271
  *
@@ -411,7 +200,93 @@ function tptn_network_admin_menu_links() {
411
 
412
  $tptn_network_pop_posts_page = add_menu_page( esc_html__( 'Top 10 - Network Popular Posts', 'top-10' ), esc_html__( 'Top 10', 'top-10' ), 'manage_network_options', 'tptn_network_pop_posts_page', array( $tptn_stats_screen, 'plugin_settings_page' ), 'dashicons-editor-ol' );
413
  add_action( "load-$tptn_network_pop_posts_page", array( $tptn_stats_screen, 'screen_option' ) );
414
- add_action( 'admin_head-' . $tptn_network_pop_posts_page, 'tptn_adminhead' );
415
 
416
  }
417
  add_action( 'network_admin_menu', 'tptn_network_admin_menu_links' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  *
22
  * @since 2.5.0
23
  *
24
+ * @global string $tptn_settings_page Settings page hook.
25
+ * @global string $tptn_settings_popular_posts Popular posts page hook.
26
+ * @global string $tptn_settings_popular_posts_daily Daily popular page hook.
27
+ * @global string $tptn_settings_tools_help Tools page hook.
28
+ * @global string $tptn_settings_exim_help Export/Import page hook.
29
  * @return void
30
  */
31
  function tptn_add_admin_pages_links() {
33
 
34
  $tptn_settings_page = add_menu_page( esc_html__( 'Top 10 Settings', 'top-10' ), esc_html__( 'Top 10', 'top-10' ), 'manage_options', 'tptn_options_page', 'tptn_options_page', 'dashicons-editor-ol' );
35
  add_action( "load-$tptn_settings_page", 'tptn_settings_help' ); // Load the settings contextual help.
 
36
 
37
  $plugin_page = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Settings', 'top-10' ), esc_html__( 'Settings', 'top-10' ), 'manage_options', 'tptn_options_page', 'tptn_options_page' );
 
38
 
39
  // Initialise Top 10 Statistics pages.
40
  $tptn_stats_screen = new Top_Ten_Statistics();
41
 
42
  $tptn_settings_popular_posts = add_submenu_page( 'tptn_options_page', __( 'Top 10 Popular Posts', 'top-10' ), __( 'Popular Posts', 'top-10' ), 'manage_options', 'tptn_popular_posts', array( $tptn_stats_screen, 'plugin_settings_page' ) );
43
  add_action( "load-$tptn_settings_popular_posts", array( $tptn_stats_screen, 'screen_option' ) );
 
44
 
45
  $tptn_settings_popular_posts_daily = add_submenu_page( 'tptn_options_page', __( 'Top 10 Daily Popular Posts', 'top-10' ), __( 'Daily Popular Posts', 'top-10' ), 'manage_options', 'tptn_popular_posts&orderby=daily_count&order=desc', array( $tptn_stats_screen, 'plugin_settings_page' ) );
46
  add_action( "load-$tptn_settings_popular_posts_daily", array( $tptn_stats_screen, 'screen_option' ) );
 
47
 
48
  // Add links to Tools pages.
49
  $tptn_settings_tools_help = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Tools', 'top-10' ), esc_html__( 'Tools', 'top-10' ), 'manage_options', 'tptn_tools_page', 'tptn_tools_page' );
50
  add_action( "load-$tptn_settings_tools_help", 'tptn_settings_tools_help' );
 
51
 
52
  $tptn_settings_exim_help = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Import Export Tables', 'top-10' ), esc_html__( 'Import/Export', 'top-10' ), 'manage_options', 'tptn_exim_page', 'tptn_exim_page' );
53
  add_action( "load-$tptn_settings_exim_help", 'tptn_settings_exim_help' );
 
54
  }
55
  add_action( 'admin_menu', 'tptn_add_admin_pages_links' );
56
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  /**
59
  * Customise the taxonomy columns.
60
  *
200
 
201
  $tptn_network_pop_posts_page = add_menu_page( esc_html__( 'Top 10 - Network Popular Posts', 'top-10' ), esc_html__( 'Top 10', 'top-10' ), 'manage_network_options', 'tptn_network_pop_posts_page', array( $tptn_stats_screen, 'plugin_settings_page' ), 'dashicons-editor-ol' );
202
  add_action( "load-$tptn_network_pop_posts_page", array( $tptn_stats_screen, 'screen_option' ) );
 
203
 
204
  }
205
  add_action( 'network_admin_menu', 'tptn_network_admin_menu_links' );
206
+
207
+ /**
208
+ * Enqueue Admin JS
209
+ *
210
+ * @since 2.9.0
211
+ *
212
+ * @param string $hook The current admin page.
213
+ */
214
+ function tptn_load_admin_scripts( $hook ) {
215
+
216
+ global $tptn_settings_page, $tptn_settings_tools_help, $tptn_settings_popular_posts, $tptn_settings_popular_posts_daily, $tptn_settings_exim_help, $tptn_network_pop_posts_page;
217
+
218
+ wp_register_script( 'top-ten-admin-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/admin-scripts.min.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-datepicker' ), '1.0', true );
219
+ wp_register_script( 'top-ten-suggest-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/top-10-suggest.min.js', array( 'jquery', 'jquery-ui-autocomplete' ), '1.0', true );
220
+
221
+ wp_register_style(
222
+ 'tptn-admin-customizer-css',
223
+ TOP_TEN_PLUGIN_URL . 'includes/admin/css/top-10-customizer.min.css',
224
+ false,
225
+ '1.0',
226
+ false
227
+ );
228
+
229
+ if ( in_array( $hook, array( $tptn_settings_page, $tptn_settings_tools_help, $tptn_settings_popular_posts, $tptn_settings_popular_posts_daily, $tptn_settings_exim_help, $tptn_network_pop_posts_page . '-network' ), true ) ) {
230
+
231
+ wp_enqueue_script( 'top-ten-admin-js' );
232
+ wp_enqueue_script( 'top-ten-suggest-js' );
233
+ wp_enqueue_script( 'plugin-install' );
234
+ add_thickbox();
235
+
236
+ wp_enqueue_code_editor(
237
+ array(
238
+ 'type' => 'text/html',
239
+ 'codemirror' => array(
240
+ 'indentUnit' => 2,
241
+ 'tabSize' => 2,
242
+ ),
243
+ )
244
+ );
245
+
246
+ }
247
+
248
+ // Only enqueue the styles if this is a popular posts page.
249
+ if ( in_array( $hook, array( $tptn_settings_popular_posts, $tptn_settings_popular_posts_daily, $tptn_network_pop_posts_page . '-network' ), true ) ) {
250
+ wp_enqueue_style(
251
+ 'tptn-admin-ui-css',
252
+ TOP_TEN_PLUGIN_URL . 'includes/admin/css/top-10-admin.min.css',
253
+ false,
254
+ '1.0',
255
+ false
256
+ );
257
+ }
258
+ }
259
+ add_action( 'admin_enqueue_scripts', 'tptn_load_admin_scripts' );
260
+
261
+
262
+ /**
263
+ * This function enqueues scripts and styles in the Customizer.
264
+ *
265
+ * @since 2.9.0
266
+ */
267
+ function tptn_customize_controls_enqueue_scripts() {
268
+ wp_enqueue_script( 'customize-controls' );
269
+ wp_enqueue_script( 'top-ten-suggest-js' );
270
+
271
+ wp_enqueue_style( 'tptn-admin-customizer-css' );
272
+
273
+ }
274
+ add_action( 'customize_controls_enqueue_scripts', 'tptn_customize_controls_enqueue_scripts', 99 );
275
+
276
+
277
+ /**
278
+ * This function enqueues scripts and styles on widgets.php.
279
+ *
280
+ * @since 2.9.0
281
+ *
282
+ * @param string $hook The current admin page.
283
+ */
284
+ function tptn_enqueue_scripts_widgets( $hook ) {
285
+ if ( 'widgets.php' !== $hook ) {
286
+ return;
287
+ }
288
+ wp_enqueue_script( 'top-ten-suggest-js' );
289
+ wp_enqueue_style( 'tptn-admin-customizer-css' );
290
+ }
291
+ add_action( 'admin_enqueue_scripts', 'tptn_enqueue_scripts_widgets', 99 );
292
+
includes/admin/class-top-ten-network-statistics-table.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
- * @copyright 2008-2019 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
@@ -61,8 +61,16 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
61
  $limits = '';
62
  $sql = '';
63
 
64
- $from_date = tptn_get_from_date( $args['post-date-filter-from'], 1, 0 );
65
- $to_date = tptn_get_from_date( $args['post-date-filter-to'], 1, 0 );
 
 
 
 
 
 
 
 
66
 
67
  /* Start creating the SQL */
68
  $table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
@@ -161,7 +169,7 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
161
  * @param string $args Array of arguments.
162
  * @return null|string null|string
163
  */
164
- public function record_count( $args = null ) {
165
 
166
  global $wpdb;
167
 
@@ -402,8 +410,7 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
402
  ob_start();
403
 
404
  // Add date selector.
405
- $current_time = current_time( 'timestamp', 0 );
406
- $current_date = gmdate( 'd M Y', $current_time );
407
 
408
  $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
409
  echo '<input type="text" id="datepicker-from" name="post-date-filter-from" value="' . esc_attr( $post_date_from ) . '" size="11" />';
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
+ * @copyright 2008-2020 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
61
  $limits = '';
62
  $sql = '';
63
 
64
+ $from_date = tptn_get_from_date(
65
+ isset( $args['post-date-filter-from'] ) ? $args['post-date-filter-from'] : null,
66
+ 1,
67
+ 0
68
+ );
69
+ $to_date = tptn_get_from_date(
70
+ isset( $args['post-date-filter-to'] ) ? $args['post-date-filter-to'] : null,
71
+ 1,
72
+ 0
73
+ );
74
 
75
  /* Start creating the SQL */
76
  $table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
169
  * @param string $args Array of arguments.
170
  * @return null|string null|string
171
  */
172
+ public function record_count( $args = null ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
173
 
174
  global $wpdb;
175
 
410
  ob_start();
411
 
412
  // Add date selector.
413
+ $current_date = current_time( 'd M Y' );
 
414
 
415
  $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
416
  echo '<input type="text" id="datepicker-from" name="post-date-filter-from" value="' . esc_attr( $post_date_from ) . '" size="11" />';
includes/admin/class-top-ten-network-statistics.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
- * @copyright 2008-2019 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
@@ -57,7 +57,7 @@ class Top_Ten_Network_Statistics {
57
  * @param string $value Option value.
58
  * @return string Value.
59
  */
60
- public static function set_screen( $status, $option, $value ) {
61
  return $value;
62
  }
63
 
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
+ * @copyright 2008-2020 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
57
  * @param string $value Option value.
58
  * @return string Value.
59
  */
60
+ public static function set_screen( $status, $option, $value ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
61
  return $value;
62
  }
63
 
includes/admin/class-top-ten-statistics-table.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
- * @copyright 2008-2019 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
@@ -64,8 +64,16 @@ 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-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';
@@ -228,7 +236,6 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
228
  switch ( $column_name ) {
229
  case 'post_type':
230
  return $item[ $column_name ];
231
- case 'total_count':
232
  case 'daily_count':
233
  return tptn_number_format_i18n( absint( $item[ $column_name ] ) );
234
  default:
@@ -328,6 +335,21 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
328
  );
329
  }
330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  /**
332
  * Associative array of columns
333
  *
@@ -452,8 +474,7 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
452
  ob_start();
453
 
454
  // Add date selector.
455
- $current_time = current_time( 'timestamp', 0 );
456
- $current_date = gmdate( 'd M Y', $current_time );
457
 
458
  $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
459
  echo '<input type="text" id="datepicker-from" name="post-date-filter-from" value="' . esc_attr( $post_date_from ) . '" size="11" />';
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
+ * @copyright 2008-2020 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
64
 
65
  $blog_id = get_current_blog_id();
66
 
67
+ $from_date = tptn_get_from_date(
68
+ isset( $args['post-date-filter-from'] ) ? $args['post-date-filter-from'] : null,
69
+ 1,
70
+ 0
71
+ );
72
+ $to_date = tptn_get_from_date(
73
+ isset( $args['post-date-filter-to'] ) ? $args['post-date-filter-to'] : null,
74
+ 1,
75
+ 0
76
+ );
77
 
78
  /* Start creating the SQL */
79
  $table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
236
  switch ( $column_name ) {
237
  case 'post_type':
238
  return $item[ $column_name ];
 
239
  case 'daily_count':
240
  return tptn_number_format_i18n( absint( $item[ $column_name ] ) );
241
  default:
335
  );
336
  }
337
 
338
+ /**
339
+ * Render the Total Count column.
340
+ *
341
+ * @param array $item Current item.
342
+ * @return string
343
+ */
344
+ public function column_total_count( $item ) {
345
+ return sprintf(
346
+ '<div contentEditable="true" class="live_edit" id="total_count_%1$s" data-wp-post-id="%1$s" data-wp-count="%2$s">%3$s</div>',
347
+ $item['ID'],
348
+ $item['total_count'],
349
+ tptn_number_format_i18n( absint( $item['total_count'] ) )
350
+ );
351
+ }
352
+
353
  /**
354
  * Associative array of columns
355
  *
474
  ob_start();
475
 
476
  // Add date selector.
477
+ $current_date = current_time( 'd M Y' );
 
478
 
479
  $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
480
  echo '<input type="text" id="datepicker-from" name="post-date-filter-from" value="' . esc_attr( $post_date_from ) . '" size="11" />';
includes/admin/class-top-ten-statistics.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
- * @copyright 2008-2019 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
@@ -57,7 +57,7 @@ class Top_Ten_Statistics {
57
  * @param string $value Option value.
58
  * @return string Value.
59
  */
60
- public static function set_screen( $status, $option, $value ) {
61
  return $value;
62
  }
63
 
7
  * @author Ajay D'Souza <me@ajaydsouza.com>
8
  * @license GPL-2.0+
9
  * @link https://webberzone.com
10
+ * @copyright 2008-2020 Ajay D'Souza
11
  */
12
 
13
  /**** If this file is called directly, abort. ****/
57
  * @param string $value Option value.
58
  * @return string Value.
59
  */
60
+ public static function set_screen( $status, $option, $value ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
61
  return $value;
62
  }
63
 
includes/admin/css/top-10-admin.css CHANGED
@@ -667,3 +667,26 @@ a.ui-button:active,
667
  -webkit-box-shadow: -8px -8px 8px #aaaaaa;
668
  box-shadow: -8px -8px 8px #aaaaaa;
669
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
667
  -webkit-box-shadow: -8px -8px 8px #aaaaaa;
668
  box-shadow: -8px -8px 8px #aaaaaa;
669
  }
670
+
671
+ /* Live editing styles
672
+ ----------------------------------*/
673
+ .live_edit {
674
+ padding: 0 2px;
675
+ }
676
+ .live_edit_mode {
677
+ border: 1px solid black;
678
+ }
679
+ .live_edit_mode_success {
680
+ background-color: lightgreen;
681
+ -webkit-transition: background-color 0.5s ease;
682
+ -moz-transition: background-color 0.5s ease;
683
+ -o-transition: background-color 0.5s ease;
684
+ transition: background-color 0.5s ease;
685
+ }
686
+ .live_edit_mode_error {
687
+ background-color: lightpink;
688
+ -webkit-transition: background-color 0.5s ease;
689
+ -moz-transition: background-color 0.5s ease;
690
+ -o-transition: background-color 0.5s ease;
691
+ transition: background-color 0.5s ease;
692
+ }
includes/admin/css/top-10-admin.min.css CHANGED
@@ -1 +1,5 @@
1
- .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-datepicker{border:1px solid #aaa;background:#fff;color:#222}.ui-datepicker a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-button .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa}
 
 
 
 
1
+ /*! jQuery UI - v1.12.1 - 2019-02-05
2
+ * http://jqueryui.com
3
+ * Includes: core.css, datepicker.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-datepicker{border:1px solid #aaa;background:#fff;color:#222}.ui-datepicker a{color:#222}.ui-button,.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,html .ui-button.ui-state-disabled:active,html .ui-button.ui-state-disabled:hover{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-button,.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button{color:#555;text-decoration:none}.ui-button:focus,.ui-button:hover,.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,a.ui-button:focus,a.ui-button:hover{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px #5e9ed6}.ui-button.ui-state-active:hover,.ui-button:active,.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-button:focus .ui-icon,.ui-button:hover .ui-icon,.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-button:active .ui-icon,.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-button .ui-state-highlight.ui-icon,.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-button .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:4px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa}.live_edit{padding:0 2px}.live_edit_mode{border:1px solid #000}.live_edit_mode_success{background-color:#90ee90;-webkit-transition:background-color .5s ease;-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;transition:background-color .5s ease}.live_edit_mode_error{background-color:#ffb6c1;-webkit-transition:background-color .5s ease;-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;transition:background-color .5s ease}
includes/admin/css/top-10-customizer.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .ui-autocomplete {
2
+ z-index: 9999999999;
3
+ }
includes/admin/css/top-10-customizer.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .ui-autocomplete{z-index:9999999999}
includes/admin/default-settings.php CHANGED
@@ -647,12 +647,13 @@ function tptn_settings_styles() {
647
  'options' => tptn_get_styles(),
648
  ),
649
  'custom_css' => array(
650
- 'id' => 'custom_css',
651
- 'name' => esc_html__( 'Custom CSS', 'top-10' ),
652
  /* translators: 1: Opening a tag, 2: Closing a tag, 3: Opening code tage, 4. Closing code tag. */
653
- 'desc' => sprintf( esc_html__( 'Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available CSS classes to style.', 'top-10' ), '<a href="' . esc_url( 'http://wordpress.org/plugins/top-10/faq/' ) . '" target="_blank">', '</a>', '<code>', '</code>' ),
654
- 'type' => 'css',
655
- 'options' => '',
 
656
  ),
657
  );
658
 
647
  'options' => tptn_get_styles(),
648
  ),
649
  'custom_css' => array(
650
+ 'id' => 'custom_css',
651
+ 'name' => esc_html__( 'Custom CSS', 'top-10' ),
652
  /* translators: 1: Opening a tag, 2: Closing a tag, 3: Opening code tage, 4. Closing code tag. */
653
+ 'desc' => sprintf( esc_html__( 'Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available CSS classes to style.', 'top-10' ), '<a href="' . esc_url( 'https://wordpress.org/plugins/top-10/faq/' ) . '" target="_blank">', '</a>', '<code>', '</code>' ),
654
+ 'type' => 'css',
655
+ 'options' => '',
656
+ 'field_class' => 'codemirror_css',
657
  ),
658
  );
659
 
includes/admin/import-export.php CHANGED
@@ -283,7 +283,7 @@ function tptn_import_tables() {
283
 
284
  if ( $daily ) {
285
  $dp_date = str_replace( '/', '-', $line[2] );
286
- $dp_date = date( 'Y-m-d H', strtotime( $dp_date ) );
287
 
288
  $wpdb->query( $wpdb->prepare( "INSERT INTO {$table_name} (postnumber, cntaccess, dp_date, blog_id) VALUES( %d, %d, %s, %d ) ", $line[0], $line[1], $dp_date, $line[3] ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
289
  } else {
@@ -333,7 +333,7 @@ function tptn_process_settings_export() {
333
 
334
  nocache_headers();
335
  header( 'Content-Type: application/json; charset=utf-8' );
336
- header( 'Content-Disposition: attachment; filename=tptn-settings-export-' . date( 'm-d-Y' ) . '.json' );
337
  header( 'Expires: 0' );
338
 
339
  echo wp_json_encode( $settings );
283
 
284
  if ( $daily ) {
285
  $dp_date = str_replace( '/', '-', $line[2] );
286
+ $dp_date = gmdate( 'Y-m-d H', strtotime( $dp_date ) );
287
 
288
  $wpdb->query( $wpdb->prepare( "INSERT INTO {$table_name} (postnumber, cntaccess, dp_date, blog_id) VALUES( %d, %d, %s, %d ) ", $line[0], $line[1], $dp_date, $line[3] ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
289
  } else {
333
 
334
  nocache_headers();
335
  header( 'Content-Type: application/json; charset=utf-8' );
336
+ header( 'Content-Disposition: attachment; filename=tptn-settings-export-' . gmdate( 'm-d-Y' ) . '.json' );
337
  header( 'Expires: 0' );
338
 
339
  echo wp_json_encode( $settings );
includes/admin/js/admin-scripts.js ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Function to clear the cache.
2
+ function clearCache() {
3
+ /**** since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php ****/
4
+ jQuery.post(ajaxurl, {
5
+ action: 'tptn_clear_cache'
6
+ }, function (response, textStatus, jqXHR) {
7
+ alert(response.message);
8
+ }, 'json');
9
+ }
10
+
11
+ jQuery(document).ready(function($) {
12
+ // Prompt the user when they leave the page without saving the form.
13
+ formmodified=0;
14
+
15
+ function confirmFormChange() {
16
+ formmodified=1;
17
+ }
18
+
19
+ function confirmExit() {
20
+ if ( formmodified == 1 ) {
21
+ return true;
22
+ }
23
+ }
24
+
25
+ function formNotModified() {
26
+ formmodified = 0;
27
+ }
28
+
29
+ $('form *').change( confirmFormChange );
30
+
31
+ window.onbeforeunload = confirmExit;
32
+
33
+ $( "input[name='submit']" ).click(formNotModified);
34
+ $( "input[id='search-submit']" ).click(formNotModified);
35
+ $( "input[id='doaction']" ).click(formNotModified);
36
+ $( "input[id='doaction2']" ).click(formNotModified);
37
+ $( "input[name='filter_action']" ).click(formNotModified);
38
+
39
+ $( function() {
40
+ $( "#post-body-content" ).tabs({
41
+ create: function( event, ui ) {
42
+ $( ui.tab.find("a") ).addClass( "nav-tab-active" );
43
+ },
44
+ activate: function( event, ui ) {
45
+ $( ui.oldTab.find("a") ).removeClass( "nav-tab-active" );
46
+ $( ui.newTab.find("a") ).addClass( "nav-tab-active" );
47
+ }
48
+ });
49
+ });
50
+
51
+ // Datepicker.
52
+ $( function() {
53
+ var dateFormat = 'dd M yy',
54
+ from = $( "#datepicker-from" )
55
+ .datepicker({
56
+ changeMonth: true,
57
+ maxDate: 0,
58
+ dateFormat: dateFormat
59
+ })
60
+ .on( "change", function() {
61
+ to.datepicker( "option", "minDate", getDate( this ) );
62
+ }),
63
+ to = $( "#datepicker-to" )
64
+ .datepicker({
65
+ changeMonth: true,
66
+ maxDate: 0,
67
+ dateFormat: dateFormat
68
+ })
69
+ .on( "change", function() {
70
+ from.datepicker( "option", "maxDate", getDate( this ) );
71
+ });
72
+
73
+ function getDate( element ) {
74
+ var date;
75
+ try {
76
+ date = $.datepicker.parseDate( dateFormat, element.value );
77
+ } catch( error ) {
78
+ date = null;
79
+ }
80
+
81
+ return date;
82
+ }
83
+ } );
84
+
85
+ // Initialise CodeMirror.
86
+ $( ".codemirror_html" ).each( function( index, element ) {
87
+ if( $( element ).length && typeof wp.codeEditor === 'object' ) {
88
+ var editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
89
+ editorSettings.codemirror = _.extend(
90
+ {},
91
+ editorSettings.codemirror,
92
+ {
93
+ }
94
+ );
95
+ var editor = wp.codeEditor.initialize( $( element ), editorSettings );
96
+ editor.codemirror.on( 'change', confirmFormChange );
97
+ }
98
+ });
99
+
100
+ $( ".codemirror_js" ).each( function( index, element ) {
101
+ if( $( element ).length && typeof wp.codeEditor === 'object' ) {
102
+ var editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
103
+ editorSettings.codemirror = _.extend(
104
+ {},
105
+ editorSettings.codemirror,
106
+ {
107
+ mode: 'javascript',
108
+ }
109
+ );
110
+ var editor = wp.codeEditor.initialize( $( element ), editorSettings );
111
+ editor.codemirror.on( 'change', confirmFormChange );
112
+ }
113
+ });
114
+
115
+ $( ".codemirror_css" ).each( function( index, element ) {
116
+ if( $( element ).length && typeof wp.codeEditor === 'object' ) {
117
+ var editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
118
+ editorSettings.codemirror = _.extend(
119
+ {},
120
+ editorSettings.codemirror,
121
+ {
122
+ mode: 'css',
123
+ }
124
+ );
125
+ var editor = wp.codeEditor.initialize( $( element ), editorSettings );
126
+ editor.codemirror.on( 'change', confirmFormChange );
127
+ }
128
+ });
129
+
130
+ // Editable table code.
131
+ $('.live_edit').click(function(){
132
+ $(this).addClass('live_edit_mode');
133
+ $(this).removeClass("live_edit_mode_success");
134
+ $(this).removeClass("live_edit_mode_error");
135
+ });
136
+
137
+ $(".live_edit").on('focusout keypress',function(e){
138
+ if (e.type !== "focusout" && e.which !== 13) {
139
+ return;
140
+ }
141
+ var $element = $( this );
142
+ var post_id = $element.attr( 'data-wp-post-id' );
143
+ var count = $element.attr( 'data-wp-count' );
144
+ var value = $element.text();
145
+
146
+ $element.removeClass("live_edit_mode");
147
+
148
+ $.ajax({
149
+ type: 'POST',
150
+ dataType: 'json',
151
+ url: ajaxurl,
152
+ data: {
153
+ action: 'tptn_edit_count_ajax',
154
+ post_id: post_id,
155
+ total_count: value,
156
+ total_count_original: count
157
+ },
158
+ success: function( response ) {
159
+ if ( response === false ) {
160
+ $element.addClass("live_edit_mode_error");
161
+ $element.html(count);
162
+ } else if ( response > 0 ) {
163
+ $element.addClass("live_edit_mode_success");
164
+ }
165
+ },
166
+ });
167
+ });
168
+
169
+ });
includes/admin/js/admin-scripts.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function clearCache(){jQuery.post(ajaxurl,{action:"tptn_clear_cache"},(function(response,textStatus,jqXHR){alert(response.message)}),"json")}jQuery(document).ready((function($){function confirmFormChange(){formmodified=1}function confirmExit(){if(1==formmodified)return!0}function formNotModified(){formmodified=0}formmodified=0,$("form *").change(confirmFormChange),window.onbeforeunload=confirmExit,$("input[name='submit']").click(formNotModified),$("input[id='search-submit']").click(formNotModified),$("input[id='doaction']").click(formNotModified),$("input[id='doaction2']").click(formNotModified),$("input[name='filter_action']").click(formNotModified),$((function(){$("#post-body-content").tabs({create:function(event,ui){$(ui.tab.find("a")).addClass("nav-tab-active")},activate:function(event,ui){$(ui.oldTab.find("a")).removeClass("nav-tab-active"),$(ui.newTab.find("a")).addClass("nav-tab-active")}})})),$((function(){var dateFormat="dd M yy",from=$("#datepicker-from").datepicker({changeMonth:!0,maxDate:0,dateFormat:"dd M yy"}).on("change",(function(){to.datepicker("option","minDate",getDate(this))})),to=$("#datepicker-to").datepicker({changeMonth:!0,maxDate:0,dateFormat:"dd M yy"}).on("change",(function(){from.datepicker("option","maxDate",getDate(this))}));function getDate(element){var date;try{date=$.datepicker.parseDate("dd M yy",element.value)}catch(error){date=null}return date}})),$(".codemirror_html").each((function(index,element){if($(element).length&&"object"==typeof wp.codeEditor){var editorSettings=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{},editor;editorSettings.codemirror=_.extend({},editorSettings.codemirror,{}),wp.codeEditor.initialize($(element),editorSettings).codemirror.on("change",confirmFormChange)}})),$(".codemirror_js").each((function(index,element){if($(element).length&&"object"==typeof wp.codeEditor){var editorSettings=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{},editor;editorSettings.codemirror=_.extend({},editorSettings.codemirror,{mode:"javascript"}),wp.codeEditor.initialize($(element),editorSettings).codemirror.on("change",confirmFormChange)}})),$(".codemirror_css").each((function(index,element){if($(element).length&&"object"==typeof wp.codeEditor){var editorSettings=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{},editor;editorSettings.codemirror=_.extend({},editorSettings.codemirror,{mode:"css"}),wp.codeEditor.initialize($(element),editorSettings).codemirror.on("change",confirmFormChange)}})),$(".live_edit").click((function(){$(this).addClass("live_edit_mode"),$(this).removeClass("live_edit_mode_success"),$(this).removeClass("live_edit_mode_error")})),$(".live_edit").on("focusout keypress",(function(e){if("focusout"===e.type||13===e.which){var $element=$(this),post_id=$element.attr("data-wp-post-id"),count=$element.attr("data-wp-count"),value=$element.text();$element.removeClass("live_edit_mode"),$.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"tptn_edit_count_ajax",post_id:post_id,total_count:value,total_count_original:count},success:function(response){!1===response?($element.addClass("live_edit_mode_error"),$element.html(count)):response>0&&$element.addClass("live_edit_mode_success")}})}}))}));
includes/admin/js/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
includes/admin/js/top-10-suggest.js ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ // Function to add auto suggest.
3
+ $.fn.tptnTagsSuggest = function( options ) {
4
+ var cache;
5
+ var last;
6
+ var $element = $( this );
7
+
8
+ options = options || {};
9
+
10
+ var taxonomy = options.taxonomy || $element.attr( 'data-wp-taxonomy' ) || 'category';
11
+ delete( options.taxonomy );
12
+
13
+ function split( val ) {
14
+ return val.split( /,(?=(?:(?:[^"]*"){2})*[^"]*$)/ ); // Split typical CSV format, with commas and double quotes.
15
+ }
16
+
17
+ function extractLast( term ) {
18
+ return split( term ).pop();
19
+ }
20
+
21
+ options = $.extend({
22
+ minLength: 2,
23
+ position: {
24
+ my: 'left top+2',
25
+ at: 'left bottom',
26
+ collision: 'none'
27
+ },
28
+ source: function( request, response ) {
29
+ var term;
30
+
31
+ if ( last === request.term ) {
32
+ response( cache );
33
+ return;
34
+ }
35
+
36
+ term = extractLast( request.term );
37
+
38
+ if ( last === request.term ) {
39
+ response( cache );
40
+ return;
41
+ }
42
+
43
+ $.ajax({
44
+ type: 'POST',
45
+ dataType: 'json',
46
+ url: ajaxurl,
47
+ data: {
48
+ action: 'tptn_tag_search',
49
+ tax: taxonomy,
50
+ q: term
51
+ },
52
+ }).done( function( data ) {
53
+ cache = data;
54
+ response( data );
55
+ });
56
+
57
+ last = request.term;
58
+
59
+ },
60
+ search: function() {
61
+ // Custom minLength.
62
+ var term = extractLast( this.value );
63
+
64
+ if ( term.length < 2 ) {
65
+ return false;
66
+ }
67
+ },
68
+ focus: function( event, ui ) {
69
+ // Prevent value inserted on focus.
70
+ event.preventDefault();
71
+ },
72
+ select: function( event, ui ) {
73
+ var terms = split( this.value );
74
+ var val = ui.item.value;
75
+
76
+ if ( val.indexOf(',') !== -1 ) {
77
+ val = '"' + val + '"'
78
+ }
79
+
80
+ // Remove the last user input.
81
+ terms.pop();
82
+
83
+ // Add the selected item.
84
+ terms.push( val );
85
+
86
+ // Add placeholder to get the comma-and-space at the end.
87
+ terms.push( "" );
88
+ this.value = terms.join( ", " );
89
+ return false;
90
+ }
91
+ }, options );
92
+
93
+ $element.on( "keydown", function( event ) {
94
+ // Don't navigate away from the field on tab when selecting an item.
95
+ if ( event.keyCode === $.ui.keyCode.TAB &&
96
+ $( this ).autocomplete( 'instance' ).menu.active ) {
97
+ event.preventDefault();
98
+ }
99
+ })
100
+ .autocomplete( options );
101
+ };
102
+
103
+ $( '.category_autocomplete' ).each( function ( i, element ) {
104
+ $( element ).tptnTagsSuggest();
105
+ });
106
+
107
+ $('.widget-liquid-right, #customize-controls').on( 'click', '.category_autocomplete', function() {
108
+ $( '.category_autocomplete' ).tptnTagsSuggest();
109
+ });
110
+ });
includes/admin/js/top-10-suggest.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(document).ready((function($){$.fn.tptnTagsSuggest=function(options){var cache,last,$element=$(this),taxonomy=(options=options||{}).taxonomy||$element.attr("data-wp-taxonomy")||"category";function split(val){return val.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/)}function extractLast(term){return split(term).pop()}delete options.taxonomy,options=$.extend({minLength:2,position:{my:"left top+2",at:"left bottom",collision:"none"},source:function(request,response){var term;last!==request.term?(term=extractLast(request.term),last!==request.term?($.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"tptn_tag_search",tax:taxonomy,q:term}}).done((function(data){cache=data,response(data)})),last=request.term):response(cache)):response(cache)},search:function(){var term;if(extractLast(this.value).length<2)return!1},focus:function(event,ui){event.preventDefault()},select:function(event,ui){var terms=split(this.value),val=ui.item.value;return-1!==val.indexOf(",")&&(val='"'+val+'"'),terms.pop(),terms.push(val),terms.push(""),this.value=terms.join(", "),!1}},options),$element.on("keydown",(function(event){event.keyCode===$.ui.keyCode.TAB&&$(this).autocomplete("instance").menu.active&&event.preventDefault()})).autocomplete(options)},$(".category_autocomplete").each((function(i,element){$(element).tptnTagsSuggest()})),$(".widget-liquid-right, #customize-controls").on("click",".category_autocomplete",(function(){$(".category_autocomplete").tptnTagsSuggest()}))}));
includes/admin/save-settings.php CHANGED
@@ -296,7 +296,7 @@ function tptn_sanitize_exclude_cat( $settings ) {
296
 
297
  if ( isset( $settings['exclude_cat_slugs'] ) ) {
298
 
299
- $exclude_cat_slugs = array_unique( explode( ',', $settings['exclude_cat_slugs'] ) );
300
 
301
  foreach ( $exclude_cat_slugs as $cat_name ) {
302
  $cat = get_term_by( 'name', $cat_name, 'category' );
@@ -311,7 +311,7 @@ function tptn_sanitize_exclude_cat( $settings ) {
311
  }
312
  }
313
  $settings['exclude_categories'] = isset( $exclude_categories ) ? join( ',', $exclude_categories ) : '';
314
- $settings['exclude_cat_slugs'] = isset( $exclude_categories_slugs ) ? join( ',', $exclude_categories_slugs ) : '';
315
 
316
  }
317
 
296
 
297
  if ( isset( $settings['exclude_cat_slugs'] ) ) {
298
 
299
+ $exclude_cat_slugs = array_unique( str_getcsv( $settings['exclude_cat_slugs'] ) );
300
 
301
  foreach ( $exclude_cat_slugs as $cat_name ) {
302
  $cat = get_term_by( 'name', $cat_name, 'category' );
311
  }
312
  }
313
  $settings['exclude_categories'] = isset( $exclude_categories ) ? join( ',', $exclude_categories ) : '';
314
+ $settings['exclude_cat_slugs'] = isset( $exclude_categories_slugs ) ? tptn_str_putcsv( $exclude_categories_slugs ) : '';
315
 
316
  }
317
 
includes/admin/settings-page.php CHANGED
@@ -269,7 +269,9 @@ function tptn_textarea_callback( $args ) {
269
  $value = isset( $args['options'] ) ? $args['options'] : '';
270
  }
271
 
272
- $html = sprintf( '<textarea class="large-text" cols="50" rows="5" id="tptn_settings[%1$s]" name="tptn_settings[%1$s]">%2$s</textarea>', sanitize_key( $args['id'] ), esc_textarea( stripslashes( $value ) ) );
 
 
273
  $html .= '<p class="description">' . wp_kses_post( $args['desc'] ) . '</p>';
274
 
275
  /** This filter has been defined in settings-page.php */
@@ -654,8 +656,8 @@ function tptn_tags_search() {
654
  }
655
 
656
  $results = get_terms(
657
- $taxonomy,
658
  array(
 
659
  'name__like' => $s,
660
  'fields' => 'names',
661
  'hide_empty' => false,
@@ -666,7 +668,6 @@ function tptn_tags_search() {
666
  wp_die();
667
 
668
  }
669
- add_action( 'wp_ajax_nopriv_tptn_tag_search', 'tptn_tags_search' );
670
  add_action( 'wp_ajax_tptn_tag_search', 'tptn_tags_search' );
671
 
672
 
269
  $value = isset( $args['options'] ) ? $args['options'] : '';
270
  }
271
 
272
+ $class = sanitize_html_class( $args['field_class'] );
273
+
274
+ $html = sprintf( '<textarea class="%3$s" cols="50" rows="20" id="ata_settings[%1$s]" name="ata_settings[%1$s]">%2$s</textarea>', sanitize_key( $args['id'] ), esc_textarea( stripslashes( $value ) ), 'large-text ' . $class );
275
  $html .= '<p class="description">' . wp_kses_post( $args['desc'] ) . '</p>';
276
 
277
  /** This filter has been defined in settings-page.php */
656
  }
657
 
658
  $results = get_terms(
 
659
  array(
660
+ 'taxonomy' => $taxonomy,
661
  'name__like' => $s,
662
  'fields' => 'names',
663
  'hide_empty' => false,
668
  wp_die();
669
 
670
  }
 
671
  add_action( 'wp_ajax_tptn_tag_search', 'tptn_tags_search' );
672
 
673
 
includes/counter.php CHANGED
@@ -230,3 +230,109 @@ function get_tptn_post_count_only( $id = false, $count = 'total', $blog_id = fal
230
  }
231
 
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
231
 
232
 
233
+ /**
234
+ * Delete post count.
235
+ *
236
+ * @since 2.9.0
237
+ *
238
+ * @param int $post_id Post ID.
239
+ * @param int $blog_id Blog ID.
240
+ * @param bool $daily Daily flag.
241
+ * @return bool|int Number of rows affected or false if error.
242
+ */
243
+ function tptn_delete_count( $post_id, $blog_id, $daily = false ) {
244
+ global $wpdb;
245
+
246
+ $post_id = intval( $post_id );
247
+ $blog_id = intval( $blog_id );
248
+
249
+ if ( empty( $post_id ) || empty( $blog_id ) ) {
250
+ return false;
251
+ }
252
+
253
+ $table_name = $wpdb->base_prefix . 'top_ten';
254
+ if ( $daily ) {
255
+ $table_name .= '_daily';
256
+ }
257
+
258
+ $results = $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
259
+ $wpdb->prepare(
260
+ "DELETE FROM {$table_name} WHERE postnumber = %d AND blog_id = %d", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
261
+ $post_id,
262
+ $blog_id
263
+ )
264
+ );
265
+
266
+ return $results;
267
+ }
268
+
269
+
270
+ /**
271
+ * Function to update the Top 10 count with ajax.
272
+ *
273
+ * @since 2.9.0
274
+ */
275
+ function tptn_edit_count_ajax() {
276
+
277
+ if ( ! isset( $_REQUEST['total_count'] ) || ! isset( $_REQUEST['post_id'] ) || ! isset( $_REQUEST['total_count_original'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
278
+ wp_die( 0 );
279
+ }
280
+
281
+ $results = 0;
282
+
283
+ $post_id = intval( $_REQUEST['post_id'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
284
+ $blog_id = get_current_blog_id();
285
+ $total_count = filter_var( $_REQUEST['total_count'], FILTER_SANITIZE_NUMBER_INT ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
286
+ $total_count_original = filter_var( $_REQUEST['total_count_original'], FILTER_SANITIZE_NUMBER_INT ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
287
+
288
+ // If our current user can't edit this post, bail.
289
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
290
+ wp_die( 0 );
291
+ }
292
+
293
+ if ( $total_count_original !== $total_count ) {
294
+ $results = tptn_edit_count( $post_id, $blog_id, $total_count );
295
+ }
296
+ echo wp_json_encode( $results );
297
+ wp_die();
298
+ }
299
+ add_action( 'wp_ajax_tptn_edit_count_ajax', 'tptn_edit_count_ajax' );
300
+
301
+
302
+ /**
303
+ * Function to edit the count.
304
+ *
305
+ * @since 2.9.0
306
+ *
307
+ * @param int $post_id Post ID.
308
+ * @param int $blog_id Blog ID.
309
+ * @param int $total_count Total count.
310
+ * @return bool|int Number of rows affected or false if error.
311
+ */
312
+ function tptn_edit_count( $post_id, $blog_id, $total_count ) {
313
+
314
+ global $wpdb;
315
+
316
+ $post_id = intval( $post_id );
317
+ $blog_id = intval( $blog_id );
318
+ $total_count = intval( $total_count );
319
+
320
+ if ( empty( $post_id ) || empty( $blog_id ) || empty( $total_count ) ) {
321
+ return false;
322
+ }
323
+
324
+ $table_name = $wpdb->base_prefix . 'top_ten';
325
+
326
+ $results = $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
327
+ $wpdb->prepare(
328
+ "INSERT INTO {$table_name} (postnumber, cntaccess, blog_id) VALUES( %d, %d, %d ) ON DUPLICATE KEY UPDATE cntaccess= %d ", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
329
+ $post_id,
330
+ $total_count,
331
+ $blog_id,
332
+ $total_count
333
+ )
334
+ );
335
+
336
+ return $results;
337
+ }
338
+
includes/cron.php CHANGED
@@ -26,7 +26,7 @@ function tptn_cron() {
26
  */
27
  $delete_from = apply_filters( 'tptn_maintenance_days', $delete_from );
28
 
29
- $current_time = current_time( 'timestamp', 0 );
30
  $from_date = strtotime( "-{$delete_from} DAY", $current_time );
31
  $from_date = gmdate( 'Y-m-d H', $from_date );
32
 
26
  */
27
  $delete_from = apply_filters( 'tptn_maintenance_days', $delete_from );
28
 
29
+ $current_time = strtotime( current_time( 'mysql' ) );
30
  $from_date = strtotime( "-{$delete_from} DAY", $current_time );
31
  $from_date = gmdate( 'Y-m-d H', $from_date );
32
 
includes/helpers.php CHANGED
@@ -36,7 +36,7 @@ function tptn_trunc_count( $daily = true ) {
36
  */
37
  function tptn_get_from_date( $time = null, $daily_range = null, $hour_range = null ) {
38
 
39
- $current_time = isset( $time ) ? strtotime( $time ) : current_time( 'timestamp', 0 );
40
  $daily_range = isset( $daily_range ) ? $daily_range : tptn_get_option( 'daily_range' );
41
  $hour_range = isset( $hour_range ) ? $hour_range : tptn_get_option( 'hour_range' );
42
 
@@ -90,3 +90,63 @@ function tptn_number_format_i18n( $number, $decimals = 0 ) {
90
  */
91
  return apply_filters( 'number_format_i18n', $formatted, $number, $decimals );
92
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  */
37
  function tptn_get_from_date( $time = null, $daily_range = null, $hour_range = null ) {
38
 
39
+ $current_time = isset( $time ) ? strtotime( $time ) : strtotime( current_time( 'mysql' ) );
40
  $daily_range = isset( $daily_range ) ? $daily_range : tptn_get_option( 'daily_range' );
41
  $hour_range = isset( $hour_range ) ? $hour_range : tptn_get_option( 'hour_range' );
42
 
90
  */
91
  return apply_filters( 'number_format_i18n', $formatted, $number, $decimals );
92
  }
93
+
94
+ /**
95
+ * Convert a string to CSV.
96
+ *
97
+ * @since 2.9.0
98
+ *
99
+ * @param string $array Input string.
100
+ * @param string $delimiter Delimiter.
101
+ * @param string $enclosure Enclosure.
102
+ * @param string $terminator Terminating string.
103
+ * @return string CSV string.
104
+ */
105
+ function tptn_str_putcsv( $array, $delimiter = ',', $enclosure = '"', $terminator = "\n" ) {
106
+ // First convert associative array to numeric indexed array.
107
+ $work_array = array();
108
+ foreach ( $array as $key => $value ) {
109
+ $work_array[] = $value;
110
+ }
111
+
112
+ $string = '';
113
+ $array_size = count( $work_array );
114
+
115
+ for ( $i = 0; $i < $array_size; $i++ ) {
116
+ // Nested array, process nest item.
117
+ if ( is_array( $work_array[ $i ] ) ) {
118
+ $string .= str_putcsv( $work_array[ $i ], $delimiter, $enclosure, $terminator );
119
+ } else {
120
+ switch ( gettype( $work_array[ $i ] ) ) {
121
+ // Manually set some strings.
122
+ case 'NULL':
123
+ $sp_format = '';
124
+ break;
125
+ case 'boolean':
126
+ $sp_format = ( true === $work_array[ $i ] ) ? 'true' : 'false';
127
+ break;
128
+ // Make sure sprintf has a good datatype to work with.
129
+ case 'integer':
130
+ $sp_format = '%i';
131
+ break;
132
+ case 'double':
133
+ $sp_format = '%0.2f';
134
+ break;
135
+ case 'string':
136
+ $sp_format = '%s';
137
+ $work_array[ $i ] = str_replace( "$enclosure", "$enclosure$enclosure", $work_array[ $i ] );
138
+ break;
139
+ // Unknown or invalid items for a csv - note: the datatype of array is already handled above, assuming the data is nested.
140
+ case 'object':
141
+ case 'resource':
142
+ default:
143
+ $sp_format = '';
144
+ break;
145
+ }
146
+ $string .= sprintf( '%2$s' . $sp_format . '%2$s', $work_array[ $i ], $enclosure );
147
+ $string .= ( $i < ( $array_size - 1 ) ) ? $delimiter : $terminator;
148
+ }
149
+ }
150
+
151
+ return $string;
152
+ }
includes/modules/class-top-ten-count-widget.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
- * @copyright 2008-2019 Ajay D'Souza
10
  */
11
 
12
  // If this file is called directly, abort.
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
+ * @copyright 2008-2020 Ajay D'Souza
10
  */
11
 
12
  // If this file is called directly, abort.
includes/modules/class-top-ten-widget.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
- * @copyright 2008-2019 Ajay D'Souza
10
  */
11
 
12
  // If this file is called directly, abort.
@@ -47,19 +47,21 @@ class Top_Ten_Widget extends WP_Widget {
47
  * @param array $instance Previously saved values from database.
48
  */
49
  public function form( $instance ) {
50
- $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
51
- $limit = isset( $instance['limit'] ) ? esc_attr( $instance['limit'] ) : '';
52
- $offset = isset( $instance['offset'] ) ? esc_attr( $instance['offset'] ) : '';
53
- $disp_list_count = isset( $instance['disp_list_count'] ) ? esc_attr( $instance['disp_list_count'] ) : '';
54
- $show_excerpt = isset( $instance['show_excerpt'] ) ? esc_attr( $instance['show_excerpt'] ) : '';
55
- $show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
56
- $show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
57
- $post_thumb_op = isset( $instance['post_thumb_op'] ) ? esc_attr( $instance['post_thumb_op'] ) : 'text_only';
58
- $thumb_height = isset( $instance['thumb_height'] ) ? esc_attr( $instance['thumb_height'] ) : '';
59
- $thumb_width = isset( $instance['thumb_width'] ) ? esc_attr( $instance['thumb_width'] ) : '';
60
- $daily = isset( $instance['daily'] ) ? esc_attr( $instance['daily'] ) : 'overall';
61
- $daily_range = isset( $instance['daily_range'] ) ? esc_attr( $instance['daily_range'] ) : '';
62
- $hour_range = isset( $instance['hour_range'] ) ? esc_attr( $instance['hour_range'] ) : '';
 
 
63
 
64
  // Parse the Post types.
65
  $post_types = array();
@@ -146,6 +148,13 @@ class Top_Ten_Widget extends WP_Widget {
146
  <input class="widefat" 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( $thumb_width ); ?>" />
147
  </label>
148
  </p>
 
 
 
 
 
 
 
149
  <p><?php esc_html_e( 'Post types to include:', 'top-10' ); ?><br />
150
 
151
  <?php foreach ( $wp_post_types as $wp_post_type ) { ?>
@@ -171,7 +180,7 @@ class Top_Ten_Widget extends WP_Widget {
171
  ?>
172
 
173
  <?php
174
- } //ending form creation
175
 
176
  /**
177
  * Sanitize widget form values as they are saved.
@@ -209,6 +218,20 @@ class Top_Ten_Widget extends WP_Widget {
209
  $post_types = array_intersect( $wp_post_types, $post_types );
210
  $instance['post_types'] = http_build_query( $post_types, '', '&' );
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  /**
213
  * Filters Update widget options array.
214
  *
@@ -217,7 +240,7 @@ class Top_Ten_Widget extends WP_Widget {
217
  * @param array $instance Widget options array
218
  */
219
  return apply_filters( 'tptn_widget_options_update', $instance );
220
- } //ending update
221
 
222
  /**
223
  * Front-end display of widget.
@@ -265,6 +288,7 @@ class Top_Ten_Widget extends WP_Widget {
265
  $show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
266
  $show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
267
  $post_types = isset( $instance['post_types'] ) ? $instance['post_types'] : tptn_get_option( 'post_types' );
 
268
 
269
  $arguments = array(
270
  'is_widget' => 1,
@@ -283,6 +307,7 @@ class Top_Ten_Widget extends WP_Widget {
283
  'thumb_width' => $thumb_width,
284
  'disp_list_count' => $disp_list_count,
285
  'post_types' => $post_types,
 
286
  );
287
 
288
  /**
@@ -300,7 +325,7 @@ class Top_Ten_Widget extends WP_Widget {
300
 
301
  echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
302
 
303
- } //ending function widget
304
 
305
 
306
  /**
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
+ * @copyright 2008-2020 Ajay D'Souza
10
  */
11
 
12
  // If this file is called directly, abort.
47
  * @param array $instance Previously saved values from database.
48
  */
49
  public function form( $instance ) {
50
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
51
+ $limit = isset( $instance['limit'] ) ? esc_attr( $instance['limit'] ) : '';
52
+ $offset = isset( $instance['offset'] ) ? esc_attr( $instance['offset'] ) : '';
53
+ $disp_list_count = isset( $instance['disp_list_count'] ) ? esc_attr( $instance['disp_list_count'] ) : '';
54
+ $show_excerpt = isset( $instance['show_excerpt'] ) ? esc_attr( $instance['show_excerpt'] ) : '';
55
+ $show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
56
+ $show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
57
+ $post_thumb_op = isset( $instance['post_thumb_op'] ) ? esc_attr( $instance['post_thumb_op'] ) : 'text_only';
58
+ $thumb_height = isset( $instance['thumb_height'] ) ? esc_attr( $instance['thumb_height'] ) : '';
59
+ $thumb_width = isset( $instance['thumb_width'] ) ? esc_attr( $instance['thumb_width'] ) : '';
60
+ $daily = isset( $instance['daily'] ) ? esc_attr( $instance['daily'] ) : 'overall';
61
+ $daily_range = isset( $instance['daily_range'] ) ? esc_attr( $instance['daily_range'] ) : '';
62
+ $hour_range = isset( $instance['hour_range'] ) ? esc_attr( $instance['hour_range'] ) : '';
63
+ $include_categories = isset( $instance['include_categories'] ) ? esc_attr( $instance['include_categories'] ) : '';
64
+ $include_cat_ids = isset( $instance['include_cat_ids'] ) ? esc_attr( $instance['include_cat_ids'] ) : '';
65
 
66
  // Parse the Post types.
67
  $post_types = array();
148
  <input class="widefat" 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( $thumb_width ); ?>" />
149
  </label>
150
  </p>
151
+ <p>
152
+ <label for="<?php echo esc_attr( $this->get_field_id( 'include_categories' ) ); ?>">
153
+ <?php esc_html_e( 'Only from categories', 'top-10' ); ?>:
154
+ <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( $include_categories ); ?>" />
155
+ </label>
156
+ <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( $include_cat_ids ); ?>" />
157
+ </p>
158
  <p><?php esc_html_e( 'Post types to include:', 'top-10' ); ?><br />
159
 
160
  <?php foreach ( $wp_post_types as $wp_post_type ) { ?>
180
  ?>
181
 
182
  <?php
183
+ }
184
 
185
  /**
186
  * Sanitize widget form values as they are saved.
218
  $post_types = array_intersect( $wp_post_types, $post_types );
219
  $instance['post_types'] = http_build_query( $post_types, '', '&' );
220
 
221
+ // Save include_categories.
222
+ $include_categories = array_unique( str_getcsv( $new_instance['include_categories'] ) );
223
+
224
+ foreach ( $include_categories as $cat_name ) {
225
+ $cat = get_term_by( 'name', $cat_name, 'category' );
226
+
227
+ if ( isset( $cat->term_taxonomy_id ) ) {
228
+ $include_cat_ids[] = $cat->term_taxonomy_id;
229
+ $include_cat_names[] = $cat->name;
230
+ }
231
+ }
232
+ $instance['include_cat_ids'] = isset( $include_cat_ids ) ? join( ',', $include_cat_ids ) : '';
233
+ $instance['include_categories'] = isset( $include_cat_names ) ? tptn_str_putcsv( $include_cat_names ) : '';
234
+
235
  /**
236
  * Filters Update widget options array.
237
  *
240
  * @param array $instance Widget options array
241
  */
242
  return apply_filters( 'tptn_widget_options_update', $instance );
243
+ }
244
 
245
  /**
246
  * Front-end display of widget.
288
  $show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
289
  $show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
290
  $post_types = isset( $instance['post_types'] ) ? $instance['post_types'] : tptn_get_option( 'post_types' );
291
+ $include_cat_ids = isset( $instance['include_cat_ids'] ) ? esc_attr( $instance['include_cat_ids'] ) : '';
292
 
293
  $arguments = array(
294
  'is_widget' => 1,
307
  'thumb_width' => $thumb_width,
308
  'disp_list_count' => $disp_list_count,
309
  'post_types' => $post_types,
310
+ 'include_cat_ids' => $include_cat_ids,
311
  );
312
 
313
  /**
325
 
326
  echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
327
 
328
+ }
329
 
330
 
331
  /**
includes/modules/taxonomies.php CHANGED
@@ -55,9 +55,9 @@ function tptn_exclude_categories_where( $where ) {
55
  $sql = $where;
56
 
57
  $sql .= " AND $wpdb->posts.ID NOT IN (
58
- SELECT object_id
59
- FROM $wpdb->term_relationships
60
- WHERE term_taxonomy_id IN ($terms)
61
  )";
62
 
63
  return $sql;
55
  $sql = $where;
56
 
57
  $sql .= " AND $wpdb->posts.ID NOT IN (
58
+ SELECT object_id
59
+ FROM $wpdb->term_relationships
60
+ WHERE term_taxonomy_id IN ($terms)
61
  )";
62
 
63
  return $sql;
includes/public/display-posts.php CHANGED
@@ -373,7 +373,13 @@ 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( 'timestamp', 0 ) - ( $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 ", current_time( 'Y-m-d H:m:s' ) - ( $args['how_old'] * DAY_IN_SECONDS ) );
377
+ }
378
+
379
+ if ( isset( $args['include_cat_ids'] ) && ! empty( $args['include_cat_ids'] ) ) {
380
+ $include_cat_ids = $args['include_cat_ids'];
381
+
382
+ $where .= " AND $wpdb->posts.ID IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ($include_cat_ids) )";
383
  }
384
 
385
  // Create the base GROUP BY clause.
includes/public/media.php CHANGED
@@ -107,9 +107,12 @@ function tptn_get_the_post_thumbnail( $args = array() ) {
107
  if ( ! $postimage ) {
108
  if ( false != get_post_thumbnail_id( $result->ID ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
109
  $postthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $result->ID ), array( $args['thumb_width'], $args['thumb_height'] ) );
110
- $postimage = $postthumb[0];
 
 
 
 
111
  }
112
- $pick = 'featured';
113
  }
114
 
115
  // If there is no thumbnail found, fetch the first image in the post, if enabled.
@@ -125,8 +128,8 @@ function tptn_get_the_post_thumbnail( $args = array() ) {
125
  if ( false != wp_get_attachment_image_src( $postimage_id, array( $args['thumb_width'], $args['thumb_height'] ) ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
126
  $postthumb = wp_get_attachment_image_src( $postimage_id, array( $args['thumb_width'], $args['thumb_height'] ) );
127
  $postimage = $postthumb[0];
 
128
  }
129
- $pick .= 'correct';
130
  }
131
  }
132
 
107
  if ( ! $postimage ) {
108
  if ( false != get_post_thumbnail_id( $result->ID ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
109
  $postthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $result->ID ), array( $args['thumb_width'], $args['thumb_height'] ) );
110
+
111
+ if ( false !== $postthumb ) {
112
+ $postimage = $postthumb[0];
113
+ $pick = 'featured';
114
+ }
115
  }
 
116
  }
117
 
118
  // If there is no thumbnail found, fetch the first image in the post, if enabled.
128
  if ( false != wp_get_attachment_image_src( $postimage_id, array( $args['thumb_width'], $args['thumb_height'] ) ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
129
  $postthumb = wp_get_attachment_image_src( $postimage_id, array( $args['thumb_width'], $args['thumb_height'] ) );
130
  $postimage = $postthumb[0];
131
+ $pick .= 'correct';
132
  }
 
133
  }
134
  }
135
 
includes/tracker.php CHANGED
@@ -240,7 +240,7 @@ function tptn_update_count( $id, $blog_id, $activate_counter ) {
240
 
241
  if ( ( 10 === $activate_counter ) || ( 11 === $activate_counter ) ) {
242
 
243
- $current_date = gmdate( 'Y-m-d H', current_time( 'timestamp', 0 ) );
244
 
245
  $ttd = $wpdb->query( $wpdb->prepare( "INSERT INTO {$top_ten_daily} (postnumber, cntaccess, dp_date, blog_id) VALUES( %d, '1', %s, %d ) ON DUPLICATE KEY UPDATE cntaccess= cntaccess+1 ", $id, $current_date, $blog_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
246
 
240
 
241
  if ( ( 10 === $activate_counter ) || ( 11 === $activate_counter ) ) {
242
 
243
+ $current_date = current_time( 'Y-m-d H' );
244
 
245
  $ttd = $wpdb->query( $wpdb->prepare( "INSERT INTO {$top_ten_daily} (postnumber, cntaccess, dp_date, blog_id) VALUES( %d, '1', %s, %d ) ON DUPLICATE KEY UPDATE cntaccess= cntaccess+1 ", $id, $current_date, $blog_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
246
 
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-12-07 12:34+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"
@@ -13,7 +13,7 @@ msgstr ""
13
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
14
  "esc_attr_e\n"
15
  "X-Poedit-Basepath: ..\n"
16
- "X-Generator: Poedit 2.2.3\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "X-Poedit-SearchPath-0: .\n"
@@ -43,21 +43,21 @@ msgstr ""
43
  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:40
47
  #: includes/admin/class-top-ten-network-statistics.php:118
48
  #: includes/admin/class-top-ten-statistics.php:128
49
  msgid "Popular Posts"
50
  msgstr ""
51
 
52
- #: includes/admin/admin-dashboard.php:132 includes/admin/admin.php:44
53
  msgid "Daily Popular Posts"
54
  msgstr ""
55
 
56
- #: includes/admin/admin-metabox.php:109
57
  msgid "Visit count:"
58
  msgstr ""
59
 
60
- #: includes/admin/admin-metabox.php:111
61
  msgid ""
62
  "Enter a number above to update the visit count. Leaving the above box blank "
63
  "will set the count to zero"
@@ -105,24 +105,24 @@ msgid ""
105
  "will need to make the same change in the %1$s meta box on this page."
106
  msgstr ""
107
 
108
- #: includes/admin/admin.php:30 includes/admin/admin.php:34
109
  #: includes/admin/settings-page.php:32
110
  msgid "Top 10 Settings"
111
  msgstr ""
112
 
113
- #: includes/admin/admin.php:30 includes/admin/admin.php:412
114
  msgid "Top 10"
115
  msgstr ""
116
 
117
- #: includes/admin/admin.php:34 includes/admin/admin.php:370
118
  msgid "Settings"
119
  msgstr ""
120
 
121
- #: includes/admin/admin.php:40 includes/admin/class-top-ten-statistics.php:74
122
  msgid "Top 10 Popular Posts"
123
  msgstr ""
124
 
125
- #: includes/admin/admin.php:44
126
  msgid "Top 10 Daily Popular Posts"
127
  msgstr ""
128
 
@@ -134,19 +134,15 @@ msgstr ""
134
  msgid "Tools"
135
  msgstr ""
136
 
137
- #: includes/admin/admin.php:53
138
  msgid "Top 10 Import Export Tables"
139
  msgstr ""
140
 
141
- #: includes/admin/admin.php:53
142
  msgid "Import/Export"
143
  msgstr ""
144
 
145
- #: includes/admin/admin.php:206
146
- msgid "New information not saved. Do you wish to leave the page?"
147
- msgstr ""
148
-
149
- #: includes/admin/admin.php:324
150
  #, php-format
151
  msgid ""
152
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
@@ -154,19 +150,19 @@ msgid ""
154
  "\"_blank\">WordPress.org</a>"
155
  msgstr ""
156
 
157
- #: includes/admin/admin.php:392 includes/admin/sidebar.php:55
158
  msgid "Support"
159
  msgstr ""
160
 
161
- #: includes/admin/admin.php:393
162
  msgid "Donate"
163
  msgstr ""
164
 
165
- #: includes/admin/admin.php:394
166
  msgid "Contribute"
167
  msgstr ""
168
 
169
- #: includes/admin/admin.php:412
170
  msgid "Top 10 - Network Popular Posts"
171
  msgstr ""
172
 
@@ -184,55 +180,55 @@ msgstr ""
184
  msgid "popular_posts"
185
  msgstr ""
186
 
187
- #: includes/admin/class-top-ten-network-statistics-table.php:185
188
- #: includes/admin/class-top-ten-statistics-table.php:215
189
  msgid "No popular posts available."
190
  msgstr ""
191
 
192
- #: includes/admin/class-top-ten-network-statistics-table.php:254
193
- #: includes/admin/class-top-ten-statistics-table.php:300
194
  msgid "Y/m/d"
195
  msgstr ""
196
 
197
- #: includes/admin/class-top-ten-network-statistics-table.php:291
198
- #: includes/admin/class-top-ten-statistics-table.php:339
199
  #: includes/modules/class-top-ten-count-widget.php:53
200
- #: includes/modules/class-top-ten-widget.php:80
201
  msgid "Title"
202
  msgstr ""
203
 
204
- #: includes/admin/class-top-ten-network-statistics-table.php:292
205
  msgid "Blog"
206
  msgstr ""
207
 
208
- #: includes/admin/class-top-ten-network-statistics-table.php:293
209
- #: includes/admin/class-top-ten-statistics-table.php:344
210
  #: includes/admin/import-export.php:183
211
  msgid "Date"
212
  msgstr ""
213
 
214
- #: includes/admin/class-top-ten-network-statistics-table.php:294
215
- #: includes/admin/class-top-ten-statistics-table.php:340
216
  msgid "Total visits"
217
  msgstr ""
218
 
219
- #: includes/admin/class-top-ten-network-statistics-table.php:295
220
- #: includes/admin/class-top-ten-statistics-table.php:341
221
  msgid "Daily visits"
222
  msgstr ""
223
 
224
- #: includes/admin/class-top-ten-network-statistics-table.php:328
225
- #: includes/admin/class-top-ten-statistics-table.php:378
226
  msgid "Delete Count"
227
  msgstr ""
228
 
229
- #: includes/admin/class-top-ten-network-statistics-table.php:375
230
- #: includes/admin/class-top-ten-statistics-table.php:425
231
  msgid "Are you sure you want to do this"
232
  msgstr ""
233
 
234
- #: includes/admin/class-top-ten-network-statistics-table.php:418
235
- #: includes/admin/class-top-ten-statistics-table.php:493
236
  msgid "Filter"
237
  msgstr ""
238
 
@@ -244,28 +240,28 @@ msgstr ""
244
  msgid "All post types"
245
  msgstr ""
246
 
247
- #: includes/admin/class-top-ten-statistics-table.php:266
248
  msgid "View"
249
  msgstr ""
250
 
251
- #: includes/admin/class-top-ten-statistics-table.php:267
252
  msgid "Edit"
253
  msgstr ""
254
 
255
- #: includes/admin/class-top-ten-statistics-table.php:268
256
  msgid "Delete"
257
  msgstr ""
258
 
259
- #: includes/admin/class-top-ten-statistics-table.php:298
260
  #, php-format
261
  msgid "%s ago"
262
  msgstr ""
263
 
264
- #: includes/admin/class-top-ten-statistics-table.php:342
265
  msgid "Post type"
266
  msgstr ""
267
 
268
- #: includes/admin/class-top-ten-statistics-table.php:343
269
  msgid "Author"
270
  msgstr ""
271
 
@@ -278,12 +274,12 @@ msgid "Enable trackers"
278
  msgstr ""
279
 
280
  #: includes/admin/default-settings.php:72
281
- #: includes/modules/class-top-ten-widget.php:95
282
  msgid "Overall"
283
  msgstr ""
284
 
285
  #: includes/admin/default-settings.php:73
286
- #: includes/admin/default-settings.php:720
287
  msgid "Daily"
288
  msgstr ""
289
 
@@ -559,7 +555,7 @@ msgid ""
559
  msgstr ""
560
 
561
  #: includes/admin/default-settings.php:320
562
- #: includes/admin/default-settings.php:769
563
  msgid "Number of posts to display"
564
  msgstr ""
565
 
@@ -766,12 +762,12 @@ msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
766
  msgstr ""
767
 
768
  #: includes/admin/default-settings.php:547
769
- #: includes/modules/class-top-ten-widget.php:145
770
  msgid "Thumbnail width"
771
  msgstr ""
772
 
773
  #: includes/admin/default-settings.php:555
774
- #: includes/modules/class-top-ten-widget.php:139
775
  msgid "Thumbnail height"
776
  msgstr ""
777
 
@@ -847,7 +843,7 @@ msgid ""
847
  "below. If not checked and no thumbnail is found, no image will be shown."
848
  msgstr ""
849
 
850
- #: includes/admin/default-settings.php:612 includes/admin/settings-page.php:688
851
  msgid "Default thumbnail"
852
  msgstr ""
853
 
@@ -872,54 +868,54 @@ msgid ""
872
  "CSS classes to style."
873
  msgstr ""
874
 
875
- #: includes/admin/default-settings.php:682
876
  msgid "Enable scheduled maintenance"
877
  msgstr ""
878
 
879
- #: includes/admin/default-settings.php:683
880
  msgid ""
881
  "Cleaning the database at regular intervals could improve performance, "
882
  "especially on high traffic blogs. Enabling maintenance will automatically "
883
  "delete entries older than 90 days in the daily tables."
884
  msgstr ""
885
 
886
- #: includes/admin/default-settings.php:689
887
  msgid "Time to run maintenance"
888
  msgstr ""
889
 
890
- #: includes/admin/default-settings.php:690
891
  msgid "The next two options allow you to set the time to run the cron."
892
  msgstr ""
893
 
894
- #: includes/admin/default-settings.php:695
895
  msgid "Hour"
896
  msgstr ""
897
 
898
- #: includes/admin/default-settings.php:705
899
  msgid "Minute"
900
  msgstr ""
901
 
902
- #: includes/admin/default-settings.php:715
903
  msgid "Run maintenance"
904
  msgstr ""
905
 
906
- #: includes/admin/default-settings.php:721
907
  msgid "Weekly"
908
  msgstr ""
909
 
910
- #: includes/admin/default-settings.php:722
911
  msgid "Fortnightly"
912
  msgstr ""
913
 
914
- #: includes/admin/default-settings.php:723
915
  msgid "Monthly"
916
  msgstr ""
917
 
918
- #: includes/admin/default-settings.php:751
919
  msgid "Permalink - Overall"
920
  msgstr ""
921
 
922
- #: includes/admin/default-settings.php:753
923
  #, php-format
924
  msgid ""
925
  "This will set the path of the custom feed generated by the plugin for "
@@ -927,11 +923,11 @@ msgid ""
927
  "when changing this option."
928
  msgstr ""
929
 
930
- #: includes/admin/default-settings.php:760
931
  msgid "Permalink - Daily"
932
  msgstr ""
933
 
934
- #: includes/admin/default-settings.php:762
935
  #, php-format
936
  msgid ""
937
  "This will set the path of the custom feed generated by the plugin for daily/"
@@ -939,37 +935,37 @@ msgid ""
939
  "%2$s when changing this option."
940
  msgstr ""
941
 
942
- #: includes/admin/default-settings.php:770
943
  msgid "Maximum number of posts that will be displayed in the custom feed."
944
  msgstr ""
945
 
946
- #: includes/admin/default-settings.php:777
947
  msgid "Custom period in day(s)"
948
  msgstr ""
949
 
950
- #: includes/admin/default-settings.php:879
951
  msgid "No styles"
952
  msgstr ""
953
 
954
- #: includes/admin/default-settings.php:880
955
  msgid "Select this option if you plan to add your own styles"
956
  msgstr ""
957
 
958
- #: includes/admin/default-settings.php:884
959
  msgid "Text only"
960
  msgstr ""
961
 
962
- #: includes/admin/default-settings.php:885
963
  msgid ""
964
  "Disable thumbnails and no longer include the default style sheet included in "
965
  "the plugin"
966
  msgstr ""
967
 
968
- #: includes/admin/default-settings.php:889
969
  msgid "Left thumbnails"
970
  msgstr ""
971
 
972
- #: includes/admin/default-settings.php:890
973
  msgid ""
974
  "Enabling this option will set the post thumbnail to be before text. "
975
  "Disabling this option will not revert any settings."
@@ -1279,7 +1275,7 @@ msgid ""
1279
  "The callback function used for the <strong>%s</strong> setting is missing."
1280
  msgstr ""
1281
 
1282
- #: includes/admin/settings-page.php:313
1283
  msgid "Modified from default setting"
1284
  msgstr ""
1285
 
@@ -1511,67 +1507,71 @@ msgstr ""
1511
  msgid "Display popular posts"
1512
  msgstr ""
1513
 
1514
- #: includes/modules/class-top-ten-widget.php:85
1515
  msgid "No. of posts"
1516
  msgstr ""
1517
 
1518
- #: includes/modules/class-top-ten-widget.php:90
1519
  msgid "Offset"
1520
  msgstr ""
1521
 
1522
- #: includes/modules/class-top-ten-widget.php:96
1523
  msgid "Custom time period (Enter below)"
1524
  msgstr ""
1525
 
1526
- #: includes/modules/class-top-ten-widget.php:100
1527
  msgid "In days and hours (applies only to custom option above)"
1528
  msgstr ""
1529
 
1530
- #: includes/modules/class-top-ten-widget.php:102
1531
  msgid "days"
1532
  msgstr ""
1533
 
1534
- #: includes/modules/class-top-ten-widget.php:105
1535
  msgid "hours"
1536
  msgstr ""
1537
 
1538
- #: includes/modules/class-top-ten-widget.php:110
1539
  msgid "Show count?"
1540
  msgstr ""
1541
 
1542
- #: includes/modules/class-top-ten-widget.php:115
1543
  msgid "Show excerpt?"
1544
  msgstr ""
1545
 
1546
- #: includes/modules/class-top-ten-widget.php:120
1547
  msgid "Show author?"
1548
  msgstr ""
1549
 
1550
- #: includes/modules/class-top-ten-widget.php:125
1551
  msgid "Show date?"
1552
  msgstr ""
1553
 
1554
- #: includes/modules/class-top-ten-widget.php:129
1555
  msgid "Thumbnail options"
1556
  msgstr ""
1557
 
1558
- #: includes/modules/class-top-ten-widget.php:131
1559
  msgid "Thumbnails inline, before title"
1560
  msgstr ""
1561
 
1562
- #: includes/modules/class-top-ten-widget.php:132
1563
  msgid "Thumbnails inline, after title"
1564
  msgstr ""
1565
 
1566
- #: includes/modules/class-top-ten-widget.php:133
1567
  msgid "Only thumbnails, no text"
1568
  msgstr ""
1569
 
1570
- #: includes/modules/class-top-ten-widget.php:134
1571
  msgid "No thumbnails, only text."
1572
  msgstr ""
1573
 
1574
- #: includes/modules/class-top-ten-widget.php:149
 
 
 
 
1575
  msgid "Post types to include:"
1576
  msgstr ""
1577
 
2
  msgstr ""
3
  "Project-Id-Version: Top 10\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2020-04-15 09:49+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
8
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
13
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
14
  "esc_attr_e\n"
15
  "X-Poedit-Basepath: ..\n"
16
+ "X-Generator: Poedit 2.3\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "X-Poedit-SearchPath-0: .\n"
43
  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:42
47
  #: includes/admin/class-top-ten-network-statistics.php:118
48
  #: includes/admin/class-top-ten-statistics.php:128
49
  msgid "Popular Posts"
50
  msgstr ""
51
 
52
+ #: includes/admin/admin-dashboard.php:132 includes/admin/admin.php:45
53
  msgid "Daily Popular Posts"
54
  msgstr ""
55
 
56
+ #: includes/admin/admin-metabox.php:108
57
  msgid "Visit count:"
58
  msgstr ""
59
 
60
+ #: includes/admin/admin-metabox.php:110
61
  msgid ""
62
  "Enter a number above to update the visit count. Leaving the above box blank "
63
  "will set the count to zero"
105
  "will need to make the same change in the %1$s meta box on this page."
106
  msgstr ""
107
 
108
+ #: includes/admin/admin.php:34 includes/admin/admin.php:37
109
  #: includes/admin/settings-page.php:32
110
  msgid "Top 10 Settings"
111
  msgstr ""
112
 
113
+ #: includes/admin/admin.php:34 includes/admin/admin.php:201
114
  msgid "Top 10"
115
  msgstr ""
116
 
117
+ #: includes/admin/admin.php:37 includes/admin/admin.php:159
118
  msgid "Settings"
119
  msgstr ""
120
 
121
+ #: includes/admin/admin.php:42 includes/admin/class-top-ten-statistics.php:74
122
  msgid "Top 10 Popular Posts"
123
  msgstr ""
124
 
125
+ #: includes/admin/admin.php:45
126
  msgid "Top 10 Daily Popular Posts"
127
  msgstr ""
128
 
134
  msgid "Tools"
135
  msgstr ""
136
 
137
+ #: includes/admin/admin.php:52
138
  msgid "Top 10 Import Export Tables"
139
  msgstr ""
140
 
141
+ #: includes/admin/admin.php:52
142
  msgid "Import/Export"
143
  msgstr ""
144
 
145
+ #: includes/admin/admin.php:113
 
 
 
 
146
  #, php-format
147
  msgid ""
148
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
150
  "\"_blank\">WordPress.org</a>"
151
  msgstr ""
152
 
153
+ #: includes/admin/admin.php:181 includes/admin/sidebar.php:55
154
  msgid "Support"
155
  msgstr ""
156
 
157
+ #: includes/admin/admin.php:182
158
  msgid "Donate"
159
  msgstr ""
160
 
161
+ #: includes/admin/admin.php:183
162
  msgid "Contribute"
163
  msgstr ""
164
 
165
+ #: includes/admin/admin.php:201
166
  msgid "Top 10 - Network Popular Posts"
167
  msgstr ""
168
 
180
  msgid "popular_posts"
181
  msgstr ""
182
 
183
+ #: includes/admin/class-top-ten-network-statistics-table.php:193
184
+ #: includes/admin/class-top-ten-statistics-table.php:223
185
  msgid "No popular posts available."
186
  msgstr ""
187
 
188
+ #: includes/admin/class-top-ten-network-statistics-table.php:262
189
+ #: includes/admin/class-top-ten-statistics-table.php:307
190
  msgid "Y/m/d"
191
  msgstr ""
192
 
193
+ #: includes/admin/class-top-ten-network-statistics-table.php:299
194
+ #: includes/admin/class-top-ten-statistics-table.php:361
195
  #: includes/modules/class-top-ten-count-widget.php:53
196
+ #: includes/modules/class-top-ten-widget.php:82
197
  msgid "Title"
198
  msgstr ""
199
 
200
+ #: includes/admin/class-top-ten-network-statistics-table.php:300
201
  msgid "Blog"
202
  msgstr ""
203
 
204
+ #: includes/admin/class-top-ten-network-statistics-table.php:301
205
+ #: includes/admin/class-top-ten-statistics-table.php:366
206
  #: includes/admin/import-export.php:183
207
  msgid "Date"
208
  msgstr ""
209
 
210
+ #: includes/admin/class-top-ten-network-statistics-table.php:302
211
+ #: includes/admin/class-top-ten-statistics-table.php:362
212
  msgid "Total visits"
213
  msgstr ""
214
 
215
+ #: includes/admin/class-top-ten-network-statistics-table.php:303
216
+ #: includes/admin/class-top-ten-statistics-table.php:363
217
  msgid "Daily visits"
218
  msgstr ""
219
 
220
+ #: includes/admin/class-top-ten-network-statistics-table.php:336
221
+ #: includes/admin/class-top-ten-statistics-table.php:400
222
  msgid "Delete Count"
223
  msgstr ""
224
 
225
+ #: includes/admin/class-top-ten-network-statistics-table.php:383
226
+ #: includes/admin/class-top-ten-statistics-table.php:447
227
  msgid "Are you sure you want to do this"
228
  msgstr ""
229
 
230
+ #: includes/admin/class-top-ten-network-statistics-table.php:425
231
+ #: includes/admin/class-top-ten-statistics-table.php:514
232
  msgid "Filter"
233
  msgstr ""
234
 
240
  msgid "All post types"
241
  msgstr ""
242
 
243
+ #: includes/admin/class-top-ten-statistics-table.php:273
244
  msgid "View"
245
  msgstr ""
246
 
247
+ #: includes/admin/class-top-ten-statistics-table.php:274
248
  msgid "Edit"
249
  msgstr ""
250
 
251
+ #: includes/admin/class-top-ten-statistics-table.php:275
252
  msgid "Delete"
253
  msgstr ""
254
 
255
+ #: includes/admin/class-top-ten-statistics-table.php:305
256
  #, php-format
257
  msgid "%s ago"
258
  msgstr ""
259
 
260
+ #: includes/admin/class-top-ten-statistics-table.php:364
261
  msgid "Post type"
262
  msgstr ""
263
 
264
+ #: includes/admin/class-top-ten-statistics-table.php:365
265
  msgid "Author"
266
  msgstr ""
267
 
274
  msgstr ""
275
 
276
  #: includes/admin/default-settings.php:72
277
+ #: includes/modules/class-top-ten-widget.php:97
278
  msgid "Overall"
279
  msgstr ""
280
 
281
  #: includes/admin/default-settings.php:73
282
+ #: includes/admin/default-settings.php:721
283
  msgid "Daily"
284
  msgstr ""
285
 
555
  msgstr ""
556
 
557
  #: includes/admin/default-settings.php:320
558
+ #: includes/admin/default-settings.php:770
559
  msgid "Number of posts to display"
560
  msgstr ""
561
 
762
  msgstr ""
763
 
764
  #: includes/admin/default-settings.php:547
765
+ #: includes/modules/class-top-ten-widget.php:147
766
  msgid "Thumbnail width"
767
  msgstr ""
768
 
769
  #: includes/admin/default-settings.php:555
770
+ #: includes/modules/class-top-ten-widget.php:141
771
  msgid "Thumbnail height"
772
  msgstr ""
773
 
843
  "below. If not checked and no thumbnail is found, no image will be shown."
844
  msgstr ""
845
 
846
+ #: includes/admin/default-settings.php:612 includes/admin/settings-page.php:689
847
  msgid "Default thumbnail"
848
  msgstr ""
849
 
868
  "CSS classes to style."
869
  msgstr ""
870
 
871
+ #: includes/admin/default-settings.php:683
872
  msgid "Enable scheduled maintenance"
873
  msgstr ""
874
 
875
+ #: includes/admin/default-settings.php:684
876
  msgid ""
877
  "Cleaning the database at regular intervals could improve performance, "
878
  "especially on high traffic blogs. Enabling maintenance will automatically "
879
  "delete entries older than 90 days in the daily tables."
880
  msgstr ""
881
 
882
+ #: includes/admin/default-settings.php:690
883
  msgid "Time to run maintenance"
884
  msgstr ""
885
 
886
+ #: includes/admin/default-settings.php:691
887
  msgid "The next two options allow you to set the time to run the cron."
888
  msgstr ""
889
 
890
+ #: includes/admin/default-settings.php:696
891
  msgid "Hour"
892
  msgstr ""
893
 
894
+ #: includes/admin/default-settings.php:706
895
  msgid "Minute"
896
  msgstr ""
897
 
898
+ #: includes/admin/default-settings.php:716
899
  msgid "Run maintenance"
900
  msgstr ""
901
 
902
+ #: includes/admin/default-settings.php:722
903
  msgid "Weekly"
904
  msgstr ""
905
 
906
+ #: includes/admin/default-settings.php:723
907
  msgid "Fortnightly"
908
  msgstr ""
909
 
910
+ #: includes/admin/default-settings.php:724
911
  msgid "Monthly"
912
  msgstr ""
913
 
914
+ #: includes/admin/default-settings.php:752
915
  msgid "Permalink - Overall"
916
  msgstr ""
917
 
918
+ #: includes/admin/default-settings.php:754
919
  #, php-format
920
  msgid ""
921
  "This will set the path of the custom feed generated by the plugin for "
923
  "when changing this option."
924
  msgstr ""
925
 
926
+ #: includes/admin/default-settings.php:761
927
  msgid "Permalink - Daily"
928
  msgstr ""
929
 
930
+ #: includes/admin/default-settings.php:763
931
  #, php-format
932
  msgid ""
933
  "This will set the path of the custom feed generated by the plugin for daily/"
935
  "%2$s when changing this option."
936
  msgstr ""
937
 
938
+ #: includes/admin/default-settings.php:771
939
  msgid "Maximum number of posts that will be displayed in the custom feed."
940
  msgstr ""
941
 
942
+ #: includes/admin/default-settings.php:778
943
  msgid "Custom period in day(s)"
944
  msgstr ""
945
 
946
+ #: includes/admin/default-settings.php:880
947
  msgid "No styles"
948
  msgstr ""
949
 
950
+ #: includes/admin/default-settings.php:881
951
  msgid "Select this option if you plan to add your own styles"
952
  msgstr ""
953
 
954
+ #: includes/admin/default-settings.php:885
955
  msgid "Text only"
956
  msgstr ""
957
 
958
+ #: includes/admin/default-settings.php:886
959
  msgid ""
960
  "Disable thumbnails and no longer include the default style sheet included in "
961
  "the plugin"
962
  msgstr ""
963
 
964
+ #: includes/admin/default-settings.php:890
965
  msgid "Left thumbnails"
966
  msgstr ""
967
 
968
+ #: includes/admin/default-settings.php:891
969
  msgid ""
970
  "Enabling this option will set the post thumbnail to be before text. "
971
  "Disabling this option will not revert any settings."
1275
  "The callback function used for the <strong>%s</strong> setting is missing."
1276
  msgstr ""
1277
 
1278
+ #: includes/admin/settings-page.php:315
1279
  msgid "Modified from default setting"
1280
  msgstr ""
1281
 
1507
  msgid "Display popular posts"
1508
  msgstr ""
1509
 
1510
+ #: includes/modules/class-top-ten-widget.php:87
1511
  msgid "No. of posts"
1512
  msgstr ""
1513
 
1514
+ #: includes/modules/class-top-ten-widget.php:92
1515
  msgid "Offset"
1516
  msgstr ""
1517
 
1518
+ #: includes/modules/class-top-ten-widget.php:98
1519
  msgid "Custom time period (Enter below)"
1520
  msgstr ""
1521
 
1522
+ #: includes/modules/class-top-ten-widget.php:102
1523
  msgid "In days and hours (applies only to custom option above)"
1524
  msgstr ""
1525
 
1526
+ #: includes/modules/class-top-ten-widget.php:104
1527
  msgid "days"
1528
  msgstr ""
1529
 
1530
+ #: includes/modules/class-top-ten-widget.php:107
1531
  msgid "hours"
1532
  msgstr ""
1533
 
1534
+ #: includes/modules/class-top-ten-widget.php:112
1535
  msgid "Show count?"
1536
  msgstr ""
1537
 
1538
+ #: includes/modules/class-top-ten-widget.php:117
1539
  msgid "Show excerpt?"
1540
  msgstr ""
1541
 
1542
+ #: includes/modules/class-top-ten-widget.php:122
1543
  msgid "Show author?"
1544
  msgstr ""
1545
 
1546
+ #: includes/modules/class-top-ten-widget.php:127
1547
  msgid "Show date?"
1548
  msgstr ""
1549
 
1550
+ #: includes/modules/class-top-ten-widget.php:131
1551
  msgid "Thumbnail options"
1552
  msgstr ""
1553
 
1554
+ #: includes/modules/class-top-ten-widget.php:133
1555
  msgid "Thumbnails inline, before title"
1556
  msgstr ""
1557
 
1558
+ #: includes/modules/class-top-ten-widget.php:134
1559
  msgid "Thumbnails inline, after title"
1560
  msgstr ""
1561
 
1562
+ #: includes/modules/class-top-ten-widget.php:135
1563
  msgid "Only thumbnails, no text"
1564
  msgstr ""
1565
 
1566
+ #: includes/modules/class-top-ten-widget.php:136
1567
  msgid "No thumbnails, only text."
1568
  msgstr ""
1569
 
1570
+ #: includes/modules/class-top-ten-widget.php:153
1571
+ msgid "Only from categories"
1572
+ msgstr ""
1573
+
1574
+ #: includes/modules/class-top-ten-widget.php:158
1575
  msgid "Post types to include:"
1576
  msgstr ""
1577
 
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-12-07 12:34+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"
@@ -14,7 +14,7 @@ msgstr ""
14
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
15
  "esc_attr_e\n"
16
  "X-Poedit-Basepath: ..\n"
17
- "X-Generator: Poedit 2.2.3\n"
18
  "X-Poedit-SourceCharset: UTF-8\n"
19
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
  "X-Poedit-SearchPath-0: .\n"
@@ -44,21 +44,21 @@ msgstr ""
44
  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:40
48
  #: includes/admin/class-top-ten-network-statistics.php:118
49
  #: includes/admin/class-top-ten-statistics.php:128
50
  msgid "Popular Posts"
51
  msgstr ""
52
 
53
- #: includes/admin/admin-dashboard.php:132 includes/admin/admin.php:44
54
  msgid "Daily Popular Posts"
55
  msgstr ""
56
 
57
- #: includes/admin/admin-metabox.php:109
58
  msgid "Visit count:"
59
  msgstr ""
60
 
61
- #: includes/admin/admin-metabox.php:111
62
  msgid ""
63
  "Enter a number above to update the visit count. Leaving the above box blank "
64
  "will set the count to zero"
@@ -106,24 +106,24 @@ msgid ""
106
  "will need to make the same change in the %1$s meta box on this page."
107
  msgstr ""
108
 
109
- #: includes/admin/admin.php:30 includes/admin/admin.php:34
110
  #: includes/admin/settings-page.php:32
111
  msgid "Top 10 Settings"
112
  msgstr ""
113
 
114
- #: includes/admin/admin.php:30 includes/admin/admin.php:412
115
  msgid "Top 10"
116
  msgstr ""
117
 
118
- #: includes/admin/admin.php:34 includes/admin/admin.php:370
119
  msgid "Settings"
120
  msgstr ""
121
 
122
- #: includes/admin/admin.php:40 includes/admin/class-top-ten-statistics.php:74
123
  msgid "Top 10 Popular Posts"
124
  msgstr ""
125
 
126
- #: includes/admin/admin.php:44
127
  msgid "Top 10 Daily Popular Posts"
128
  msgstr ""
129
 
@@ -135,19 +135,15 @@ msgstr ""
135
  msgid "Tools"
136
  msgstr ""
137
 
138
- #: includes/admin/admin.php:53
139
  msgid "Top 10 Import Export Tables"
140
  msgstr ""
141
 
142
- #: includes/admin/admin.php:53
143
  msgid "Import/Export"
144
  msgstr ""
145
 
146
- #: includes/admin/admin.php:206
147
- msgid "New information not saved. Do you wish to leave the page?"
148
- msgstr ""
149
-
150
- #: includes/admin/admin.php:324
151
  #, php-format
152
  msgid ""
153
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
@@ -155,19 +151,19 @@ msgid ""
155
  "\"_blank\">WordPress.org</a>"
156
  msgstr ""
157
 
158
- #: includes/admin/admin.php:392 includes/admin/sidebar.php:55
159
  msgid "Support"
160
  msgstr ""
161
 
162
- #: includes/admin/admin.php:393
163
  msgid "Donate"
164
  msgstr ""
165
 
166
- #: includes/admin/admin.php:394
167
  msgid "Contribute"
168
  msgstr ""
169
 
170
- #: includes/admin/admin.php:412
171
  msgid "Top 10 - Network Popular Posts"
172
  msgstr ""
173
 
@@ -185,55 +181,55 @@ msgstr ""
185
  msgid "popular_posts"
186
  msgstr ""
187
 
188
- #: includes/admin/class-top-ten-network-statistics-table.php:185
189
- #: includes/admin/class-top-ten-statistics-table.php:215
190
  msgid "No popular posts available."
191
  msgstr ""
192
 
193
- #: includes/admin/class-top-ten-network-statistics-table.php:254
194
- #: includes/admin/class-top-ten-statistics-table.php:300
195
  msgid "Y/m/d"
196
  msgstr ""
197
 
198
- #: includes/admin/class-top-ten-network-statistics-table.php:291
199
- #: includes/admin/class-top-ten-statistics-table.php:339
200
  #: includes/modules/class-top-ten-count-widget.php:53
201
- #: includes/modules/class-top-ten-widget.php:80
202
  msgid "Title"
203
  msgstr ""
204
 
205
- #: includes/admin/class-top-ten-network-statistics-table.php:292
206
  msgid "Blog"
207
  msgstr ""
208
 
209
- #: includes/admin/class-top-ten-network-statistics-table.php:293
210
- #: includes/admin/class-top-ten-statistics-table.php:344
211
  #: includes/admin/import-export.php:183
212
  msgid "Date"
213
  msgstr ""
214
 
215
- #: includes/admin/class-top-ten-network-statistics-table.php:294
216
- #: includes/admin/class-top-ten-statistics-table.php:340
217
  msgid "Total visits"
218
  msgstr ""
219
 
220
- #: includes/admin/class-top-ten-network-statistics-table.php:295
221
- #: includes/admin/class-top-ten-statistics-table.php:341
222
  msgid "Daily visits"
223
  msgstr ""
224
 
225
- #: includes/admin/class-top-ten-network-statistics-table.php:328
226
- #: includes/admin/class-top-ten-statistics-table.php:378
227
  msgid "Delete Count"
228
  msgstr ""
229
 
230
- #: includes/admin/class-top-ten-network-statistics-table.php:375
231
- #: includes/admin/class-top-ten-statistics-table.php:425
232
  msgid "Are you sure you want to do this"
233
  msgstr ""
234
 
235
- #: includes/admin/class-top-ten-network-statistics-table.php:418
236
- #: includes/admin/class-top-ten-statistics-table.php:493
237
  msgid "Filter"
238
  msgstr ""
239
 
@@ -245,28 +241,28 @@ msgstr ""
245
  msgid "All post types"
246
  msgstr ""
247
 
248
- #: includes/admin/class-top-ten-statistics-table.php:266
249
  msgid "View"
250
  msgstr ""
251
 
252
- #: includes/admin/class-top-ten-statistics-table.php:267
253
  msgid "Edit"
254
  msgstr ""
255
 
256
- #: includes/admin/class-top-ten-statistics-table.php:268
257
  msgid "Delete"
258
  msgstr ""
259
 
260
- #: includes/admin/class-top-ten-statistics-table.php:298
261
  #, php-format
262
  msgid "%s ago"
263
  msgstr ""
264
 
265
- #: includes/admin/class-top-ten-statistics-table.php:342
266
  msgid "Post type"
267
  msgstr ""
268
 
269
- #: includes/admin/class-top-ten-statistics-table.php:343
270
  msgid "Author"
271
  msgstr ""
272
 
@@ -279,12 +275,12 @@ msgid "Enable trackers"
279
  msgstr ""
280
 
281
  #: includes/admin/default-settings.php:72
282
- #: includes/modules/class-top-ten-widget.php:95
283
  msgid "Overall"
284
  msgstr ""
285
 
286
  #: includes/admin/default-settings.php:73
287
- #: includes/admin/default-settings.php:720
288
  msgid "Daily"
289
  msgstr ""
290
 
@@ -560,7 +556,7 @@ msgid ""
560
  msgstr ""
561
 
562
  #: includes/admin/default-settings.php:320
563
- #: includes/admin/default-settings.php:769
564
  msgid "Number of posts to display"
565
  msgstr ""
566
 
@@ -767,12 +763,12 @@ msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
767
  msgstr ""
768
 
769
  #: includes/admin/default-settings.php:547
770
- #: includes/modules/class-top-ten-widget.php:145
771
  msgid "Thumbnail width"
772
  msgstr ""
773
 
774
  #: includes/admin/default-settings.php:555
775
- #: includes/modules/class-top-ten-widget.php:139
776
  msgid "Thumbnail height"
777
  msgstr ""
778
 
@@ -848,7 +844,7 @@ msgid ""
848
  "below. If not checked and no thumbnail is found, no image will be shown."
849
  msgstr ""
850
 
851
- #: includes/admin/default-settings.php:612 includes/admin/settings-page.php:688
852
  msgid "Default thumbnail"
853
  msgstr ""
854
 
@@ -873,54 +869,54 @@ msgid ""
873
  "CSS classes to style."
874
  msgstr ""
875
 
876
- #: includes/admin/default-settings.php:682
877
  msgid "Enable scheduled maintenance"
878
  msgstr ""
879
 
880
- #: includes/admin/default-settings.php:683
881
  msgid ""
882
  "Cleaning the database at regular intervals could improve performance, "
883
  "especially on high traffic blogs. Enabling maintenance will automatically "
884
  "delete entries older than 90 days in the daily tables."
885
  msgstr ""
886
 
887
- #: includes/admin/default-settings.php:689
888
  msgid "Time to run maintenance"
889
  msgstr ""
890
 
891
- #: includes/admin/default-settings.php:690
892
  msgid "The next two options allow you to set the time to run the cron."
893
  msgstr ""
894
 
895
- #: includes/admin/default-settings.php:695
896
  msgid "Hour"
897
  msgstr ""
898
 
899
- #: includes/admin/default-settings.php:705
900
  msgid "Minute"
901
  msgstr ""
902
 
903
- #: includes/admin/default-settings.php:715
904
  msgid "Run maintenance"
905
  msgstr ""
906
 
907
- #: includes/admin/default-settings.php:721
908
  msgid "Weekly"
909
  msgstr ""
910
 
911
- #: includes/admin/default-settings.php:722
912
  msgid "Fortnightly"
913
  msgstr ""
914
 
915
- #: includes/admin/default-settings.php:723
916
  msgid "Monthly"
917
  msgstr ""
918
 
919
- #: includes/admin/default-settings.php:751
920
  msgid "Permalink - Overall"
921
  msgstr ""
922
 
923
- #: includes/admin/default-settings.php:753
924
  #, php-format
925
  msgid ""
926
  "This will set the path of the custom feed generated by the plugin for "
@@ -928,11 +924,11 @@ msgid ""
928
  "when changing this option."
929
  msgstr ""
930
 
931
- #: includes/admin/default-settings.php:760
932
  msgid "Permalink - Daily"
933
  msgstr ""
934
 
935
- #: includes/admin/default-settings.php:762
936
  #, php-format
937
  msgid ""
938
  "This will set the path of the custom feed generated by the plugin for daily/"
@@ -940,37 +936,37 @@ msgid ""
940
  "%2$s when changing this option."
941
  msgstr ""
942
 
943
- #: includes/admin/default-settings.php:770
944
  msgid "Maximum number of posts that will be displayed in the custom feed."
945
  msgstr ""
946
 
947
- #: includes/admin/default-settings.php:777
948
  msgid "Custom period in day(s)"
949
  msgstr ""
950
 
951
- #: includes/admin/default-settings.php:879
952
  msgid "No styles"
953
  msgstr ""
954
 
955
- #: includes/admin/default-settings.php:880
956
  msgid "Select this option if you plan to add your own styles"
957
  msgstr ""
958
 
959
- #: includes/admin/default-settings.php:884
960
  msgid "Text only"
961
  msgstr ""
962
 
963
- #: includes/admin/default-settings.php:885
964
  msgid ""
965
  "Disable thumbnails and no longer include the default style sheet included in "
966
  "the plugin"
967
  msgstr ""
968
 
969
- #: includes/admin/default-settings.php:889
970
  msgid "Left thumbnails"
971
  msgstr ""
972
 
973
- #: includes/admin/default-settings.php:890
974
  msgid ""
975
  "Enabling this option will set the post thumbnail to be before text. "
976
  "Disabling this option will not revert any settings."
@@ -1280,7 +1276,7 @@ msgid ""
1280
  "The callback function used for the <strong>%s</strong> setting is missing."
1281
  msgstr ""
1282
 
1283
- #: includes/admin/settings-page.php:313
1284
  msgid "Modified from default setting"
1285
  msgstr ""
1286
 
@@ -1512,67 +1508,71 @@ msgstr ""
1512
  msgid "Display popular posts"
1513
  msgstr ""
1514
 
1515
- #: includes/modules/class-top-ten-widget.php:85
1516
  msgid "No. of posts"
1517
  msgstr ""
1518
 
1519
- #: includes/modules/class-top-ten-widget.php:90
1520
  msgid "Offset"
1521
  msgstr ""
1522
 
1523
- #: includes/modules/class-top-ten-widget.php:96
1524
  msgid "Custom time period (Enter below)"
1525
  msgstr ""
1526
 
1527
- #: includes/modules/class-top-ten-widget.php:100
1528
  msgid "In days and hours (applies only to custom option above)"
1529
  msgstr ""
1530
 
1531
- #: includes/modules/class-top-ten-widget.php:102
1532
  msgid "days"
1533
  msgstr ""
1534
 
1535
- #: includes/modules/class-top-ten-widget.php:105
1536
  msgid "hours"
1537
  msgstr ""
1538
 
1539
- #: includes/modules/class-top-ten-widget.php:110
1540
  msgid "Show count?"
1541
  msgstr ""
1542
 
1543
- #: includes/modules/class-top-ten-widget.php:115
1544
  msgid "Show excerpt?"
1545
  msgstr ""
1546
 
1547
- #: includes/modules/class-top-ten-widget.php:120
1548
  msgid "Show author?"
1549
  msgstr ""
1550
 
1551
- #: includes/modules/class-top-ten-widget.php:125
1552
  msgid "Show date?"
1553
  msgstr ""
1554
 
1555
- #: includes/modules/class-top-ten-widget.php:129
1556
  msgid "Thumbnail options"
1557
  msgstr ""
1558
 
1559
- #: includes/modules/class-top-ten-widget.php:131
1560
  msgid "Thumbnails inline, before title"
1561
  msgstr ""
1562
 
1563
- #: includes/modules/class-top-ten-widget.php:132
1564
  msgid "Thumbnails inline, after title"
1565
  msgstr ""
1566
 
1567
- #: includes/modules/class-top-ten-widget.php:133
1568
  msgid "Only thumbnails, no text"
1569
  msgstr ""
1570
 
1571
- #: includes/modules/class-top-ten-widget.php:134
1572
  msgid "No thumbnails, only text."
1573
  msgstr ""
1574
 
1575
- #: includes/modules/class-top-ten-widget.php:149
 
 
 
 
1576
  msgid "Post types to include:"
1577
  msgstr ""
1578
 
3
  msgstr ""
4
  "Project-Id-Version: Top 10\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2020-04-15 09:49+0100\n"
7
  "PO-Revision-Date: \n"
8
  "Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
9
  "Language-Team: WebberZone <plugins@webberzone.com>\n"
14
  "X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
15
  "esc_attr_e\n"
16
  "X-Poedit-Basepath: ..\n"
17
+ "X-Generator: Poedit 2.3\n"
18
  "X-Poedit-SourceCharset: UTF-8\n"
19
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
  "X-Poedit-SearchPath-0: .\n"
44
  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:42
48
  #: includes/admin/class-top-ten-network-statistics.php:118
49
  #: includes/admin/class-top-ten-statistics.php:128
50
  msgid "Popular Posts"
51
  msgstr ""
52
 
53
+ #: includes/admin/admin-dashboard.php:132 includes/admin/admin.php:45
54
  msgid "Daily Popular Posts"
55
  msgstr ""
56
 
57
+ #: includes/admin/admin-metabox.php:108
58
  msgid "Visit count:"
59
  msgstr ""
60
 
61
+ #: includes/admin/admin-metabox.php:110
62
  msgid ""
63
  "Enter a number above to update the visit count. Leaving the above box blank "
64
  "will set the count to zero"
106
  "will need to make the same change in the %1$s meta box on this page."
107
  msgstr ""
108
 
109
+ #: includes/admin/admin.php:34 includes/admin/admin.php:37
110
  #: includes/admin/settings-page.php:32
111
  msgid "Top 10 Settings"
112
  msgstr ""
113
 
114
+ #: includes/admin/admin.php:34 includes/admin/admin.php:201
115
  msgid "Top 10"
116
  msgstr ""
117
 
118
+ #: includes/admin/admin.php:37 includes/admin/admin.php:159
119
  msgid "Settings"
120
  msgstr ""
121
 
122
+ #: includes/admin/admin.php:42 includes/admin/class-top-ten-statistics.php:74
123
  msgid "Top 10 Popular Posts"
124
  msgstr ""
125
 
126
+ #: includes/admin/admin.php:45
127
  msgid "Top 10 Daily Popular Posts"
128
  msgstr ""
129
 
135
  msgid "Tools"
136
  msgstr ""
137
 
138
+ #: includes/admin/admin.php:52
139
  msgid "Top 10 Import Export Tables"
140
  msgstr ""
141
 
142
+ #: includes/admin/admin.php:52
143
  msgid "Import/Export"
144
  msgstr ""
145
 
146
+ #: includes/admin/admin.php:113
 
 
 
 
147
  #, php-format
148
  msgid ""
149
  "Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
151
  "\"_blank\">WordPress.org</a>"
152
  msgstr ""
153
 
154
+ #: includes/admin/admin.php:181 includes/admin/sidebar.php:55
155
  msgid "Support"
156
  msgstr ""
157
 
158
+ #: includes/admin/admin.php:182
159
  msgid "Donate"
160
  msgstr ""
161
 
162
+ #: includes/admin/admin.php:183
163
  msgid "Contribute"
164
  msgstr ""
165
 
166
+ #: includes/admin/admin.php:201
167
  msgid "Top 10 - Network Popular Posts"
168
  msgstr ""
169
 
181
  msgid "popular_posts"
182
  msgstr ""
183
 
184
+ #: includes/admin/class-top-ten-network-statistics-table.php:193
185
+ #: includes/admin/class-top-ten-statistics-table.php:223
186
  msgid "No popular posts available."
187
  msgstr ""
188
 
189
+ #: includes/admin/class-top-ten-network-statistics-table.php:262
190
+ #: includes/admin/class-top-ten-statistics-table.php:307
191
  msgid "Y/m/d"
192
  msgstr ""
193
 
194
+ #: includes/admin/class-top-ten-network-statistics-table.php:299
195
+ #: includes/admin/class-top-ten-statistics-table.php:361
196
  #: includes/modules/class-top-ten-count-widget.php:53
197
+ #: includes/modules/class-top-ten-widget.php:82
198
  msgid "Title"
199
  msgstr ""
200
 
201
+ #: includes/admin/class-top-ten-network-statistics-table.php:300
202
  msgid "Blog"
203
  msgstr ""
204
 
205
+ #: includes/admin/class-top-ten-network-statistics-table.php:301
206
+ #: includes/admin/class-top-ten-statistics-table.php:366
207
  #: includes/admin/import-export.php:183
208
  msgid "Date"
209
  msgstr ""
210
 
211
+ #: includes/admin/class-top-ten-network-statistics-table.php:302
212
+ #: includes/admin/class-top-ten-statistics-table.php:362
213
  msgid "Total visits"
214
  msgstr ""
215
 
216
+ #: includes/admin/class-top-ten-network-statistics-table.php:303
217
+ #: includes/admin/class-top-ten-statistics-table.php:363
218
  msgid "Daily visits"
219
  msgstr ""
220
 
221
+ #: includes/admin/class-top-ten-network-statistics-table.php:336
222
+ #: includes/admin/class-top-ten-statistics-table.php:400
223
  msgid "Delete Count"
224
  msgstr ""
225
 
226
+ #: includes/admin/class-top-ten-network-statistics-table.php:383
227
+ #: includes/admin/class-top-ten-statistics-table.php:447
228
  msgid "Are you sure you want to do this"
229
  msgstr ""
230
 
231
+ #: includes/admin/class-top-ten-network-statistics-table.php:425
232
+ #: includes/admin/class-top-ten-statistics-table.php:514
233
  msgid "Filter"
234
  msgstr ""
235
 
241
  msgid "All post types"
242
  msgstr ""
243
 
244
+ #: includes/admin/class-top-ten-statistics-table.php:273
245
  msgid "View"
246
  msgstr ""
247
 
248
+ #: includes/admin/class-top-ten-statistics-table.php:274
249
  msgid "Edit"
250
  msgstr ""
251
 
252
+ #: includes/admin/class-top-ten-statistics-table.php:275
253
  msgid "Delete"
254
  msgstr ""
255
 
256
+ #: includes/admin/class-top-ten-statistics-table.php:305
257
  #, php-format
258
  msgid "%s ago"
259
  msgstr ""
260
 
261
+ #: includes/admin/class-top-ten-statistics-table.php:364
262
  msgid "Post type"
263
  msgstr ""
264
 
265
+ #: includes/admin/class-top-ten-statistics-table.php:365
266
  msgid "Author"
267
  msgstr ""
268
 
275
  msgstr ""
276
 
277
  #: includes/admin/default-settings.php:72
278
+ #: includes/modules/class-top-ten-widget.php:97
279
  msgid "Overall"
280
  msgstr ""
281
 
282
  #: includes/admin/default-settings.php:73
283
+ #: includes/admin/default-settings.php:721
284
  msgid "Daily"
285
  msgstr ""
286
 
556
  msgstr ""
557
 
558
  #: includes/admin/default-settings.php:320
559
+ #: includes/admin/default-settings.php:770
560
  msgid "Number of posts to display"
561
  msgstr ""
562
 
763
  msgstr ""
764
 
765
  #: includes/admin/default-settings.php:547
766
+ #: includes/modules/class-top-ten-widget.php:147
767
  msgid "Thumbnail width"
768
  msgstr ""
769
 
770
  #: includes/admin/default-settings.php:555
771
+ #: includes/modules/class-top-ten-widget.php:141
772
  msgid "Thumbnail height"
773
  msgstr ""
774
 
844
  "below. If not checked and no thumbnail is found, no image will be shown."
845
  msgstr ""
846
 
847
+ #: includes/admin/default-settings.php:612 includes/admin/settings-page.php:689
848
  msgid "Default thumbnail"
849
  msgstr ""
850
 
869
  "CSS classes to style."
870
  msgstr ""
871
 
872
+ #: includes/admin/default-settings.php:683
873
  msgid "Enable scheduled maintenance"
874
  msgstr ""
875
 
876
+ #: includes/admin/default-settings.php:684
877
  msgid ""
878
  "Cleaning the database at regular intervals could improve performance, "
879
  "especially on high traffic blogs. Enabling maintenance will automatically "
880
  "delete entries older than 90 days in the daily tables."
881
  msgstr ""
882
 
883
+ #: includes/admin/default-settings.php:690
884
  msgid "Time to run maintenance"
885
  msgstr ""
886
 
887
+ #: includes/admin/default-settings.php:691
888
  msgid "The next two options allow you to set the time to run the cron."
889
  msgstr ""
890
 
891
+ #: includes/admin/default-settings.php:696
892
  msgid "Hour"
893
  msgstr ""
894
 
895
+ #: includes/admin/default-settings.php:706
896
  msgid "Minute"
897
  msgstr ""
898
 
899
+ #: includes/admin/default-settings.php:716
900
  msgid "Run maintenance"
901
  msgstr ""
902
 
903
+ #: includes/admin/default-settings.php:722
904
  msgid "Weekly"
905
  msgstr ""
906
 
907
+ #: includes/admin/default-settings.php:723
908
  msgid "Fortnightly"
909
  msgstr ""
910
 
911
+ #: includes/admin/default-settings.php:724
912
  msgid "Monthly"
913
  msgstr ""
914
 
915
+ #: includes/admin/default-settings.php:752
916
  msgid "Permalink - Overall"
917
  msgstr ""
918
 
919
+ #: includes/admin/default-settings.php:754
920
  #, php-format
921
  msgid ""
922
  "This will set the path of the custom feed generated by the plugin for "
924
  "when changing this option."
925
  msgstr ""
926
 
927
+ #: includes/admin/default-settings.php:761
928
  msgid "Permalink - Daily"
929
  msgstr ""
930
 
931
+ #: includes/admin/default-settings.php:763
932
  #, php-format
933
  msgid ""
934
  "This will set the path of the custom feed generated by the plugin for daily/"
936
  "%2$s when changing this option."
937
  msgstr ""
938
 
939
+ #: includes/admin/default-settings.php:771
940
  msgid "Maximum number of posts that will be displayed in the custom feed."
941
  msgstr ""
942
 
943
+ #: includes/admin/default-settings.php:778
944
  msgid "Custom period in day(s)"
945
  msgstr ""
946
 
947
+ #: includes/admin/default-settings.php:880
948
  msgid "No styles"
949
  msgstr ""
950
 
951
+ #: includes/admin/default-settings.php:881
952
  msgid "Select this option if you plan to add your own styles"
953
  msgstr ""
954
 
955
+ #: includes/admin/default-settings.php:885
956
  msgid "Text only"
957
  msgstr ""
958
 
959
+ #: includes/admin/default-settings.php:886
960
  msgid ""
961
  "Disable thumbnails and no longer include the default style sheet included in "
962
  "the plugin"
963
  msgstr ""
964
 
965
+ #: includes/admin/default-settings.php:890
966
  msgid "Left thumbnails"
967
  msgstr ""
968
 
969
+ #: includes/admin/default-settings.php:891
970
  msgid ""
971
  "Enabling this option will set the post thumbnail to be before text. "
972
  "Disabling this option will not revert any settings."
1276
  "The callback function used for the <strong>%s</strong> setting is missing."
1277
  msgstr ""
1278
 
1279
+ #: includes/admin/settings-page.php:315
1280
  msgid "Modified from default setting"
1281
  msgstr ""
1282
 
1508
  msgid "Display popular posts"
1509
  msgstr ""
1510
 
1511
+ #: includes/modules/class-top-ten-widget.php:87
1512
  msgid "No. of posts"
1513
  msgstr ""
1514
 
1515
+ #: includes/modules/class-top-ten-widget.php:92
1516
  msgid "Offset"
1517
  msgstr ""
1518
 
1519
+ #: includes/modules/class-top-ten-widget.php:98
1520
  msgid "Custom time period (Enter below)"
1521
  msgstr ""
1522
 
1523
+ #: includes/modules/class-top-ten-widget.php:102
1524
  msgid "In days and hours (applies only to custom option above)"
1525
  msgstr ""
1526
 
1527
+ #: includes/modules/class-top-ten-widget.php:104
1528
  msgid "days"
1529
  msgstr ""
1530
 
1531
+ #: includes/modules/class-top-ten-widget.php:107
1532
  msgid "hours"
1533
  msgstr ""
1534
 
1535
+ #: includes/modules/class-top-ten-widget.php:112
1536
  msgid "Show count?"
1537
  msgstr ""
1538
 
1539
+ #: includes/modules/class-top-ten-widget.php:117
1540
  msgid "Show excerpt?"
1541
  msgstr ""
1542
 
1543
+ #: includes/modules/class-top-ten-widget.php:122
1544
  msgid "Show author?"
1545
  msgstr ""
1546
 
1547
+ #: includes/modules/class-top-ten-widget.php:127
1548
  msgid "Show date?"
1549
  msgstr ""
1550
 
1551
+ #: includes/modules/class-top-ten-widget.php:131
1552
  msgid "Thumbnail options"
1553
  msgstr ""
1554
 
1555
+ #: includes/modules/class-top-ten-widget.php:133
1556
  msgid "Thumbnails inline, before title"
1557
  msgstr ""
1558
 
1559
+ #: includes/modules/class-top-ten-widget.php:134
1560
  msgid "Thumbnails inline, after title"
1561
  msgstr ""
1562
 
1563
+ #: includes/modules/class-top-ten-widget.php:135
1564
  msgid "Only thumbnails, no text"
1565
  msgstr ""
1566
 
1567
+ #: includes/modules/class-top-ten-widget.php:136
1568
  msgid "No thumbnails, only text."
1569
  msgstr ""
1570
 
1571
+ #: includes/modules/class-top-ten-widget.php:153
1572
+ msgid "Only from categories"
1573
+ msgstr ""
1574
+
1575
+ #: includes/modules/class-top-ten-widget.php:158
1576
  msgid "Post types to include:"
1577
  msgstr ""
1578
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: popular posts, top 10, counter, top posts, daily popular, page views, stat
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
  Stable tag: trunk
6
- Requires at least: 4.8
7
- Tested up to: 5.3
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.
@@ -97,7 +97,7 @@ So, if you've got some cool feature that you'd like to implement into the plugin
97
  == Frequently Asked Questions ==
98
 
99
  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/).
100
- 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/).
101
 
102
 
103
  = How can I customise the output? =
@@ -120,7 +120,7 @@ The main CSS classes include:
120
 
121
  = Shortcodes =
122
 
123
- You can find details of the shortcodes in this [article](https://webberzone.com/support/knowledgebase/top-10-shortcodes/)
124
 
125
  = Manual install =
126
 
@@ -138,7 +138,7 @@ View [examples of the plugin API](https://gist.github.com/ajaydsouza/c8defd4b46e
138
 
139
  = Can this plugin replace Google Analytics? =
140
 
141
- No. Top 10 has been designed to only track the number of page-views on your blog posts and display the same. It isn't designed to replace Google Analytics or any other full fledged statistics application.
142
 
143
  = How does the scheduled maintenance work? =
144
 
@@ -160,145 +160,52 @@ add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sorta
160
 
161
  == Changelog ==
162
 
163
- = 2.8.0 =
164
-
165
- Release post: [https://wzn.io/34VvWMe](https://wzn.io/34VvWMe)
166
-
167
- * Features:
168
- * Custom feed for popular posts: Find new options under a new tab called Feed in the settings page where you can set the URL for the overall and daily feeds
169
- * New page in the network admin menu to view the popular posts across the network
170
- * Also delete transients and other settings on uninstall
171
-
172
- = 2.7.0 =
173
-
174
- Release post: [https://wzn.io/2HWbtwr](https://wzn.io/2HWbtwr)
175
-
176
- * Features:
177
- * Recreate the Top 10 database tables. You can find the button in the Tools page. Backup your database first
178
- * New export/import interface to export and import the Top 10 tables and settings
179
-
180
- * Enhancements:
181
- * `tptn_views` shortcode adds a new parameter 'count' to explicitly set the count type. Choose from daily, total or overall. This is overridden if daily is set to 0 (backwards compatibility)
182
-
183
- = 2.6.3 =
184
-
185
- Release post: [https://wzn.io/2L7w8mi](https://wzn.io/2L7w8mi)
186
-
187
- * Enhancements:
188
- * `tptn_get_first_image` filter has additional attributes `$image_attributes[0], $postid, $thumb_width, $thumb_height`
189
-
190
- * Bug fixes:
191
- * Reverted PolyLang implementation that was broken in v2.6.2
192
- * Delete deprecated settings on save
193
- * Fix settings link in plugins listing page
194
- * Fix exclude categories setting on save
195
-
196
- = 2.6.2 =
197
 
198
- * Enhancements:
199
- * Select a date range in the Popular Posts listing page in the admin
200
-
201
- * Bug fixes:
202
- * Fixed "Published post date" setting was not working. Thanks [@jherrerai](https://github.com/jherrerai)
203
- * Modified PolyLang and WPML function implementations
204
-
205
- = 2.6.1 =
206
-
207
- * Bug fixes:
208
- * Fixed widget daily and hourly range not working which was broken in v2.6.0
209
-
210
- = 2.6.0 =
211
 
212
  * Features:
213
- * New option to disable creation of image thumbnails. Find this under Thumbnail options
214
- * Thumbnail HTML markup includes `srcset` and `sizes` attributes when available. Read [Responsive Images in WordPress 4.4](https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/)
215
- * New option to turn on debug mode. You can turn this on when requesting support. Find it under the Counter/Tracker tab
216
- * New option to add the tracker js file on all pages, not just singular pages. Helps with minification/concatenation
217
- * New date filter in the Popular posts listing page to see the views on a particular date
218
- * New option to turn ON/OFF the number formatting of the post counts. ON by default
219
-
220
- * Enhancements:
221
- * Load tracker in footer
222
- * Renamed top-10-tracker.js to top-10-tracker.min.js
223
-
224
- * Bug fixes:
225
- * Only delete option if null value is passed to tptn_update_option
226
- * "Exclude display on these post IDs" moved under Counter section
227
-
228
- = 2.5.7 =
229
 
230
  * Enhancements:
231
- * Tools page now has the code to Recreate the PRIMARY KEY in case the button gives an error. You will need to run this in phpMyAdmin or Adminer
 
232
 
233
  * Bug fixes:
234
- * Fixed translation of " by " which had the incorrect text domain
235
- * Post types to includes selects "post" in case no option is selected
236
- * Unchecking all boxes of a "Display number of views on" setting would sometimes pick the default value
237
-
238
- = 2.5.6 =
239
-
240
- * Features:
241
- * Added new button under Tools to recreate the PRIMARY KEYs
242
-
243
- = 2.5.5 =
244
 
245
- * Bug fixes:
246
- * Fixed missing semi-colon in tracker code
247
- * Multi-site tracking failed in old installs where the PRIMARY KEY was not properly updated in the database. DB version has been updated to 6.0 to initiate primary key across all installs
248
 
249
- = 2.5.4 =
250
 
251
  * Features:
252
- * New button in the Tools page to delete the pre-2.5.x settings
253
-
254
- * Enhancements:
255
- * New function `tptn_trim_char` replaces `tptn_max_formatted_content` which should now support non-English characters as well
256
- * Counts in the "Popular Posts" page are now number formatted
257
-
258
- * Bug fixes:
259
- * Fixed PHP Illegal string offset error
260
-
261
- = 2.5.3 =
262
-
263
- * Bug fixes:
264
- * Fixed number of posts displayed in the popular posts list
265
-
266
- = 2.5.2 =
267
-
268
- * Bug fixes:
269
- * Settings / Thumbnail / Thumbnail size did not display the correct option even though the admin had this correctly saved
270
-
271
- = 2.5.1 =
272
 
273
- * Bug fixes:
274
- * Custom CSS did not get upgraded or saved properly
275
- * Uninstalling the plugin will delete the settings properly
276
 
277
- = 2.5.0 =
278
 
279
  * Features:
280
- * Upgrade old options to Settings API
281
- * New widget to display the overall count i.e. visits across all your site posts
282
- * Added a filter to override the number of days that maintenance considers to delete the database entries
283
- * New option to disable tracking for logged in users. Find "Track logged-in users" under the "Counter/Tracker" tab in the settings screen
284
 
285
  * Enhancements:
286
- * Make $ajax_tptn_tracker global. Contributed by [@pkirk](https://github.com/pkirk)
287
-
288
- * Bug fixes:
289
- * Make sure that $post object is available in `tptn_pc_content` filter. Contributed by [@mtws](https://github.com/mtws)
290
- * When editing Attachment post types, metabox should now save correctly
291
- * Disable `top_ten_nonce` as it wasn't needed for front-end users and conflicted with caching plugins
292
-
293
- * Deprecated:
294
- * `tptn_default_options` (no replacement) and `tptn_read_options` (Use `tptn_get_settings` instead)
295
 
296
- For previous changelog entries, please refer to the separate changelog.txt file
297
 
298
 
299
  == Upgrade Notice ==
300
 
301
- = 2.6.3 =
302
- * Bug fix release! Please verify your settings after upgrade.
303
  Check the Changelog for more details
304
 
3
  Contributors: webberzone, Ajay
4
  Donate link: https://ajaydsouza.com/donate/
5
  Stable tag: trunk
6
+ Requires at least: 4.9
7
+ Tested up to: 5.4
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.
97
  == Frequently Asked Questions ==
98
 
99
  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/).
100
+ It is the fastest way to get support as I monitor the forums regularly. I also provide [*paid* premium support via email](https://webberzone.com/support/).
101
 
102
 
103
  = How can I customise the output? =
120
 
121
  = Shortcodes =
122
 
123
+ You can find details of the shortcodes in this [knowledge base article](https://webberzone.com/support/knowledgebase/top-10-shortcodes/)
124
 
125
  = Manual install =
126
 
138
 
139
  = Can this plugin replace Google Analytics? =
140
 
141
+ No. Top 10 has been designed to only track the number of page-views on your blog posts and display the same. It isn't designed to replace Google Analytics or any other full fledged analytics application.
142
 
143
  = How does the scheduled maintenance work? =
144
 
160
 
161
  == Changelog ==
162
 
163
+ = 2.9.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
 
165
+ Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
 
 
 
 
 
 
 
 
 
 
 
 
166
 
167
  * Features:
168
+ * Edit the total visits from the Top 10 > Popular Posts page
169
+ * New shortcode setting `include_cat_ids` to limit top posts to selected categories/taxonomies. Use a comma separated list of [term_taxonomy_id](https://codex.wordpress.org/WordPress_Taxonomy#wp_term_taxonomy)
170
+ * New setting in widget to only include certain categories. Doesn't work with custom taxonomies
 
 
 
 
 
 
 
 
 
 
 
 
 
171
 
172
  * Enhancements:
173
+ * Implemented CodeMirror to format custom styles box
174
+ * Admin scripts are no longer loaded into the head - but using a separate JavaScript file
175
 
176
  * Bug fixes:
177
+ * Fixed media lookup returning PHP errors/warnings in rare cases
178
+ * Use `current_time` and `gmdate` as per latest WordPress Coding Standards
179
+ * No more unnecessary form modified errors in the popular posts tables in Admin area
180
+ * Fixed notices in PHP 7.4 when viewing popular posts listings
181
+ * When editing posts, the count from the metabox will only be used if it is modified
 
 
 
 
 
182
 
183
+ = 2.8.0 =
 
 
184
 
185
+ Release post: [https://webberzone.com/blog/top-10-v2-8-0/](https://webberzone.com/blog/top-10-v2-8-0/)
186
 
187
  * Features:
188
+ * Custom feed for popular posts: Find new options under a new tab called Feed in the settings page where you can set the URL for the overall and daily feeds
189
+ * New page in the network admin menu to view the popular posts across the network
190
+ * Also delete transients and other settings on uninstall
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
+ = 2.7.0 =
 
 
193
 
194
+ Release post: [https://webberzone.com/blog/top-10-v2-7-0/](https://webberzone.com/blog/top-10-v2-7-0/)
195
 
196
  * Features:
197
+ * Recreate the Top 10 database tables. You can find the button in the Tools page. Backup your database first
198
+ * New export/import interface to export and import the Top 10 tables and settings
 
 
199
 
200
  * Enhancements:
201
+ * `tptn_views` shortcode adds a new parameter 'count' to explicitly set the count type. Choose from daily, total or overall. This is overridden if daily is set to 0 (backwards compatibility)
 
 
 
 
 
 
 
 
202
 
203
+ For previous changelog entries, please refer to the separate changelog.txt file or [Github Releases page](https://github.com/WebberZone/top-10/releases)
204
 
205
 
206
  == Upgrade Notice ==
207
 
208
+ = 2.9.0 =
209
+ Bug fixes and new features;
210
  Check the Changelog for more details
211
 
top-10.php CHANGED
@@ -8,13 +8,13 @@
8
  * @author Ajay D'Souza <me@ajaydsouza.com>
9
  * @license GPL-2.0+
10
  * @link https://webberzone.com
11
- * @copyright 2008-2019 Ajay D'Souza
12
  *
13
  * @wordpress-plugin
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.8.0
18
  * Author: Ajay D'Souza
19
  * Author URI: https://webberzone.com
20
  * License: GPL-2.0+
8
  * @author Ajay D'Souza <me@ajaydsouza.com>
9
  * @license GPL-2.0+
10
  * @link https://webberzone.com
11
+ * @copyright 2008-2020 Ajay D'Souza
12
  *
13
  * @wordpress-plugin
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.9.0
18
  * Author: Ajay D'Souza
19
  * Author URI: https://webberzone.com
20
  * License: GPL-2.0+
uninstall.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
- * @copyright 2008-2019 Ajay D'Souza
10
  */
11
 
12
  // If this file is called directly, abort.
6
  * @author Ajay D'Souza <me@ajaydsouza.com>
7
  * @license GPL-2.0+
8
  * @link https://webberzone.com
9
+ * @copyright 2008-2020 Ajay D'Souza
10
  */
11
 
12
  // If this file is called directly, abort.