Version Description
- 31-05-2018 =
- minor bug fixed.
Download this release
Release Info
Developer | dots |
Plugin | Page Visit Counter |
Version | 4.1 |
Comparing to | |
See all releases |
Code changes from version 4.0.9 to 4.1
- README.txt +4 -1
- admin/class-page-visit-counter-admin.php +11 -11
- includes/class-tt-pvc-list-table.php +2 -2
- page_visit_counter.php +10 -37
- public/class-page-visit-counter-public.php +8 -8
README.txt
CHANGED
@@ -4,7 +4,7 @@ Plugin URI: http://multidots.com/
|
|
4 |
Author: Multidots
|
5 |
Author URI: http://multidots.com/
|
6 |
Contributors: dots, ketuchetan, chiragpatel, jitendrabanjara1991
|
7 |
-
Stable tag: 4.
|
8 |
Tags: page counter,page visit, post counter, post visit, wordpress post view, wordpress page view, page visit graph, post visit graph,
|
9 |
Requires at least: 2.1
|
10 |
Tested up to: 4.9.6
|
@@ -115,6 +115,9 @@ Automatic updates should work great for you. As always, though, we recommend ba
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
118 |
= 4.0.9 - 29-05-2018 =
|
119 |
* minor bug fixed.
|
120 |
|
4 |
Author: Multidots
|
5 |
Author URI: http://multidots.com/
|
6 |
Contributors: dots, ketuchetan, chiragpatel, jitendrabanjara1991
|
7 |
+
Stable tag: 4.1
|
8 |
Tags: page counter,page visit, post counter, post visit, wordpress post view, wordpress page view, page visit graph, post visit graph,
|
9 |
Requires at least: 2.1
|
10 |
Tested up to: 4.9.6
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 4.1 - 31-05-2018 =
|
119 |
+
* minor bug fixed.
|
120 |
+
|
121 |
= 4.0.9 - 29-05-2018 =
|
122 |
* minor bug fixed.
|
123 |
|
admin/class-page-visit-counter-admin.php
CHANGED
@@ -431,7 +431,7 @@ class page_visit_counter_Admin
|
|
431 |
width: 50%;
|
432 |
}
|
433 |
</style>
|
434 |
-
<div class="back"><h5><a class="button button-primary" href="<?php echo esc_url(
|
435 |
<div style="">
|
436 |
<div id="page-vist-fancybox" class="page-counter-fancybox">
|
437 |
<div id="tabs">
|
@@ -460,9 +460,7 @@ class page_visit_counter_Admin
|
|
460 |
</div>
|
461 |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
462 |
<script type="text/javascript">
|
463 |
-
|
464 |
google.charts.load('current', {'packages': ['corechart', 'bar']});
|
465 |
-
|
466 |
var chartBrowsers = '';
|
467 |
var chartIP = '';
|
468 |
var chartReferer = '';
|
@@ -613,7 +611,9 @@ class page_visit_counter_Admin
|
|
613 |
page_id: page_id
|
614 |
}),
|
615 |
success: function (data) {
|
|
|
616 |
var resultarr = JSON.parse(data);
|
|
|
617 |
if (resultarr != 'novisit') {
|
618 |
topBrowsersArr = resultarr['topBrowserString'];
|
619 |
topIpArr = resultarr['topIpString'];
|
@@ -1060,10 +1060,10 @@ class page_visit_counter_Admin
|
|
1060 |
$hidefrontview = isset($_POST['hidefrontview']) ? sanitize_text_field(wp_unslash($_POST['hidefrontview'])) : '';
|
1061 |
$text_color_page_visit = isset($_POST['textcolor']) ? sanitize_text_field(wp_unslash($_POST['textcolor'])) : '';
|
1062 |
|
1063 |
-
$twitter_url_page_visit = isset($_POST['twitter_url_page_visit']) ? $_POST['twitter_url_page_visit'] : '';
|
1064 |
-
$gplus_url_page_visit = isset($_POST['gplus_url_page_visit']) ? $_POST['gplus_url_page_visit'] : '';
|
1065 |
-
$fb_url_page_visit = isset($_POST['fb_url_page_visit']) ? $_POST['fb_url_page_visit'] : '';
|
1066 |
-
$no_of_days_to_display = isset($_POST['no_of_days_to_display']) ? $_POST['no_of_days_to_display'] : '';
|
1067 |
|
1068 |
delete_option('wfap_post_type');
|
1069 |
if (isset($type) && $type != null) {
|
@@ -1129,7 +1129,7 @@ class page_visit_counter_Admin
|
|
1129 |
$wpdb->query($query);
|
1130 |
}
|
1131 |
|
1132 |
-
wp_safe_redirect(esc_url(
|
1133 |
exit();
|
1134 |
|
1135 |
//die();
|
@@ -1206,7 +1206,7 @@ class page_visit_counter_Admin
|
|
1206 |
<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Facebook.png', dirname(__FILE__))) . '" /></a>
|
1207 |
<a target="_blank" style="margin-right: 5px;" href="https://twitter.com/intent/tweet?text=' . $page_social_content . '&url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/twitter.png', dirname(__FILE__))) . '" /></a>
|
1208 |
<a target="_blank" href="https://plus.google.com/share?url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Google_Plus.png', dirname(__FILE__))) . '" /></a></td>';
|
1209 |
-
$html .= '<td><a href="' . esc_url(
|
1210 |
$html .= '</tr>';
|
1211 |
}
|
1212 |
}
|
@@ -1267,7 +1267,7 @@ class page_visit_counter_Admin
|
|
1267 |
<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Facebook.png', dirname(__FILE__))) . '" /></a>
|
1268 |
<a target="_blank" style="margin-right: 5px;" href="https://twitter.com/intent/tweet?text=' . $page_social_content . '&url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/twitter.png', dirname(__FILE__))) . '" /></a>
|
1269 |
<a target="_blank" href="https://plus.google.com/share?url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Google_Plus.png', dirname(__FILE__))) . '" /></a></td>';
|
1270 |
-
$html .= '<td><a href="' . esc_url(
|
1271 |
$html .= '</tr>';
|
1272 |
}
|
1273 |
$html .= '</tbody><tfoot>
|
@@ -1338,7 +1338,7 @@ class page_visit_counter_Admin
|
|
1338 |
<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Facebook.png', dirname(__FILE__))) . '" /></a>
|
1339 |
<a target="_blank" style="margin-right: 5px;" href="https://twitter.com/intent/tweet?text=' . $page_social_content . '&url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/twitter.png', dirname(__FILE__))) . '" /></a>
|
1340 |
<a target="_blank" href="https://plus.google.com/share?url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Google_Plus.png', dirname(__FILE__))) . '" /></a></td>';
|
1341 |
-
$html .= '<td><a href="' . esc_url(
|
1342 |
|
1343 |
$html .= '</tr>';
|
1344 |
}
|
431 |
width: 50%;
|
432 |
}
|
433 |
</style>
|
434 |
+
<div class="back"><h5><a class="button button-primary" href="<?php echo esc_url(home_url('/wp-admin/admin.php?page=page_visit_counter')) ;?>">←<?php echo esc_html_e('Back to list', 'page-visit-counter'); ?></a></h5></div>
|
435 |
<div style="">
|
436 |
<div id="page-vist-fancybox" class="page-counter-fancybox">
|
437 |
<div id="tabs">
|
460 |
</div>
|
461 |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
462 |
<script type="text/javascript">
|
|
|
463 |
google.charts.load('current', {'packages': ['corechart', 'bar']});
|
|
|
464 |
var chartBrowsers = '';
|
465 |
var chartIP = '';
|
466 |
var chartReferer = '';
|
611 |
page_id: page_id
|
612 |
}),
|
613 |
success: function (data) {
|
614 |
+
console.log(data);
|
615 |
var resultarr = JSON.parse(data);
|
616 |
+
console.log(resultarr);
|
617 |
if (resultarr != 'novisit') {
|
618 |
topBrowsersArr = resultarr['topBrowserString'];
|
619 |
topIpArr = resultarr['topIpString'];
|
1060 |
$hidefrontview = isset($_POST['hidefrontview']) ? sanitize_text_field(wp_unslash($_POST['hidefrontview'])) : '';
|
1061 |
$text_color_page_visit = isset($_POST['textcolor']) ? sanitize_text_field(wp_unslash($_POST['textcolor'])) : '';
|
1062 |
|
1063 |
+
$twitter_url_page_visit = isset($_POST['twitter_url_page_visit']) ? sanitize_text_field(wp_unslash($_POST['twitter_url_page_visit'])) : '';
|
1064 |
+
$gplus_url_page_visit = isset($_POST['gplus_url_page_visit']) ? sanitize_text_field(wp_unslash($_POST['gplus_url_page_visit'])) : '';
|
1065 |
+
$fb_url_page_visit = isset($_POST['fb_url_page_visit']) ? sanitize_text_field(wp_unslash($_POST['fb_url_page_visit'])) : '';
|
1066 |
+
$no_of_days_to_display = isset($_POST['no_of_days_to_display']) ? sanitize_text_field(wp_unslash($_POST['no_of_days_to_display'])) : '';
|
1067 |
|
1068 |
delete_option('wfap_post_type');
|
1069 |
if (isset($type) && $type != null) {
|
1129 |
$wpdb->query($query);
|
1130 |
}
|
1131 |
|
1132 |
+
wp_safe_redirect(esc_url(home_url("/wp-admin/admin.php?page=page_visit_settings")));
|
1133 |
exit();
|
1134 |
|
1135 |
//die();
|
1206 |
<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Facebook.png', dirname(__FILE__))) . '" /></a>
|
1207 |
<a target="_blank" style="margin-right: 5px;" href="https://twitter.com/intent/tweet?text=' . $page_social_content . '&url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/twitter.png', dirname(__FILE__))) . '" /></a>
|
1208 |
<a target="_blank" href="https://plus.google.com/share?url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Google_Plus.png', dirname(__FILE__))) . '" /></a></td>';
|
1209 |
+
$html .= '<td><a href="' . esc_url(home_url('/wp-admin/admin.php?page=page_visit_counter&id=' . $results->ID)) . '" title="' . wp_kses_post($results->post_title) . '" class="" id="' . esc_attr($results->ID) . '">' . esc_html__('View Report', 'page-visit-counter') . '</a></td>';
|
1210 |
$html .= '</tr>';
|
1211 |
}
|
1212 |
}
|
1267 |
<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Facebook.png', dirname(__FILE__))) . '" /></a>
|
1268 |
<a target="_blank" style="margin-right: 5px;" href="https://twitter.com/intent/tweet?text=' . $page_social_content . '&url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/twitter.png', dirname(__FILE__))) . '" /></a>
|
1269 |
<a target="_blank" href="https://plus.google.com/share?url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Google_Plus.png', dirname(__FILE__))) . '" /></a></td>';
|
1270 |
+
$html .= '<td><a href="' . esc_url(home_url('/wp-admin/admin.php?page=page_visit_counter&id=' . $results->ID)) . '" title="' . wp_kses_post($results->post_title) . '" class="" id="' . esc_attr($results->ID) . '">' . esc_html__('View Report', 'page-visit-counter') . '</a></td>';
|
1271 |
$html .= '</tr>';
|
1272 |
}
|
1273 |
$html .= '</tbody><tfoot>
|
1338 |
<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Facebook.png', dirname(__FILE__))) . '" /></a>
|
1339 |
<a target="_blank" style="margin-right: 5px;" href="https://twitter.com/intent/tweet?text=' . $page_social_content . '&url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/twitter.png', dirname(__FILE__))) . '" /></a>
|
1340 |
<a target="_blank" href="https://plus.google.com/share?url=' . esc_url(get_permalink($results->ID)) . '"><img src="' . esc_url(plugins_url('images/Google_Plus.png', dirname(__FILE__))) . '" /></a></td>';
|
1341 |
+
$html .= '<td><a href="' . esc_url(home_url('/wp-admin/admin.php?page=page_visit_counter&id=' . $results->ID)). '" title="' . wp_kses_post($results->post_title) . '" class="" id="' . esc_attr($results->ID) . '">' . esc_html__('View Report', 'page-visit-counter') . '</a></td>';
|
1342 |
|
1343 |
$html .= '</tr>';
|
1344 |
}
|
includes/class-tt-pvc-list-table.php
CHANGED
@@ -173,8 +173,8 @@ class TT_Example_List_Table extends WP_List_Table {
|
|
173 |
'id' => $results->ID,
|
174 |
'title' => '<a href="'.esc_url(get_admin_url().'post.php?post='.$results->ID.'&action=edit').'">'.wp_kses_post($results->post_title).'</a>',
|
175 |
'count' => $total,
|
176 |
-
'share' => '<a target="_blank" style="margin-right: 5px;" href="https://www.facebook.com/sharer/sharer.php?u='.
|
177 |
-
'report' => '<a href="'.esc_url(
|
178 |
);
|
179 |
}
|
180 |
}
|
173 |
'id' => $results->ID,
|
174 |
'title' => '<a href="'.esc_url(get_admin_url().'post.php?post='.$results->ID.'&action=edit').'">'.wp_kses_post($results->post_title).'</a>',
|
175 |
'count' => $total,
|
176 |
+
'share' => '<a target="_blank" style="margin-right: 5px;" href="'.esc_url('https://www.facebook.com/sharer/sharer.php?u='.get_permalink($results->ID)).'"><img src="' . esc_url(plugins_url( 'images/Facebook.png', dirname(__FILE__) )) . '" /></a><a target="_blank" style="margin-right: 5px;" href="'.esc_url('https://twitter.com/intent/tweet?text='.esc_attr($page_social_content).'&url='.get_permalink($results->ID)).'"><img src="' . esc_url(plugins_url( 'images/twitter.png', dirname(__FILE__) )) . '" /></a><a target="_blank" href="'.esc_url('https://plus.google.com/share?url='.get_permalink($results->ID)).'"><img src="' . esc_url(plugins_url( 'images/Google_Plus.png', dirname(__FILE__) )) . '" /></a>',
|
177 |
+
'report' => '<a href="'.esc_url(home_url('/wp-admin/admin.php?page=page_visit_counter&id='.$results->ID)).'" title="'.wp_kses_post($results->post_title).'" class="" id="'.esc_attr($results->ID).'">'.esc_html__('View Report','page-visit-counter').'</a>'
|
178 |
);
|
179 |
}
|
180 |
}
|
page_visit_counter.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Plugin URI: http://www.multidots.com/
|
8 |
* Description: This plugin will count the total visits of your sites pages.
|
9 |
* Author: Multidots
|
10 |
-
* Version: 4.
|
11 |
* Author URI: http://www.multidots.com/
|
12 |
*/
|
13 |
// If this file is called directly, abort.
|
@@ -68,34 +68,6 @@ function display_page_total_count($atts) {
|
|
68 |
$html = '';
|
69 |
|
70 |
if ($pageID != '' && is_int($pageID)) {
|
71 |
-
|
72 |
-
// $pageID = get_the_ID();
|
73 |
-
//
|
74 |
-
// if ($pageID == 0) {
|
75 |
-
// $pageID = (int) get_option('page_on_front',true);
|
76 |
-
// if (empty($pageID) && !isset($pageID)) {
|
77 |
-
// $pageID = (int) get_option('page_for_posts',true);
|
78 |
-
// }
|
79 |
-
// }
|
80 |
-
//
|
81 |
-
// if ($pageID == 0) {
|
82 |
-
// $page = get_option('show_on_front',true);
|
83 |
-
// if ($page == 'posts') {
|
84 |
-
// $args = array(
|
85 |
-
// 'numberposts' => 1,
|
86 |
-
// 'orderby' => 'post_date',
|
87 |
-
// 'order' => 'DESC',
|
88 |
-
// 'post_type' => 'post',
|
89 |
-
// 'post_status' => 'publish',
|
90 |
-
// 'suppress_filters' => true );
|
91 |
-
//
|
92 |
-
// $recent_posts = wp_get_recent_posts( $args, ARRAY_A );
|
93 |
-
// foreach( $recent_posts as $recent ){
|
94 |
-
// $pageID = (int) $recent["ID"];
|
95 |
-
// }
|
96 |
-
// }
|
97 |
-
//
|
98 |
-
// }
|
99 |
|
100 |
$post = get_post($pageID);
|
101 |
|
@@ -103,8 +75,9 @@ function display_page_total_count($atts) {
|
|
103 |
$fetchSelecetedPostTypes = get_option('wfap_post_type');
|
104 |
|
105 |
$table_name = $wpdb->prefix."page_visit";
|
106 |
-
|
107 |
-
|
|
|
108 |
|
109 |
$total = (int) $pageCount[0]->total;
|
110 |
|
@@ -117,13 +90,13 @@ function display_page_total_count($atts) {
|
|
117 |
}
|
118 |
|
119 |
if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
|
120 |
-
$html .= '<p id="page-visit-counter-shortcode-block" class="page-visit-counter-block" '
|
121 |
} else {
|
122 |
$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
|
123 |
if (in_array($post->post_type,$postTypeSelectedEncodeArr)) {
|
124 |
$innerSettings = get_post_meta($pageID,'enable_page_count',true);
|
125 |
if ($innerSettings == '' || $innerSettings == 'yes') {
|
126 |
-
$html .= '<p id="page-visit-counter-shortcode-block" class="page-visit-counter-block" '
|
127 |
}
|
128 |
}
|
129 |
}
|
@@ -186,7 +159,7 @@ function page_visit_counter_md_total_sites_visit($atts) {
|
|
186 |
$text_color_page_visit = get_option('text_color_page_visit');
|
187 |
|
188 |
if (isset($text_color_page_visit) && $text_color_page_visit != null) {
|
189 |
-
$text_color_page_visit = 'style="color: '
|
190 |
} else {
|
191 |
$text_color_page_visit = 'style="color: #000000;"';
|
192 |
}
|
@@ -194,11 +167,11 @@ function page_visit_counter_md_total_sites_visit($atts) {
|
|
194 |
$totalVisitsHtml = '';
|
195 |
|
196 |
$totalVisitsHtml .= '<div class="md-pvc-total-reports">';
|
197 |
-
$totalVisitsHtml .= '<div class="md-pvc-total-reports-sub" style="background:'
|
198 |
foreach ($array as $number) {
|
199 |
-
$totalVisitsHtml .= '<span style="border: 1px solid '
|
200 |
}
|
201 |
-
$totalVisitsHtml .= '<span class="text" style="border: 1px solid '
|
202 |
$totalVisitsHtml .= '</div>';
|
203 |
$totalVisitsHtml .= '</div>';
|
204 |
|
7 |
* Plugin URI: http://www.multidots.com/
|
8 |
* Description: This plugin will count the total visits of your sites pages.
|
9 |
* Author: Multidots
|
10 |
+
* Version: 4.1
|
11 |
* Author URI: http://www.multidots.com/
|
12 |
*/
|
13 |
// If this file is called directly, abort.
|
68 |
$html = '';
|
69 |
|
70 |
if ($pageID != '' && is_int($pageID)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
$post = get_post($pageID);
|
73 |
|
75 |
$fetchSelecetedPostTypes = get_option('wfap_post_type');
|
76 |
|
77 |
$table_name = $wpdb->prefix."page_visit";
|
78 |
+
|
79 |
+
$pageCount_qry = $wpdb->prepare('SELECT SUM(page_visit) as total FROM ' . $table_name . ' WHERE page_id=%d', $pageID);
|
80 |
+
$pageCount = $wpdb->get_results($pageCount_qry);
|
81 |
|
82 |
$total = (int) $pageCount[0]->total;
|
83 |
|
90 |
}
|
91 |
|
92 |
if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
|
93 |
+
$html .= '<p id="page-visit-counter-shortcode-block" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span id="shortcode_'.esc_attr($pageID).'" style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_shortcode">'.esc_attr($total).'</span>'.__('total visits.','page-visit-counter').'</p>';
|
94 |
} else {
|
95 |
$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
|
96 |
if (in_array($post->post_type,$postTypeSelectedEncodeArr)) {
|
97 |
$innerSettings = get_post_meta($pageID,'enable_page_count',true);
|
98 |
if ($innerSettings == '' || $innerSettings == 'yes') {
|
99 |
+
$html .= '<p id="page-visit-counter-shortcode-block" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span id="shortcode_'.esc_attr($pageID).'" style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_shortcode">'.esc_attr($total).'</span>'.__('total visits.','page-visit-counter').'</p>';
|
100 |
}
|
101 |
}
|
102 |
}
|
159 |
$text_color_page_visit = get_option('text_color_page_visit');
|
160 |
|
161 |
if (isset($text_color_page_visit) && $text_color_page_visit != null) {
|
162 |
+
$text_color_page_visit = 'style="color: '.esc_attr($text_color_page_visit).';"';
|
163 |
} else {
|
164 |
$text_color_page_visit = 'style="color: #000000;"';
|
165 |
}
|
167 |
$totalVisitsHtml = '';
|
168 |
|
169 |
$totalVisitsHtml .= '<div class="md-pvc-total-reports">';
|
170 |
+
$totalVisitsHtml .= '<div class="md-pvc-total-reports-sub" style="background:'.esc_attr($backgroundcolor).';">';
|
171 |
foreach ($array as $number) {
|
172 |
+
$totalVisitsHtml .= '<span style="border: 1px solid '.esc_attr($bordercolor).';color:'.esc_attr($fontcolor).';background:'.esc_attr($countboxcolor).';">'.esc_attr($number).'</span>';
|
173 |
}
|
174 |
+
$totalVisitsHtml .= '<span class="text" style="border: 1px solid '.esc_attr($bordercolor).';color:'.esc_attr($fontcolor).';background:'.esc_attr($countboxcolor).';">'.__('total sites visits.','page-visit-counter').'</span>';
|
175 |
$totalVisitsHtml .= '</div>';
|
176 |
$totalVisitsHtml .= '</div>';
|
177 |
|
public/class-page-visit-counter-public.php
CHANGED
@@ -458,9 +458,9 @@ class page_visit_counter_Public {
|
|
458 |
if(!is_feed() && !is_home()) {
|
459 |
if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
|
460 |
if ('yes' === $enableToday || '' === $enableToday) {
|
461 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
462 |
} else {
|
463 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
464 |
}
|
465 |
} else {
|
466 |
$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
|
@@ -468,9 +468,9 @@ class page_visit_counter_Public {
|
|
468 |
$innerSettings = get_post_meta($pageID,'enable_page_count',true);
|
469 |
if ($innerSettings == '' || $innerSettings == 'yes') {
|
470 |
if ('yes' === $enableToday || '' === $enableToday) {
|
471 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
472 |
} else {
|
473 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
474 |
}
|
475 |
}
|
476 |
}
|
@@ -534,9 +534,9 @@ class page_visit_counter_Public {
|
|
534 |
if(!is_feed() && !is_home()) {
|
535 |
if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
|
536 |
if ('yes' === $enableToday || '' === $enableToday) {
|
537 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
538 |
} else {
|
539 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
540 |
}
|
541 |
} else {
|
542 |
$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
|
@@ -544,9 +544,9 @@ class page_visit_counter_Public {
|
|
544 |
$innerSettings = get_post_meta($pageID,'enable_page_count',true);
|
545 |
if ($innerSettings == '' || $innerSettings == 'yes') {
|
546 |
if ('yes' === $enableToday || '' === $enableToday) {
|
547 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
548 |
} else {
|
549 |
-
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(
|
550 |
}
|
551 |
}
|
552 |
}
|
458 |
if(!is_feed() && !is_home()) {
|
459 |
if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
|
460 |
if ('yes' === $enableToday || '' === $enableToday) {
|
461 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits,','page-visit-counter').'<span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_today">'.esc_attr($totalToday).'</span>'.__('visits today','page-visit-counter').'</p>';
|
462 |
} else {
|
463 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits.','page-visit-counter').'</p>';
|
464 |
}
|
465 |
} else {
|
466 |
$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
|
468 |
$innerSettings = get_post_meta($pageID,'enable_page_count',true);
|
469 |
if ($innerSettings == '' || $innerSettings == 'yes') {
|
470 |
if ('yes' === $enableToday || '' === $enableToday) {
|
471 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits,','page-visit-counter').'<span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_today">'.esc_attr($totalToday).'</span>'.__('visits today','page-visit-counter').'</p>';
|
472 |
} else {
|
473 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits.','page-visit-counter').'</p>';
|
474 |
}
|
475 |
}
|
476 |
}
|
534 |
if(!is_feed() && !is_home()) {
|
535 |
if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
|
536 |
if ('yes' === $enableToday || '' === $enableToday) {
|
537 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits,','page-visit-counter').'<span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_today">'.esc_attr($totalToday).'</span>'.__('visits today','page-visit-counter').'</p>';
|
538 |
} else {
|
539 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits.','page-visit-counter').'</p>';
|
540 |
}
|
541 |
} else {
|
542 |
$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
|
544 |
$innerSettings = get_post_meta($pageID,'enable_page_count',true);
|
545 |
if ($innerSettings == '' || $innerSettings == 'yes') {
|
546 |
if ('yes' === $enableToday || '' === $enableToday) {
|
547 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits,','page-visit-counter').'<span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_today">'.esc_attr($totalToday).'</span>'.__('visits today','page-visit-counter').'</p>';
|
548 |
} else {
|
549 |
+
$html .= '<p id="default-loop-page-visit-counter" class="page-visit-counter-block" '.esc_attr($text_color_page_visit).'><img src="'.esc_url(plugins_url('images/1456175371_vector_65_14.png', dirname(__FILE__) )).'" /><span style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor">'.esc_attr($total).'</span>'.__('total visits.','page-visit-counter').'</p>';
|
550 |
}
|
551 |
}
|
552 |
}
|