WP Statistics - Version 12.6.7

Version Description

  • Improvement and sanitize visitor's IP address.
  • Improved: Minor issues.
Download this release

Release Info

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

Code changes from version 12.6.6.1 to 12.6.7

assets/images/welcome/what-is-new/coupon-code.png CHANGED
Binary file
assets/js/admin.js CHANGED
@@ -12,25 +12,6 @@ jQuery(document).ready(function () {
12
  });
13
  }
14
 
15
- // Check about page
16
- if (jQuery('.wp-statistics-welcome').length) {
17
- jQuery('.nav-tab-wrapper a').click(function () {
18
- var tab_id = jQuery(this).attr('data-tab');
19
-
20
- if (tab_id == 'link') {
21
- return true;
22
- }
23
-
24
- jQuery('.nav-tab-wrapper a').removeClass('nav-tab-active');
25
- jQuery('.tab-content').removeClass('current');
26
-
27
- jQuery("[data-tab=" + tab_id + "]").addClass('nav-tab-active');
28
- jQuery("[data-content=" + tab_id + "]").addClass('current');
29
-
30
- return false;
31
- });
32
- }
33
-
34
  // Check the Condition Require Setting Api
35
  function wp_statistics_check_condition_view_option(selector, field) {
36
  jQuery(document).on("change", selector, function (e) {
12
  });
13
  }
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  // Check the Condition Require Setting Api
16
  function wp_statistics_check_condition_view_option(selector, field) {
17
  jQuery(document).on("change", selector, function (e) {
includes/classes/class-wp-statistics-frontend.php CHANGED
@@ -102,7 +102,7 @@ class WP_Statistics_Frontend {
102
  $params['api'] = rtrim( rest_get_url_prefix(), "/" );
103
 
104
  //Set ip
105
- $params['ip'] = $WP_Statistics->get_IP();
106
 
107
  //set hash ip
108
  $params['hash_ip'] = $WP_Statistics->get_hash_string();
@@ -134,7 +134,7 @@ class WP_Statistics_Frontend {
134
  $params['current_page_id'] = $get_page_type['id'];
135
 
136
  if ( array_key_exists( "search_query", $get_page_type ) ) {
137
- $params['search_query'] = $get_page_type['search_query'];
138
  }
139
 
140
  //page url
102
  $params['api'] = rtrim( rest_get_url_prefix(), "/" );
103
 
104
  //Set ip
105
+ $params['ip'] = esc_html( $WP_Statistics->get_IP() );
106
 
107
  //set hash ip
108
  $params['hash_ip'] = $WP_Statistics->get_hash_string();
134
  $params['current_page_id'] = $get_page_type['id'];
135
 
136
  if ( array_key_exists( "search_query", $get_page_type ) ) {
137
+ $params['search_query'] = esc_html( $get_page_type['search_query'] );
138
  }
139
 
140
  //page url
includes/classes/class-wp-statistics-hits.php CHANGED
@@ -650,9 +650,9 @@ class WP_Statistics_Hits {
650
  $page_uri = substr( $page_uri, 0, 255 );
651
 
652
  // If we have already been to this page today (a likely scenario), just update the count on the record.
653
- $exist = $wpdb->get_row( "SELECT `page_id` FROM {$wpdb->prefix}statistics_pages WHERE `date` = '{$WP_Statistics->Current_Date( 'Y-m-d' )}' " . ( $is_search === true ? "AND `uri` = '" . $page_uri . "'" : "" ) . "AND `type` = '{$this->current_page_type}' AND `id` = {$this->current_page_id}", ARRAY_A );
654
  if ( null !== $exist ) {
655
- $sql = $wpdb->prepare( "UPDATE {$wpdb->prefix}statistics_pages SET `count` = `count` + 1 WHERE `date` = '{$WP_Statistics->Current_Date( 'Y-m-d' )}' " . ( $is_search === true ? "AND `uri` = '" . $page_uri . "'" : "" ) . "AND `type` = '{$this->current_page_type}' AND `id` = %d", $this->current_page_id );
656
  $this->result = $wpdb->query( $sql );
657
  $page_id = $exist['page_id'];
658
 
650
  $page_uri = substr( $page_uri, 0, 255 );
651
 
652
  // If we have already been to this page today (a likely scenario), just update the count on the record.
653
+ $exist = $wpdb->get_row( "SELECT `page_id` FROM {$wpdb->prefix}statistics_pages WHERE `date` = '{$WP_Statistics->Current_Date( 'Y-m-d' )}' " . ( $is_search === true ? "AND `uri` = '" . esc_sql( $page_uri ) . "'" : "" ) . "AND `type` = '{$this->current_page_type}' AND `id` = {$this->current_page_id}", ARRAY_A );
654
  if ( null !== $exist ) {
655
+ $sql = $wpdb->prepare( "UPDATE {$wpdb->prefix}statistics_pages SET `count` = `count` + 1 WHERE `date` = '{$WP_Statistics->Current_Date( 'Y-m-d' )}' " . ( $is_search === true ? "AND `uri` = '" . esc_sql( $page_uri ) . "'" : "" ) . "AND `type` = '{$this->current_page_type}' AND `id` = %d", $this->current_page_id );
656
  $this->result = $wpdb->query( $sql );
657
  $page_id = $exist['page_id'];
658
 
includes/classes/class-wp-statistics-welcome.php CHANGED
@@ -34,19 +34,23 @@ class WP_Statistics_Welcome {
34
  * Welcome page
35
  */
36
  public static function page_callback() {
37
- $response = wp_remote_get( 'https://wp-statistics.com/wp-json/plugin/addons' );
38
- $response_code = wp_remote_retrieve_response_code( $response );
39
- $error = null;
40
- $plugins = array();
41
 
42
- // Check response
43
- if ( is_wp_error( $response ) ) {
44
- $error = $response->get_error_message();
45
- } else {
46
- if ( $response_code == '200' ) {
47
- $plugins = json_decode( $response['body'] );
 
 
 
 
48
  } else {
49
- $error = $response['body'];
 
 
 
 
50
  }
51
  }
52
 
34
  * Welcome page
35
  */
36
  public static function page_callback() {
 
 
 
 
37
 
38
+ // Create Default Variable
39
+ $error = null;
40
+ $plugins = array();
41
+
42
+ // Check List Plugins if in Plugins Tab
43
+ if ( isset( $_GET['tab'] ) and $_GET['tab'] == "addons" ) {
44
+ $response = wp_remote_get( 'https://wp-statistics.com/wp-json/plugin/addons' );
45
+ $response_code = wp_remote_retrieve_response_code( $response );
46
+ if ( is_wp_error( $response ) ) {
47
+ $error = $response->get_error_message();
48
  } else {
49
+ if ( $response_code == '200' ) {
50
+ $plugins = json_decode( $response['body'] );
51
+ } else {
52
+ $error = $response['body'];
53
+ }
54
  }
55
  }
56
 
includes/classes/class-wp-statistics.php CHANGED
@@ -813,7 +813,7 @@ class WP_Statistics {
813
 
814
  // Get User IP
815
  if ( isset( $_SERVER[ $ip_method ] ) ) {
816
- $this->ip = $_SERVER[ $ip_method ];
817
  }
818
 
819
  /**
813
 
814
  // Get User IP
815
  if ( isset( $_SERVER[ $ip_method ] ) ) {
816
+ $this->ip = sanitize_text_field( $_SERVER[ $ip_method ] );
817
  }
818
 
819
  /**
includes/log/top-referring.php CHANGED
@@ -51,13 +51,16 @@ if ( $referr ) {
51
  } else {
52
 
53
  //Get Wordpress Domain
54
- $site_url = wp_parse_url( get_site_url() );
55
- $site_url = $site_url['scheme'] . "://" . $site_url['host'];
 
 
 
56
 
57
  //Get List referred
58
  $result = $wpdb->get_results(
59
  $wpdb->prepare(
60
- "SELECT SUBSTRING_INDEX(REPLACE( REPLACE( referred, 'http://', '') , 'https://' , '') , '/', 1 ) as `domain`, count(referred) as `number` FROM {$wpdb->prefix}statistics_visitor WHERE `referred` REGEXP \"^(https?://|www\\.)[\.A-Za-z0-9\-]+\\.[a-zA-Z]{2,4}\" AND referred <> '' AND LENGTH(referred) >=12 AND `referred` NOT LIKE '{$site_url}%' AND `last_counter` BETWEEN %s AND %s GROUP BY domain ORDER BY `number` DESC",
61
  $rangestartdate,
62
  $rangeenddate
63
  )
51
  } else {
52
 
53
  //Get Wordpress Domain
54
+ $where = '';
55
+ $domain_name = rtrim( preg_replace( '/^https?:\/\//', '', get_site_url() ), " / " );
56
+ foreach ( array( "http", "https", "ftp" ) as $protocol ) {
57
+ $where = " AND `referred` NOT LIKE '{$protocol}://{$domain_name}%' ";
58
+ }
59
 
60
  //Get List referred
61
  $result = $wpdb->get_results(
62
  $wpdb->prepare(
63
+ "SELECT SUBSTRING_INDEX(REPLACE( REPLACE( referred, 'http://', '') , 'https://' , '') , '/', 1 ) as `domain`, count(referred) as `number` FROM {$wpdb->prefix}statistics_visitor WHERE `referred` REGEXP \"^(https?://|www\\.)[\.A-Za-z0-9\-]+\\.[a-zA-Z]{2,4}\" AND referred <> '' AND LENGTH(referred) >=12 AND `last_counter` BETWEEN %s AND %s {$where} GROUP BY domain ORDER BY `number` DESC",
64
  $rangestartdate,
65
  $rangeenddate
66
  )
includes/log/widgets/referring.php CHANGED
@@ -6,9 +6,12 @@ function wp_statistics_generate_referring_postbox_content( $count = 10 ) {
6
  if ( false === ( $get_urls = get_transient( 'wps_top_referring' ) ) ) {
7
 
8
  //Get Wordpress Domain
9
- $site_url = wp_parse_url( get_site_url() );
10
- $site_url = $site_url['scheme'] . "://" . $site_url['host'];
11
- $result = $wpdb->get_results( "SELECT SUBSTRING_INDEX(REPLACE( REPLACE( referred, 'http://', '') , 'https://' , '') , '/', 1 ) as `domain`, count(referred) as `number` FROM {$wpdb->prefix}statistics_visitor WHERE `referred` REGEXP \"^(https?://|www\\.)[\.A-Za-z0-9\-]+\\.[a-zA-Z]{2,4}\" AND referred <> '' AND LENGTH(referred) >=12 AND `referred` NOT LIKE '{$site_url}%' GROUP BY domain ORDER BY `number` DESC LIMIT $count" );
 
 
 
12
  foreach ( $result as $items ) {
13
  $get_urls[ $items->domain ] = wp_statistics_get_number_referer_from_domain( $items->domain );
14
  }
@@ -33,7 +36,7 @@ function wp_statistics_generate_referring_postbox_content( $count = 10 ) {
33
  $referrer_list = ( empty( $refer_opt ) ? array() : $refer_opt );
34
 
35
  if ( ! $get_urls ) {
36
- return;
37
  }
38
 
39
  foreach ( $get_urls as $domain => $number ) {
6
  if ( false === ( $get_urls = get_transient( 'wps_top_referring' ) ) ) {
7
 
8
  //Get Wordpress Domain
9
+ $where = '';
10
+ $domain_name = rtrim( preg_replace( '/^https?:\/\//', '', get_site_url() ), " / " );
11
+ foreach ( array( "http", "https", "ftp" ) as $protocol ) {
12
+ $where = " AND `referred` NOT LIKE '{$protocol}://{$domain_name}%' ";
13
+ }
14
+ $result = $wpdb->get_results( "SELECT SUBSTRING_INDEX(REPLACE( REPLACE( referred, 'http://', '') , 'https://' , '') , '/', 1 ) as `domain`, count(referred) as `number` FROM {$wpdb->prefix}statistics_visitor WHERE `referred` REGEXP \"^(https?://|www\\.)[\.A-Za-z0-9\-]+\\.[a-zA-Z]{2,4}\" AND referred <> '' AND LENGTH(referred) >=12 {$where} GROUP BY domain ORDER BY `number` DESC LIMIT $count" );
15
  foreach ( $result as $items ) {
16
  $get_urls[ $items->domain ] = wp_statistics_get_number_referer_from_domain( $items->domain );
17
  }
36
  $referrer_list = ( empty( $refer_opt ) ? array() : $refer_opt );
37
 
38
  if ( ! $get_urls ) {
39
+ return;
40
  }
41
 
42
  foreach ( $get_urls as $domain => $number ) {
includes/templates/welcome.php CHANGED
@@ -11,165 +11,174 @@
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( 'New Product', 'wp-statistics' ); ?></a>
15
- <a href="#" class="nav-tab" data-tab="addons"><?php _e( 'Add-Ons', 'wp-statistics' ); ?></a>
16
- <a href="#" class="nav-tab" data-tab="credit"><?php _e( 'Credits', 'wp-statistics' ); ?></a>
17
- <a href="#" class="nav-tab" data-tab="changelog"><?php _e( 'Changelog', 'wp-statistics' ); ?></a>
18
  <a href="https://wp-statistics.com/donate/" class="nav-tab donate" data-tab="link" target="_blank"><?php _e( 'Donate', 'wp-statistics' ); ?></a>
19
  </h2>
20
 
21
- <div data-content="whats-news" class="tab-content current">
22
- <section class="center-section">
23
- <div class="left">
24
- <div class="content-padding">
25
- <h2><?php _e( 'WP-Telegram Notifications', 'wp-statistics' ); ?></h2>
26
- <h4><?php echo sprintf( __( 'A new plugin from <a href="%s" target="_blank">VeronaLabs</a>.', 'wp-statistics' ), 'https://veronalabs.com' ); ?></h4>
27
-
28
- <a href="https://wp-telegram.com/purchase/" target="_blank">
29
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/coupon-code.png' ); ?>"/>
30
- </a>
 
 
31
  </div>
32
- </div>
33
- </section>
34
-
35
- <section class="normal-section">
36
- <div class="left">
37
- <div class="content-padding">
38
- <h2><?php _e( 'Connect with customers', 'wp-statistics' ); ?></h2>
39
- <p><?php _e( 'Your customers can easily send their message using the box placed on your website.', 'wp-statistics' ); ?></p>
40
  </div>
41
- </div>
42
 
43
- <style>
44
- div#wp-telegram-chatbox img {
45
- width: 270px;
46
- display: inline-block;
47
- }
48
- </style>
49
 
50
- <div class="right text-center" id="wp-telegram-chatbox">
51
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-chatbox.gif' ); ?>"/>
52
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-iphone-2.png' ); ?>"/>
53
- </div>
54
- </section>
55
-
56
- <section class="normal-section">
57
- <div class="right">
58
- <div class="content-padding">
59
- <h2><?php _e( 'Send messages to your channels/Groups', 'wp-statistics' ); ?></h2>
60
- <p><?php _e( 'Simply send any message through the WordPress admin panel to your channels or groups on the telegram. No need to add a person as an admin to the channel/group to add send messages.', 'wp-statistics' ); ?></p>
61
  </div>
62
- </div>
63
-
64
- <div class="left text-center">
65
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-send.png' ); ?>"/>
66
- </div>
67
- </section>
68
-
69
- <section class="normal-section">
70
- <div class="left">
71
- <div class="content-padding">
72
- <h2><?php _e( 'Integrations & Notifications', 'wp-statistics' ); ?></h2>
73
- <p><?php _e( 'Integrate with famous plugins such as WooCommerce, CF7, GravityForms, Quforms and EDD.', 'wp-statistics' ); ?></p>
74
- <p><?php _e( 'For example: Receive the text of the messages sent in a form created with GravityForm on a particular channel or group. ', 'wp-statistics' ); ?></p>
75
  </div>
76
- </div>
77
 
78
- <div class="right text-center">
79
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-settings.png' ); ?>"/>
80
- </div>
81
- </section>
82
-
83
- <section class="normal-section">
84
- <div class="right">
85
- <div class="content-padding">
86
- <h2><?php _e( 'Supports multiple channels or groups', 'wp-statistics' ); ?></h2>
87
- <p><?php _e( 'You can add as many channels/groups as you want to the panel and arrange different tasks in different channels/groups.', 'wp-statistics' ); ?></p>
88
- <p><?php _e( 'For example, different groups for sales, marketing, support or technical team.', 'wp-statistics' ); ?></p>
 
89
  </div>
90
- </div>
91
 
92
- <div class="left text-center">
93
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-channels.png' ); ?>"/>
94
- </div>
95
- </section>
96
-
97
- <section class="center-section">
98
- <div class="left">
99
- <div class="content-padding">
100
- <a href="https://wp-telegram.com/purchase/" target="_blank">
101
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/coupon-code.png' ); ?>"/>
102
- </a>
 
103
  </div>
104
- </div>
105
- </section>
106
 
107
- <section class="center-section">
108
- <div class="left">
109
- <div class="content-padding">
110
- <h3>Follow us on Social Media</h3>
 
 
 
 
 
 
 
 
111
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
- <a href="https://github.com/veronalabs" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-github.png' ); ?>"/></a>
114
- <a href="https://www.instagram.com/veronalabs/" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-instagram.png' ); ?>"/></a>
115
- <a href="https://www.linkedin.com/company/veronalabs/" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-linkedin.png' ); ?>"/></a>
116
- <a href="https://twitter.com/veronalabs" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-twitter.png' ); ?>"/></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  </div>
118
- </section>
119
- </div>
120
-
121
- <div data-content="addons" class="tab-content">
122
- <section class="center-section">
123
- <?php include( WP_Statistics::$reg['plugin-dir'] . "includes/templates/add-ons.php" ); ?>
124
- </section>
125
- </div>
126
 
127
- <div data-content="credit" class="tab-content">
128
- <div class="about-wrap-content">
129
- <p class="about-description"><?php echo sprintf( __( 'WP-Statistics is created by some people and is one of the <a href="%s" target="_blank">VeronaLabs.com</a> projects.', 'wp-statistics' ), 'https://veronalabs.com' ); ?></p>
130
- <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'wp-statistics' ); ?></h3>
131
- <ul class="wp-people-group ">
132
- <li class="wp-person">
133
- <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>
134
- <span class="title"><?php _e( 'Original Author', 'wp-statistics' ); ?></span>
135
- </li>
136
- </ul>
137
- <h3 class="wp-people-group"><?php _e( 'Other Contributors', 'wp-statistics' ); ?></h3>
138
- <ul class="wp-people-group">
139
- <li class="wp-person">
140
- <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>
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/ghasemi71ir" class="web"><?php echo get_avatar( 'ghasemi71ir@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mohammad Ghasemi', '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/gregross" class="web"><?php echo get_avatar( 'greg@toolstack.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Greg Ross', '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/dedidata" class="web"><?php echo get_avatar( 'dedidata.com@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Farhad Sakhaei', 'wp-statistics' ); ?></a>
153
- <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
154
- </li>
155
- <li class="wp-person">
156
- <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>
157
- <span class="title"><?php _e( 'Language Contributor', 'wp-statistics' ); ?></span>
158
- </li>
159
- </ul>
160
-
161
- <p class="clear"><?php echo sprintf( __( 'WP-Statistics is being developed on GitHub, if you’re interested in contributing to the plugin, please look at the <a href="%s" target="_blank">GitHub page</a>.', 'wp-statistics' ), 'https://github.com/wp-statistics/wp-statistics' ); ?></p>
162
- <h3 class="wp-people-group"><?php _e( 'External Libraries', 'wp-statistics' ); ?></h3>
163
- <p class="wp-credits-list">
164
- <a target="_blank" href="https://maxmind.com/">MaxMind</a>,
165
- <a target="_blank" href="https://www.chartjs.org/">Chart.js</a>,
166
- <a target="_blank" href="https://whichbrowser.net/">WhichBrowser</a>.</p>
167
  </div>
168
- </div>
169
 
170
- <div data-content="changelog" class="tab-content">
171
- <?php WP_Statistics_Welcome::show_change_log(); ?>
172
- </div>
173
  <hr style="clear: both;">
174
  <div class="wps-return-to-dashboard">
175
  <a href="<?php echo WP_Statistics_Admin_Pages::admin_url( 'overview' ); ?>"><?php _e( 'Go to Statistics &rarr; Overview', 'wp-statistics' ); ?></a>
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="<?php echo add_query_arg( array( 'page' => 'wps_welcome', 'tab' => 'whats-news' ), admin_url( 'admin.php' ) ); ?>" class="nav-tab <?php echo( ( ! isset( $_GET['tab'] ) || ( isset( $_GET['tab'] ) and $_GET['tab'] == "whats-news" ) ) ? "nav-tab-active" : "" ); ?>" data-tab="whats-news"><?php _e( 'New Product', 'wp-statistics' ); ?></a>
15
+ <a href="<?php echo add_query_arg( array( 'page' => 'wps_welcome', 'tab' => 'addons' ), admin_url( 'admin.php' ) ); ?>" class="nav-tab <?php echo( ( isset( $_GET['tab'] ) and $_GET['tab'] == "addons" ) ? "nav-tab-active" : "" ); ?>" data-tab="addons"><?php _e( 'Add-Ons', 'wp-statistics' ); ?></a>
16
+ <a href="<?php echo add_query_arg( array( 'page' => 'wps_welcome', 'tab' => 'credit' ), admin_url( 'admin.php' ) ); ?>" class="nav-tab <?php echo( ( isset( $_GET['tab'] ) and $_GET['tab'] == "credit" ) ? "nav-tab-active" : "" ); ?>" data-tab="credit"><?php _e( 'Credits', 'wp-statistics' ); ?></a>
17
+ <a href="<?php echo add_query_arg( array( 'page' => 'wps_welcome', 'tab' => 'changelog' ), admin_url( 'admin.php' ) ); ?>" class="nav-tab <?php echo( ( isset( $_GET['tab'] ) and $_GET['tab'] == "changelog" ) ? "nav-tab-active" : "" ); ?>" data-tab="changelog"><?php _e( 'Changelog', 'wp-statistics' ); ?></a>
18
  <a href="https://wp-statistics.com/donate/" class="nav-tab donate" data-tab="link" target="_blank"><?php _e( 'Donate', 'wp-statistics' ); ?></a>
19
  </h2>
20
 
21
+ <?php if ( ! isset( $_GET['tab'] ) || ( isset( $_GET['tab'] ) and $_GET['tab'] == "whats-news" ) ) { ?>
22
+ <div data-content="whats-news" class="tab-content current">
23
+ <section class="center-section">
24
+ <div class="left">
25
+ <div class="content-padding">
26
+ <h2><?php _e( 'WP-Telegram Notifications', 'wp-statistics' ); ?></h2>
27
+ <h4><?php echo sprintf( __( 'A new plugin from <a href="%s" target="_blank">VeronaLabs</a>.', 'wp-statistics' ), 'https://veronalabs.com' ); ?></h4>
28
+
29
+ <a href="https://wp-telegram.com/purchase/" target="_blank">
30
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/coupon-code.png' ); ?>"/>
31
+ </a>
32
+ </div>
33
  </div>
34
+ </section>
35
+
36
+ <section class="normal-section">
37
+ <div class="left">
38
+ <div class="content-padding">
39
+ <h2><?php _e( 'Connect with customers', 'wp-statistics' ); ?></h2>
40
+ <p><?php _e( 'Your customers can easily send their message using the box placed on your website.', 'wp-statistics' ); ?></p>
41
+ </div>
42
  </div>
 
43
 
44
+ <style>
45
+ div#wp-telegram-chatbox img {
46
+ width: 270px;
47
+ display: inline-block;
48
+ }
49
+ </style>
50
 
51
+ <div class="right text-center" id="wp-telegram-chatbox">
52
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-chatbox.gif' ); ?>"/>
53
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-iphone-2.png' ); ?>"/>
 
 
 
 
 
 
 
 
54
  </div>
55
+ </section>
56
+
57
+ <section class="normal-section">
58
+ <div class="right">
59
+ <div class="content-padding">
60
+ <h2><?php _e( 'Send messages to your channels/Groups', 'wp-statistics' ); ?></h2>
61
+ <p><?php _e( 'Simply send any message through the WordPress admin panel to your channels or groups on the telegram. No need to add a person as an admin to the channel/group to add send messages.', 'wp-statistics' ); ?></p>
62
+ </div>
 
 
 
 
 
63
  </div>
 
64
 
65
+ <div class="left text-center">
66
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-send.png' ); ?>"/>
67
+ </div>
68
+ </section>
69
+
70
+ <section class="normal-section">
71
+ <div class="left">
72
+ <div class="content-padding">
73
+ <h2><?php _e( 'Integrations & Notifications', 'wp-statistics' ); ?></h2>
74
+ <p><?php _e( 'Integrate with famous plugins such as WooCommerce, CF7, GravityForms, Quforms and EDD.', 'wp-statistics' ); ?></p>
75
+ <p><?php _e( 'For example: Receive the text of the messages sent in a form created with GravityForm on a particular channel or group. ', 'wp-statistics' ); ?></p>
76
+ </div>
77
  </div>
 
78
 
79
+ <div class="right text-center">
80
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-settings.png' ); ?>"/>
81
+ </div>
82
+ </section>
83
+
84
+ <section class="normal-section">
85
+ <div class="right">
86
+ <div class="content-padding">
87
+ <h2><?php _e( 'Supports multiple channels or groups', 'wp-statistics' ); ?></h2>
88
+ <p><?php _e( 'You can add as many channels/groups as you want to the panel and arrange different tasks in different channels/groups.', 'wp-statistics' ); ?></p>
89
+ <p><?php _e( 'For example, different groups for sales, marketing, support or technical team.', 'wp-statistics' ); ?></p>
90
+ </div>
91
  </div>
 
 
92
 
93
+ <div class="left text-center">
94
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/wp-telegram-channels.png' ); ?>"/>
95
+ </div>
96
+ </section>
97
+
98
+ <section class="center-section">
99
+ <div class="left">
100
+ <div class="content-padding">
101
+ <a href="https://wp-telegram.com/purchase/" target="_blank">
102
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/what-is-new/coupon-code.png' ); ?>"/>
103
+ </a>
104
+ </div>
105
  </div>
106
+ </section>
107
+
108
+ <section class="center-section">
109
+ <div class="left">
110
+ <div class="content-padding">
111
+ <h3>Follow us on Social Media</h3>
112
+ </div>
113
+
114
+ <a href="https://github.com/veronalabs" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-github.png' ); ?>"/></a>
115
+ <a href="https://www.instagram.com/veronalabs/" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-instagram.png' ); ?>"/></a>
116
+ <a href="https://www.linkedin.com/company/veronalabs/" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-linkedin.png' ); ?>"/></a>
117
+ <a href="https://twitter.com/veronalabs" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-twitter.png' ); ?>"/></a>
118
+ </div>
119
+ </section>
120
+ </div>
121
+ <?php } ?>
122
 
123
+ <?php if ( isset( $_GET['tab'] ) and $_GET['tab'] == "addons" ) { ?>
124
+ <div data-content="addons" class="tab-content current">
125
+ <section class="center-section">
126
+ <?php include( WP_Statistics::$reg['plugin-dir'] . "includes/templates/add-ons.php" ); ?>
127
+ </section>
128
+ </div>
129
+ <?php } ?>
130
+
131
+ <?php if ( isset( $_GET['tab'] ) and $_GET['tab'] == "credit" ) { ?>
132
+ <div data-content="credit" class="tab-content current">
133
+ <div class="about-wrap-content">
134
+ <p class="about-description"><?php echo sprintf( __( 'WP-Statistics is created by some people and is one of the <a href="%s" target="_blank">VeronaLabs.com</a> projects.', 'wp-statistics' ), 'https://veronalabs.com' ); ?></p>
135
+ <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'wp-statistics' ); ?></h3>
136
+ <ul class="wp-people-group ">
137
+ <li class="wp-person">
138
+ <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>
139
+ <span class="title"><?php _e( 'Original Author', 'wp-statistics' ); ?></span>
140
+ </li>
141
+ </ul>
142
+ <h3 class="wp-people-group"><?php _e( 'Other Contributors', 'wp-statistics' ); ?></h3>
143
+ <ul class="wp-people-group">
144
+ <li class="wp-person">
145
+ <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>
146
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
147
+ </li>
148
+ <li class="wp-person">
149
+ <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>
150
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
151
+ </li>
152
+ <li class="wp-person">
153
+ <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>
154
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
155
+ </li>
156
+ <li class="wp-person">
157
+ <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>
158
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
159
+ </li>
160
+ <li class="wp-person">
161
+ <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>
162
+ <span class="title"><?php _e( 'Language Contributor', 'wp-statistics' ); ?></span>
163
+ </li>
164
+ </ul>
165
+
166
+ <p class="clear"><?php echo sprintf( __( 'WP-Statistics is being developed on GitHub, if you’re interested in contributing to the plugin, please look at the <a href="%s" target="_blank">GitHub page</a>.', 'wp-statistics' ), 'https://github.com/wp-statistics/wp-statistics' ); ?></p>
167
+ <h3 class="wp-people-group"><?php _e( 'External Libraries', 'wp-statistics' ); ?></h3>
168
+ <p class="wp-credits-list">
169
+ <a target="_blank" href="https://maxmind.com/">MaxMind</a>,
170
+ <a target="_blank" href="https://www.chartjs.org/">Chart.js</a>,
171
+ <a target="_blank" href="https://whichbrowser.net/">WhichBrowser</a>.</p>
172
  </div>
173
+ </div>
174
+ <?php } ?>
 
 
 
 
 
 
175
 
176
+ <?php if ( isset( $_GET['tab'] ) and $_GET['tab'] == "changelog" ) { ?>
177
+ <div data-content="changelog" class="tab-content current">
178
+ <?php WP_Statistics_Welcome::show_change_log(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  </div>
180
+ <?php } ?>
181
 
 
 
 
182
  <hr style="clear: both;">
183
  <div class="wps-return-to-dashboard">
184
  <a href="<?php echo WP_Statistics_Admin_Pages::admin_url( 'overview' ); ?>"><?php _e( 'Go to Statistics &rarr; Overview', 'wp-statistics' ); ?></a>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits,
5
  Requires at least: 3.0
6
  Tested up to: 5.2.1
7
  Requires PHP: 5.6
8
- Stable tag: 12.6.6.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -126,6 +126,10 @@ http://yourwebsite.com/wp-json/wpstatistics/v1
126
  To register, go to the Permalink page and update the permalink with press Save Changes.
127
 
128
  == Changelog ==
 
 
 
 
129
  = 12.6.6.1 =
130
  * Fixed: issue to showing Hit column for custom post type.
131
  * Improvement: Sanitize page's title and Escaping that in overview page.
5
  Requires at least: 3.0
6
  Tested up to: 5.2.1
7
  Requires PHP: 5.6
8
+ Stable tag: 12.6.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
126
  To register, go to the Permalink page and update the permalink with press Save Changes.
127
 
128
  == Changelog ==
129
+ = 12.6.7 =
130
+ * Improvement and sanitize visitor's IP address.
131
+ * Improved: Minor issues.
132
+
133
  = 12.6.6.1 =
134
  * Fixed: issue to showing Hit column for custom post type.
135
  * Improvement: Sanitize page's title and Escaping that in overview page.
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
- * Version: 12.6.6.1
7
  * Author: VeronaLabs
8
  * Author URI: http://veronalabs.com/
9
  * Text Domain: wp-statistics
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
+ * Version: 12.6.7
7
  * Author: VeronaLabs
8
  * Author URI: http://veronalabs.com/
9
  * Text Domain: wp-statistics