Skip to content

Commit

Permalink
v1.3.8
Browse files Browse the repository at this point in the history
* Update ChartJS 3.9.1 to 4.2.0,
* Add option CDN for ChartJS,
* Update GeoIP Database 20230203,
* Add device type gaming and television,
* Add agent type opera and Samsung Internet,
* request Optimisation,
* Correction php warning.
  • Loading branch information
thanatos-vf-2000 committed Feb 5, 2023
1 parent f1fb108 commit aa696a1
Show file tree
Hide file tree
Showing 40 changed files with 12,563 additions and 772 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
Contributors: vanhoucke
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
Requires at least: 5.7
Tested up to: 6.1
Tested up to: 6.1.1
Requires PHP: 7.4
Stable tag: 1.3.7
Stable tag: 1.3.8
License: GPLv2

This plugin gives you the complete information on your website's visitors.
Expand Down Expand Up @@ -96,14 +96,15 @@ GeoChart
Source: https://developers.google.com/chart/interactive/docs/gallery/geochart


### 1.3.7 (2211-SFP3)
*Release Date - 13 November 2022*
### 1.3.8 (2302-SFP1)
*Release Date - 05 Febrary 2023*

* Update ChartJS 3.7.1 to 3.9.1,
* Composer: Php require >=7.3 to ^7.3||^8.0,
* Update GeoIP Database 20221111,
* Update ChartJS 3.9.1 to 4.2.0,
* Add option CDN for ChartJS,
* Update GeoIP Database 20230203,
* Add device type gaming and television,
* Add agent type opera and Samsung Internet,
* request Optimisation,
* Correction multisite uninstall,
* Correction php warning.

See [changelog.txt](https://plugins.svn.wordpress.org/stats4wp/trunk/changelog.txt) for older changelog
Expand Down
10 changes: 8 additions & 2 deletions assets/defaults.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.3.2
* @Version 1.3.8
*/
return array(
'anonymize_ips' => array(
Expand Down Expand Up @@ -51,5 +51,11 @@
'section' => STATS4WP_NAME.'_admin_index',
'type' => 'checkboxField',
'message' => __('Locations are geocoded by Google Maps. Any data that does not require geocoding is not sent to any server. Please see the Google Maps Terms of Service for more information on their data policy.','stats4wp'),
'link' => 'https://developers.google.com/maps/terms')
'link' => 'https://developers.google.com/maps/terms'),
'cdn_chartjs' => array(
'title' => __('Enable CDN Chart JS','stats4wp'),
'section' => STATS4WP_NAME.'_admin_index',
'type' => 'checkboxField',
'message' => __('Use CDN for Chart.js: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/<version>/chart.min.js.','stats4wp'),
'link' => 'https://cdnjs.com/libraries/Chart.js')
);
Binary file added assets/images/logo-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions assets/js/chart..js

Large diffs are not rendered by default.

11,331 changes: 11,322 additions & 9 deletions assets/js/chart.js

Large diffs are not rendered by default.

14 changes: 1 addition & 13 deletions assets/js/chart.min.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions assets/js/chart.umd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/js/chart.umd.min.js

Large diffs are not rendered by default.

