StatCounter – Free Real Time Visitor Stats - Version 1.6.8

Version Description

Addd StatCounter https compatible code

Download this release

Release Info

Developer StatCounter
Plugin Icon StatCounter – Free Real Time Visitor Stats
Version 1.6.8
Comparing to
See all releases

Code changes from version 1.6.7 to 1.6.8

Files changed (2) hide show
  1. StatCounter-Wordpress-Plugin.php +23 -21
  2. readme.txt +11 -2
StatCounter-Wordpress-Plugin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Official StatCounter Plugin
4
- * Version: 1.6.7
5
  * Plugin URI: http://statcounter.com/
6
  * Description: Adds the StatCounter tracking code to your blog. <br>To get setup: 1) Activate this plugin 2) Enter your StatCounter Project ID and Security Code in the <a href="options-general.php?page=StatCounter-Wordpress-Plugin.php"><strong>options page</strong></a>.
7
  * Author: Aodhan Cullen
@@ -213,31 +213,33 @@ if ($sc_position=="header") {
213
 
214
  // The guts of the StatCounter script
215
  function add_statcounter() {
216
- global $user_level;
217
- $sc_project = get_option(key_sc_project);
218
- $sc_security = get_option(key_sc_security);
219
- $sc_invisible = 0;
220
- $sc_invisible = get_option('sc_invisible');
221
- if (
222
- ( $sc_project > 0 )
223
- ) {
224
  ?>
225
- <!-- Start of StatCounter Code -->
226
- <script type="text/javascript">
227
- <!--
228
- var sc_project=<?php echo $sc_project; ?>;
229
- var sc_security="<?php echo $sc_security; ?>";
230
  <?php
231
  if($sc_invisible==1) {
232
- echo " var sc_invisible=1;\n";
233
  }?>
234
- //-->
235
- </script>
236
- <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script>
237
- <noscript><div class="statcounter"><a title="web analytics" href="http://statcounter.com/"><img class="statcounter" src="http://c.statcounter.com/<?php echo $sc_project; ?>/0/<?php echo $sc_security; ?>/<?php echo $sc_invisible; ?>/" alt="web analytics" /></a></div></noscript>
238
- <!-- End of StatCounter Code -->
 
 
239
  <?php
240
- }
241
  }
242
 
243
  ?>
1
  <?php
2
  /*
3
  * Plugin Name: Official StatCounter Plugin
4
+ * Version: 1.6.8
5
  * Plugin URI: http://statcounter.com/
6
  * Description: Adds the StatCounter tracking code to your blog. <br>To get setup: 1) Activate this plugin 2) Enter your StatCounter Project ID and Security Code in the <a href="options-general.php?page=StatCounter-Wordpress-Plugin.php"><strong>options page</strong></a>.
7
  * Author: Aodhan Cullen
213
 
214
  // The guts of the StatCounter script
215
  function add_statcounter() {
216
+ global $user_level;
217
+ $sc_project = get_option(key_sc_project);
218
+ $sc_security = get_option(key_sc_security);
219
+ $sc_invisible = 0;
220
+ $sc_invisible = get_option('sc_invisible');
221
+ if (
222
+ ( $sc_project > 0 )
223
+ ) {
224
  ?>
225
+ <!-- Start of StatCounter Code -->
226
+ <script type="text/javascript">
227
+ <!--
228
+ var sc_project=<?php echo $sc_project; ?>;
229
+ var sc_security="<?php echo $sc_security; ?>";
230
  <?php
231
  if($sc_invisible==1) {
232
+ echo " var sc_invisible=1;\n";
233
  }?>
234
+ var scJsHost = (("https:" == document.location.protocol) ?
235
+ "https://secure." : "http://www.");
236
+ //-->
237
+ document.write("<sc"+"ript type='text/javascript' src='" +scJsHost +"statcounter.com/counter/counter.js'></"+"script>");
238
+ </script>
239
+ <noscript><div class="statcounter"><a title="web analytics" href="http://statcounter.com/"><img class="statcounter" src="http://c.statcounter.com/<?php echo $sc_project; ?>/0/<?php echo $sc_security; ?>/<?php echo $sc_invisible; ?>/" alt="web analytics" /></a></div></noscript>
240
+ <!-- End of StatCounter Code -->
241
  <?php
242
+ }
243
  }
244
 
245
  ?>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Aodhan Cullen
3
  Donate link: http://statcounter.com/
4
  Tags: web, statistics, stats, hit, counter, visitor, ip, tracker, analytics
5
  Requires at least: 2.0.2
6
- Tested up to: 3.9.1
7
- Stable tag: 1.6.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -70,6 +70,12 @@ To activate the StatCounter service for your WordPress site:
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
 
73
  = 1.6.6 =
74
  Removed deprecated function calls
75
 
@@ -109,6 +115,9 @@ Improved UI to give error message in dashboard when no project id has been set
109
 
110
  == Upgrade Notice ==
111
 
 
 
 
112
  = 1.6.7 =
113
  Support https/http for wordpress admin section when viewing StatCounter stats
114
 
3
  Donate link: http://statcounter.com/
4
  Tags: web, statistics, stats, hit, counter, visitor, ip, tracker, analytics
5
  Requires at least: 2.0.2
6
+ Tested up to: 4.0
7
+ Stable tag: 1.6.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.6.8 =
74
+ Addd StatCounter https compatible code
75
+
76
+ = 1.6.7 =
77
+ Support https/http for wordpress admin section when viewing StatCounter stats
78
+
79
  = 1.6.6 =
80
  Removed deprecated function calls
81
 
115
 
116
  == Upgrade Notice ==
117
 
118
+ = 1.6.8 =
119
+ Addd StatCounter https compatible code
120
+
121
  = 1.6.7 =
122
  Support https/http for wordpress admin section when viewing StatCounter stats
123