Version Description
- Bug fixing in IP execlusion
Download this release
Release Info
Developer | osamaesh |
Plugin | Visitors Traffic Real Time Statistics |
Version | 4.5 |
Comparing to | |
See all releases |
Code changes from version 4.4 to 4.5
- Visitors-Traffic-Real-Time-Statistics.php +1 -1
- ahc_settings.php +3 -2
- functions.php +13 -6
- readme.txt +6 -1
Visitors-Traffic-Real-Time-Statistics.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Visitor Traffic Real Time Statistics
|
|
4 |
Description: Hits counter that shows analytical numbers of your WordPress site visitors and hits.
|
5 |
Author: wp-buy
|
6 |
Author URI: https://www.wp-buy.com/
|
7 |
-
Version: 4.
|
8 |
Text Domain: visitors-traffic-real-time-statistics
|
9 |
Domain Path: /languages
|
10 |
*/
|
4 |
Description: Hits counter that shows analytical numbers of your WordPress site visitors and hits.
|
5 |
Author: wp-buy
|
6 |
Author URI: https://www.wp-buy.com/
|
7 |
+
Version: 4.5
|
8 |
Text Domain: visitors-traffic-real-time-statistics
|
9 |
Domain Path: /languages
|
10 |
*/
|
ahc_settings.php
CHANGED
@@ -80,6 +80,7 @@ $ahcfree_get_save_settings = ahcfree_get_save_settings();
|
|
80 |
$hits_days = $ahcfree_get_save_settings[0]->set_hits_days;
|
81 |
$ajax_check = ($ahcfree_get_save_settings[0]->set_ajax_check * 1000);
|
82 |
$set_ips = $ahcfree_get_save_settings[0]->set_ips;
|
|
|
83 |
|
84 |
$delete_plugin_data = get_option('ahcfree_delete_plugin_data_on_uninstall');
|
85 |
$ahcfree_hide_top_bar_icon = get_option('ahcfree_hide_top_bar_icon');
|
@@ -144,8 +145,8 @@ $ahcproRobots = get_option('ahcproRobots');
|
|
144 |
</div>
|
145 |
<div class="form-group col-md-6">
|
146 |
<label for="exampleInput">IP's to exclude</label>
|
147 |
-
<textarea placeholder='192.168.1.1
|
148 |
-
<small id="Help" class="form-text text-muted">Excluded IPs will not be tracked by your counter,
|
149 |
</div>
|
150 |
|
151 |
</div>
|
80 |
$hits_days = $ahcfree_get_save_settings[0]->set_hits_days;
|
81 |
$ajax_check = ($ahcfree_get_save_settings[0]->set_ajax_check * 1000);
|
82 |
$set_ips = $ahcfree_get_save_settings[0]->set_ips;
|
83 |
+
$set_ips = str_ireplace(' ',' ',$set_ips);
|
84 |
|
85 |
$delete_plugin_data = get_option('ahcfree_delete_plugin_data_on_uninstall');
|
86 |
$ahcfree_hide_top_bar_icon = get_option('ahcfree_hide_top_bar_icon');
|
145 |
</div>
|
146 |
<div class="form-group col-md-6">
|
147 |
<label for="exampleInput">IP's to exclude</label>
|
148 |
+
<textarea placeholder='192.168.1.1 192.168.1.2' name="set_ips" id="set_ips" rows="3" class="form-control" ><?php echo esc_html($set_ips); ?></textarea>
|
149 |
+
<small id="Help" class="form-text text-muted">Excluded IPs will not be tracked by your counter, enter IP per line</small>
|
150 |
</div>
|
151 |
|
152 |
</div>
|
functions.php
CHANGED
@@ -102,7 +102,7 @@ function ahcfree_savesettings() {
|
|
102 |
|
103 |
global $wpdb;
|
104 |
|
105 |
-
|
106 |
$verify = isset($_POST['ahc_settings_send']) ? wp_verify_nonce( sanitize_text_field($_POST['ahc_settings_send']), 'ahc_settings_action' ) : false;
|
107 |
|
108 |
if ($verify && current_user_can( 'manage_options' ))
|
@@ -112,6 +112,7 @@ function ahcfree_savesettings() {
|
|
112 |
$set_ajax_check = intval($_POST['set_ajax_check']);
|
113 |
$posts_type = '';
|
114 |
$set_ips = ahc_free_sanitize_text_or_array_field($_POST['set_ips']);
|
|
|
115 |
$set_google_map = '';
|
116 |
$ahcfree_hide_top_bar_icon = isset($_POST['ahcfree_hide_top_bar_icon']) ? intval($_POST['ahcfree_hide_top_bar_icon']) : '0';
|
117 |
$ahcfree_ahcfree_haships = isset($_POST['ahcfree_ahcfree_haships']) ? intval($_POST['ahcfree_ahcfree_haships']) : '0';
|
@@ -133,11 +134,12 @@ function ahcfree_savesettings() {
|
|
133 |
{
|
134 |
foreach ($ahcproUserRoles as $v)
|
135 |
{
|
136 |
-
|
|
|
137 |
}
|
138 |
|
139 |
-
$
|
140 |
-
update_option('ahcproUserRoles',$
|
141 |
}
|
142 |
|
143 |
ahcfree_update_tables();
|
@@ -2408,23 +2410,28 @@ function ahcfree_track_visitor()
|
|
2408 |
{
|
2409 |
$exclude_ips_arr = array();
|
2410 |
$exclude_ips = AHCFREE_EXCLUDE_IPS;
|
2411 |
-
|
2412 |
if ($exclude_ips == '' or empty($exclude_ips)) {
|
2413 |
$exclude_ips = array();
|
2414 |
}else{
|
2415 |
|
2416 |
-
$exclude_ips =
|
|
|
|
|
|
|
2417 |
}
|
2418 |
|
|
|
2419 |
$client_ip_address = trim(ahcfree_get_client_ip_address());
|
2420 |
foreach($exclude_ips as $k=>$v)
|
2421 |
{
|
|
|
2422 |
if($v!='')
|
2423 |
{
|
2424 |
|
2425 |
$exclude_ips_arr[] = trim($v);
|
2426 |
}
|
2427 |
}
|
|
|
2428 |
|
2429 |
|
2430 |
if (!ahcfree_is_login_page() && !ahcfree_is_search_engine_bot() && !ahcfree_is_wordpress_bot()) {
|
102 |
|
103 |
global $wpdb;
|
104 |
|
105 |
+
$ahcproUserRoles_ = '';
|
106 |
$verify = isset($_POST['ahc_settings_send']) ? wp_verify_nonce( sanitize_text_field($_POST['ahc_settings_send']), 'ahc_settings_action' ) : false;
|
107 |
|
108 |
if ($verify && current_user_can( 'manage_options' ))
|
112 |
$set_ajax_check = intval($_POST['set_ajax_check']);
|
113 |
$posts_type = '';
|
114 |
$set_ips = ahc_free_sanitize_text_or_array_field($_POST['set_ips']);
|
115 |
+
|
116 |
$set_google_map = '';
|
117 |
$ahcfree_hide_top_bar_icon = isset($_POST['ahcfree_hide_top_bar_icon']) ? intval($_POST['ahcfree_hide_top_bar_icon']) : '0';
|
118 |
$ahcfree_ahcfree_haships = isset($_POST['ahcfree_ahcfree_haships']) ? intval($_POST['ahcfree_ahcfree_haships']) : '0';
|
134 |
{
|
135 |
foreach ($ahcproUserRoles as $v)
|
136 |
{
|
137 |
+
|
138 |
+
$ahcproUserRoles_ .= $v.",";
|
139 |
}
|
140 |
|
141 |
+
$ahcproUserRoles_ = substr($ahcproUserRoles_,0,-1);
|
142 |
+
update_option('ahcproUserRoles',$ahcproUserRoles_);
|
143 |
}
|
144 |
|
145 |
ahcfree_update_tables();
|
2410 |
{
|
2411 |
$exclude_ips_arr = array();
|
2412 |
$exclude_ips = AHCFREE_EXCLUDE_IPS;
|
|
|
2413 |
if ($exclude_ips == '' or empty($exclude_ips)) {
|
2414 |
$exclude_ips = array();
|
2415 |
}else{
|
2416 |
|
2417 |
+
$exclude_ips = str_ireplace("\n"," ",$exclude_ips);
|
2418 |
+
$exclude_ips = str_ireplace(","," ",$exclude_ips);
|
2419 |
+
|
2420 |
+
$exclude_ips = explode(" ", $exclude_ips);
|
2421 |
}
|
2422 |
|
2423 |
+
|
2424 |
$client_ip_address = trim(ahcfree_get_client_ip_address());
|
2425 |
foreach($exclude_ips as $k=>$v)
|
2426 |
{
|
2427 |
+
|
2428 |
if($v!='')
|
2429 |
{
|
2430 |
|
2431 |
$exclude_ips_arr[] = trim($v);
|
2432 |
}
|
2433 |
}
|
2434 |
+
|
2435 |
|
2436 |
|
2437 |
if (!ahcfree_is_login_page() && !ahcfree_is_search_engine_bot() && !ahcfree_is_wordpress_bot()) {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wp-buy, osamaesh
|
|
3 |
Tags: visitor, traffic, statistics, analytics, stats, online, Visit, WordPress analytics ,visitors online, count visitor, google analytics, analytics, GeoIP, Geo locations, analytics dashboard, visits, chart, browser, blog, today, yesterday, week, month, wp Statistics, year, post, page, sidebar, summary, feedburner, hits, pagerank, google, histats, alexa, live visit, counter, diagram, graph
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.8.2
|
6 |
-
Stable tag: 4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -150,6 +150,11 @@ This plugin supports IPv6; however, PHP must be compiled with IPv6 support enabl
|
|
150 |
|
151 |
== Changelog ==
|
152 |
|
|
|
|
|
|
|
|
|
|
|
153 |
= 4.4 =
|
154 |
1. Escape variables and and options
|
155 |
|
3 |
Tags: visitor, traffic, statistics, analytics, stats, online, Visit, WordPress analytics ,visitors online, count visitor, google analytics, analytics, GeoIP, Geo locations, analytics dashboard, visits, chart, browser, blog, today, yesterday, week, month, wp Statistics, year, post, page, sidebar, summary, feedburner, hits, pagerank, google, histats, alexa, live visit, counter, diagram, graph
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.8.2
|
6 |
+
Stable tag: 4.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
150 |
|
151 |
== Changelog ==
|
152 |
|
153 |
+
= 4.5 =
|
154 |
+
1. Bug fixing in IP execlusion
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
= 4.4 =
|
159 |
1. Escape variables and and options
|
160 |
|