157 changes: 157 additions & 0 deletions assets/js/loader.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion assets/options.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package CT4GGPlugin
* @Version 1.3.2
* @Version 1.3.8
*/
return array(
'install' => '0',
Expand All @@ -13,4 +13,5 @@
'top_page' => 10,
'disableadminstat' => false,
'geochart' => false,
'cdn_chartjs' => false,
);
11 changes: 11 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
This file contains older changelog entries, so we can keep the size of the standard WordPress readme.txt file reasonable.
For the latest changes, please see the "Changelog" section of the [readme.txt file](https://plugins.svn.wordpress.org/stats4wp/trunk/readme.txt).

= 1.3.8 (2302-SFP1) =
*Release Date - 05 Febrary 2023*

* Update ChartJS 3.9.1 to 4.2.0,
* Add option CDN for ChartJS,
* Update GeoIP Database 20230203,
* Add device type gaming and television,
* Add agent type opera and Samsung Internet,
* request Optimisation,
* Correction php warning.

= 1.3.7 (2211-SFP3) =
*Release Date - 03 November 2022*

Expand Down
Binary file modified db/GeoLite2-Country.mmdb
Binary file not shown.
4 changes: 2 additions & 2 deletions inc/Api/GeoIP.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.3.7
* @Version 1.3.8
*/
namespace STATS4WP\Api;

Expand All @@ -15,7 +15,7 @@ class GeoIP
*
* @var string
*/
public static $geoip_date = '20221111';
public static $geoip_date = '20230203';

/**
* Date of database GeoIpLitle User IP
Expand Down
9 changes: 7 additions & 2 deletions inc/Core/DB.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.3.7
* @Version 1.3.8
*/
namespace STATS4WP\Core;

Expand Down Expand Up @@ -126,11 +126,16 @@ public static function table($export = 'all', $except = array())
public static function ExistRow($tbl)
{
global $wpdb;

if (! in_array($tbl, self::$db_table)) return false;
if (in_array($tbl,self::$db_table_exist,true)) {
$nb = self::$db_table_exist[$tbl];
} else {
$nbrows = $wpdb->get_row("SELECT count(*) as nb FROM " . DB::table($tbl));
$nbrows = wp_cache_get( "cpt_".$tbl );
if ( false === $nbrows ) {
$nbrows = $wpdb->get_row("SELECT count(*) as nb FROM " . DB::table($tbl));
wp_cache_set( "cpt_".$tbl, $nbrows );
}
$nb = $nbrows->nb;
self::$db_table_exist+= ["$tbl" => $nb];
}
Expand Down
21 changes: 18 additions & 3 deletions inc/Core/Enqueue.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.0.0
* @Version 1.3.8
*/
namespace STATS4WP\Core;

use STATS4WP\Core\Options;

class Enqueue
{
public function register() {
Expand All @@ -28,11 +30,24 @@ public function admin_enqueue() {
if (WP_DEBUG) {
wp_enqueue_style( STATS4WP_NAME."_admin", STATS4WP_URL . 'assets/css/admin-customizer.css', false,STATS4WP_VERSION);
wp_enqueue_script( STATS4WP_NAME."_admin", STATS4WP_URL . 'assets/js/admin.js', array('jquery'), STATS4WP_VERSION, true );
wp_enqueue_script( "chart-js", STATS4WP_URL . 'assets/js/chart.js', array('jquery'), STATS4WP_CHARTJS_VERSION, true );
if (Options::get_option('cdn_chartjs') === false ) {
wp_enqueue_script( "chart-js", STATS4WP_URL . 'assets/js/chart.js', array('jquery'), STATS4WP_CHARTJS_VERSION, true );
} else {
wp_enqueue_script( "chart-js", "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/" . STATS4WP_CHARTJS_VERSION . "/chart.umd.js", array('jquery'), STATS4WP_CHARTJS_VERSION, true );
}
} else {
wp_enqueue_style( STATS4WP_NAME."_admin", STATS4WP_URL . 'assets/css/admin-customizer.min.css', false,STATS4WP_VERSION);
wp_enqueue_script( STATS4WP_NAME."_admin", STATS4WP_URL . 'assets/js/admin.min.js', array('jquery'), STATS4WP_VERSION, true );
wp_enqueue_script( "chart-js", STATS4WP_URL . 'assets/js/chart.min.js', array('jquery'), STATS4WP_CHARTJS_VERSION, true );
if (Options::get_option('cdn_chartjs') === false ) {
wp_enqueue_script( "chart-js", STATS4WP_URL . 'assets/js/chart.min.js', array('jquery'), STATS4WP_CHARTJS_VERSION, true );
} else {
wp_enqueue_script( "chart-js", "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/" . STATS4WP_CHARTJS_VERSION . "/chart.umd.min.js
", array('jquery'), STATS4WP_CHARTJS_VERSION, true );
}

}
}

Expand Down
4 changes: 2 additions & 2 deletions inc/Core/Install.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.0.0
* @Version 1.3.8
*/
namespace STATS4WP\Core;

Expand Down Expand Up @@ -89,7 +89,7 @@ public static function table_sql()
date date NOT NULL,
count int(11) NOT NULL,
id int(11) NOT NULL,
KEY `UPDSTATS` (`date`,`type`),
KEY `UPDSTATS` (`date`,`type`,`id`),
KEY `SELDATE` (`date`),
PRIMARY KEY (`page_id`)
) {$collate}");
Expand Down
4 changes: 2 additions & 2 deletions inc/Ui/DashBoard.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.3.2
* @Version 1.3.8
*/

namespace STATS4WP\Ui;
Expand Down Expand Up @@ -45,7 +45,7 @@ public function register()

public function setPages()
{
$icon_svg = "data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' standalone='no'?%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'%3e%3csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='20pt' height='20pt' viewBox='0 0 256.000000 256.000000' preserveAspectRatio='xMidYMid meet'%3e%3cg transform='translate(0.000000,256.000000) scale(0.100000,-0.100000)' fill='%23000000' stroke='none'%3e%3cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(65.490196%25,66.27451%25,67.45098%25);fill-opacity:1;' d='M614 2470 c-5 -5 -43 -10 -84 -12 l-75 -3 1 -55 c1 -46 22 -126 60 -225 4 -11 -16 9 -44 44 -59 73 -102 107 -154 123 -32 9 -40 8 -63 -10 -14 -12 -41 -26 -59 -32 -28 -9 -32 -14 -28 -40 2 -16 -3 -43 -12 -61 -9 -18 -16 -38 -16 -44 0 -7 -11 -20 -25 -29 -19 -12 -25 -25 -25 -51 0 -20 -8 -41 -19 -52 -10 -10 -21 -36 -24 -58 -4 -22 -14 -45 -23 -52 -13 -10 -14 -19 -6 -60 8 -33 8 -70 0 -120 -9 -63 -8 -76 8 -110 11 -21 35 -48 54 -61 48 -33 108 -26 285 31 253 82 340 94 439 61 39 -14 51 -23 63 -53 20 -47 115 -209 142 -241 11 -14 -5 21 -37 76 -86 150 -116 232 -108 288 11 74 73 153 231 296 79 71 153 145 164 163 35 56 24 105 -28 122 -10 3 -32 23 -49 44 -32 40 -99 71 -154 71 -18 0 -33 8 -44 25 -22 34 -48 39 -102 20 -44 -16 -53 -16 -126 -1 -89 18 -128 20 -142 6z'/%3e%3cpath d='M1775 2383 c-45 -23 -85 -64 -102 -103 -8 -19 -19 -93 -24 -165 -5 -71 -14 -155 -20 -185 -26 -130 -105 -284 -221 -427 -42 -51 -60 -65 -109 -84 -33 -12 -58 -23 -56 -25 1 -2 29 4 61 12 l57 15 67 -36 c197 -109 326 -259 474 -550 87 -172 103 -195 132 -195 28 0 43 16 48 49 2 19 18 30 82 57 87 37 126 67 126 98 0 15 14 27 50 43 44 19 50 26 50 51 0 16 9 37 20 47 33 30 87 125 105 185 9 30 24 72 32 93 14 32 14 45 3 91 -10 42 -10 65 -1 100 16 64 14 94 -10 143 -18 38 -27 45 -75 59 -61 17 -87 14 -243 -31 -86 -25 -185 -33 -196 -15 -11 17 75 51 204 80 198 45 266 75 302 134 46 76 -1 205 -76 206 -11 1 -29 14 -40 32 -30 47 -70 73 -115 73 -36 0 -41 3 -57 39 -22 50 -39 66 -67 66 -13 0 -29 7 -36 15 -7 8 -30 18 -52 22 -22 3 -45 12 -51 20 -36 44 -49 52 -94 58 -26 3 -65 14 -85 25 -44 24 -45 24 -83 3z'/%3e%3cpath d='M1140 1360 c-8 -5 -10 -10 -5 -10 6 0 17 5 25 10 8 5 11 10 5 10 -5 0 -17 -5 -25 -10z'/%3e%3cpath d='M1090 1340 c-8 -5 -10 -10 -5 -10 6 0 17 5 25 10 8 5 11 10 5 10 -5 0 -17 -5 -25 -10z'/%3e%3cpath d='M1030 1326 c0 -2 8 -10 18 -17 15 -13 16 -12 3 4 -13 16 -21 21 -21 13z'/%3e%3cpath d='M950 1271 c-137 -80 -246 -206 -289 -334 -29 -84 -39 -176 -20 -188 26 -16 29 -10 29 55 0 82 29 176 78 252 47 72 155 174 228 215 50 29 64 40 47 38 -5 0 -37 -18 -73 -38z'/%3e%3cpath d='M1081 1265 c14 -16 85 -95 158 -174 73 -79 155 -178 183 -220 27 -42 51 -77 52 -79 2 -1 8 4 15 11 21 26 -95 163 -325 387 -60 58 -97 92 -83 75z'/%3e%3cpath d='M142 624 c-27 -19 -29 -64 -4 -86 9 -9 34 -21 55 -28 30 -9 38 -16 35 -33 -2 -16 -11 -23 -33 -25 -24 -3 -35 3 -57 29 l-28 33 0 -39 0 -40 56 -2 c76 -4 114 17 114 63 0 27 -25 48 -73 64 -45 14 -58 37 -32 56 27 20 33 18 66 -17 l29 -31 0 34 0 34 -53 2 c-34 1 -60 -3 -75 -14z'/%3e%3cpath d='M290 610 c0 -34 15 -40 25 -11 6 21 31 34 46 25 5 -3 9 -43 9 -90 0 -78 -2 -85 -22 -94 -17 -6 -7 -9 42 -9 49 0 61 2 48 10 -15 8 -18 25 -18 99 0 97 6 105 45 65 l25 -24 0 29 0 30 -100 0 -100 0 0 -30z'/%3e%3cpath d='M591 618 c-37 -97 -65 -156 -83 -170 -20 -18 -19 -18 28 -18 42 0 46 2 30 13 -30 22 -12 57 29 57 44 0 68 -35 39 -57 -15 -11 -10 -13 45 -13 61 0 63 1 43 18 -12 9 -37 55 -56 102 -36 88 -59 110 -75 68z m24 -80 c6 -25 5 -28 -19 -28 -30 0 -29 -2 -15 39 12 35 24 31 34 -11z'/%3e%3cpath d='M730 610 c0 -34 15 -40 25 -11 6 21 31 34 46 25 5 -3 9 -43 9 -90 0 -78 -2 -85 -22 -94 -17 -6 -7 -9 42 -9 49 0 61 2 48 10 -15 8 -18 25 -18 99 0 97 6 105 45 65 l25 -24 0 29 0 30 -100 0 -100 0 0 -30z'/%3e%3cpath d='M982 624 c-27 -19 -29 -64 -4 -86 9 -9 34 -21 55 -28 30 -9 38 -16 35 -33 -2 -16 -11 -23 -33 -25 -24 -3 -35 3 -57 29 l-28 33 0 -39 0 -40 56 -2 c76 -4 114 17 114 63 0 27 -25 48 -73 64 -45 14 -58 37 -32 56 27 20 33 18 66 -17 l29 -31 0 34 0 34 -53 2 c-34 1 -60 -3 -75 -14z'/%3e%3cpath d='M1218 431 c-49 -60 -88 -119 -88 -130 0 -20 5 -21 80 -21 l80 0 0 -45 0 -45 45 0 45 0 0 45 c0 41 2 45 25 45 20 0 25 5 25 25 0 20 -5 25 -25 25 l-25 0 0 105 0 105 -37 0 c-36 0 -42 -6 -125 -109z m72 -31 l0 -70 -60 0 -61 0 57 70 c31 39 58 70 60 70 2 0 4 -31 4 -70z'/%3e%3cpath d='M1535 397 c10 -8 32 -54 50 -103 41 -114 56 -118 85 -23 12 39 25 68 29 63 4 -5 18 -37 31 -72 31 -84 46 -79 81 27 16 46 36 92 45 103 16 17 15 18 -26 18 -40 0 -42 -1 -25 -14 19 -14 19 -15 -1 -78 l-20 -63 -22 65 c-12 36 -26 71 -31 79 -16 26 -38 3 -55 -58 -9 -34 -20 -61 -25 -61 -4 0 -15 23 -24 52 -12 38 -13 55 -5 65 8 10 -1 13 -48 13 -51 0 -56 -2 -39 -13z'/%3e%3cpath d='M1893 396 c14 -11 17 -29 17 -94 0 -67 -3 -83 -17 -91 -14 -8 -4 -10 42 -10 53 0 58 1 42 13 -12 10 -17 24 -15 43 3 24 9 29 40 34 50 8 68 25 68 65 0 45 -21 54 -117 54 -67 -1 -76 -3 -60 -14z m111 -12 c9 -8 16 -24 16 -34 0 -22 -26 -50 -46 -50 -10 0 -14 12 -14 43 0 59 14 72 44 41z'/%3e%3c/g%3e%3c/svg%3e";
$icon_svg = STATS4WP_URL . 'assets/images/logo-end.png';;
if( !function_exists('get_plugin_data') ){
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
Expand Down
17 changes: 9 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: vanhoucke
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, maps, map
Requires at least: 5.2
Tested up to: 6.0
Tested up to: 6.1.1
Requires PHP: 7.4
Stable tag: 1.3.6
Stable tag: 1.3.8
License: GPLv2

This plugin gives you the complete information on your website's visitors.
Expand Down Expand Up @@ -101,14 +101,15 @@ Source: https://developers.google.com/chart/interactive/docs/gallery/geochart

== Changelog ==

= 1.3.7 (2211-SFP3) =
*Release Date - 13 November 2022*
= 1.3.8 (2302-SFP1) =
*Release Date - 05 Febrary 2023*

* Update ChartJS 3.7.1 to 3.9.1,
* Composer: Php require >=7.3 to ^7.3||^8.0,
* Update GeoIP Database 20221111,
* Update ChartJS 3.9.1 to 4.2.0,
* Add option CDN for ChartJS,
* Update GeoIP Database 20230203,
* Add device type gaming and television,
* Add agent type opera and Samsung Internet,
* request Optimisation,
* Correction multisite uninstall,
* Correction php warning.

See [changelog.txt](https://plugins.svn.wordpress.org/stats4wp/trunk/changelog.txt) for older changelog
Expand Down
8 changes: 4 additions & 4 deletions stats4wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Plugin Name: stats4wp
Plugin URI: https://ginkgos.net/plugin/stats4wp/
Description: Statistics For WorPress.
Version: 1.3.7
Version: 1.3.8
Requires at least: 5.2
Tested up to: 6.1
Tested up to: 6.1.1
Requires PHP: 7.4
Author: Franck VANHOUCKE
Author URI: https://ginkgos.net/
Expand Down Expand Up @@ -40,12 +40,12 @@
/**
* Plugin variable information
*/
define('STATS4WP_VERSION', '1.3.7' );
define('STATS4WP_VERSION', '1.3.8' );
define('STATS4WP_NAME', 'stats4wp' );
define('STATS4WP_FILE', __FILE__ );
define('STATS4WP_PATH', plugin_dir_path( STATS4WP_FILE ) );
define('STATS4WP_URL', plugin_dir_url( STATS4WP_FILE ) );
define('STATS4WP_CHARTJS_VERSION', '3.9.1' );
define('STATS4WP_CHARTJS_VERSION', '4.2.0' );


/**
Expand Down
11 changes: 9 additions & 2 deletions templates-part/dashboard/country-maps.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package STATS4WPPlugin
* @Version 1.3.2
* @Version 1.3.8
*
* Desciption: Contry Maps
*/
Expand All @@ -23,7 +23,14 @@
<h2 class="hndle ui-sortable-handle"><?php _e('Users country maps for last year', 'stats4wp'); ?></h2>
</div>
<div class="inside">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<?php
if (Options::get_option('cdn_chartjs') === false ) {
echo '<script type="text/javascript" src="' . STATS4WP_URL . 'assets/js/loader.js"></script>';
} else {
echo '<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>';
}
?>

<script type="text/javascript">
google.charts.load('current', {
'packages':['geochart'],
Expand Down
Loading

0 comments on commit aa696a1

Please sign in to comment.