WP Statistics - Version 12.6.6

Version Description

  • Fixed: issue to showing Hit column for custom post type.
  • Improvement: Sanitize page's title and Escaping that in overview page.
  • Added: postbox Ads in overview page. Don't worry! Not very annoying.
Download this release

Release Info

Developer mostafa.s1990
Plugin Icon 128x128 WP Statistics
Version 12.6.6
Comparing to
See all releases

Code changes from version 12.6.5 to 12.6.6

.gitignore ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### macOS ###
2
+ *.DS_Store
3
+ .AppleDouble
4
+ .LSOverride
5
+
6
+ # Icon must end with two \r
7
+ Icon
8
+
9
+ # Thumbnails
10
+ ._*
11
+
12
+ # Files that might appear in the root of a volume
13
+ .DocumentRevisions-V100
14
+ .fseventsd
15
+ .Spotlight-V100
16
+ .TemporaryItems
17
+ .Trashes
18
+ .VolumeIcon.icns
19
+ .com.apple.timemachine.donotpresent
20
+
21
+ # Directories potentially created on remote AFP share
22
+ .AppleDB
23
+ .AppleDesktop
24
+ Network Trash Folder
25
+ Temporary Items
26
+ .apdisk
assets/css/log.css CHANGED
@@ -343,7 +343,7 @@
343
  }
344
 
345
  .table-stats tr:last-child td {
346
- border-bottom:0px;
347
  }
348
 
349
  .table-stats tr:hover:not(:first-child) td {
@@ -395,4 +395,36 @@
395
 
396
  .wps-postbox-veronalabs img {
397
  width: 116px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  }
343
  }
344
 
345
  .table-stats tr:last-child td {
346
+ border-bottom: 0px;
347
  }
348
 
349
  .table-stats tr:hover:not(:first-child) td {
395
 
396
  .wps-postbox-veronalabs img {
397
  width: 116px;
398
+ }
399
+
400
+ #wps_overview_ads_postbox .inside {
401
+ padding: 0;
402
+ margin: 0;
403
+ }
404
+
405
+ #wps_overview_ads_postbox .inside a img {
406
+ width: 100%;
407
+ height: auto;
408
+ }
409
+
410
+ #wps_overview_ads_postbox .inside a:focus {
411
+ box-shadow: none;
412
+ }
413
+
414
+ #wps_overview_ads_postbox .inside .close-overview-ads {
415
+ position: absolute;
416
+ right: 0;
417
+ margin: 10px 20px;
418
+ opacity: 0;
419
+ transition: 1s all;
420
+ }
421
+
422
+ #wps_overview_ads_postbox .inside .close-overview-ads span.dashicons {
423
+ font-size: 21px;
424
+ color: #72777c;
425
+ cursor: pointer;
426
+ }
427
+
428
+ #wps_overview_ads_postbox .inside:hover .close-overview-ads {
429
+ opacity: 1;
430
  }
