Version Description
- Release Date: January 13, 2017
- Added: Option to reset plugin options without deleting the data.
- Fixed: If IP hashing as enabled a PHP would be generated during the hashing.
- Fixed: Typo in JavaScript code that would cause some errors not to be displayed.
- Fixed: Make sure the historical table exists before checking the keys on it which would cause extra output to be generated on first install.
- Updated: RTL CSS styles for left/right div's in the admin dashboard, thanks sszdh.
Download this release
Release Info
Developer | GregRoss |
Plugin | WP Statistics |
Version | 11.0.3 |
Comparing to | |
See all releases |
Code changes from version 11.0.2 to 11.0.3
- assets/css/log.min.css +1 -1
- assets/css/rtl.css +19 -0
- assets/css/rtl.min.css +1 -1
- assets/js/dashboard.js +1 -1
- assets/js/dashboard.min.js +1 -1
- assets/js/editor.js +1 -1
- assets/js/editor.min.js +1 -1
- assets/js/log.js +1 -1
- assets/js/log.min.js +1 -1
- includes/classes/statistics.class.php +1 -1
- includes/settings/tabs/wps-removal.php +48 -8
- readme.txt +10 -2
- wp-statistics.php +11 -11
- wps-install.php +14 -7
assets/css/log.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@media print{#wpadminbar,#adminmenuback,#adminmenuwrap,#show-settings-link{display:none}}#wps-postbox-container-1{width:30%;float:left}#wps-postbox-container-2{margin:0 0 0 1%;width:68%;float:right}@media screen and (max-width:960px){#wps-postbox-container-1{width:35%}#wps-postbox-container-2{margin:0 0 0 1%;width:63%}}@media screen and (max-width:758px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}@media screen and (max-width:524px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}#last-log{width:100%;direction:ltr}#wps-postbox-container-1 a,#wps-postbox-container-2 a,#last-log a{text-decoration:none}#summary-stats{background:none repeat scroll 0 0 rgba(0,0,0,0);border:1px none;margin:0 0 10px}#summary-stats tr:first-child th{border-top:0 none}#summary-stats span{color:#21759b !important;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:21px}#th-colspan{text-align:center}#th-colspan span{color:#459605 !important;font-size:30px}#last-visitor tr{text-align:center}#last-visitor tr:first-child{background:none repeat scroll 0 0 #eee;font-weight:bold;text-align:center}#last-search tr{text-align:center}#last-search tr:first-child{background:none repeat scroll 0 0 #eee;font-weight:bold;text-align:center}#last-referrer tr{text-align:left}#last-referrer tr:first-child{background:none repeat scroll 0 0 #eee;font-weight:bold;text-align:center}.th-center{text-align:center !important}.td-align{text-align:left}.td-url{color:#009936 !important;direction:ltr;font-size:10px !important;text-align:left;white-space:nowrap}#map_canvas{direction:ltr;height:380px;width:100%}.map-html-marker{max-height:170px;width:200px}.map-html-marker p{border-bottom:1px dashed #efefef;font-size:10px;margin:2px 0;padding:3px 0;text-align:left}.map-html-marker p:last-child{border-bottom:0 none}.log-item{border-bottom:1px solid #d3cdcd;border-top:1px solid #fff;min-height:46px;padding:3px 7px}.log-item:hover{background:none repeat scroll 0 0 #eee}.show-map{float:left}.log-referred{float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto}.log-page-title{float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.log-ip{direction:ltr;float:right;font-size:10px;margin-bottom:5px;white-space:pre;overflow:hidden;text-overflow:ellipsis;text-align:right}.log-tools{float:left;margin:0 2px}.log-agent{float:left}.log-url{direction:ltr;float:left;font-size:10px;margin:0 0 0 2px;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}.postbox{overflow:hidden}#time_zone a{font-size:11px;text-decoration:none}#visits-log{direction:ltr;height:290px;width:100%}#search-engine-log{direction:ltr}#browsers-log{direction:ltr;height:330px;margin:0 auto;width:100%}#platform-log{direction:ltr}#visits-stats{direction:ltr}#exclusion-stats{direction:ltr}#search-stats{direction:ltr}#page-stats{direction:ltr}#about-links{margin:0 0 10px}#about-links p{display:inline;font-size:11px;margin:0 2px}.left-div{float:left}.right-div{float:right}#donate-text{float:left}#donate-button{float:right;margin:12px 0 0}.jqvmap-label{z-index:10000}.ui-sortable{min-height:100px}
|
1 |
+
@media print{#wpadminbar,#adminmenuback,#adminmenuwrap,#show-settings-link{display:none}#wpcontent,#wpfooter{margin-left:0}}#wps-postbox-container-1{width:30%;float:left}#wps-postbox-container-2{margin:0 0 0 1%;width:68%;float:right}@media screen and (max-width:960px){#wps-postbox-container-1{width:35%}#wps-postbox-container-2{margin:0 0 0 1%;width:63%}}@media screen and (max-width:758px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}@media screen and (max-width:524px){#wps-postbox-container-1{width:100%}#wps-postbox-container-2{margin:0 0 0 1%;width:100%}}#last-log{width:100%;direction:ltr}#wps-postbox-container-1 a,#wps-postbox-container-2 a,#last-log a{text-decoration:none}#summary-stats{background:none repeat scroll 0 0 rgba(0,0,0,0);border:1px none;margin:0 0 10px}#summary-stats tr:first-child th{border-top:0 none}#summary-stats span{color:#21759b !important;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:21px}#th-colspan{text-align:center}#th-colspan span{color:#459605 !important;font-size:30px}#last-visitor tr{text-align:center}#last-visitor tr:first-child{background:none repeat scroll 0 0 #eee;font-weight:bold;text-align:center}#last-search tr{text-align:center}#last-search tr:first-child{background:none repeat scroll 0 0 #eee;font-weight:bold;text-align:center}#last-referrer tr{text-align:left}#last-referrer tr:first-child{background:none repeat scroll 0 0 #eee;font-weight:bold;text-align:center}.th-center{text-align:center !important}.td-align{text-align:left}.td-url{color:#009936 !important;direction:ltr;font-size:10px !important;text-align:left;white-space:nowrap}#map_canvas{direction:ltr;height:380px;width:100%}.map-html-marker{max-height:170px;width:200px}.map-html-marker p{border-bottom:1px dashed #efefef;font-size:10px;margin:2px 0;padding:3px 0;text-align:left}.map-html-marker p:last-child{border-bottom:0 none}.log-item{border-bottom:1px solid #d3cdcd;border-top:1px solid #fff;min-height:46px;padding:3px 7px}.log-item:hover{background:none repeat scroll 0 0 #eee}.show-map{float:left}.log-referred{float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto}.log-page-title{float:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.log-ip{direction:ltr;float:right;font-size:10px;margin-bottom:5px;white-space:pre;overflow:hidden;text-overflow:ellipsis;text-align:right}.log-tools{float:left;margin:0 2px}.log-agent{float:left}.log-url{direction:ltr;float:left;font-size:10px;margin:0 0 0 2px;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}.postbox{overflow:hidden}#time_zone a{font-size:11px;text-decoration:none}#visits-log{direction:ltr;height:290px;width:100%}#search-engine-log{direction:ltr}#browsers-log{direction:ltr;height:330px;margin:0 auto;width:100%}#platform-log{direction:ltr}#visits-stats{direction:ltr}#exclusion-stats{direction:ltr}#search-stats{direction:ltr}#page-stats{direction:ltr}#about-links{margin:0 0 10px}#about-links p{display:inline;font-size:11px;margin:0 2px}.left-div{float:left}.right-div{float:right}#donate-text{float:left}#donate-button{float:right;margin:12px 0 0}.jqvmap-label{z-index:10000}.ui-sortable{min-height:100px}
|
assets/css/rtl.css
CHANGED
@@ -1,36 +1,55 @@
|
|
1 |
#left-log {
|
2 |
margin: 0 1% 0 0;
|
3 |
}
|
|
|
4 |
.td-align {
|
5 |
text-align: right;
|
6 |
}
|
|
|
7 |
#donate-button {
|
8 |
}
|
|
|
9 |
.log-referred {
|
10 |
float: right;
|
11 |
}
|
|
|
12 |
.log-ip {
|
13 |
float: left;
|
14 |
}
|
|
|
15 |
#last-log{
|
16 |
direction: rtl;
|
17 |
}
|
|
|
18 |
.ui-widget, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button{
|
19 |
font-family: tahoma;
|
20 |
}
|
|
|
21 |
.ui-tabs .ui-tabs-nav li{
|
22 |
float: right;
|
23 |
}
|
|
|
24 |
.jqvmap-label{
|
25 |
direction: ltr;
|
26 |
}
|
|
|
27 |
.jqplot-table-legend, .jqplot-highlighter-tooltip{
|
28 |
direction: rtl;
|
29 |
font-family: tahoma;
|
30 |
}
|
|
|
31 |
#donate-text {
|
32 |
float: right;
|
33 |
}
|
|
|
34 |
#donate-button {
|
35 |
float: left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
1 |
#left-log {
|
2 |
margin: 0 1% 0 0;
|
3 |
}
|
4 |
+
|
5 |
.td-align {
|
6 |
text-align: right;
|
7 |
}
|
8 |
+
|
9 |
#donate-button {
|
10 |
}
|
11 |
+
|
12 |
.log-referred {
|
13 |
float: right;
|
14 |
}
|
15 |
+
|
16 |
.log-ip {
|
17 |
float: left;
|
18 |
}
|
19 |
+
|
20 |
#last-log{
|
21 |
direction: rtl;
|
22 |
}
|
23 |
+
|
24 |
.ui-widget, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button{
|
25 |
font-family: tahoma;
|
26 |
}
|
27 |
+
|
28 |
.ui-tabs .ui-tabs-nav li{
|
29 |
float: right;
|
30 |
}
|
31 |
+
|
32 |
.jqvmap-label{
|
33 |
direction: ltr;
|
34 |
}
|
35 |
+
|
36 |
.jqplot-table-legend, .jqplot-highlighter-tooltip{
|
37 |
direction: rtl;
|
38 |
font-family: tahoma;
|
39 |
}
|
40 |
+
|
41 |
#donate-text {
|
42 |
float: right;
|
43 |
}
|
44 |
+
|
45 |
#donate-button {
|
46 |
float: left;
|
47 |
+
}
|
48 |
+
|
49 |
+
.left-div {
|
50 |
+
float: right;
|
51 |
+
}
|
52 |
+
|
53 |
+
.right-div {
|
54 |
+
float: left;
|
55 |
}
|
assets/css/rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#left-log{margin:0 1% 0 0}.td-align{text-align:right}.log-referred{float:right}.log-ip{float:left}#last-log{direction:rtl}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:tahoma}.ui-tabs .ui-tabs-nav li{float:right}.jqvmap-label{direction:ltr}.jqplot-table-legend,.jqplot-highlighter-tooltip{direction:rtl;font-family:tahoma}#donate-text{float:right}#donate-button{float:left}
|
1 |
+
#left-log{margin:0 1% 0 0}.td-align{text-align:right}.log-referred{float:right}.log-ip{float:left}#last-log{direction:rtl}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:tahoma}.ui-tabs .ui-tabs-nav li{float:right}.jqvmap-label{direction:ltr}.jqplot-table-legend,.jqplot-highlighter-tooltip{direction:rtl;font-family:tahoma}#donate-text{float:right}#donate-button{float:left}.left-div{float:right}.right-div{float:left}
|
assets/js/dashboard.js
CHANGED
@@ -24,7 +24,7 @@ function wp_statistics_get_widget_contents( widget, container_id ) {
|
|
24 |
.fail(function(result){
|
25 |
// If we failed for some reason, like a timeout, try again.
|
26 |
container.html(wp_statistics_loading_image);
|
27 |
-
wp_statistics_get_widget_contents( widget,
|
28 |
});
|
29 |
|
30 |
}
|
24 |
.fail(function(result){
|
25 |
// If we failed for some reason, like a timeout, try again.
|
26 |
container.html(wp_statistics_loading_image);
|
27 |
+
wp_statistics_get_widget_contents( widget, container_id );
|
28 |
});
|
29 |
|
30 |
}
|
assets/js/dashboard.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wp_statistics_get_widget_contents(t,i){var s={action:"wp_statistics_get_widget_contents",widget:t,format:"dashboard"};container=jQuery("#"+i),container.is(":visible")&&jQuery.ajax({url:ajaxurl,type:"post",data:s,datatype:"json"}).always(function(t){jQuery("#"+i).html("").html(t)}).fail(function(
|
1 |
+
function wp_statistics_get_widget_contents(t,i){var s={action:"wp_statistics_get_widget_contents",widget:t,format:"dashboard"};container=jQuery("#"+i),container.is(":visible")&&jQuery.ajax({url:ajaxurl,type:"post",data:s,datatype:"json"}).always(function(t){jQuery("#"+i).html("").html(t)}).fail(function(s){container.html(wp_statistics_loading_image),wp_statistics_get_widget_contents(t,i)})}function wp_statistics_refresh_widget(){var t=this.id.replace("_refresh_button","");t=t.replace("-widget","-div");var i=t.replace("wp-statistics-","");return i=i.replace("-div",""),i=i.replace("-","."),container=jQuery("#"+t),container.is(":visible")&&(container.html(wp_statistics_loading_image),wp_statistics_get_widget_contents(i,t)),!1}function wp_statistics_refresh_on_toggle_widget(){if("wp-statistics-"==this.value.substring(0,14)){var t=this.value.replace("-widget","-div"),i=t.replace("wp-statistics-","");i=i.replace("-div",""),i=i.replace("-","."),wp_statistics_get_widget_contents(i,t)}}function wp_statistics_goto_more(){var t=this.id;return void 0!==wp_statistics_destinations[t]&&(window.location.href=wp_statistics_destinations[t]),!1}
|
assets/js/editor.js
CHANGED
@@ -24,7 +24,7 @@ function wp_statistics_get_widget_contents( widget, container_id ) {
|
|
24 |
.fail(function(result){
|
25 |
// If we failed for some reason, like a timeout, try again.
|
26 |
container.html(wp_statistics_loading_image);
|
27 |
-
wp_statistics_get_widget_contents( widget,
|
28 |
});
|
29 |
|
30 |
}
|
24 |
.fail(function(result){
|
25 |
// If we failed for some reason, like a timeout, try again.
|
26 |
container.html(wp_statistics_loading_image);
|
27 |
+
wp_statistics_get_widget_contents( widget, container_id );
|
28 |
});
|
29 |
|
30 |
}
|
assets/js/editor.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wp_statistics_get_widget_contents(t,i){var s={action:"wp_statistics_get_widget_contents",widget:t,"page-id":wp_statistics_current_id};container=jQuery("#"+i),container.is(":visible")&&jQuery.ajax({url:ajaxurl,type:"post",data:s,datatype:"json"}).always(function(t){jQuery("#"+i).html("").html(t)}).fail(function(
|
1 |
+
function wp_statistics_get_widget_contents(t,i){var s={action:"wp_statistics_get_widget_contents",widget:t,"page-id":wp_statistics_current_id};container=jQuery("#"+i),container.is(":visible")&&jQuery.ajax({url:ajaxurl,type:"post",data:s,datatype:"json"}).always(function(t){jQuery("#"+i).html("").html(t)}).fail(function(s){container.html(wp_statistics_loading_image),wp_statistics_get_widget_contents(t,i)})}function wp_statistics_refresh_widget(){var t="wp-statistics-page-div",i="page";return container=jQuery("#"+t),container.html(wp_statistics_loading_image),wp_statistics_get_widget_contents(i,t),!1}function wp_statistics_refresh_on_toggle_widget(){if("wp_statistics_editor_meta_box"==this.value){var t="wp-statistics-page-div",i="page";wp_statistics_get_widget_contents(i,t)}}function wp_statistics_goto_more(){var t=this.id;return void 0!==wp_statistics_destinations[t]&&(window.location.href=wp_statistics_destinations[t]+wp_statistics_current_id),!1}
|
assets/js/log.js
CHANGED
@@ -23,7 +23,7 @@ function wp_statistics_get_widget_contents( widget, container_id ) {
|
|
23 |
.fail(function(result){
|
24 |
// If we failed for some reason, like a timeout, try again.
|
25 |
container.html(wp_statistics_loading_image);
|
26 |
-
wp_statistics_get_widget_contents( widget,
|
27 |
});
|
28 |
|
29 |
}
|
23 |
.fail(function(result){
|
24 |
// If we failed for some reason, like a timeout, try again.
|
25 |
container.html(wp_statistics_loading_image);
|
26 |
+
wp_statistics_get_widget_contents( widget, container_id );
|
27 |
});
|
28 |
|
29 |
}
|
assets/js/log.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wp_statistics_get_widget_contents(t,i){var s={action:"wp_statistics_get_widget_contents",widget:t};container=jQuery("#"+i),container.is(":visible")&&jQuery.ajax({url:ajaxurl,type:"post",data:s,datatype:"json"}).always(function(t){jQuery("#"+i).html("").html(t)}).fail(function(
|
1 |
+
function wp_statistics_get_widget_contents(t,i){var s={action:"wp_statistics_get_widget_contents",widget:t};container=jQuery("#"+i),container.is(":visible")&&jQuery.ajax({url:ajaxurl,type:"post",data:s,datatype:"json"}).always(function(t){jQuery("#"+i).html("").html(t)}).fail(function(s){container.html(wp_statistics_loading_image),wp_statistics_get_widget_contents(t,i)})}function wp_statistics_refresh_widget(){var t=this.id.replace("wps_","");return t=t.replace("_refresh_button",""),container_id=t.replace(".","_")+"_postbox",container=jQuery("#"+container_id),container.is(":visible")&&(container.html(wp_statistics_loading_image),wp_statistics_get_widget_contents(t,container_id)),!1}function wp_statistics_refresh_on_toggle_widget(){if("wps_"==this.value.substring(0,4)){var t=this.value.replace("wps_",""),i=t.replace("_postbox","");wp_statistics_get_widget_contents(i,t)}}function wp_statistics_goto_more(){var t=this.id;return void 0!==wp_statistics_destinations[t]&&(window.location.href=wp_statistics_destinations[t]),!1}
|
includes/classes/statistics.class.php
CHANGED
@@ -61,7 +61,7 @@ class WP_Statistics {
|
|
61 |
|
62 |
$this->get_IP();
|
63 |
|
64 |
-
if( $this->get_option('hash_ips') == true ) { $this->ip_hash = '#hash#' . sha1( $this->ip
|
65 |
|
66 |
}
|
67 |
|
61 |
|
62 |
$this->get_IP();
|
63 |
|
64 |
+
if( $this->get_option('hash_ips') == true ) { $this->ip_hash = '#hash#' . sha1( $this->ip . $_SERVER['HTTP_USER_AGENT'] ); }
|
65 |
|
66 |
}
|
67 |
|
includes/settings/tabs/wps-removal.php
CHANGED
@@ -3,7 +3,35 @@ if( $wps_nonce_valid ) {
|
|
3 |
|
4 |
if( array_key_exists( 'wps_remove_plugin', $_POST ) ) {
|
5 |
if( is_super_admin() ) {
|
6 |
-
update_option('wp_statistics_removal', 'true' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
}
|
9 |
}
|
@@ -12,31 +40,43 @@ if( $wps_nonce_valid ) {
|
|
12 |
<table class="form-table">
|
13 |
<tbody>
|
14 |
<tr valign="top">
|
15 |
-
<th scope="row" colspan="2"><h3><?php _e('WP Statisitcs Removal', 'wp_statistics'); ?></h3></th>
|
16 |
</tr>
|
17 |
|
18 |
<tr valign="top">
|
19 |
<th scope="row" colspan="2">
|
20 |
-
<?php
|
21 |
<br>
|
22 |
<br>
|
23 |
-
<?php
|
24 |
</th>
|
25 |
</tr>
|
26 |
|
27 |
<tr valign="top">
|
28 |
<th scope="row">
|
29 |
-
<label for="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
</th>
|
31 |
|
32 |
<td>
|
33 |
<input id="remove-plugin" type="checkbox" name="wps_remove_plugin">
|
34 |
-
<label for="remove-plugin"><?php _e('Remove', 'wp_statistics'); ?></label>
|
35 |
-
<p class="description"><?php _e('Remove data and settings, this action cannot be undone.', 'wp_statistics'); ?></p>
|
36 |
</td>
|
37 |
</tr>
|
38 |
|
39 |
</tbody>
|
40 |
</table>
|
41 |
|
42 |
-
<?php submit_button(__('Update', 'wp_statistics'), 'primary', 'submit'); ?>
|
3 |
|
4 |
if( array_key_exists( 'wps_remove_plugin', $_POST ) ) {
|
5 |
if( is_super_admin() ) {
|
6 |
+
update_option( 'wp_statistics_removal', 'true' );
|
7 |
+
}
|
8 |
+
}
|
9 |
+
|
10 |
+
if( array_key_exists( 'wps_reset_plugin', $_POST ) ) {
|
11 |
+
if( is_super_admin() ) {
|
12 |
+
GLOBAL $wpdb;
|
13 |
+
|
14 |
+
// Handle multi site implementations
|
15 |
+
if( is_multisite() ) {
|
16 |
+
|
17 |
+
// Loop through each of the sites.
|
18 |
+
foreach( wp_get_sites() as $blog ) {
|
19 |
+
|
20 |
+
switch_to_blog( $blog['blog_id'] );
|
21 |
+
|
22 |
+
// Delete the wp_statistics option.
|
23 |
+
delete_option('wp_statistics');
|
24 |
+
// Delete the user options.
|
25 |
+
$wpdb->query( "DELETE FROM {$wpdb->prefix}usermeta WHERE meta_key LIKE 'wp_statistics%'");
|
26 |
+
}
|
27 |
+
|
28 |
+
restore_current_blog();
|
29 |
+
} else {
|
30 |
+
// Delete the wp_statistics option.
|
31 |
+
delete_option('wp_statistics');
|
32 |
+
// Delete the user options.
|
33 |
+
$wpdb->query( "DELETE FROM {$wpdb->prefix}usermeta WHERE meta_key LIKE 'wp_statistics%'");
|
34 |
+
}
|
35 |
}
|
36 |
}
|
37 |
}
|
40 |
<table class="form-table">
|
41 |
<tbody>
|
42 |
<tr valign="top">
|
43 |
+
<th scope="row" colspan="2"><h3><?php _e( 'WP Statisitcs Removal', 'wp_statistics' ); ?></h3></th>
|
44 |
</tr>
|
45 |
|
46 |
<tr valign="top">
|
47 |
<th scope="row" colspan="2">
|
48 |
+
<?php _e( 'Uninstalling WP Statistics will not remove the data and settings, you can use this option to remove the WP Statistics data from your install before uninstalling the plugin.', 'wp_statistics' ); ?>
|
49 |
<br>
|
50 |
<br>
|
51 |
+
<?php _e( 'Once you submit this form the settings will be deleted during the page load, however WP Statistics will still show up in your Admin menu until another page load is executed.', 'wp_statistics' ); ?>
|
52 |
</th>
|
53 |
</tr>
|
54 |
|
55 |
<tr valign="top">
|
56 |
<th scope="row">
|
57 |
+
<label for="reset-plugin"><?php _e( 'Reset options', 'wp_statistics' ); ?>:</label>
|
58 |
+
</th>
|
59 |
+
|
60 |
+
<td>
|
61 |
+
<input id="reset-plugin" type="checkbox" name="wps_reset_plugin">
|
62 |
+
<label for="reset-plugin"><?php _e( 'Reset', 'wp_statistics' ); ?></label>
|
63 |
+
<p class="description"><?php _e( 'Reset the plugin options to the defaults. This will remove all user and global settings but will keep all other data. This action cannot be undone. Note: For multi-site installs this will reset all sites to the defaults.', 'wp_statistics' ); ?></p>
|
64 |
+
</td>
|
65 |
+
</tr>
|
66 |
+
|
67 |
+
<tr valign="top">
|
68 |
+
<th scope="row">
|
69 |
+
<label for="remove-plugin"><?php _e( 'Remove data and settings', 'wp_statistics' ); ?>:</label>
|
70 |
</th>
|
71 |
|
72 |
<td>
|
73 |
<input id="remove-plugin" type="checkbox" name="wps_remove_plugin">
|
74 |
+
<label for="remove-plugin"><?php _e( 'Remove', 'wp_statistics' ); ?></label>
|
75 |
+
<p class="description"><?php _e( 'Remove data and settings, this action cannot be undone.', 'wp_statistics' ); ?></p>
|
76 |
</td>
|
77 |
</tr>
|
78 |
|
79 |
</tbody>
|
80 |
</table>
|
81 |
|
82 |
+
<?php submit_button( __( 'Update', 'wp_statistics' ), 'primary', 'submit' ); ?>
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Statistics ===
|
2 |
Contributors: GregRoss, mostafa.s1990
|
3 |
Donate link: http://wp-statistics.com/donate/
|
4 |
-
Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary,
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 11.0.
|
8 |
License: GPL3
|
9 |
|
10 |
Complete statistics for your WordPress site.
|
@@ -286,6 +286,14 @@ You may also downgrade to WP Statistics 10.3 as a temporary measure, but no new
|
|
286 |
PHP 5.4 is now required for version 11.0 and above! IPv6 is now supported if you have IPv6 support complied in to PHP, if you don't you may see warning messages if you receive visitors from IPv6 addresses (see the FAQ for more information).
|
287 |
|
288 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
= 11.0.2 =
|
290 |
* Release Date: December 1, 2016
|
291 |
* Fixed: Top visitors page css for date picker.
|
1 |
=== WP Statistics ===
|
2 |
Contributors: GregRoss, mostafa.s1990
|
3 |
Donate link: http://wp-statistics.com/donate/
|
4 |
+
Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, hits, pagerank, google, alexa, live visit
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 11.0.3
|
8 |
License: GPL3
|
9 |
|
10 |
Complete statistics for your WordPress site.
|
286 |
PHP 5.4 is now required for version 11.0 and above! IPv6 is now supported if you have IPv6 support complied in to PHP, if you don't you may see warning messages if you receive visitors from IPv6 addresses (see the FAQ for more information).
|
287 |
|
288 |
== Changelog ==
|
289 |
+
= 11.0.3 =
|
290 |
+
* Release Date: January 13, 2017
|
291 |
+
* Added: Option to reset plugin options without deleting the data.
|
292 |
+
* Fixed: If IP hashing as enabled a PHP would be generated during the hashing.
|
293 |
+
* Fixed: Typo in JavaScript code that would cause some errors not to be displayed.
|
294 |
+
* Fixed: Make sure the historical table exists before checking the keys on it which would cause extra output to be generated on first install.
|
295 |
+
* Updated: RTL CSS styles for left/right div's in the admin dashboard, thanks sszdh.
|
296 |
+
|
297 |
= 11.0.2 =
|
298 |
* Release Date: December 1, 2016
|
299 |
* Fixed: Top visitors page css for date picker.
|
wp-statistics.php
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: WP Statistics
|
4 |
-
Plugin URI: http://wp-statistics.com/
|
5 |
-
Description: Complete statistics for your WordPress site.
|
6 |
-
Version: 11.0.
|
7 |
-
Author: Greg Ross & Mostafa Soufi
|
8 |
-
Author URI: http://wp-statistics.com/
|
9 |
-
Text Domain: wp_statistics
|
10 |
-
Domain Path: /languages/
|
11 |
-
License: GPL2
|
12 |
-
*/
|
13 |
|
14 |
// These defines are used later for various reasons.
|
15 |
-
define('WP_STATISTICS_VERSION', '11.0.
|
16 |
define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
|
17 |
define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.4.0');
|
18 |
define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Plugin Name: WP Statistics
|
4 |
+
* Plugin URI: http://wp-statistics.com/
|
5 |
+
* Description: Complete statistics for your WordPress site.
|
6 |
+
* Version: 11.0.3
|
7 |
+
* Author: Greg Ross & Mostafa Soufi
|
8 |
+
* Author URI: http://wp-statistics.com/
|
9 |
+
* Text Domain: wp_statistics
|
10 |
+
* Domain Path: /languages/
|
11 |
+
* License: GPL2
|
12 |
+
*/
|
13 |
|
14 |
// These defines are used later for various reasons.
|
15 |
+
define('WP_STATISTICS_VERSION', '11.0.3');
|
16 |
define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
|
17 |
define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.4.0');
|
18 |
define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
|
wps-install.php
CHANGED
@@ -114,13 +114,21 @@
|
|
114 |
KEY host (host)
|
115 |
) CHARSET=utf8");
|
116 |
|
117 |
-
//
|
118 |
-
$
|
|
|
|
|
|
|
119 |
|
120 |
-
if( $result
|
121 |
-
|
122 |
-
$wpdb->query( "
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
// This includes the dbDelta function from WordPress.
|
@@ -138,7 +146,6 @@
|
|
138 |
// Some old versions (in the 5.0.x line) of MySQL have issue with the compound index on the visitor table
|
139 |
// so let's make sure it was created, if not, use the older format to create the table manually instead of
|
140 |
// using the dbDelta() call.
|
141 |
-
$dbname = DB_NAME;
|
142 |
$result = $wpdb->query("SHOW TABLES WHERE `Tables_in_{$dbname}` = '{$wpdb->prefix}statistics_visitor'" );
|
143 |
|
144 |
if( $result != 1 ) {
|
114 |
KEY host (host)
|
115 |
) CHARSET=utf8");
|
116 |
|
117 |
+
// Grab the database name we're using from the global.
|
118 |
+
$dbname = DB_NAME;
|
119 |
+
|
120 |
+
// Check to see if the historical table exists yet, aka if this is a upgrade instead of a first install.
|
121 |
+
$result = $wpdb->query("SHOW TABLES WHERE `Tables_in_{$dbname}` = '{$wpdb->prefix}statistics_historical'" );
|
122 |
|
123 |
+
if( $result == 1 ) {
|
124 |
+
// Before we update the historical table, check to see if it exists with the old keys
|
125 |
+
$result = $wpdb->query( "SHOW COLUMNS FROM {$wp_prefix}statistics_historical LIKE 'key'" );
|
126 |
+
|
127 |
+
if( $result > 0 ) {
|
128 |
+
$wpdb->query( "ALTER TABLE `{$wp_prefix}statistics_historical` CHANGE `id` `page_id` bigint(20)" );
|
129 |
+
$wpdb->query( "ALTER TABLE `{$wp_prefix}statistics_historical` CHANGE `key` `ID` bigint(20)" );
|
130 |
+
$wpdb->query( "ALTER TABLE `{$wp_prefix}statistics_historical` CHANGE `type` `category` varchar(25)" );
|
131 |
+
}
|
132 |
}
|
133 |
|
134 |
// This includes the dbDelta function from WordPress.
|
146 |
// Some old versions (in the 5.0.x line) of MySQL have issue with the compound index on the visitor table
|
147 |
// so let's make sure it was created, if not, use the older format to create the table manually instead of
|
148 |
// using the dbDelta() call.
|
|
|
149 |
$result = $wpdb->query("SHOW TABLES WHERE `Tables_in_{$dbname}` = '{$wpdb->prefix}statistics_visitor'" );
|
150 |
|
151 |
if( $result != 1 ) {
|