WP Statistics - Version 12.5.7

Version Description

  • Added: The Edge To Browser List.
  • Added: date_i18n function in dates for retrieving localized date.
  • Improved: The Browsers charts.
  • Improved: Minor issues in GeoIP update function.
  • Optimized: All png files. (60% Save).
Download this release

Release Info

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

Code changes from version 12.5.6 to 12.5.7

Files changed (74) hide show
  1. assets/css/admin.css +4 -0
  2. assets/images/Air.png +0 -0
  3. assets/images/Android.png +0 -0
  4. assets/images/Chrome.png +0 -0
  5. assets/images/Edge.png +0 -0
  6. assets/images/Firefox.png +0 -0
  7. assets/images/Ipad.png +0 -0
  8. assets/images/MSIE.png +0 -0
  9. assets/images/Opera Next.png +0 -0
  10. assets/images/Opera.png +0 -0
  11. assets/images/Safari.png +0 -0
  12. assets/images/TRAVOD-logo.png +0 -0
  13. assets/images/ask.png +0 -0
  14. assets/images/baidu.png +0 -0
  15. assets/images/bing.png +0 -0
  16. assets/images/dashicons-migrate.png +0 -0
  17. assets/images/dashicons-update.png +0 -0
  18. assets/images/duckduckgo.png +0 -0
  19. assets/images/google.png +0 -0
  20. assets/images/icon.png +0 -0
  21. assets/images/link.png +0 -0
  22. assets/images/logo-250-white.png +0 -0
  23. assets/images/logo-250.png +0 -0
  24. assets/images/map.png +0 -0
  25. assets/images/marker.png +0 -0
  26. assets/images/qwant.png +0 -0
  27. assets/images/stars.png +0 -0
  28. assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  29. assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  30. assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  31. assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  32. assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  33. assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  34. assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  35. assets/images/ui-icons_222222_256x240.png +0 -0
  36. assets/images/ui-icons_2e83ff_256x240.png +0 -0
  37. assets/images/ui-icons_454545_256x240.png +0 -0
  38. assets/images/ui-icons_888888_256x240.png +0 -0
  39. assets/images/ui-icons_cd0a0a_256x240.png +0 -0
  40. assets/images/unknown.png +0 -0
  41. assets/images/welcome/add-on-advanced-reporting.png +0 -0
  42. assets/images/welcome/add-on-mini-chart.png +0 -0
  43. assets/images/welcome/add-on-realtime-stats.png +0 -0
  44. assets/images/welcome/add-on-widgets.png +0 -0
  45. assets/images/welcome/addon-advanced-reporting.png +0 -0
  46. assets/images/welcome/addon-realltime-stats.png +0 -0
  47. assets/images/welcome/addon-widgets.png +0 -0
  48. assets/images/welcome/addons-mini-chart.png +0 -0
  49. assets/images/welcome/cache.png +0 -0
  50. assets/images/welcome/country.png +0 -0
  51. assets/images/welcome/shortcode.png +0 -0
  52. assets/images/welcome/whichbrowser.png +0 -0
  53. assets/images/yahoo.png +0 -0
  54. assets/images/yandex.png +0 -0
  55. includes/classes/class-wp-statistics-updates.php +115 -126
  56. includes/classes/class-wp-statistics.php +3 -1
  57. includes/functions/functions.php +41 -2
  58. includes/log/all-browsers.php +15 -2
  59. includes/log/last-search.php +1 -10
  60. includes/log/last-visitor.php +9 -44
  61. includes/log/online.php +5 -24
  62. includes/log/top-referring.php +8 -27
  63. includes/log/top-visitors.php +1 -8
  64. includes/log/widgets/about.php +2 -2
  65. includes/log/widgets/browsers.php +8 -2
  66. includes/log/widgets/jqv.map.php +18 -23
  67. includes/log/widgets/recent.php +6 -25
  68. includes/log/widgets/top.visitors.php +1 -3
  69. includes/log/widgets/words.php +5 -22
  70. includes/optimization/wps-optimization.php +5 -14
  71. includes/settings/tabs/wps-general.php +1 -0
  72. includes/templates/welcome.php +61 -48
  73. readme.txt +17 -9
  74. wp-statistics.php +2 -2
assets/css/admin.css CHANGED
@@ -225,6 +225,10 @@
225
  margin: 0 0 20px 0;
226
  }
227
 
 
 
 
 
228
  .wp-statistics-welcome .center-section {
229
  padding: 41px 0 60px;
230
  clear: both;
225
  margin: 0 0 20px 0;
226
  }
227
 