includes/classes/class-wp-statistics-admin.php CHANGED
@@ -62,7 +62,7 @@ class WP_Statistics_Admin {
62
 
63
  //Add Column in Post Type Wp_List Table
64
  add_action( 'load-edit.php', array( $this, 'load_edit_init' ) );
65
- if ( $WP_Statistics->get_option( 'pages' ) && ! $WP_Statistics->get_option( 'disable_column' ) ) {
66
  add_action( 'post_submitbox_misc_actions', array( $this, 'post_init' ) );
67
  }
68
 
@@ -89,6 +89,9 @@ class WP_Statistics_Admin {
89
  //Add Visitors Log Table
90
  add_action( 'admin_init', array( $this, 'register_visitors_log_tbl' ) );
91
 
 
 
 
92
  //Check Require update page type in database
93
  WP_Statistics_Install::_init_page_type_updater();
94
  }
@@ -125,6 +128,43 @@ class WP_Statistics_Admin {
125
  <?php
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  /**
129
  * This function outputs error messages in the admin interface
130
  * if the primary components of WP Statistics are enabled.
62
 
63
  //Add Column in Post Type Wp_List Table
64
  add_action( 'load-edit.php', array( $this, 'load_edit_init' ) );
65
+ if ( $WP_Statistics->get_option( 'pages' ) && $WP_Statistics->get_option( 'hit_post_metabox' ) ) {
66
  add_action( 'post_submitbox_misc_actions', array( $this, 'post_init' ) );
67
  }
68
 
89
  //Add Visitors Log Table
90
  add_action( 'admin_init', array( $this, 'register_visitors_log_tbl' ) );
91
 
92
+ // Add Overview Ads
93
+ add_action( 'load-toplevel_page_' . WP_Statistics::$page['overview'], array( $this, 'overview_page_ads' ) );
94
+
95
  //Check Require update page type in database
96
  WP_Statistics_Install::_init_page_type_updater();
97
  }
128
  <?php
129
  }
130
 
131
+ /**
132
+ * OverView Page Ads
133
+ */
134
+ public function overview_page_ads() {
135
+
136
+ // Get Overview Ads
137
+ $get_overview_ads = get_option( 'wp_statistics_overview_page_ads', false );
138
+
139
+ // Check Expire or not exist
140
+ if ( $get_overview_ads === false || ( is_array( $get_overview_ads ) and ( current_time( 'timestamp' ) >= ( $get_overview_ads['timestamp'] + WEEK_IN_SECONDS ) ) ) ) {
141
+
142
+ // Check Exist
143
+ $overview_ads = ( $get_overview_ads === false ? array() : $get_overview_ads );
144
+
145
+ // Get New Ads from API
146
+ $request = wp_remote_get( 'https://wp-statistics.com/wp-json/ads/overview', array( 'timeout' => 30 ) );
147
+ if ( is_wp_error( $request ) ) {
148
+ return;
149
+ }
150
+
151
+ // Get Json Data
152
+ $data = json_decode( wp_remote_retrieve_body( $request ), true );
153
+
154
+ // Set new Timestamp
155
+ $overview_ads['timestamp'] = current_time( 'timestamp' );
156
+
157
+ // Set Ads
158
+ $overview_ads['ads'] = ( empty( $data ) ? array( 'status' => 'no', 'ID' => 'none' ) : $data );
159
+
160
+ // Set Last Viewed
161
+ $overview_ads['view'] = ( isset( $get_overview_ads['view'] ) ? $get_overview_ads['view'] : '' );
162
+
163
+ // Set Option
164
+ update_option( 'wp_statistics_overview_page_ads', $overview_ads, 'no' );
165
+ }
166
+ }
167
+
168
  /**
169
  * This function outputs error messages in the admin interface
170
  * if the primary components of WP Statistics are enabled.
includes/classes/class-wp-statistics-ajax.php CHANGED
@@ -15,6 +15,7 @@ class WP_Statistics_Ajax {
15
  */
16
  $list = array(
17
  'close_notice',
 
18
  'delete_agents',
19
  'delete_platforms',
20
  'delete_ip',
@@ -32,7 +33,7 @@ class WP_Statistics_Ajax {
32
  * Setup an AJAX action to close the notice on the overview page.
33
  */
34
  public function close_notice_action_callback() {
35
- global $WP_Statistics;
36
 
37
  $manage_cap = wp_statistics_validate_capability(
38
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
@@ -55,11 +56,28 @@ class WP_Statistics_Ajax {
55
  wp_die();
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  /**
59
  * Setup an AJAX action to delete an agent in the optimization page.
60
  */
61
  public function delete_agents_action_callback() {
62
- global $WP_Statistics, $wpdb;
63
 
64
  $manage_cap = wp_statistics_validate_capability(
65
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
@@ -90,14 +108,14 @@ class WP_Statistics_Ajax {
90
  _e( 'Access denied!', 'wp-statistics' );
91
  }
92
 
93
- wp_die();
94
  }
95
 
96
  /**
97
  * Setup an AJAX action to delete a platform in the optimization page.
98
  */
99
  public function delete_platforms_action_callback() {
100
- global $WP_Statistics, $wpdb;
101
 
102
  $manage_cap = wp_statistics_validate_capability(
103
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
@@ -127,14 +145,14 @@ class WP_Statistics_Ajax {
127
  _e( 'Access denied!', 'wp-statistics' );
128
  }
129
 
130
- wp_die();
131
  }
132
 
133
  /**
134
  * Setup an AJAX action to delete a ip in the optimization page.
135
  */
136
  public function delete_ip_action_callback() {
137
- global $WP_Statistics, $wpdb;
138
 
139
  $manage_cap = wp_statistics_validate_capability(
140
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
@@ -164,7 +182,7 @@ class WP_Statistics_Ajax {
164
  _e( 'Access denied!', 'wp-statistics' );
165
  }
166
 
167
- wp_die();
168
  }
169
 
170
  /**
@@ -232,14 +250,14 @@ class WP_Statistics_Ajax {
232
  _e( 'Access denied!', 'wp-statistics' );
233
  }
234
 
235
- wp_die();
236
  }
237
 
238
  /**
239
  * Setup an AJAX action to purge visitors with more than a defined number of hits.
240
  */
241
  public function purge_visitor_hits_action_callback() {
242
- global $WP_Statistics;
243
 
244
  require( WP_Statistics::$reg['plugin-dir'] . 'includes/functions/purge-hits.php' );
245
 
@@ -264,7 +282,7 @@ class WP_Statistics_Ajax {
264
  _e( 'Access denied!', 'wp-statistics' );
265
  }
266
 
267
- wp_die();
268
  }
269
 
270
  /**
@@ -412,6 +430,6 @@ class WP_Statistics_Ajax {
412
  _e( 'Access denied!', 'wp-statistics' );
413
  }
414
 
415
- wp_die();
416
  }
417
  }
15
  */
16
  $list = array(
17
  'close_notice',
18
+ 'close_overview_ads',
19
  'delete_agents',
20
  'delete_platforms',
21
  'delete_ip',
33
  * Setup an AJAX action to close the notice on the overview page.
34
  */
35
  public function close_notice_action_callback() {
36
+ global $WP_Statistics;
37
 
38
  $manage_cap = wp_statistics_validate_capability(
39
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
56
  wp_die();
57
  }
58
 
59
+ /**
60
+ * Close Overview Ads
61
+ */
62
+ public function close_overview_ads_action_callback() {
63
+ if ( wp_doing_ajax() and isset( $_REQUEST['ads_id'] ) ) {
64
+
65
+ // Check Security Nonce
66
+ check_ajax_referer( 'overview_ads_nonce', 'wps_nonce' );
67
+
68
+ // Update Option
69
+ $get_opt = get_option( 'wp_statistics_overview_page_ads' );
70
+ $get_opt['view'] = $_REQUEST['ads_id'];
71
+ update_option( 'wp_statistics_overview_page_ads', $get_opt, 'no' );
72
+ }
73
+ exit;
74
+ }
75
+
76
  /**
77
  * Setup an AJAX action to delete an agent in the optimization page.
78
  */
79
  public function delete_agents_action_callback() {
80
+ global $WP_Statistics, $wpdb;
81
 
82
  $manage_cap = wp_statistics_validate_capability(
83
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
108
  _e( 'Access denied!', 'wp-statistics' );
109
  }
110
 
111
+ wp_die();
112
  }
113
 
114
  /**
115
  * Setup an AJAX action to delete a platform in the optimization page.
116
  */
117
  public function delete_platforms_action_callback() {
118
+ global $WP_Statistics, $wpdb;
119
 
120
  $manage_cap = wp_statistics_validate_capability(
121
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
145
  _e( 'Access denied!', 'wp-statistics' );
146
  }
147
 
148
+ wp_die();
149
  }
150
 
151
  /**
152
  * Setup an AJAX action to delete a ip in the optimization page.
153
  */
154
  public function delete_ip_action_callback() {
155
+ global $WP_Statistics, $wpdb;
156
 
157
  $manage_cap = wp_statistics_validate_capability(
158
  $WP_Statistics->get_option( 'manage_capability', 'manage_options' )
182
  _e( 'Access denied!', 'wp-statistics' );
183
  }
184
 
185
+ wp_die();
186
  }
187
 
188
  /**
250
  _e( 'Access denied!', 'wp-statistics' );
251
  }
252
 
253
+ wp_die();
254
  }
255
 
256
  /**
257
  * Setup an AJAX action to purge visitors with more than a defined number of hits.
258
  */
259
  public function purge_visitor_hits_action_callback() {
260
+ global $WP_Statistics;
261
 
262
  require( WP_Statistics::$reg['plugin-dir'] . 'includes/functions/purge-hits.php' );
263
 
282
  _e( 'Access denied!', 'wp-statistics' );
283
  }
284
 
285
+ wp_die();
286
  }
287
 
288
  /**
430
  _e( 'Access denied!', 'wp-statistics' );
431
  }
432
 
433
+ wp_die();
434
  }
435
  }
includes/classes/class-wp-statistics-uninstall.php CHANGED
@@ -43,6 +43,7 @@ class WP_Statistics_Uninstall {
43
  delete_option( 'wp_statistics' );
44
  delete_option( 'wp_statistics_db_version' );
45
  delete_option( 'wp_statistics_plugin_version' );
 
46
 
47
  // Delete the transients.
48
  delete_transient( 'wps_top_referring' );
43
  delete_option( 'wp_statistics' );
44
  delete_option( 'wp_statistics_db_version' );
45
  delete_option( 'wp_statistics_plugin_version' );
46
+ delete_option( 'wp_statistics_overview_page_ads' );
47
 
48
  // Delete the transients.
49
  delete_transient( 'wps_top_referring' );
includes/functions/functions.php CHANGED
@@ -523,7 +523,7 @@ function wp_statistics_get_top_pages( $rangestartdate = null, $rangeenddate = nu
523
  $id = wp_statistics_uri_to_id( $out[0] );
524
  $post = get_post( $id );
525
  if ( is_object( $post ) ) {
526
- $title = $post->post_title;
527
  } else {
528
  if ( $out[0] == '/' ) {
529
  $title = get_bloginfo();
@@ -1936,7 +1936,7 @@ function wp_statistics_get_post_list( $args = array() ) {
1936
  $query = new WP_Query( $args );
1937
  $list = array();
1938
  foreach ( $query->posts as $ID ) {
1939
- $list[ $ID ] = get_the_title( $ID );
1940
  }
1941
 
1942
  return $list;
@@ -1968,7 +1968,7 @@ function wp_statistics_get_page_info( $page_id, $type = 'post' ) {
1968
  case "post":
1969
  case "page":
1970
  $arg = array(
1971
- 'title' => get_the_title( $page_id ),
1972
  'link' => get_the_permalink( $page_id ),
1973
  'edit_link' => get_edit_post_link( $page_id ),
1974
  'meta' => array(
@@ -1981,7 +1981,7 @@ function wp_statistics_get_page_info( $page_id, $type = 'post' ) {
1981
  case "tax":
1982
  $term = get_term( $page_id );
1983
  $arg = array(
1984
- 'title' => $term->name,
1985
  'link' => ( is_wp_error( get_term_link( $page_id ) ) === true ? '' : get_term_link( $page_id ) ),
1986
  'edit_link' => get_edit_term_link( $page_id ),
1987
  'meta' => array(
@@ -2000,7 +2000,7 @@ function wp_statistics_get_page_info( $page_id, $type = 'post' ) {
2000
  case "author":
2001
  $user_info = get_userdata( $page_id );
2002
  $arg = array(
2003
- 'title' => ( $user_info->display_name != "" ? $user_info->display_name : $user_info->first_name . ' ' . $user_info->last_name ),
2004
  'link' => get_author_posts_url( $page_id ),
2005
  'edit_link' => get_edit_user_link( $page_id ),
2006
  );
523
  $id = wp_statistics_uri_to_id( $out[0] );
524
  $post = get_post( $id );
525
  if ( is_object( $post ) ) {
526
+ $title = esc_html( $post->post_title );
527
  } else {
528
  if ( $out[0] == '/' ) {
529
  $title = get_bloginfo();
1936
  $query = new WP_Query( $args );
1937
  $list = array();
1938
  foreach ( $query->posts as $ID ) {
1939
+ $list[ $ID ] = esc_html( get_the_title( $ID ) );
1940
  }
1941
 
1942
  return $list;
1968
  case "post":
1969
  case "page":
1970
  $arg = array(
1971
+ 'title' => esc_html( get_the_title( $page_id ) ),
1972
  'link' => get_the_permalink( $page_id ),
1973
  'edit_link' => get_edit_post_link( $page_id ),
1974
  'meta' => array(
1981
  case "tax":
1982
  $term = get_term( $page_id );
1983
  $arg = array(
1984
+ 'title' => esc_html( $term->name ),
1985
  'link' => ( is_wp_error( get_term_link( $page_id ) ) === true ? '' : get_term_link( $page_id ) ),
1986
  'edit_link' => get_edit_term_link( $page_id ),
1987
  'meta' => array(
2000
  case "author":
2001
  $user_info = get_userdata( $page_id );
2002
  $arg = array(
2003
+ 'title' => ( $user_info->display_name != "" ? esc_html( $user_info->display_name ) : esc_html( $user_info->first_name . ' ' . $user_info->last_name ) ),
2004
  'link' => get_author_posts_url( $page_id ),
2005
  'edit_link' => get_edit_user_link( $page_id ),
2006
  );
includes/log/authors.php CHANGED
@@ -105,7 +105,7 @@
105
  <canvas id="hit-stats" height="80"></canvas>
106
  <script>
107
  var ctx = document.getElementById("hit-stats").getContext('2d');
108
- <?php if(is_rtl()) { ?> Chart.defaults.global.defaultFontFamily = "tahoma"; <?php } ?>
109
  var ChartJs = new Chart(ctx, {
110
  type: 'line',
111
  data: {
@@ -242,7 +242,7 @@
242
  <th>
243
  <a href="<?php echo get_permalink(
244
  $post_obj
245
- ); ?>"><?php echo $post_obj->post_title; ?></a>
246
  </th>
247
  <th class="th-center"><span><?php echo number_format_i18n( $post_stat ); ?></span>
248
  </th>
105
  <canvas id="hit-stats" height="80"></canvas>
106
  <script>
107
  var ctx = document.getElementById("hit-stats").getContext('2d');
108
+ <?php if(is_rtl()) { ?> Chart.defaults.global.defaultFontFamily = "tahoma"; <?php } ?>
109
  var ChartJs = new Chart(ctx, {
110
  type: 'line',
111
  data: {
242
  <th>
243
  <a href="<?php echo get_permalink(
244
  $post_obj
245
+ ); ?>"><?php echo esc_html( $post_obj->post_title ); ?></a>
246
  </th>
247
  <th class="th-center"><span><?php echo number_format_i18n( $post_stat ); ?></span>
248
  </th>
includes/log/categories.php CHANGED
@@ -92,7 +92,7 @@
92
  <canvas id="hit-stats" height="80"></canvas>
93
  <script>
94
  var ctx = document.getElementById("hit-stats").getContext('2d');
95
- <?php if(is_rtl()) { ?> Chart.defaults.global.defaultFontFamily = "tahoma"; <?php } ?>
96
  var ChartJs = new Chart(ctx, {
97
  type: 'line',
98
  data: {
@@ -229,7 +229,7 @@
229
  <th>
230
  <a href="<?php echo get_permalink(
231
  $post_obj
232
- ); ?>"><?php echo $post_obj->post_title; ?></a>
233
  </th>
234
  <th class="th-center"><span><?php echo number_format_i18n( $post_stat ); ?></span>
235
  </th>
92
  <canvas id="hit-stats" height="80"></canvas>
93
  <script>
94
  var ctx = document.getElementById("hit-stats").getContext('2d');
95
+ <?php if(is_rtl()) { ?> Chart.defaults.global.defaultFontFamily = "tahoma"; <?php } ?>
96
  var ChartJs = new Chart(ctx, {
97
  type: 'line',
98
  data: {
229
  <th>
230
  <a href="<?php echo get_permalink(
231
  $post_obj
232
+ ); ?>"><?php echo esc_html( $post_obj->post_title ); ?></a>
233
  </th>
234
  <th class="th-center"><span><?php echo number_format_i18n( $post_stat ); ?></span>
235
  </th>
includes/log/log.php CHANGED
@@ -112,5 +112,29 @@ foreach ( array( 'exclusions' => 'exclusions', 'users_online' => 'online' ) as $
112
  datatype: 'json',
113
  });
114
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  });
116
  </script>
112
  datatype: 'json',
113
  });
114
  });
115
+
116
+ // Added New Ads
117
+ <?php
118
+ $overview_ads = get_option( 'wp_statistics_overview_page_ads', false );
119
+ if($overview_ads != false and is_array( $overview_ads ) and $overview_ads['ads']['ID'] != $overview_ads['view'] and $overview_ads['ads']['status'] == "yes") {
120
+ ?>
121
+ jQuery(`<div id="wps_overview_ads_postbox" class="postbox"><div class="inside"><div class="close-overview-ads"><span class="dashicons dashicons-dismiss"></span></div><a href="<?php echo( isset( $overview_ads['ads']['link'] ) ? $overview_ads['ads']['link'] : '' ); ?>" title="<?php echo( isset( $overview_ads['ads']['title'] ) ? $overview_ads['ads']['title'] : '' ); ?>" <?php echo( $overview_ads['ads']['_target'] == "yes" ? ' target="_blank"' : '' ); ?>><img src="<?php echo( isset( $overview_ads['ads']['image'] ) ? $overview_ads['ads']['image'] : '' ); ?>" alt="<?php echo( isset( $overview_ads['ads']['title'] ) ? $overview_ads['ads']['title'] : '' ); ?>"></a></div></div>`).insertAfter("#wps-postbox-container-2 #normal-sortables div.postbox:first");
122
+ jQuery(document).on('click', '.close-overview-ads', function () {
123
+ jQuery("#wps_overview_ads_postbox").fadeOut("normal");
124
+ jQuery.ajax({
125
+ url: ajaxurl,
126
+ type: 'get',
127
+ data: {
128
+ 'action': 'wp_statistics_close_overview_ads',
129
+ 'ads_id': '<?php echo $overview_ads['ads']['ID']; ?>',
130
+ 'wps_nonce': '<?php echo wp_create_nonce( 'overview_ads_nonce' ); ?>'
131
+ },
132
+ datatype: 'json'
133
+ });
134
+ });
135
+ <?php
136
+ }
137
+ ?>
138
+
139
  });
140
  </script>
includes/log/page-statistics.php CHANGED
@@ -23,7 +23,7 @@ if ( $pageuri && ! $pageid ) {
23
 
24
  $post = get_post( $pageid );
25
  if ( is_object( $post ) ) {
26
- $title = $post->post_title;
27
  } else {
28
  $title = "";
29
  }
@@ -53,8 +53,8 @@ if ( $page > 0 and $post_type != "page" ) {
53
  $url_fields = '&prepage=' . $pageid;
54
 
55
  //Show Select Box Ui
56
- $html = __( 'Select Page', 'wp-statistics' ) . ': ';
57
- $html .= '<select name="page-id">';
58
  foreach ( wp_statistics_get_post_list( $arg ) as $post_id => $post_title ) {
59
  $html .= '<option value="' . $post_id . '"' . selected( $post_id, $page, false ) . '>' . $post_title . '</option>';
60
  }
23
 
24
  $post = get_post( $pageid );
25
  if ( is_object( $post ) ) {
26
+ $title = esc_html( $post->post_title );
27
  } else {
28
  $title = "";
29
  }
53
  $url_fields = '&prepage=' . $pageid;
54
 
55
  //Show Select Box Ui
56
+ $html = __( 'Select Page', 'wp-statistics' ) . ': ';
57
+ $html .= '<select name="page-id">';
58
  foreach ( wp_statistics_get_post_list( $arg ) as $post_id => $post_title ) {
59
  $html .= '<option value="' . $post_id . '"' . selected( $post_id, $page, false ) . '>' . $post_title . '</option>';
60
  }
includes/log/tags.php CHANGED
@@ -245,7 +245,7 @@
245
  <th>
246
  <a href="<?php echo get_permalink(
247
  $post_obj
248
- ); ?>"><?php echo $post_obj->post_title; ?></a>
249
  </th>
250
  <th class="th-center"><span><?php echo number_format_i18n( $post_stat ); ?></span>
251
  </th>
245
  <th>
246
  <a href="<?php echo get_permalink(
247
  $post_obj
248
+ ); ?>"><?php echo esc_html( $post_obj->post_title ); ?></a>
249
  </th>
250
  <th class="th-center"><span><?php echo number_format_i18n( $post_stat ); ?></span>
251
  </th>
includes/log/widgets/pages.php CHANGED
@@ -23,13 +23,13 @@ function wp_statistics_generate_pages_postbox_content() {
23
  /**
24
  * Check Get title by url
25
  * @since v12.5.7
26
- */
27
  if ( $page_link == '' ) {
28
  $page_link = htmlentities( $site_url . $item->uri, ENT_QUOTES );
29
  $id = wp_statistics_uri_to_id( $item->uri );
30
  $post = get_post( $id );
31
  if ( is_object( $post ) ) {
32
- $title = $post->post_title;
33
  } else {
34
  if ( $item->uri == '/' ) {
35
  $title = get_bloginfo();
23
  /**
24
  * Check Get title by url
25
  * @since v12.5.7
26
+ */
27
  if ( $page_link == '' ) {
28
  $page_link = htmlentities( $site_url . $item->uri, ENT_QUOTES );
29
  $id = wp_statistics_uri_to_id( $item->uri );
30
  $post = get_post( $id );
31
  if ( is_object( $post ) ) {
32
+ $title = esc_html( $post->post_title );
33
  } else {
34
  if ( $item->uri == '/' ) {
35
  $title = get_bloginfo();
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: mostafa.s1990, mehrshaddarzi, ghasemi71ir, GregRoss, dedidata
3
  Donate link: https://wp-statistics.com/donate/
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
- Tested up to: 5.2
7
  Requires PHP: 5.6
8
- Stable tag: 12.6.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -126,6 +126,11 @@ http://yourwebsite.com/wp-json/wpstatistics/v1
126
  To register, go to the Permalink page and update the permalink with press Save Changes.
127
 
128
  == Changelog ==
 
 
 
 
 
129
  = 12.6.5 =
130
  * WordPress 5.2 compatibility.
131
 
3
  Donate link: https://wp-statistics.com/donate/
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
+ Tested up to: 5.2.1
7
  Requires PHP: 5.6
8
+ Stable tag: 12.6.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
126
  To register, go to the Permalink page and update the permalink with press Save Changes.
127
 
128
  == Changelog ==
129
+ = 12.6.6 =
130
+ * Fixed: issue to showing Hit column for custom post type.
131
+ * Improvement: Sanitize page's title and Escaping that in overview page.
132
+ * Added: postbox Ads in overview page. Don't worry! Not very annoying.
133
+
134
  = 12.6.5 =
135
  * WordPress 5.2 compatibility.
136
 
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
- * Version: 12.6.5
7
  * Author: VeronaLabs
8
  * Author URI: http://veronalabs.com/
9
  * Text Domain: wp-statistics
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
+ * Version: 12.6.6
7
  * Author: VeronaLabs
8
  * Author URI: http://veronalabs.com/
9
  * Text Domain: wp-statistics