Changeset 531460
- Timestamp:
- 04/15/2012 04:26:14 PM (14 years ago)
- Location:
- google-analytics-injector/trunk
- Files:
-
- 2 edited
-
google-analytics-injector.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
google-analytics-injector/trunk/google-analytics-injector.php
r487245 r531460 5 5 Description: Google Analytics Injector plugin let you inject Google Analytics tracking code into your website to 6 6 collect statistics about your visitors. Just add your tracking code from Google Analytics to start the tracking. 7 Version: 1. 0.17 Version: 1.1 8 8 Author: Niklas Olsson 9 9 Author URI: http://www.geckosolutions.se … … 45 45 function inject_google_analytics_code() { 46 46 if (!is_admin() && get_option('ua_tracking_code') != "") { 47 echo "<!-- Google Analytics Injector 1. 0.1 from http://www.geckosolutions.se/blog/wordpress-plugins/ -->\n";47 echo "<!-- Google Analytics Injector 1.1 from http://www.geckosolutions.se/blog/wordpress-plugins/ -->\n"; 48 48 echo get_google_analytics_tracking_code(get_option('ua_tracking_code'), get_option('site_restriction_url')); 49 49 echo "\n<!-- / Google Analytics Injector -->\n"; … … 187 187 */ 188 188 function isValidUaCode($ua_tracking_code) { 189 if($ua_tracking_code == "" || preg_match('/^UA- [0-9]*-[0-9]$/', $ua_tracking_code)) {189 if($ua_tracking_code == "" || preg_match('/^UA-\d{4,9}-\d{1,2}$/', $ua_tracking_code)) { 190 190 return true; 191 191 } -
google-analytics-injector/trunk/readme.txt
r487227 r531460 39 39 * Tested stability up to Wordpress 3.3.1 40 40 * Removed a PHP notice regarding an undifined index 41 42 = 1.1 = 43 * Updated the validation function for validating the Google Analytics tracking code.
Note: See TracChangeset
for help on using the changeset viewer.