WD Google Analytics - Version 1.0.21

Version Description

  • Fixed: Network activation
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Google Analytics
Version 1.0.21
Comparing to
See all releases

Code changes from version 1.0.20 to 1.0.21

Files changed (3) hide show
  1. gawd_class.php +19 -0
  2. google-analytics-wd.php +3 -3
  3. readme.txt +5 -2
gawd_class.php CHANGED
@@ -521,6 +521,25 @@ class GAWD
521
  /**
522
  * Activation function needed for the activation hook.
523
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  public static function activate()
525
  {
526
  $credentials['project_id'] = '115052745574-5vbr7tci4hjkr9clkflmnpto5jisgstg.apps.googleusercontent.com';
521
  /**
522
  * Activation function needed for the activation hook.
523
  */
524
+ public static function global_activate($networkwide)
525
+ {
526
+ if (function_exists('is_multisite') && is_multisite()) {
527
+ // Check if it is a network activation - if so, run the activation function for each blog id.
528
+ if ($networkwide) {
529
+ global $wpdb;
530
+ // Get all blog ids.
531
+ $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
532
+ foreach ($blogids as $blog_id) {
533
+ switch_to_blog($blog_id);
534
+ self::activate();
535
+ restore_current_blog();
536
+ }
537
+ return;
538
+ }
539
+ }
540
+ self::activate();
541
+ }
542
+
543
  public static function activate()
544
  {
545
  $credentials['project_id'] = '115052745574-5vbr7tci4hjkr9clkflmnpto5jisgstg.apps.googleusercontent.com';
google-analytics-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Google Analytics
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
  * Description: Google Analytics WD is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
- * Version: 1.0.20
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -26,7 +26,7 @@ if (!defined('GAWD_INC')) {
26
  }
27
 
28
  if (!defined('GAWD_VERSION')) {
29
- define('GAWD_VERSION', '1.0.20');
30
  }
31
 
32
 
@@ -203,5 +203,5 @@ With a large number of detailed and user-friendly reports, Google Analytics WD p
203
 
204
  add_action('plugins_loaded', array('GAWD', 'get_instance'));
205
 
206
- register_activation_hook(__FILE__, array('GAWD', 'activate'));
207
  register_deactivation_hook(__FILE__, array('GAWD', 'deactivate'));
4
  * Plugin Name: Google Analytics
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
  * Description: Google Analytics WD is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
+ * Version: 1.0.21
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
26
  }
27
 
28
  if (!defined('GAWD_VERSION')) {
29
+ define('GAWD_VERSION', '1.0.21');
30
  }
31
 
32
 
203
 
204
  add_action('plugins_loaded', array('GAWD', 'get_instance'));
205
 
206
+ register_activation_hook(__FILE__, array('GAWD', 'global_activate'));
207
  register_deactivation_hook(__FILE__, array('GAWD', 'deactivate'));
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-google-analytics-plugin.h
4
  Tags: google analytics, statistics, tracking, analytics dashboard, ga, google analytics dashboard, analytics, stats, googleanalytics, ecommerce tracking, custom reports, custom dimensions
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
- Stable tag: 1.0.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -104,6 +104,9 @@ Upgrade to Google Analytics WD Pro for premium features:
104
 
105
  == Changelog ==
106
 
 
 
 
107
  = 1.0.20 =
108
  * Fixed: Admin styles conflict because of bootstrap.css
109
 
@@ -130,8 +133,8 @@ Upgrade to Google Analytics WD Pro for premium features:
130
 
131
  = 1.0.14 =
132
  * Fixed: Analytics back end menu position conflict
133
- * Fixed: Bug on deleted property check
134
  * Added: Error log
 
135
 
136
  = 1.0.13 =
137
  * Fixed: Bug on Custom code option in tracking
4
  Tags: google analytics, statistics, tracking, analytics dashboard, ga, google analytics dashboard, analytics, stats, googleanalytics, ecommerce tracking, custom reports, custom dimensions
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
+ Stable tag: 1.0.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
104
 
105
  == Changelog ==
106
 
107
+ = 1.0.21 =
108
+ * Fixed: Network activation
109
+
110
  = 1.0.20 =
111
  * Fixed: Admin styles conflict because of bootstrap.css
112
 
133
 
134
  = 1.0.14 =
135
  * Fixed: Analytics back end menu position conflict
 
136
  * Added: Error log
137
+ * Fixed: Bug on deleted property check
138
 
139
  = 1.0.13 =
140
  * Fixed: Bug on Custom code option in tracking