228
+ .wp-statistics-welcome img {
229
+ width: auto;
230
+ }
231
+
232
  .wp-statistics-welcome .center-section {
233
  padding: 41px 0 60px;
234
  clear: both;
assets/images/Air.png CHANGED
Binary file
assets/images/Android.png CHANGED
Binary file
assets/images/Chrome.png CHANGED
Binary file
assets/images/Edge.png ADDED
Binary file
assets/images/Firefox.png CHANGED
Binary file
assets/images/Ipad.png CHANGED
Binary file
assets/images/MSIE.png CHANGED
Binary file
assets/images/Opera Next.png CHANGED
Binary file
assets/images/Opera.png CHANGED
Binary file
assets/images/Safari.png CHANGED
Binary file
assets/images/TRAVOD-logo.png CHANGED
Binary file
assets/images/ask.png CHANGED
Binary file
assets/images/baidu.png CHANGED
Binary file
assets/images/bing.png CHANGED
Binary file
assets/images/dashicons-migrate.png CHANGED
Binary file
assets/images/dashicons-update.png CHANGED
Binary file
assets/images/duckduckgo.png CHANGED
Binary file
assets/images/google.png CHANGED
Binary file
assets/images/icon.png CHANGED
Binary file
assets/images/link.png CHANGED
Binary file
assets/images/logo-250-white.png CHANGED
Binary file
assets/images/logo-250.png CHANGED
Binary file
assets/images/map.png CHANGED
Binary file
assets/images/marker.png CHANGED
Binary file
assets/images/qwant.png CHANGED
Binary file
assets/images/stars.png CHANGED
Binary file
assets/images/ui-bg_flat_0_aaaaaa_40x100.png CHANGED
Binary file
assets/images/ui-bg_flat_75_ffffff_40x100.png CHANGED
Binary file
assets/images/ui-bg_glass_55_fbf9ee_1x400.png CHANGED
Binary file
assets/images/ui-bg_glass_65_ffffff_1x400.png CHANGED
Binary file
assets/images/ui-bg_glass_75_e6e6e6_1x400.png CHANGED
Binary file
assets/images/ui-bg_glass_95_fef1ec_1x400.png CHANGED
Binary file
assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png CHANGED
Binary file
assets/images/ui-icons_222222_256x240.png CHANGED
Binary file
assets/images/ui-icons_2e83ff_256x240.png CHANGED
Binary file
assets/images/ui-icons_454545_256x240.png CHANGED
Binary file
assets/images/ui-icons_888888_256x240.png CHANGED
Binary file
assets/images/ui-icons_cd0a0a_256x240.png CHANGED
Binary file
assets/images/unknown.png CHANGED
Binary file
assets/images/welcome/add-on-advanced-reporting.png DELETED
Binary file
assets/images/welcome/add-on-mini-chart.png DELETED
Binary file
assets/images/welcome/add-on-realtime-stats.png DELETED
Binary file
assets/images/welcome/add-on-widgets.png DELETED
Binary file
assets/images/welcome/addon-advanced-reporting.png ADDED
Binary file
assets/images/welcome/addon-realltime-stats.png ADDED
Binary file
assets/images/welcome/addon-widgets.png ADDED
Binary file
assets/images/welcome/addons-mini-chart.png ADDED
Binary file
assets/images/welcome/cache.png DELETED
Binary file
assets/images/welcome/country.png DELETED
Binary file
assets/images/welcome/shortcode.png DELETED
Binary file
assets/images/welcome/whichbrowser.png DELETED
Binary file
assets/images/yahoo.png CHANGED
Binary file
assets/images/yandex.png CHANGED
Binary file
includes/classes/class-wp-statistics-updates.php CHANGED
@@ -1,35 +1,33 @@
1
  <?php
2
 
3
- use GeoIp2\Database\Reader;
4
-
5
  /**
6
  * Class WP_Statistics_Updates
7
  */
8
  class WP_Statistics_Updates {
9
 
10
  //List Geo ip Library
11
- public static $geoip = array (
12
  'country' => array(
13
- 'cdn' => 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz',
14
  'github' => 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-Country/master/GeoLite2-Country.mmdb.gz',
15
- 'file' => 'GeoLite2-Country',
16
- 'opt' => 'geoip'
17
  ),
18
- 'city' => array(
19
- 'cdn' => 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz',
20
  'github' => 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-City/master/GeoLite2-City.mmdb.gz',
21
- 'file' => 'GeoLite2-City',
22
- 'opt' => 'geoip_city'
23
  )
24
  );
25
 
26
 
27
- /**
28
- * Update option process.
29
- */
30
- static function do_upgrade() {
31
 
32
- }
33
 
34
  /**
35
  * This function downloads the GeoIP database from MaxMind.
@@ -39,7 +37,7 @@ class WP_Statistics_Updates {
39
  *
40
  * @return string
41
  */
42
- static function download_geoip($pack, $type = "enable") {
43
  GLOBAL $WP_Statistics;
44
 
45
  //Create Empty Return Function
@@ -58,7 +56,9 @@ class WP_Statistics_Updates {
58
  // We need the gzopen() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
59
  // Also stop trying to update the database as it just won't work :)
60
  if ( false === function_exists( 'gzopen' ) ) {
61
- if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
 
 
62
 
63
  $result["notice"] = __( 'Error the gzopen() function do not exist!', 'wp-statistics' );
64
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
@@ -67,37 +67,33 @@ class WP_Statistics_Updates {
67
  }
68
 
69
  // If GeoIP is disabled, bail out.
70
- if($type =="update" and $WP_Statistics->get_option( WP_Statistics_Updates::$geoip[$pack]['opt'] ) == '') {
71
  return '';
72
  }
73
 
74
  // This is the location of the file to download.
75
- $download_url = WP_Statistics_Updates::$geoip[$pack]['cdn'];
76
  $response = wp_remote_get( $download_url );
77
 
78
  // Change download url if the maxmind.com doesn't response.
79
  if ( wp_remote_retrieve_response_code( $response ) != '200' ) {
80
- $download_url = WP_Statistics_Updates::$geoip[$pack]['github'];
81
  }
82
 
83
  // Get the upload directory from WordPress.
84
  $upload_dir = wp_upload_dir();
85
 
86
  // Create a variable with the name of the database file to download.
87
- $DBFile = $upload_dir['basedir'] . '/wp-statistics/'. WP_Statistics_Updates::$geoip[$pack]['file'].'.mmdb';
88
 
89
  // Check to see if the subdirectory we're going to upload to exists, if not create it.
90
  if ( ! file_exists( $upload_dir['basedir'] . '/wp-statistics' ) ) {
91
  if ( ! @mkdir( $upload_dir['basedir'] . '/wp-statistics', 0755 ) ) {
92
- if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
93
-
94
- $result["notice"] = sprintf(
95
- __(
96
- 'Error creating GeoIP database directory, make sure your web server has permissions to create directories in: %s',
97
- 'wp-statistics'
98
- ),
99
- $upload_dir['basedir']
100
- );
101
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
102
 
103
  return $result;
@@ -105,15 +101,13 @@ class WP_Statistics_Updates {
105
  }
106
 
107
  if ( ! is_writable( $upload_dir['basedir'] . '/wp-statistics' ) ) {
108
- if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
109
-
110
- $result["notice"] = sprintf(
111
- __(
112
- 'Error setting permissions of the GeoIP database directory, make sure your web server has permissions to write to directories in : %s',
113
- 'wp-statistics'
114
- ),
115
- $upload_dir['basedir']
116
- );
117
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
118
 
119
  return $result;
@@ -124,80 +118,77 @@ class WP_Statistics_Updates {
124
 
125
  // If we failed, through a message, otherwise proceed.
126
  if ( is_wp_error( $TempFile ) ) {
127
- if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
 
 
128
 
129
- $result["notice"] = sprintf(
130
- __( 'Error downloading GeoIP database from: %s - %s', 'wp-statistics' ),
131
- $download_url,
132
- $TempFile->get_error_message()
133
- );
134
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
135
  } else {
136
- // Open the downloaded file to unzip it.
137
- $ZipHandle = gzopen($TempFile, 'rb');
138
-
139
- // Create th new file to unzip to.
140
- $DBfh = fopen($DBFile, 'wb');
141
-
142
- // If we failed to open the downloaded file, through an error and remove the temporary file. Otherwise do the actual unzip.
143
- if (!$ZipHandle) {
144
- if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
145
-
146
- $result["notice"] = sprintf(
147
- __('Error could not open downloaded GeoIP database for reading: %s', 'wp-statistics'),
148
- $TempFile
149
- ) ;
150
- WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
151
-
152
- unlink($TempFile);
153
- } else {
154
- // If we failed to open the new file, throw and error and remove the temporary file. Otherwise actually do the unzip.
155
- if (!$DBfh) {
156
- if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
157
-
158
- $result["notice"] = sprintf(
159
- __('Error could not open destination GeoIP database for writing %s', 'wp-statistics'),
160
- $DBFile
161
- );
162
- WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
163
-
164
- unlink($TempFile);
165
- } else {
166
- while (($data = gzread($ZipHandle, 4096)) != false) {
167
- fwrite($DBfh, $data);
168
- }
169
-
170
- // Close the files.
171
- gzclose($ZipHandle);
172
- fclose($DBfh);
173
-
174
- // Delete the temporary file.
175
- unlink($TempFile);
176
-
177
- // Display the success message.
178
- $result["status"] = true;
179
- $result["notice"] = "<div class='updated settings-error'><p><strong>" .
180
- __( 'GeoIP Database updated successfully!', 'wp-statistics' ) .
181
- "</strong></p></div>";
182
-
183
- // Update the options to reflect the new download.
184
- if($type =="update") {
185
- $WP_Statistics->update_option('last_geoip_dl', time());
186
- $WP_Statistics->update_option('update_geoip', false);
187
- }
188
-
189
- // Populate any missing GeoIP information if the user has selected the option.
190
- if($pack =="country") {
191
- if ($WP_Statistics->get_option('geoip') &&
192
- wp_statistics_geoip_supported() &&
193
- $WP_Statistics->get_option('auto_pop')
194
- ) {
195
- WP_Statistics_Updates::populate_geoip_info();
196
- }
197
- }
198
- }
199
- }
200
- }
201
 
202
 
203
  if ( $WP_Statistics->get_option( 'geoip_report' ) == true ) {
@@ -225,14 +216,14 @@ class WP_Statistics_Updates {
225
  }
226
 
227
  /**
228
- * Downloads the referrerspam database from https://github.com/piwik/referrer-spam-blacklist.
229
  *
230
  * @return string
231
  */
232
  static function download_referrerspam() {
233
  GLOBAL $WP_Statistics;
234
 
235
- // If referrerspam is disabled, bail out.
236
  if ( $WP_Statistics->get_option( 'referrerspam' ) == false ) {
237
  return '';
238
  }
@@ -256,7 +247,7 @@ class WP_Statistics_Updates {
256
  }
257
 
258
  /**
259
- * Populate GeoIP infomration in to the database.
260
  * It is used in two different parts of the plugin;
261
  * When a user manual requests the update to happen and after a new GeoIP database has been download
262
  * (if the option is selected).
@@ -264,30 +255,30 @@ class WP_Statistics_Updates {
264
  * @return string
265
  */
266
  static function populate_geoip_info() {
267
- global $wpdb;
268
 
269
  // Find all rows in the table that currently don't have GeoIP info or have an unknown ('000') location.
270
- $result = $wpdb->get_results(
271
- "SELECT id,ip FROM `{$wpdb->prefix}statistics_visitor` WHERE location = '' or location = '000' or location IS NULL"
272
- );
273
 
274
  // Try create a new reader instance.
275
- try {
276
- $upload_dir = wp_upload_dir();
277
- $reader = new Reader( $upload_dir['basedir'] . '/wp-statistics/GeoLite2-Country.mmdb' );
278
- } catch ( Exception $e ) {
 
 
279
  $text_error = __( 'Unable to load the GeoIP database, make sure you have downloaded it in the settings page.', 'wp-statistics' );
280
  WP_Statistics_Admin_Pages::set_admin_notice( $text_error, $type = 'error' );
281
  }
282
 
283
  $count = 0;
284
 
285
- // Loop through all the missing rows and update them if we find a locaiton for them.
286
  foreach ( $result as $item ) {
287
  $count ++;
288
 
289
  // If the IP address is only a hash, don't bother updating the record.
290
- if ( substr( $item->ip, 0, 6 ) != '#hash#' ) {
291
  try {
292
  $record = $reader->country( $item->ip );
293
  $location = $record->country->isoCode;
@@ -307,8 +298,6 @@ class WP_Statistics_Updates {
307
  }
308
  }
309
 
310
- return "<div class='updated settings-error'><p><strong>" .
311
- sprintf( __( 'Updated %s GeoIP records in the visitors database.', 'wp-statistics' ), $count ) .
312
- "</strong></p></div>";
313
  }
314
  }
1
  <?php
2
 
 
 
3
  /**
4
  * Class WP_Statistics_Updates
5
  */
6
  class WP_Statistics_Updates {
7
 
8
  //List Geo ip Library
9
+ public static $geoip = array(
10
  'country' => array(
11
+ 'cdn' => 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz',
12
  'github' => 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-Country/master/GeoLite2-Country.mmdb.gz',
13
+ 'file' => 'GeoLite2-Country',
14
+ 'opt' => 'geoip'
15
  ),
16
+ 'city' => array(
17
+ 'cdn' => 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz',
18
  'github' => 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-City/master/GeoLite2-City.mmdb.gz',
19
+ 'file' => 'GeoLite2-City',
20
+ 'opt' => 'geoip_city'
21
  )
22
  );
23
 
24
 
25
+ /**
26
+ * Update option process.
27
+ */
28
+ static function do_upgrade() {
29
 
30
+ }
31
 
32
  /**
33
  * This function downloads the GeoIP database from MaxMind.
37
  *
38
  * @return string
39
  */
40
+ static function download_geoip( $pack, $type = "enable" ) {
41
  GLOBAL $WP_Statistics;
42
 
43
  //Create Empty Return Function
56
  // We need the gzopen() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
57
  // Also stop trying to update the database as it just won't work :)
58
  if ( false === function_exists( 'gzopen' ) ) {
59
+ if ( $type == "enable" ) {
60
+ $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'], '' );
61
+ }
62
 
63
  $result["notice"] = __( 'Error the gzopen() function do not exist!', 'wp-statistics' );
64
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
67
  }
68
 
69
  // If GeoIP is disabled, bail out.
70
+ if ( $type == "update" and $WP_Statistics->get_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'] ) == '' ) {
71
  return '';
72
  }
73
 
74
  // This is the location of the file to download.
75
+ $download_url = WP_Statistics_Updates::$geoip[ $pack ]['cdn'];
76
  $response = wp_remote_get( $download_url );
77
 
78
  // Change download url if the maxmind.com doesn't response.
79
  if ( wp_remote_retrieve_response_code( $response ) != '200' ) {
80
+ $download_url = WP_Statistics_Updates::$geoip[ $pack ]['github'];
81
  }
82
 
83
  // Get the upload directory from WordPress.
84
  $upload_dir = wp_upload_dir();
85
 
86
  // Create a variable with the name of the database file to download.
87
+ $DBFile = $upload_dir['basedir'] . '/wp-statistics/' . WP_Statistics_Updates::$geoip[ $pack ]['file'] . '.mmdb';
88
 
89
  // Check to see if the subdirectory we're going to upload to exists, if not create it.
90
  if ( ! file_exists( $upload_dir['basedir'] . '/wp-statistics' ) ) {
91
  if ( ! @mkdir( $upload_dir['basedir'] . '/wp-statistics', 0755 ) ) {
92
+ if ( $type == "enable" ) {
93
+ $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'], '' );
94
+ }
95
+
96
+ $result["notice"] = sprintf( __( 'Error creating GeoIP database directory, make sure your web server has permissions to create directories in: %s', 'wp-statistics' ), $upload_dir['basedir'] );
 
 
 
 
97
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
98
 
99
  return $result;
101
  }
102
 
103
  if ( ! is_writable( $upload_dir['basedir'] . '/wp-statistics' ) ) {
104
+ if ( $type == "enable" ) {
105
+ $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'], '' );
106
+ }
107
+
108
+ $result["notice"] = sprintf( __( 'Error setting permissions of the GeoIP database directory, make sure your web server has permissions to write to directories in : %s', 'wp-statistics' ),
109
+ $upload_dir['basedir']
110
+ );
 
 
111
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
112
 
113
  return $result;
118
 
119
  // If we failed, through a message, otherwise proceed.
120
  if ( is_wp_error( $TempFile ) ) {
121
+ if ( $type == "enable" ) {
122
+ $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'], '' );
123
+ }
124
 
125
+ $result["notice"] = sprintf( __( 'Error downloading GeoIP database from: %s - %s', 'wp-statistics' ), $download_url, $TempFile->get_error_message() );
 
 
 
 
126
  WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
127
  } else {
128
+ // Open the downloaded file to unzip it.
129
+ $ZipHandle = gzopen( $TempFile, 'rb' );
130
+
131
+ // Create th new file to unzip to.
132
+ $DBfh = fopen( $DBFile, 'wb' );
133
+
134
+ // If we failed to open the downloaded file, through an error and remove the temporary file. Otherwise do the actual unzip.
135
+ if ( ! $ZipHandle ) {
136
+ if ( $type == "enable" ) {
137
+ $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'], '' );
138
+ }
139
+
140
+ $result["notice"] = sprintf(
141
+ __( 'Error could not open downloaded GeoIP database for reading: %s', 'wp-statistics' ),
142
+ $TempFile
143
+ );
144
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
145
+
146
+ unlink( $TempFile );
147
+ } else {
148
+ // If we failed to open the new file, throw and error and remove the temporary file. Otherwise actually do the unzip.
149
+ if ( ! $DBfh ) {
150
+ if ( $type == "enable" ) {
151
+ $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[ $pack ]['opt'], '' );
152
+ }
153
+
154
+ $result["notice"] = sprintf( __( 'Error could not open destination GeoIP database for writing %s', 'wp-statistics' ), $DBFile );
155
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
156
+
157
+ unlink( $TempFile );
158
+ } else {
159
+ while ( ( $data = gzread( $ZipHandle, 4096 ) ) != false ) {
160
+ fwrite( $DBfh, $data );
161
+ }
162
+
163
+ // Close the files.
164
+ gzclose( $ZipHandle );
165
+ fclose( $DBfh );
166
+
167
+ // Delete the temporary file.
168
+ unlink( $TempFile );
169
+
170
+ // Display the success message.
171
+ $result["status"] = true;
172
+ $result["notice"] = "<div class='updated settings-error'><p><strong>" . __( 'GeoIP Database updated successfully!', 'wp-statistics' ) . "</strong></p></div>";
173
+
174
+ // Update the options to reflect the new download.
175
+ if ( $type == "update" ) {
176
+ $WP_Statistics->update_option( 'last_geoip_dl', time() );
177
+ $WP_Statistics->update_option( 'update_geoip', false );
178
+ }
179
+
180
+ // Populate any missing GeoIP information if the user has selected the option.
181
+ if ( $pack == "country" ) {
182
+ if ( $WP_Statistics->get_option( 'geoip' ) &&
183
+ wp_statistics_geoip_supported() &&
184
+ $WP_Statistics->get_option( 'auto_pop' )
185
+ ) {
186
+ WP_Statistics_Updates::populate_geoip_info();
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
 
192
 
193
 
194
  if ( $WP_Statistics->get_option( 'geoip_report' ) == true ) {
216
  }
217
 
218
  /**
219
+ * Downloads the referrer spam database from https://github.com/piwik/referrer-spam-blacklist.
220
  *
221
  * @return string
222
  */
223
  static function download_referrerspam() {
224
  GLOBAL $WP_Statistics;
225
 
226
+ // If referrer spam is disabled, bail out.
227
  if ( $WP_Statistics->get_option( 'referrerspam' ) == false ) {
228
  return '';
229
  }
247
  }
248
 
249
  /**
250
+ * Populate GeoIP information in to the database.
251
  * It is used in two different parts of the plugin;
252
  * When a user manual requests the update to happen and after a new GeoIP database has been download
253
  * (if the option is selected).
255
  * @return string
256
  */
257
  static function populate_geoip_info() {
258
+ global $wpdb, $WP_Statistics;
259
 
260
  // Find all rows in the table that currently don't have GeoIP info or have an unknown ('000') location.
261
+ $result = $wpdb->get_results( "SELECT id,ip FROM `{$wpdb->prefix}statistics_visitor` WHERE location = '' or location = '000' or location IS NULL" );
 
 
262
 
263
  // Try create a new reader instance.
264
+ $reader = false;
265
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
266
+ $reader = $WP_Statistics::geoip_loader( 'country' );
267
+ }
268
+
269
+ if($reader ===false) {
270
  $text_error = __( 'Unable to load the GeoIP database, make sure you have downloaded it in the settings page.', 'wp-statistics' );
271
  WP_Statistics_Admin_Pages::set_admin_notice( $text_error, $type = 'error' );
272
  }
273
 
274
  $count = 0;
275
 
276
+ // Loop through all the missing rows and update them if we find a location for them.
277
  foreach ( $result as $item ) {
278
  $count ++;
279
 
280
  // If the IP address is only a hash, don't bother updating the record.
281
+ if ( substr( $item->ip, 0, 6 ) != '#hash#' and $reader != false ) {
282
  try {
283
  $record = $reader->country( $item->ip );
284
  $location = $record->country->isoCode;
298
  }
299
  }
300
 
301
+ return "<div class='updated settings-error'><p><strong>" . sprintf( __( 'Updated %s GeoIP records in the visitors database.', 'wp-statistics' ), $count ) . "</strong></p></div>";
 
 
302
  }
303
  }
includes/classes/class-wp-statistics.php CHANGED
@@ -454,7 +454,9 @@ class WP_Statistics {
454
 
455
  /**
456
  * geo ip Loader
457
- * @throws \MaxMind\Db\Reader\InvalidDatabaseException
 
 
458
  */
459
  static function geoip_loader( $pack ) {
460
 
454
 
455
  /**
456
  * geo ip Loader
457
+ *
458
+ * @param $pack
459
+ * @return bool|\GeoIp2\Database\Reader
460
  */
461
  static function geoip_loader( $pack ) {
462
 
includes/functions/functions.php CHANGED
@@ -423,10 +423,14 @@ function wp_statistics_ua_list( $rangestartdate = null, $rangeenddate = null ) {
423
  $result = $wpdb->get_results( "SELECT DISTINCT agent FROM {$wpdb->prefix}statistics_visitor", ARRAY_N );
424
  }
425
 
426
- $Browsers = array();
 
427
 
428
  foreach ( $result as $out ) {
429
- $Browsers[] = $out[0];
 
 
 
430
  }
431
 
432
  return $Browsers;
@@ -1556,4 +1560,39 @@ function wp_statistics_admin_notice_result( $type, $message ) {
1556
  }
1557
 
1558
  printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1559
  }
423
  $result = $wpdb->get_results( "SELECT DISTINCT agent FROM {$wpdb->prefix}statistics_visitor", ARRAY_N );
424
  }
425
 
426
+ $Browsers = array();
427
+ $default_browser = wp_statistics_get_browser_list();
428
 
429
  foreach ( $result as $out ) {
430
+ //Check Browser is defined in wp-statistics
431
+ if ( array_key_exists( strtolower( $out[0] ), $default_browser ) ) {
432
+ $Browsers[] = $out[0];
433
+ }
434
  }
435
 
436
  return $Browsers;
1560
  }
1561
 
1562
  printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
1563
+ }
1564
+
1565
+ /**
1566
+ * Get All Browser List For Detecting
1567
+ *
1568
+ * @param bool $all
1569
+ * @return array|mixed
1570
+ */
1571
+ function wp_statistics_get_browser_list( $all = true ) {
1572
+
1573
+ //List Of Detect Browser in WP Statistics
1574
+ $list = array(
1575
+ "chrome" => __( "Google Chrome", 'wp-statistics' ),
1576
+ "firefox" => __( "Mozilla Firefox", 'wp-statistics' ),
1577
+ "msie" => __( "Microsoft Internet Explorer", 'wp-statistics' ),
1578
+ "edge" => __( "Microsoft Edge", 'wp-statistics' ),
1579
+ "opera" => __( "Opera", 'wp-statistics' ),
1580
+ "safari" => __( "Safari", 'wp-statistics' )
1581
+ );
1582
+ $browser_key = array_keys( $list );
1583
+
1584
+ //Return All Browser List
1585
+ if ( $all === true ) {
1586
+ return $list;
1587
+ //Return Browser Keys For detect
1588
+ } elseif ( $all == "key" ) {
1589
+ return $browser_key;
1590
+ } else {
1591
+ //Return Custom Browser Name by key
1592
+ if ( array_search( strtolower( $all ), $browser_key ) !== false ) {
1593
+ return $list[ strtolower( $all ) ];
1594
+ } else {
1595
+ return __( "Unknown", 'wp-statistics' );
1596
+ }
1597
+ }
1598
  }
includes/log/all-browsers.php CHANGED
@@ -37,17 +37,24 @@ if ( ! is_array( $Browsers ) ) {
37
 
38
  natcasesort( $Browsers );
39
  $BrowserVisits = array();
 
40
  foreach ( $Browsers as $Browser ) {
 
41
  $BrowserVisits[ $Browser ] = wp_statistics_useragent( $Browser, $rangestartdate, $rangeenddate );
 
 
42
  }
43
 
 
 
 
44
  $browser_name = array();
45
  $i = 0;
46
  $browser_value = array();
47
  $browser_color = array();
48
 
49
  foreach ( $BrowserVisits as $key => $value ) {
50
- if ( $value > 10 and $key ) {
51
  $i ++;
52
  $browser_name[] = "'" . $key . "'";
53
  $browser_value[] = $value;
@@ -55,6 +62,13 @@ foreach ( $BrowserVisits as $key => $value ) {
55
  }
56
  }
57
 
 
 
 
 
 
 
 
58
  // Platforms
59
  $Platforms = wp_statistics_platform_list( null, $rangestartdate, $rangeenddate );
60
  if ( ! is_array( $Platforms ) ) {
@@ -93,7 +107,6 @@ foreach ( $PlatformVisits as $key => $value ) {
93
  <span class="toggle-indicator" aria-hidden="true"></span>
94
  </button>
95
  <h2 class="hndle"><span><?php echo $paneltitle; ?></span></h2>
96
-
97
  <div class="inside">
98
  <canvas id="browsers-log" height="200"></canvas>
99
  <script>
37
 
38
  natcasesort( $Browsers );
39
  $BrowserVisits = array();
40
+ $total = 0;
41
  foreach ( $Browsers as $Browser ) {
42
+ //Get List Of count Visitor By Agent
43
  $BrowserVisits[ $Browser ] = wp_statistics_useragent( $Browser, $rangestartdate, $rangeenddate );
44
+ //Sum This agent
45
+ $total += $BrowserVisits[ $Browser ];
46
  }
47
 
48
+ //Add Unknown Agent to total
49
+ $total += $other_agent_count = $wpdb->get_var( 'SELECT COUNT(*) FROM `' . $wpdb->prefix . 'statistics_visitor` WHERE `last_counter` BETWEEN \'' . $rangestartdate . '\' AND \'' . $rangeenddate . '\' AND `agent` NOT IN (\'' . implode( "','", $Browsers ) . '\')' );
50
+
51
  $browser_name = array();
52
  $i = 0;
53
  $browser_value = array();
54
  $browser_color = array();
55
 
56
  foreach ( $BrowserVisits as $key => $value ) {
57
+ if ( $value > 0 ) {
58
  $i ++;
59
  $browser_name[] = "'" . $key . "'";
60
  $browser_value[] = $value;
62
  }
63
  }
64
 
65
+ //Add Unknown Agent
66
+ if ( $other_agent_count > 0 ) {
67
+ $browser_name[] = "'" . __( 'Other', 'wp-statistics' ) . "'";
68
+ $browser_value[] = $other_agent_count;
69
+ $browser_color[] = wp_statistics_generate_rgba_color( 10, '0.4' );
70
+ }
71
+
72
  // Platforms
73
  $Platforms = wp_statistics_platform_list( null, $rangestartdate, $rangeenddate );
74
  if ( ! is_array( $Platforms ) ) {
107
  <span class="toggle-indicator" aria-hidden="true"></span>
108
  </button>
109
  <h2 class="hndle"><span><?php echo $paneltitle; ?></span></h2>
 
110
  <div class="inside">
111
  <canvas id="browsers-log" height="200"></canvas>
112
  <script>
includes/log/last-search.php CHANGED
@@ -166,16 +166,7 @@ $total = $search_result[ $referred ];
166
  echo $words;
167
  echo "</td>";
168
  echo "<td style=\"text-align: left\">";
169
- if ( array_search(
170
- strtolower( $items->agent ),
171
- array(
172
- "chrome",
173
- "firefox",
174
- "msie",
175
- "opera",
176
- "safari",
177
- )
178
- ) !== false
179
  ) {
180
  $agent = "<img src='" .
181
  plugins_url( 'wp-statistics/assets/images/' ) .
166
  echo $words;
167
  echo "</td>";
168
  echo "<td style=\"text-align: left\">";
169
+ if ( array_search( strtolower( $items->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false
 
 
 
 
 
 
 
 
 
170
  ) {
171
  $agent = "<img src='" .
172
  plugins_url( 'wp-statistics/assets/images/' ) .
includes/log/last-visitor.php CHANGED
@@ -66,18 +66,7 @@ if ( $_get != '%' ) {
66
  if ( $i == $Total ) {
67
  $spacer = "";
68
  }
69
- echo $spacer .
70
- "<li><a " .
71
- $current .
72
- "href='?page=" .
73
- WP_Statistics::$page['visitors'] .
74
- "&agent=" .
75
- $Browser .
76
- "'> " .
77
- __( $Browser, 'wp-statistics' ) .
78
- " <span class='count'>(" .
79
- number_format_i18n( wp_statistics_useragent( $Browser ) ) .
80
- ")</span></a></li>";
81
  }
82
  } else {
83
  if ( $_get != '%' ) {
@@ -85,10 +74,7 @@ if ( $_get != '%' ) {
85
  } else {
86
  $current = "";
87
  }
88
- echo $spacer .
89
- "<li><a {$current} href='?page=" .
90
- WP_Statistics::$page['visitors'] .
91
- "&{$_var}={$_get}'>{$title} <span class='count'>({$total})</span></a></li>";
92
  }
93
  }
94
  ?>
@@ -102,10 +88,7 @@ if ( $_get != '%' ) {
102
  $paneltitle = $paneltitle . ' [' . __( 'Filtered by', 'wp-statistics' ) . ': ' . $title . ']';
103
  } ?>
104
  <button class="handlediv" type="button" aria-expanded="true">
105
- <span class="screen-reader-text"><?php printf(
106
- __( 'Toggle panel: %s', 'wp-statistics' ),
107
- $paneltitle
108
- ); ?></span>
109
  <span class="toggle-indicator" aria-hidden="true"></span>
110
  </button>
111
  <h2 class="hndle"><span><?php echo $paneltitle; ?></span></h2>
@@ -171,27 +154,13 @@ if ( $_get != '%' ) {
171
  foreach ( $result as $items ) {
172
  echo "<tr>";
173
  echo "<td style=\"text-align: left\">";
174
- if ( array_search(
175
- strtolower( $items->agent ),
176
- array(
177
- "chrome",
178
- "firefox",
179
- "msie",
180
- "opera",
181
- "safari",
182
- )
183
- ) !== false
184
  ) {
185
- $agent = "<img src='" .
186
- plugins_url( 'wp-statistics/assets/images/' ) .
187
- $items->agent .
188
- ".png' class='log-tools' title='{$items->agent}'/>";
189
  } else {
190
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
191
  }
192
- echo "<a href='?page=" .
193
- WP_Statistics::$page['overview'] .
194
- "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
195
  echo "</td>";
196
  $city = '';
197
  if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
@@ -211,9 +180,7 @@ if ( $_get != '%' ) {
211
 
212
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
213
  echo "<td style=\"text-align: left\">";
214
- echo "<img src='" .
215
- plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
216
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
217
  echo "</td>";
218
  }
219
 
@@ -224,16 +191,14 @@ if ( $_get != '%' ) {
224
  }
225
 
226
  echo "<td style=\"text-align: left\">";
227
- echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
228
  echo "</td>";
229
 
230
  echo "<td style=\"text-align: left\">";
231
  if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
232
  $ip_string = __( '#hash#', 'wp-statistics' );
233
  } else {
234
- $ip_string = "<a href='admin.php?page=" .
235
- WP_Statistics::$page['visitors'] .
236
- "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
237
  }
238
  echo $ip_string;
239
  echo "</td>";
66
  if ( $i == $Total ) {
67
  $spacer = "";
68
  }
69
+ echo $spacer . "<li><a " . $current . "href='?page=" . WP_Statistics::$page['visitors'] . "&agent=" . $Browser . "'> " . __( $Browser, 'wp-statistics' ) . " <span class='count'>(" . number_format_i18n( wp_statistics_useragent( $Browser ) ) . ")</span></a></li>";
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
  } else {
72
  if ( $_get != '%' ) {
74
  } else {
75
  $current = "";
76
  }
77
+ echo $spacer . "<li><a {$current} href='?page=" . WP_Statistics::$page['visitors'] . "&{$_var}={$_get}'>{$title} <span class='count'>({$total})</span></a></li>";
 
 
 
78
  }
79
  }
80
  ?>
88
  $paneltitle = $paneltitle . ' [' . __( 'Filtered by', 'wp-statistics' ) . ': ' . $title . ']';
89
  } ?>
90
  <button class="handlediv" type="button" aria-expanded="true">
91
+ <span class="screen-reader-text"><?php printf( __( 'Toggle panel: %s', 'wp-statistics' ), $paneltitle ); ?></span>
 
 
 
92
  <span class="toggle-indicator" aria-hidden="true"></span>
93
  </button>
94
  <h2 class="hndle"><span><?php echo $paneltitle; ?></span></h2>
154
  foreach ( $result as $items ) {
155
  echo "<tr>";
156
  echo "<td style=\"text-align: left\">";
157
+ if ( array_search( strtolower( $items->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false
 
 
 
 
 
 
 
 
 
158
  ) {
159
+ $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $items->agent . ".png' class='log-tools' title='{$items->agent}'/>";
 
 
 
160
  } else {
161
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
162
  }
163
+ echo "<a href='?page=" . WP_Statistics::$page['overview'] . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
 
 
164
  echo "</td>";
165
  $city = '';
166
  if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
180
 
181
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
182
  echo "<td style=\"text-align: left\">";
183
+ echo "<img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) . "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
 
 
184
  echo "</td>";
185
  }
186
 
191
  }
192
 
193
  echo "<td style=\"text-align: left\">";
194
+ echo date_i18n( get_option( 'date_format' ), strtotime( $items->last_counter ) );
195
  echo "</td>";
196
 
197
  echo "<td style=\"text-align: left\">";
198
  if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
199
  $ip_string = __( '#hash#', 'wp-statistics' );
200
  } else {
201
+ $ip_string = "<a href='admin.php?page=" . WP_Statistics::$page['visitors'] . "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
 
 
202
  }
203
  echo $ip_string;
204
  echo "</td>";
includes/log/online.php CHANGED
@@ -8,7 +8,7 @@
8
  ?>
9
  <div class="wrap">
10
  <h2><?php _e( 'Online Users', 'wp-statistics' ); ?></h2>
11
- <?php do_action( 'wp_statistics_after_title' ); ?>
12
 
13
  <div class="postbox-container" id="last-log">
14
  <div class="metabox-holder">
@@ -84,35 +84,16 @@
84
  echo $map_string;
85
 
86
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
87
- echo "<img src='" .
88
- plugins_url(
89
- 'wp-statistics/assets/images/flags/' . $items->location . '.png'
90
- ) .
91
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
92
  }
93
 
94
- if ( array_search(
95
- strtolower( $items->agent ),
96
- array(
97
- "chrome",
98
- "firefox",
99
- "msie",
100
- "opera",
101
- "safari",
102
- )
103
- ) !== false
104
- ) {
105
- $agent = "<img src='" .
106
- plugins_url( 'wp-statistics/assets/images/' ) .
107
- $items->agent .
108
- ".png' class='log-tools' title='{$items->agent}'/>";
109
  } else {
110
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
111
  }
112
 
113
- echo "<a href='?page=" .
114
- WP_Statistics::$page['overview'] .
115
- "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a> {$items->ip}";
116
  echo "<br>";
117
 
118
  $timediff = ( $items->timestamp - $items->created );
8
  ?>
9
  <div class="wrap">
10
  <h2><?php _e( 'Online Users', 'wp-statistics' ); ?></h2>
11
+ <?php do_action( 'wp_statistics_after_title' ); ?>
12
 
13
  <div class="postbox-container" id="last-log">
14
  <div class="metabox-holder">
84
  echo $map_string;
85
 
86
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
87
+ echo "<img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) . "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
 
 
 
 
88
  }
89
 
90
+ if ( array_search( strtolower( $items->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false ) {
91
+ $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $items->agent . ".png' class='log-tools' title='{$items->agent}'/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  } else {
93
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
94
  }
95
 
96
+ echo "<a href='?page=" . WP_Statistics::$page['overview'] . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a> {$items->ip}";
 
 
97
  echo "<br>";
98
 
99
  $timediff = ( $items->timestamp - $items->created );
includes/log/top-referring.php CHANGED
@@ -104,13 +104,11 @@ if ( $referr ) {
104
  'All',
105
  'wp-statistics'
106
  ); ?></a>
107
- </li>
108
- |
109
  <li>
110
- <a class="current"
111
- href="?page=<?php echo WP_Statistics::$page['referrers']; ?>&referr=<?php echo $WP_Statistics->html_sanitize_referrer(
112
- $referr
113
- ) . $date_args; ?>"> <?php echo htmlentities( $title, ENT_QUOTES ); ?>
114
  <span class="count">(<?php echo $total; ?>)</span></a></li>
115
  <?php } else { ?>
116
  <li class="all"><a <?php if ( ! $referr ) {
@@ -195,32 +193,15 @@ if ( $referr ) {
195
  date( get_option( 'date_format' ), strtotime( $item->last_counter ) ) .
196
  " - <a href='http://www.geoiptool.com/en/?IP={$item->ip}' target='_blank'>{$item->ip}</a></div>";
197
  echo "<div class='clear'></div>";
198
- echo "<a class='show-map' title='" .
199
- __( 'Map', 'wp-statistics' ) .
200
- "'><div class='dashicons dashicons-location-alt'></div></a>";
201
 
202
- if ( array_search(
203
- strtolower( $item->agent ),
204
- array(
205
- 'chrome',
206
- 'firefox',
207
- 'msie',
208
- 'opera',
209
- 'safari',
210
- )
211
- ) !== false
212
- ) {
213
- $agent = "<img src='" .
214
- plugins_url( 'wp-statistics/assets/images/' ) .
215
- $item->agent .
216
- ".png' class='log-tools' title='{$item->agent}'/>";
217
  } else {
218
  $agent = "<div class='dashicons dashicons-editor-help'></div>";
219
  }
220
 
221
- echo "<div class='log-agent'><a href='?page=" .
222
- WP_Statistics::$page['overview'] .
223
- "&type=last-all-visitor&agent={$item->agent}'>{$agent}</a>";
224
  echo $WP_Statistics->get_referrer_link( $item->referred, 100 ) . '</div>';
225
  echo "</div>";
226
  }
104
  'All',
105
  'wp-statistics'
106
  ); ?></a>
107
+ </li>|
 
108
  <li>
109
+ <a class="current" href="?page=<?php echo WP_Statistics::$page['referrers']; ?>&referr=<?php echo $WP_Statistics->html_sanitize_referrer(
110
+ $referr
111
+ ) . $date_args; ?>"> <?php echo htmlentities( $title, ENT_QUOTES ); ?>
 
112
  <span class="count">(<?php echo $total; ?>)</span></a></li>
113
  <?php } else { ?>
114
  <li class="all"><a <?php if ( ! $referr ) {
193
  date( get_option( 'date_format' ), strtotime( $item->last_counter ) ) .
194
  " - <a href='http://www.geoiptool.com/en/?IP={$item->ip}' target='_blank'>{$item->ip}</a></div>";
195
  echo "<div class='clear'></div>";
196
+ echo "<a class='show-map' title='" . __( 'Map', 'wp-statistics' ) . "'><div class='dashicons dashicons-location-alt'></div></a>";
 
 
197
 
198
+ if ( array_search( strtolower( $item->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false ) {
199
+ $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $item->agent . ".png' class='log-tools' title='{$item->agent}'/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  } else {
201
  $agent = "<div class='dashicons dashicons-editor-help'></div>";
202
  }
203
 
204
+ echo "<div class='log-agent'><a href='?page=" . WP_Statistics::$page['overview'] . "&type=last-all-visitor&agent={$item->agent}'>{$agent}</a>";
 
 
205
  echo $WP_Statistics->get_referrer_link( $item->referred, 100 ) . '</div>';
206
  echo "</div>";
207
  }
includes/log/top-visitors.php CHANGED
@@ -32,14 +32,7 @@ include( WP_Statistics::$reg['plugin-dir'] . 'includes/log/widgets/top.visitors.
32
  echo ' ' . __( 'Date', 'wp-statistics' ) . ': ';
33
 
34
  echo '<input type="hidden" name="page" value="' . WP_Statistics::$page['top-visitors'] . '">' . "\r\n";
35
- echo '<input type="text" size="10" name="statsdate" id="statsdate" value="' .
36
- htmlentities( $statsdate, ENT_QUOTES ) .
37
- '" placeholder="' .
38
- __( wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")), 'wp-statistics' ) .
39
- '"> <input type="submit" value="' .
40
- __( 'Go', 'wp-statistics' ) .
41
- '" class="button-primary">' .
42
- "\r\n";
43
 
44
  echo '</form>' . "\r\n";
45
 
32
  echo ' ' . __( 'Date', 'wp-statistics' ) . ': ';
33
 
34
  echo '<input type="hidden" name="page" value="' . WP_Statistics::$page['top-visitors'] . '">' . "\r\n";
35
+ echo '<input type="text" size="10" name="statsdate" id="statsdate" value="' . htmlentities( $statsdate, ENT_QUOTES ) . '" placeholder="' . __( wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")), 'wp-statistics' ) . '"> <input type="submit" value="' . __( 'Go', 'wp-statistics' ) . '" class="button-primary">' . "\r\n";
 
 
 
 
 
 
 
36
 
37
  echo '</form>' . "\r\n";
38
 
includes/log/widgets/about.php CHANGED
@@ -8,11 +8,11 @@ function wp_statistics_generate_about_postbox_content() {
8
 
9
  <div id="about-links" style="text-align: center;">
10
  <p><a href="https://wp-statistics.com" target="_blank"><?php _e( 'Website', 'wp-statistics' ); ?></a></p>
11
- | <p><a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><?php _e( 'Rate and Review', 'wp-statistics' ); ?></a></p>
12
  <?php
13
  if ( current_user_can( wp_statistics_validate_capability( $WP_Statistics->get_option( 'manage_capability', 'manage_options' ) ) ) ) {
14
  ?>
15
- | <p><a href="?page=<?php echo WP_Statistics::$page['settings']; ?>&tab=about"><?php _e( 'More Information', 'wp-statistics' ); ?></a></p>
16
  | <p><a href="admin.php?page=wps_welcome"><?php _e( 'What’s New', 'wp-statistics' ); ?>?</a></p>
17
  <?php
18
  }
8
 
9
  <div id="about-links" style="text-align: center;">
10
  <p><a href="https://wp-statistics.com" target="_blank"><?php _e( 'Website', 'wp-statistics' ); ?></a></p>
11
+ | <p><a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><?php _e( 'Rate & Review', 'wp-statistics' ); ?></a></p>
12
  <?php
13
  if ( current_user_can( wp_statistics_validate_capability( $WP_Statistics->get_option( 'manage_capability', 'manage_options' ) ) ) ) {
14
  ?>
15
+ | <p><a href="?page=<?php echo WP_Statistics::$page['settings']; ?>&tab=about"><?php _e( 'More Info', 'wp-statistics' ); ?></a></p>
16
  | <p><a href="admin.php?page=wps_welcome"><?php _e( 'What’s New', 'wp-statistics' ); ?>?</a></p>
17
  <?php
18
  }
includes/log/widgets/browsers.php CHANGED
@@ -11,10 +11,16 @@ function wp_statistics_generate_browsers_postbox_content() {
11
  $topten_browser_value = array();
12
 
13
  foreach ( $Browsers as $Browser ) {
 
14
  $BrowserVisits[ $Browser ] = wp_statistics_useragent( $Browser );
15
- $total += $BrowserVisits[ $Browser ];
 
16
  }
17
 
 
 
 
 
18
  arsort( $BrowserVisits );
19
 
20
  foreach ( $BrowserVisits as $key => $value ) {
@@ -29,7 +35,7 @@ function wp_statistics_generate_browsers_postbox_content() {
29
  $topten_browser_color[] = wp_statistics_generate_rgba_color( $count, '0.4' );
30
  }
31
 
32
- if ( $topten_browser_name and $topten_browser_value ) {
33
  $topten_browser_name[] = "'" . __( 'Other', 'wp-statistics' ) . "'";
34
  $topten_browser_value[] = ( $total - $topten );
35
  $topten_browser_color[] = wp_statistics_generate_rgba_color( 10, '0.4' );
11
  $topten_browser_value = array();
12
 
13
  foreach ( $Browsers as $Browser ) {
14
+ //Get List Of count Visitor By Agent
15
  $BrowserVisits[ $Browser ] = wp_statistics_useragent( $Browser );
16
+ //Sum This agent
17
+ $total += $BrowserVisits[ $Browser ];
18
  }
19
 
20
+ //Add Unknown Agent to total
21
+ $total += $other_agent_count = $wpdb->get_var( 'SELECT COUNT(*) FROM `' . $wpdb->prefix . 'statistics_visitor` WHERE `agent` NOT IN (\'' . implode( "','", $Browsers ) . '\')' );
22
+
23
+ //Sort Browser List By Visitor ASC
24
  arsort( $BrowserVisits );
25
 
26
  foreach ( $BrowserVisits as $key => $value ) {
35
  $topten_browser_color[] = wp_statistics_generate_rgba_color( $count, '0.4' );
36
  }
37
 
38
+ if ( $topten_browser_name and $topten_browser_value and $other_agent_count > 0 ) {
39
  $topten_browser_name[] = "'" . __( 'Other', 'wp-statistics' ) . "'";
40
  $topten_browser_value[] = ( $total - $topten );
41
  $topten_browser_color[] = wp_statistics_generate_rgba_color( 10, '0.4' );
includes/log/widgets/jqv.map.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- function wp_statistics_generate_map_postbox_content($ISOCountryCode ) {
3
 
4
  global $wpdb, $WP_Statistics;
5
 
@@ -21,10 +21,10 @@ function wp_statistics_generate_map_postbox_content($ISOCountryCode ) {
21
  $final_result['000'] = array();
22
 
23
  //Load City Geoip
24
- $geoip_reader = false;
25
- if( $WP_Statistics->get_option( 'geoip_city' ) ) {
26
- $geoip_reader = $WP_Statistics::geoip_loader('city');
27
- }
28
 
29
  if ( $result ) {
30
  foreach ( $result as $new_r ) {
@@ -56,14 +56,7 @@ function wp_statistics_generate_map_postbox_content($ISOCountryCode ) {
56
 
57
  $flag = "<img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . strtoupper( $markets['location'] ) . '.png' ) . "' title='{$ISOCountryCode[strtoupper($markets['location'])]}' class='log-tools'/> {$ISOCountryCode[strtoupper($markets['location'])]}";
58
 
59
- if ( array_search( strtolower( $markets['agent'] ), array(
60
- "chrome",
61
- "firefox",
62
- "msie",
63
- "opera",
64
- "safari",
65
- ) ) !== false
66
- ) {
67
  $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $markets['agent'] . ".png' class='log-tools' title='{$markets['agent']}'/>";
68
  } else {
69
  $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/unknown.png' ) . "' class='log-tools' title='{$markets['agent']}'/>";
@@ -73,16 +66,18 @@ function wp_statistics_generate_map_postbox_content($ISOCountryCode ) {
73
  $markets['ip'] = __( '#hash#', 'wp-statistics' );
74
  }
75
 
76
- $city = '';
77
- if($geoip_reader !=false) {
78
- try {
79
- $reader = $geoip_reader->city($markets['ip']);
80
- $city = $reader->city->name;
81
- } catch ( Exception $e ) {
82
- $city = __( 'Unknown' , 'wp-statistics' );
83
- }
84
- }
85
- if($city !="") $city = ' - '.$city;
 
 
86
 
87
  $get_ipp[ $markets['location'] ][] = "<p>{$agent} {$markets['ip']} {$city}</p>";
88
  }
1
  <?php
2
+ function wp_statistics_generate_map_postbox_content( $ISOCountryCode ) {
3
 
4
  global $wpdb, $WP_Statistics;
5
 
21
  $final_result['000'] = array();
22
 
23
  //Load City Geoip
24
+ $geoip_reader = false;
25
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
26
+ $geoip_reader = $WP_Statistics::geoip_loader( 'city' );
27
+ }
28
 
29
  if ( $result ) {
30
  foreach ( $result as $new_r ) {
56
 
57
  $flag = "<img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . strtoupper( $markets['location'] ) . '.png' ) . "' title='{$ISOCountryCode[strtoupper($markets['location'])]}' class='log-tools'/> {$ISOCountryCode[strtoupper($markets['location'])]}";
58
 
59
+ if ( array_search( strtolower( $markets['agent'] ), wp_statistics_get_browser_list( 'key' ) ) !== false ) {
 
 
 
 
 
 
 
60
  $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $markets['agent'] . ".png' class='log-tools' title='{$markets['agent']}'/>";
61
  } else {
62
  $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/unknown.png' ) . "' class='log-tools' title='{$markets['agent']}'/>";
66
  $markets['ip'] = __( '#hash#', 'wp-statistics' );
67
  }
68
 
69
+ $city = '';
70
+ if ( $geoip_reader != false ) {
71
+ try {
72
+ $reader = $geoip_reader->city( $markets['ip'] );
73
+ $city = $reader->city->name;
74
+ } catch ( Exception $e ) {
75
+ $city = __( 'Unknown', 'wp-statistics' );
76
+ }
77
+ }
78
+ if ( $city != "" ) {
79
+ $city = ' - ' . $city;
80
+ }
81
 
82
  $get_ipp[ $markets['location'] ][] = "<p>{$agent} {$markets['ip']} {$city}</p>";
83
  }
includes/log/widgets/recent.php CHANGED
@@ -30,27 +30,12 @@ function wp_statistics_generate_recent_postbox_content( $ISOCountryCode, $count
30
  foreach ( $result as $items ) {
31
  echo "<tr>";
32
  echo "<td style=\"text-align: left\">";
33
- if ( array_search(
34
- strtolower( $items->agent ),
35
- array(
36
- "chrome",
37
- "firefox",
38
- "msie",
39
- "opera",
40
- "safari",
41
- )
42
- ) !== false
43
- ) {
44
- $agent = "<img src='" .
45
- plugins_url( 'wp-statistics/assets/images/' ) .
46
- $items->agent .
47
- ".png' class='log-tools' title='{$items->agent}'/>";
48
  } else {
49
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
50
  }
51
- echo "<a href='?page=" .
52
- WP_Statistics::$page['overview'] .
53
- "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
54
  echo "</td>";
55
  $city = '';
56
  if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
@@ -70,9 +55,7 @@ function wp_statistics_generate_recent_postbox_content( $ISOCountryCode, $count
70
 
71
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
72
  echo "<td style=\"text-align: left\">";
73
- echo "<img src='" .
74
- plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
75
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
76
  echo "</td>";
77
  }
78
 
@@ -83,16 +66,14 @@ function wp_statistics_generate_recent_postbox_content( $ISOCountryCode, $count
83
  }
84
 
85
  echo "<td style=\"text-align: left\">";
86
- echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
87
  echo "</td>";
88
 
89
  echo "<td style=\"text-align: left\">";
90
  if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
91
  $ip_string = __( '#hash#', 'wp-statistics' );
92
  } else {
93
- $ip_string = "<a href='admin.php?page=" .
94
- WP_Statistics::$page['visitors'] .
95
- "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
96
  }
97
  echo $ip_string;
98
  echo "</td>";
30
  foreach ( $result as $items ) {
31
  echo "<tr>";
32
  echo "<td style=\"text-align: left\">";
33
+ if ( array_search( strtolower( $items->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false ) {
34
+ $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $items->agent . ".png' class='log-tools' title='{$items->agent}'/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  } else {
36
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
37
  }
38
+ echo "<a href='?page=" . WP_Statistics::$page['overview'] . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
 
 
39
  echo "</td>";
40
  $city = '';
41
  if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
55
 
56
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
57
  echo "<td style=\"text-align: left\">";
58
+ echo "<img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) . "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
 
 
59
  echo "</td>";
60
  }
61
 
66
  }
67
 
68
  echo "<td style=\"text-align: left\">";
69
+ echo date_i18n( get_option( 'date_format' ), strtotime( $items->last_counter ) );
70
  echo "</td>";
71
 
72
  echo "<td style=\"text-align: left\">";
73
  if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
74
  $ip_string = __( '#hash#', 'wp-statistics' );
75
  } else {
76
+ $ip_string = "<a href='admin.php?page=" . WP_Statistics::$page['visitors'] . "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
 
 
77
  }
78
  echo $ip_string;
79
  echo "</td>";
includes/log/widgets/top.visitors.php CHANGED
@@ -66,9 +66,7 @@ function wp_statistics_generate_top_visitors_postbox_content(
66
  echo "<tr>";
67
  echo "<td>$i</td>";
68
  echo "<td>" . (int) $visitor->hits . "</td>";
69
- echo "<td><img src='" .
70
- plugins_url( 'wp-statistics/assets/images/flags/' . $item . '.png' ) .
71
- "' title='{$ISOCountryCode[$item]}'/></td>";
72
  echo "<td>{$ISOCountryCode[$item]}</td>";
73
  if ( $geoip_reader != false ) {
74
  echo "<td>{$city}</td>";
66
  echo "<tr>";
67
  echo "<td>$i</td>";
68
  echo "<td>" . (int) $visitor->hits . "</td>";
69
+ echo "<td><img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . $item . '.png' ) . "' title='{$ISOCountryCode[$item]}'/></td>";
 
 
70
  echo "<td>{$ISOCountryCode[$item]}</td>";
71
  if ( $geoip_reader != false ) {
72
  echo "<td>{$city}</td>";
includes/log/widgets/words.php CHANGED
@@ -64,21 +64,8 @@ function wp_statistics_generate_words_postbox_content( $ISOCountryCode, $count =
64
  echo $words;
65
  echo "</td>";
66
  echo "<td style=\"text-align: left\">";
67
- if ( array_search(
68
- strtolower( $items->agent ),
69
- array(
70
- "chrome",
71
- "firefox",
72
- "msie",
73
- "opera",
74
- "safari",
75
- )
76
- ) !== false
77
- ) {
78
- $agent = "<img src='" .
79
- plugins_url( 'wp-statistics/assets/images/' ) .
80
- $items->agent .
81
- ".png' class='log-tools' title='{$items->agent}'/>";
82
  } else {
83
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
84
  }
@@ -104,9 +91,7 @@ function wp_statistics_generate_words_postbox_content( $ISOCountryCode, $count =
104
 
105
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
106
  echo "<td style=\"text-align: left\">";
107
- echo "<img src='" .
108
- plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
109
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
110
  echo "</td>";
111
  }
112
 
@@ -117,16 +102,14 @@ function wp_statistics_generate_words_postbox_content( $ISOCountryCode, $count =
117
  }
118
 
119
  echo "<td style=\"text-align: left\">";
120
- echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
121
  echo "</td>";
122
 
123
  echo "<td style=\"text-align: left\">";
124
  if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
125
  $ip_string = __( '#hash#', 'wp-statistics' );
126
  } else {
127
- $ip_string = "<a href='admin.php?page=" .
128
- WP_Statistics::$page['visitors'] .
129
- "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
130
  }
131
  echo $ip_string;
132
  echo "</td>";
64
  echo $words;
65
  echo "</td>";
66
  echo "<td style=\"text-align: left\">";
67
+ if ( array_search( strtolower( $items->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false ) {
68
+ $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $items->agent . ".png' class='log-tools' title='{$items->agent}'/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  } else {
70
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
71
  }
91
 
92
  if ( $WP_Statistics->get_option( 'geoip' ) ) {
93
  echo "<td style=\"text-align: left\">";
94
+ echo "<img src='" . plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) . "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
 
 
95
  echo "</td>";
96
  }
97
 
102
  }
103
 
104
  echo "<td style=\"text-align: left\">";
105
+ echo date_i18n( get_option( 'date_format' ), strtotime( $items->last_counter ) );
106
  echo "</td>";
107
 
108
  echo "<td style=\"text-align: left\">";
109
  if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
110
  $ip_string = __( '#hash#', 'wp-statistics' );
111
  } else {
112
+ $ip_string = "<a href='admin.php?page=" . WP_Statistics::$page['visitors'] . "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
 
 
113
  }
114
  echo $ip_string;
115
  echo "</td>";
includes/optimization/wps-optimization.php CHANGED
@@ -38,9 +38,7 @@ if ( array_key_exists( 'hash-ips', $_GET ) ) {
38
  }
39
  }
40
 
41
- echo "<div class='updated settings-error'><p><strong>" .
42
- __( 'IP Addresses replaced with hash values.', 'wp-statistics' ) .
43
- "</strong></p></div>";
44
  }
45
  }
46
 
@@ -48,9 +46,7 @@ if ( array_key_exists( 'install', $_GET ) ) {
48
  if ( intval( $_GET['install'] ) == 1 ) {
49
  $WPS_Installed = "1.0";
50
  new WP_Statistics_Install( $WP_Statistics );
51
- echo "<div class='updated settings-error'><p><strong>" .
52
- __( 'Install routine complete.', 'wp-statistics' ) .
53
- "</strong></p></div>";
54
  }
55
  }
56
 
@@ -76,23 +72,18 @@ if ( array_key_exists( 'index', $_GET ) ) {
76
  $deleterows[] .= $row->ID;
77
  }
78
 
79
- // Update the lastrow data.
80
  $lastrow['last_counter'] = $row->last_counter;
81
  $lastrow['ip'] = $row->ip;
82
  }
83
 
84
- // Now do the acutal deletions.
85
  foreach ( $deleterows as $row ) {
86
  $wpdb->delete( $wp_prefix . 'statistics_visitor', array( 'ID' => $row ) );
87
  }
88
 
89
  // The table should be ready to be updated now with the new index, so let's do it.
90
- $result = $wpdb->get_results(
91
- "ALTER TABLE " .
92
- $wp_prefix .
93
- 'statistics_visitor' .
94
- " ADD UNIQUE `date_ip_agent` ( `last_counter`, `ip`, `agent` (75), `platform` (75), `version` (75) )"
95
- );
96
 
97
  // We might have an old index left over from 7.1-7.3 so lets make sure to delete it.
98
  $wpdb->query( "DROP INDEX `date_ip` ON {$wp_prefix}statistics_visitor" );
38
  }
39
  }
40
 
41
+ echo "<div class='updated settings-error'><p><strong>" . __( 'IP Addresses replaced with hash values.', 'wp-statistics' ) . "</strong></p></div>";
 
 
42
  }
43
  }
44
 
46
  if ( intval( $_GET['install'] ) == 1 ) {
47
  $WPS_Installed = "1.0";
48
  new WP_Statistics_Install( $WP_Statistics );
49
+ echo "<div class='updated settings-error'><p><strong>" . __( 'Install routine complete.', 'wp-statistics' ) . "</strong></p></div>";
 
 
50
  }
51
  }
52
 
72
  $deleterows[] .= $row->ID;
73
  }
74
 
75
+ // Update the last row data.
76
  $lastrow['last_counter'] = $row->last_counter;
77
  $lastrow['ip'] = $row->ip;
78
  }
79
 
80
+ // Now do the actual deletions.
81
  foreach ( $deleterows as $row ) {
82
  $wpdb->delete( $wp_prefix . 'statistics_visitor', array( 'ID' => $row ) );
83
  }
84
 
85
  // The table should be ready to be updated now with the new index, so let's do it.
86
+ $result = $wpdb->get_results( "ALTER TABLE " . $wp_prefix . 'statistics_visitor' . " ADD UNIQUE `date_ip_agent` ( `last_counter`, `ip`, `agent` (75), `platform` (75), `version` (75) )" );
 
 
 
 
 
87
 
88
  // We might have an old index left over from 7.1-7.3 so lets make sure to delete it.
89
  $wpdb->query( "DROP INDEX `date_ip` ON {$wp_prefix}statistics_visitor" );
includes/settings/tabs/wps-general.php CHANGED
@@ -327,6 +327,7 @@ if ( $wps_nonce_valid ) {
327
 
328
  <p class="description"><?php _e( 'If you use WordPress Cache Plugins, enable this option.', 'wp-statistics' ); ?></p>
329
  <p class="description"><?php echo sprintf( __( 'To register WP-Statistics REST API endpoint ( %s ) , go to the <a href="%s">Permalink page</a> and update the permalink with press Save Changes.', 'wp-statistics' ), WP_Statistics_Rest::route ,admin_url( 'options-permalink.php' ) ); ?></p>
 
330
  </td>
331
  </tr>
332
 
327
 
328
  <p class="description"><?php _e( 'If you use WordPress Cache Plugins, enable this option.', 'wp-statistics' ); ?></p>
329
  <p class="description"><?php echo sprintf( __( 'To register WP-Statistics REST API endpoint ( %s ) , go to the <a href="%s">Permalink page</a> and update the permalink with press Save Changes.', 'wp-statistics' ), WP_Statistics_Rest::route ,admin_url( 'options-permalink.php' ) ); ?></p>
330
+ <p class="description"><?php echo __( 'Don\'t forget to clear your enabled plugin cache.', 'wp-statistics' ); ?></p>
331
  </td>
332
  </tr>
333
 
includes/templates/welcome.php CHANGED
@@ -3,15 +3,7 @@
3
  <h1><?php printf( __( 'Welcome to WP-Statistics&nbsp;%s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></h1>
4
 
5
  <p class="about-text">
6
- <?php printf(
7
- __(
8
- 'Thank you for updating to the latest version! We encourage you to submit a %srating and review%s over at WordPress.org. Your feedback is greatly appreciated!',
9
- 'wp-statistics'
10
- ),
11
- '<a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank">',
12
- '</a>'
13
- ); ?>
14
-
15
  <?php _e( 'Submit your rating:', 'wp-statistics' ); ?>
16
  <a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/stars.png' ); ?>"/></a>
17
  </p>
@@ -19,85 +11,112 @@
19
  <div class="wp-badge"><?php printf( __( 'Version %s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></div>
20
 
21
  <h2 class="nav-tab-wrapper wp-clearfix">
22
- <a href="#" class="nav-tab nav-tab-active"
23
- data-tab="whats-news"><?php _e( 'What&#8217;s New', 'wp-statistics' ); ?></a>
24
  <a href="#" class="nav-tab" data-tab="credit"><?php _e( 'Credits', 'wp-statistics' ); ?></a>
25
  <a href="#" class="nav-tab" data-tab="changelog"><?php _e( 'Changelog', 'wp-statistics' ); ?></a>
26
  </h2>
27
 
28
  <div data-content="whats-news" class="tab-content current">
29
- <section class="normal-section">
30
- <div class="right">
31
  <div class="content-padding">
32
- <h2><?php _e( 'Showing the cities of your website visitors', 'wp-statistics' ); ?></h2>
33
- <h4><?php _e( 'Enable this feature to know the cities of the people who visit your website.', 'wp-statistics' ); ?></h4>
34
  </div>
35
  </div>
36
-
37
- <div class="left text-center">
38
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/country.png' ); ?>"/>
39
- </div>
40
  </section>
41
 
42
  <section class="normal-section">
43
  <div class="left">
44
  <div class="content-padding">
45
- <h2><?php _e( 'The plugin’s Short Codes in the editor', 'wp-statistics' ); ?></h2>
46
- <h4><?php _e( 'All the plugin’s shortcodes are readily available.', 'wp-statistics' ); ?></h4>
 
 
 
 
 
 
 
 
47
  </div>
48
  </div>
49
 
50
  <div class="right text-center">
51
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/shortcode.png' ); ?>"/>
52
  </div>
53
  </section>
54
 
55
  <section class="normal-section">
56
  <div class="right">
57
  <div class="content-padding">
58
- <h2><?php _e( 'Support Cache, Updated!', 'wp-statistics' ); ?></h2>
59
- <h4><?php _e( 'If your WordPress cache is enabled, you should enable the cache in the plugin\'s setting, too.', 'wp-statistics' ); ?></h4>
 
 
 
 
 
 
 
60
  </div>
61
  </div>
62
 
63
  <div class="left text-center">
64
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/cache.png' ); ?>"/>
65
  </div>
66
  </section>
67
 
68
  <section class="normal-section">
69
  <div class="left">
70
  <div class="content-padding">
71
- <h2><?php _e( 'Improved recognition of crawlers', 'wp-statistics' ); ?></h2>
72
- <h4><?php _e( 'To better recognize crawlers, we used WhichBrowser to make your website’s statistics more accurate.', 'wp-statistics' ); ?></h4>
 
 
 
 
73
  </div>
74
  </div>
75
 
76
  <div class="right text-center">
77
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/whichbrowser.png' ); ?>"/>
78
  </div>
79
  </section>
80
 
81
  <section class="normal-section">
82
  <div class="right">
83
  <div class="content-padding">
84
- <h2><?php _e( 'Add-Ons!', 'wp-statistics' ); ?></h2>
85
- <h4><?php _e( 'These extensions add more functionality to your WP-Statistics Plugin.', 'wp-statistics' ); ?></h4>
 
 
 
 
86
  </div>
87
  </div>
88
 
89
- <div class="right text-center addons-item">
90
- <a href="https://wp-statistics.com/downloads/wp-statistics-widgets/" title="Widgets" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-widgets.png' ); ?>"/></a>
91
- <a href="https://wp-statistics.com/downloads/wp-statistics-mini-chart/" title="Mini Chart" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-mini-chart.png' ); ?>"/></a>
92
- <a href="https://wp-statistics.com/downloads/wp-statistics-advanced-reporting/" title="Advanced Reporting" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-advanced-reporting.png' ); ?>"/></a>
93
- <a href="https://wp-statistics.com/downloads/wp-statistics-realtime-stats/" title="Realtime stats" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-realtime-stats.png' ); ?>"/></a>
 
 
 
 
 
 
 
 
 
 
 
94
  </div>
95
  </section>
96
 
97
  <section class="center-section logo">
98
  <a href="https://veronalabs.com" target="_blank" title="WordPress Solutions and Services"><img src="http://bit.ly/2FsmZlq"/></a>
99
  <p><?php echo __( 'WP-Statistics is one of the VeronaLabs.com projects.', 'wp-statistics' ); ?></p>
100
- <h4><?php echo sprintf( __( 'To help us, you can make <a href="%s" target="_blank">donate</a> or <a href="%s" target="_blank">purchase</a> Add-Ons. 😊', 'wp-statistics' ), 'https://wp-statistics.com/donate/', 'https://wp-statistics.com/add-ons/' ); ?></h4>
101
  </section>
102
  </div>
103
 
@@ -107,36 +126,30 @@
107
  <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'wp-statistics' ); ?></h3>
108
  <ul class="wp-people-group ">
109
  <li class="wp-person">
110
- <a href="https://profiles.wordpress.org/mostafas1990"
111
- class="web"><?php echo get_avatar( 'mst404@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mostafa Soufi', 'wp-statistics' ); ?></a>
112
  <span class="title"><?php _e( 'Original Author', 'wp-statistics' ); ?></span>
113
  </li>
114
  </ul>
115
  <h3 class="wp-people-group"><?php _e( 'Other Contributors', 'wp-statistics' ); ?></h3>
116
  <ul class="wp-people-group">
117
  <li class="wp-person">
118
- <a href="https://profiles.wordpress.org/mehrshaddarzi"
119
- class="web"><?php echo get_avatar( 'mehrshad198@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mehrshad Darzi', 'wp-statistics' ); ?></a>
120
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
121
  </li>
122
  <li class="wp-person">
123
- <a href="https://profiles.wordpress.org/ghasemi71ir"
124
- class="web"><?php echo get_avatar( 'ghasemi71ir@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mohammad Ghasemi', 'wp-statistics' ); ?></a>
125
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
126
  </li>
127
  <li class="wp-person">
128
- <a href="https://profiles.wordpress.org/gregross"
129
- class="web"><?php echo get_avatar( 'greg@toolstack.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Greg Ross', 'wp-statistics' ); ?></a>
130
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
131
  </li>
132
  <li class="wp-person">
133
- <a href="https://profiles.wordpress.org/dedidata"
134
- class="web"><?php echo get_avatar( 'dedidata.com@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Farhad Sakhaei', 'wp-statistics' ); ?></a>
135
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
136
  </li>
137
  <li class="wp-person">
138
- <a href="https://profiles.wordpress.org/pedromendonca"
139
- class="web"><?php echo get_avatar( 'ped.gaspar@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Pedro Mendonça', 'wp-statistics' ); ?></a>
140
  <span class="title"><?php _e( 'Language Contributor', 'wp-statistics' ); ?></span>
141
  </li>
142
  </ul>
3
  <h1><?php printf( __( 'Welcome to WP-Statistics&nbsp;%s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></h1>
4
 
5
  <p class="about-text">
6
+ <?php printf(__('Thank you for updating to the latest version! We encourage you to submit a %srating and review%s over at WordPress.org. Your feedback is greatly appreciated!','wp-statistics'),'<a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank">','</a>'); ?>
 
 
 
 
 
 
 
 
7
  <?php _e( 'Submit your rating:', 'wp-statistics' ); ?>
8
  <a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/stars.png' ); ?>"/></a>
9
  </p>
11
  <div class="wp-badge"><?php printf( __( 'Version %s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></div>
12
 
13
  <h2 class="nav-tab-wrapper wp-clearfix">
14
+ <a href="#" class="nav-tab nav-tab-active" data-tab="whats-news"><?php _e( 'What&#8217;s New', 'wp-statistics' ); ?></a>
 
15
  <a href="#" class="nav-tab" data-tab="credit"><?php _e( 'Credits', 'wp-statistics' ); ?></a>
16
  <a href="#" class="nav-tab" data-tab="changelog"><?php _e( 'Changelog', 'wp-statistics' ); ?></a>
17
  </h2>
18
 
19
  <div data-content="whats-news" class="tab-content current">
20
+ <section class="center-section">
21
+ <div class="left">
22
  <div class="content-padding">
23
+ <h2><?php _e( 'Great update for all WP-Statistics Add-Ons', 'wp-statistics' ); ?></h2>
 
24
  </div>
25
  </div>
 
 
 
 
26
  </section>
27
 
28
  <section class="normal-section">
29
  <div class="left">
30
  <div class="content-padding">
31
+ <h2 style="margin-top: 0"><?php _e( 'View Live Report data with new dashboard', 'wp-statistics' ); ?></h2>
32
+ <p><?php _e( '<span style="font-weight: bold;">New:</span> Redesign & Optimized for with on the big screen', 'wp-statistics' ); ?></p>
33
+ <p><?php _e( '<span style="font-weight: bold;">New:</span> Visitor on Map', 'wp-statistics' ); ?></p>
34
+ <p><?php _e( '<span style="font-weight: bold;">New:</span> Live Chart', 'wp-statistics' ); ?></p>
35
+ <p><?php _e( '<span style="font-weight: bold;">New:</span> Better Performance', 'wp-statistics' ); ?></p>
36
+ <p><?php _e( 'And much more!', 'wp-statistics' ); ?></p>
37
+
38
+ <div class="col">
39
+ <a class="button button-primary button-hero" href="https://wp-statistics.com/downloads/wp-statistics-realtime-stats/" target="_blank">Get Real-Time Stats</a>
40
+ </div>
41
  </div>
42
  </div>
43
 
44
  <div class="right text-center">
45
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/addon-realltime-stats.png' ); ?>"/>
46
  </div>
47
  </section>
48
 
49
  <section class="normal-section">
50
  <div class="right">
51
  <div class="content-padding">
52
+ <h2 style="margin-top: 0"><?php _e( 'Advanced Reporting', 'wp-statistics' ); ?></h2>
53
+ <p><?php _e( 'Now, Fully customized and new options!', 'wp-statistics' ); ?></p>
54
+ <p><?php _e( 'New: Ability to customize reports based on data widgets.', 'wp-statistics' ); ?></p>
55
+ <p><?php _e( 'Ability to send preview & test email.', 'wp-statistics' ); ?></p>
56
+ <p><?php _e( 'Added “Top Countries” stats for sending with the report.', 'wp-statistics' ); ?></p>
57
+
58
+ <div class="col">
59
+ <a class="button button-primary button-hero" href="https://wp-statistics.com/downloads/wp-statistics-advanced-reporting/" target="_blank">Get Advanced Reporting</a>
60
+ </div>
61
  </div>
62
  </div>
63
 
64
  <div class="left text-center">
65
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/addon-advanced-reporting.png' ); ?>"/>
66
  </div>
67
  </section>
68
 
69
  <section class="normal-section">
70
  <div class="left">
71
  <div class="content-padding">
72
+ <h2><?php _e( 'Widgets', 'wp-statistics' ); ?></h2>
73
+ <p><?php _e( 'The new & beautiful chart includes a caching mechanism and time range settings', 'wp-statistics' ); ?></p>
74
+
75
+ <div class="col">
76
+ <a class="button button-primary button-hero" href="https://wp-statistics.com/downloads/wp-statistics-widgets/" target="_blank">Get Widgets</a>
77
+ </div>
78
  </div>
79
  </div>
80
 
81
  <div class="right text-center">
82
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/addon-widgets.png' ); ?>"/>
83
  </div>
84
  </section>
85
 
86
  <section class="normal-section">
87
  <div class="right">
88
  <div class="content-padding">
89
+ <h2><?php _e( 'Mini Chart', 'wp-statistics' ); ?></h2>
90
+ <p><?php _e( 'Now include customization and show based on post type settings', 'wp-statistics' ); ?></p>
91
+
92
+ <div class="col">
93
+ <a class="button button-primary button-hero" href="https://wp-statistics.com/downloads/wp-statistics-mini-chart/" target="_blank">Get Mini Chart</a>
94
+ </div>
95
  </div>
96
  </div>
97
 
98
+ <div class="left text-center">
99
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/addons-mini-chart.png' ); ?>"/>
100
+ </div>
101
+ </section>
102
+
103
+ <section class="center-section">
104
+ <div class="left">
105
+ <div class="content-padding">
106
+ <h2>Add-Ons Bundle</h2>
107
+ <p>Buying a bundle is always a good way to access all add-ons with lower money.<br>According to your requests we have defined all 5 add-ons, in a package with a good discount.</p>
108
+ <p style="margin: 32px 0;"><a href="https://wp-statistics.com/downloads/add-ons-bundle/" target="_blank"><img src="https://wp-statistics.com/wp-content/uploads/2018/12/welcome-page-bundle.png"/></a></p>
109
+
110
+ <div class="col">
111
+ <a class="button button-primary button-hero" href="https://wp-statistics.com/downloads/add-ons-bundle/" target="_blank">Get Add-Ons Bundle!</a>
112
+ </div>
113
+ </div>
114
  </div>
115
  </section>
116
 
117
  <section class="center-section logo">
118
  <a href="https://veronalabs.com" target="_blank" title="WordPress Solutions and Services"><img src="http://bit.ly/2FsmZlq"/></a>
119
  <p><?php echo __( 'WP-Statistics is one of the VeronaLabs.com projects.', 'wp-statistics' ); ?></p>
 
120
  </section>
121
  </div>
122
 
126
  <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'wp-statistics' ); ?></h3>
127
  <ul class="wp-people-group ">
128
  <li class="wp-person">
129
+ <a href="https://profiles.wordpress.org/mostafas1990" class="web"><?php echo get_avatar( 'mst404@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mostafa Soufi', 'wp-statistics' ); ?></a>
 
130
  <span class="title"><?php _e( 'Original Author', 'wp-statistics' ); ?></span>
131
  </li>
132
  </ul>
133
  <h3 class="wp-people-group"><?php _e( 'Other Contributors', 'wp-statistics' ); ?></h3>
134
  <ul class="wp-people-group">
135
  <li class="wp-person">
136
+ <a href="https://profiles.wordpress.org/mehrshaddarzi" class="web"><?php echo get_avatar( 'mehrshad198@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mehrshad Darzi', 'wp-statistics' ); ?></a>
 
137
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
138
  </li>
139
  <li class="wp-person">
140
+ <a href="https://profiles.wordpress.org/ghasemi71ir" class="web"><?php echo get_avatar( 'ghasemi71ir@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mohammad Ghasemi', 'wp-statistics' ); ?></a>
 
141
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
142
  </li>
143
  <li class="wp-person">
144
+ <a href="https://profiles.wordpress.org/gregross" class="web"><?php echo get_avatar( 'greg@toolstack.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Greg Ross', 'wp-statistics' ); ?></a>
 
145
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
146
  </li>
147
  <li class="wp-person">
148
+ <a href="https://profiles.wordpress.org/dedidata" class="web"><?php echo get_avatar( 'dedidata.com@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Farhad Sakhaei', 'wp-statistics' ); ?></a>
 
149
  <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
150
  </li>
151
  <li class="wp-person">
152
+ <a href="https://profiles.wordpress.org/pedromendonca" class="web"><?php echo get_avatar( 'ped.gaspar@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Pedro Mendonça', 'wp-statistics' ); ?></a>
 
153
  <span class="title"><?php _e( 'Language Contributor', 'wp-statistics' ); ?></span>
154
  </li>
155
  </ul>
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.0
7
- Stable tag: 12.5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -55,9 +55,15 @@ WP Statistics doesn’t officially support the multisite feature; however, it do
55
  Version 8.8 is the first release that can be installed, upgraded and removed correctly on multi-site. It also has some basic support for the network admin menu. This should not be taken as an indication that WP Statistics fully supports the multisite, but only should be considered as a very first step.
56
 
57
  = Does WP Statistics work with caching plugins? =
58
- Probably not. Most caching plugins don’t execute the standard WordPress loop for a page it has already cached (by design of course) which means the WP Statistics code never runs for that page.
59
- This means WP Statistics can’t record the page hit or visitor’s information, which is against the purpose of WP Statistics.
60
- We don’t recommend using a caching plugin with WP Statistics.
 
 
 
 
 
 
61
 
62
  = What’s the difference between Visits and Visitors? =
63
  Visits is the number of page hits your site has received.
@@ -110,12 +116,14 @@ If IPv6 is not enabled, you may see an warning like:
110
  = 12.5.3 =
111
  Please consider that after updating, you will probably see some changes in Hits. The reason is that we have better-recognized crawlers and robots to get more accurate statistics for you.
112
 
113
- If the cache option is enabled in your WordPress, you should make sure the below endpoint registered in your WordPress.
114
- http://yourwebsite.com/wp-json/wpstatistics/v1
115
-
116
- To register, go to the Permalink page and update the permalink with press Save Changes.
117
-
118
  == Changelog ==
 
 
 
 
 
 
 
119
  = 12.5.6 =
120
  * Fixed: Counting stats issue in Cache mode.
121
 
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.0
7
+ Stable tag: 12.5.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
55
  Version 8.8 is the first release that can be installed, upgraded and removed correctly on multi-site. It also has some basic support for the network admin menu. This should not be taken as an indication that WP Statistics fully supports the multisite, but only should be considered as a very first step.
56
 
57
  = Does WP Statistics work with caching plugins? =
58
+ Yes, the cache support added in v12.5.1
59
+
60
+ If you're using a plugin cache:
61
+ * Don't forget to clear your enabled plugin cache.
62
+ * You should enabled the plugin cache option in the Settings page.
63
+ * Making sure the below endpoint registered in your WordPress.
64
+ http://yourwebsite.com/wp-json/wpstatistics/v1
65
+
66
+ To register, go to the Permalink page and update the permalink with press Save Changes.
67
 
68
  = What’s the difference between Visits and Visitors? =
69
  Visits is the number of page hits your site has received.
116
  = 12.5.3 =
117
  Please consider that after updating, you will probably see some changes in Hits. The reason is that we have better-recognized crawlers and robots to get more accurate statistics for you.
118
 
 
 
 
 
 
119
  == Changelog ==
120
+ = 12.5.7 =
121
+ * Added: The Edge To Browser List.
122
+ * Added: `date_i18n` function in dates for retrieving localized date.
123
+ * Improved: The Browsers charts.
124
+ * Improved: Minor issues in GeoIP update function.
125
+ * Optimized: All png files. (60% Save).
126
+
127
  = 12.5.6 =
128
  * Fixed: Counting stats issue in Cache mode.
129
 
wp-statistics.php CHANGED
@@ -3,8 +3,8 @@
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.5.6
7
- * Author: Verona Labs
8
  * Author URI: http://veronalabs.com/
9
  *
10
  * 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.5.7
7
+ * Author: VeronaLabs
8
  * Author URI: http://veronalabs.com/
9
  *
10
  * Text Domain: wp-statistics