Version Description
Download this release
Release Info
Developer | cavemonkey50 |
Plugin | Google Analyticator |
Version | 1.53 |
Comparing to | |
See all releases |
Code changes from version 1.52 to 1.53
- google-analyticator/google-analyticator.php +12 -2
- readme.txt +3 -3
google-analyticator/google-analyticator.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Google Analyticator
|
4 |
-
* Version: 1.
|
5 |
* Plugin URI: http://cavemonkey50.com/code/google-analyticator/
|
6 |
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the options page</a> and enter your Google Analytics' UID and enable logging.
|
7 |
* Author: Ronald Heft, Jr.
|
@@ -47,10 +47,19 @@ function add_ga_option_page() {
|
|
47 |
add_options_page('Google Analyticator Options', 'Google Analytics', 8, basename(__FILE__), 'ga_options_page');
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
function ga_options_page() {
|
51 |
// If we are a postback, store the options
|
52 |
if (isset($_POST['info_update'])) {
|
53 |
-
check_admin_referer();
|
54 |
|
55 |
// Update the status
|
56 |
$ga_status = $_POST[key_ga_status];
|
@@ -98,6 +107,7 @@ function ga_options_page() {
|
|
98 |
?>
|
99 |
|
100 |
<form method="post" action="options-general.php?page=google-analyticator.php">
|
|
|
101 |
<div class="wrap">
|
102 |
<h2>Google Analyticator Options</h2>
|
103 |
<fieldset class='options'>
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Google Analyticator
|
4 |
+
* Version: 1.53
|
5 |
* Plugin URI: http://cavemonkey50.com/code/google-analyticator/
|
6 |
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the options page</a> and enter your Google Analytics' UID and enable logging.
|
7 |
* Author: Ronald Heft, Jr.
|
47 |
add_options_page('Google Analyticator Options', 'Google Analytics', 8, basename(__FILE__), 'ga_options_page');
|
48 |
}
|
49 |
|
50 |
+
// wp_nonce
|
51 |
+
if ( !function_exists('wp_nonce_field') ) {
|
52 |
+
function ga_nonce_field($action = -1) { return; }
|
53 |
+
$ga_nonce = -1;
|
54 |
+
} else {
|
55 |
+
function ga_nonce_field($action = -1) { return wp_nonce_field($action); }
|
56 |
+
$ga_nonce = 'ga-update-key';
|
57 |
+
}
|
58 |
+
|
59 |
function ga_options_page() {
|
60 |
// If we are a postback, store the options
|
61 |
if (isset($_POST['info_update'])) {
|
62 |
+
check_admin_referer('$ga_nonce', $ga_nonce);
|
63 |
|
64 |
// Update the status
|
65 |
$ga_status = $_POST[key_ga_status];
|
107 |
?>
|
108 |
|
109 |
<form method="post" action="options-general.php?page=google-analyticator.php">
|
110 |
+
<?php ga_nonce_field('$ga_nonce', $ga_nonce); ?>
|
111 |
<div class="wrap">
|
112 |
<h2>Google Analyticator Options</h2>
|
113 |
<fieldset class='options'>
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: cavemonkey50
|
3 |
Donate link: http://cavemonkey50.com/code/
|
4 |
Tags: stats, google, analytics, tracking
|
5 |
-
Requires at least:
|
6 |
Tested up to: 2.2
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Adds the necessary JavaScript code to enable Google Analytics.
|
10 |
|
@@ -33,7 +33,7 @@ Once you save your settings the JavaScript code should now be appearing on all o
|
|
33 |
|
34 |
== Installation ==
|
35 |
|
36 |
-
Drop the google-analyticator folder into /wp-content/plugins
|
37 |
|
38 |
== Frequently Asked Questions ==
|
39 |
|
2 |
Contributors: cavemonkey50
|
3 |
Donate link: http://cavemonkey50.com/code/
|
4 |
Tags: stats, google, analytics, tracking
|
5 |
+
Requires at least: 2.0
|
6 |
Tested up to: 2.2
|
7 |
+
Stable tag: 1.53
|
8 |
|
9 |
Adds the necessary JavaScript code to enable Google Analytics.
|
10 |
|
33 |
|
34 |
== Installation ==
|
35 |
|
36 |
+
Drop the google-analyticator folder into /wp-content/plugins/ and activate the plugin.
|
37 |
|
38 |
== Frequently Asked Questions ==
|
39 |
|