Simple Google Analytics - Version 2.0.3

Version Description

Download this release

Release Info

Developer JeromeMeyer62
Plugin Icon 128x128 Simple Google Analytics
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

autoload.php CHANGED
@@ -1,14 +1,11 @@
1
  <?php
2
-
3
- // Constantes
4
- define('SGA_ROOT', dirname( plugin_basename( __FILE__ ) )) ;
5
- define('SGA_PLUGIN_TITLE', 'Simple Google Analytics') ; // Titre
6
- define('SGA_SETTINGS_AUTH', 'administrator') ;
7
-
8
 
9
  // Chargement automatique des classes
10
  function sga_autoload($className) {
11
- @include('class/' . $className . '.class.php') ;
 
 
 
12
  }
13
  spl_autoload_register('sga_autoload') ;
14
 
1
  <?php
 
 
 
 
 
 
2
 
3
  // Chargement automatique des classes
4
  function sga_autoload($className) {
5
+ $filename = SGA_DIRPATH . '/class/' . $className . '.class.php' ;
6
+ if (file_exists($filename)) {
7
+ include_once($filename) ;
8
+ }
9
  }
10
  spl_autoload_register('sga_autoload') ;
11
 
class/Actions.class.php CHANGED
@@ -81,7 +81,7 @@
81
 
82
  // Ajoute le sous-menu aux réglages
83
  public static function menu() {
84
- add_options_page(SGA_PLUGIN_TITLE, Output::__('Simple Google Analytics Settings'), SGA_SETTINGS_AUTH, __FILE__, "Output::settingsPage") ;
85
  }
86
 
87
 
@@ -121,7 +121,7 @@
121
 
122
  // Pour chaques filtres
123
  foreach ($this->filters as $key => $value) {
124
- add_filter($key, 'Actions::' . $value) ;
125
  }
126
 
127
  }
@@ -129,7 +129,7 @@
129
 
130
  // Insère un lien sur la page des plugins
131
  public static function actionLinks($links) {
132
- $link = '<a href="' . menu_page_url ( plugin_basename(__FILE__) , false ) . '">' . Output::__('Settings') .'</a>' ;
133
  array_unshift($links, $link) ;
134
  return $links ;
135
  }
81
 
82
  // Ajoute le sous-menu aux réglages
83
  public static function menu() {
84
+ add_options_page(SGA_PLUGIN_TITLE, Output::__('Simple Google Analytics Settings'), SGA_SETTINGS_AUTH, 'simple-google-analytics-config', "Output::settingsPage") ;
85
  }
86
 
87
 
121
 
122
  // Pour chaques filtres
123
  foreach ($this->filters as $key => $value) {
124
+ add_filter($key . '_' . SGA_BASENAME, 'Actions::' . $value) ;
125
  }
126
 
127
  }
129
 
130
  // Insère un lien sur la page des plugins
131
  public static function actionLinks($links) {
132
+ $link = '<a href="' . menu_page_url('simple-google-analytics-config' , false) . '">' . Output::__('Settings') .'</a>' ;
133
  array_unshift($links, $link) ;
134
  return $links ;
135
  }
readme.txt CHANGED
@@ -5,8 +5,8 @@ Tags: google analytics, wordpress statistics, tracking
5
  Plugin link: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
6
  Requires at least: 2.6
7
  Tested up to: 3.2.1
8
- Version: 2.0.2
9
- Stable tag: 2.0.2
10
 
11
  == Description ==
12
  Simple Google Analytics allows you to easilly add your Google Analytics code on all your pages.
@@ -49,6 +49,8 @@ It should work from 2.6 upwards.. Has been tested on all current versions and is
49
  1. Screenshot Simple Google Analytics Admin Page
50
 
51
  == Changelog ==
 
 
52
  = version 2.0.2 =
53
  * Google Code has returned to the original. The optimized code have issues with some users having no stats. All should be fine now.
54
  = version 2.0 =
5
  Plugin link: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
6
  Requires at least: 2.6
7
  Tested up to: 3.2.1
8
+ Version: 2.0.3
9
+ Stable tag: 2.0.3
10
 
11
  == Description ==
12
  Simple Google Analytics allows you to easilly add your Google Analytics code on all your pages.
49
  1. Screenshot Simple Google Analytics Admin Page
50
 
51
  == Changelog ==
52
+ = version 2.0.3 =
53
+ * Corrected a bug that made all settings link on extension page going to Simple Google Analytics settings page.
54
  = version 2.0.2 =
55
  * Google Code has returned to the original. The optimized code have issues with some users having no stats. All should be fine now.
56
  = version 2.0 =
simple_google_analytics.php CHANGED
@@ -3,10 +3,18 @@
3
  Plugin Name: Simple Google Analytics
4
  Plugin URI: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
5
  Description: A simple Plugin to add Analytics code on your pages. You simply enter your ID, you choose if you are on a sub-domain and add your domain name.
6
- Version: 2.0.2
7
  Author: Jerome Meyer
8
  Author URI: http://www.arobase62.fr
9
  */
 
 
 
 
 
 
 
 
10
 
11
  // Chargement dynamique des classes
12
  @include('autoload.php') ;
3
  Plugin Name: Simple Google Analytics
4
  Plugin URI: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
5
  Description: A simple Plugin to add Analytics code on your pages. You simply enter your ID, you choose if you are on a sub-domain and add your domain name.
6
+ Version: 2.0.3
7
  Author: Jerome Meyer
8
  Author URI: http://www.arobase62.fr
9
  */
10
+
11
+
12
+ // Constantes
13
+ define('SGA_ROOT', dirname(plugin_basename(__FILE__))) ;
14
+ define('SGA_DIRPATH', plugin_dir_path(__FILE__)) ;
15
+ define('SGA_BASENAME', plugin_basename(__FILE__)) ;
16
+ define('SGA_PLUGIN_TITLE', 'Simple Google Analytics') ; // Titre
17
+ define('SGA_SETTINGS_AUTH', 'administrator') ;
18
 
19
  // Chargement dynamique des classes
20
  @include('autoload.php') ;