WD Google Analytics - Version 1.1.3

Version Description

  • Fixed: Empty settings page when plugin has token but accounts data lost for some reason
  • Changed: Show notification to install Backup WD plugin only on plugin pages.
Download this release

Release Info

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

Code changes from version 1.1.2 to 1.1.3

Files changed (3) hide show
  1. gawd_class.php +1 -2
  2. google-analytics-wd.php +17 -12
  3. readme.txt +5 -1
gawd_class.php CHANGED
@@ -962,7 +962,6 @@ class GAWD
962
  delete_option('gawd_user_status');
963
  delete_option('gawd_account_status');
964
  delete_option('gawd_management_accounts');
965
- delete_option('gawd_bk_notice_status');
966
  delete_transient('gawd_user_profiles');
967
 
968
 
@@ -1418,7 +1417,7 @@ class GAWD
1418
  {
1419
  global $gawd_user_data;
1420
  $gawd_client = GAWD_google_client::get_instance();
1421
- $accounts = $gawd_client->get_management_accounts();
1422
  $gawd_user_data = get_option('gawd_user_data');
1423
  if (isset($_GET['defaultExist']) && $_GET['defaultExist'] == 1) {
1424
  $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
962
  delete_option('gawd_user_status');
963
  delete_option('gawd_account_status');
964
  delete_option('gawd_management_accounts');
 
965
  delete_transient('gawd_user_profiles');
966
 
967
 
1417
  {
1418
  global $gawd_user_data;
1419
  $gawd_client = GAWD_google_client::get_instance();
1420
+ $accounts = $gawd_client->get_management_accounts(true);
1421
  $gawd_user_data = get_option('gawd_user_data');
1422
  if (isset($_GET['defaultExist']) && $_GET['defaultExist'] == 1) {
1423
  $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
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.1.2
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.1.2');
30
  }
31
 
32
 
@@ -232,29 +232,34 @@ function gawd_php_version_admin_notice() {
232
 
233
 
234
  }
235
- if (!function_exists('wd_bp_install_notice')) {
236
  $wd_bp_plugin_url = GAWD_URL;
237
- function wd_bp_script_style() {
238
  global $wd_bp_plugin_url;
239
  wp_enqueue_script('wd_bck_install', $wd_bp_plugin_url . '/inc/js/wd_bp_install.js', array('jquery'));
240
  wp_enqueue_style('wd_bck_install', $wd_bp_plugin_url . '/inc/css/wd_bp_install.css');
241
  }
242
- add_action('admin_enqueue_scripts', 'wd_bp_script_style');
243
 
244
  /**
245
  * Show notice to install backup plugin
246
  */
247
- function wd_bp_install_notice() {
248
  global $wd_bp_plugin_url;
 
 
 
 
 
249
  $prefix = 'gawd';
250
- $meta_value = get_option('gawd_bk_notice_status');
251
  if ($meta_value === '' || $meta_value === false) {
252
  ob_start();
253
  ?>
254
  <div class="notice notice-info" id="wd_bp_notice_cont">
255
  <p>
256
  <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/logo.png'; ?>">
257
- <?php _e("Hey! Install brand new FREE", $prefix) ?>
258
  <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
259
  target="_blank"><?php _e("Backup WD", $prefix) ?></a>
260
  <?php _e("plugin to keep your images and website safe.", $prefix) ?>
@@ -273,7 +278,7 @@ if (!function_exists('wd_bp_install_notice')) {
273
  }
274
 
275
  if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
276
- add_action('admin_notices', 'wd_bp_install_notice');
277
  }
278
 
279
  /**
@@ -282,8 +287,8 @@ if (!function_exists('wd_bp_install_notice')) {
282
  * empty: notice,
283
  * 1 : never show again
284
  */
285
- function wd_bp_install_notice_status() {
286
- update_option('gawd_bk_notice_status', '1', 'no');
287
  }
288
- add_action('wp_ajax_wd_bp_dismiss', 'wd_bp_install_notice_status');
289
  }
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.1.3
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.1.3');
30
  }
31
 
32
 
232
 
233
 
234
  }
235
+ if (!function_exists('gawd_wd_bp_install_notice')) {
236
  $wd_bp_plugin_url = GAWD_URL;
237
+ function gawd_wd_bp_script_style() {
238
  global $wd_bp_plugin_url;
239
  wp_enqueue_script('wd_bck_install', $wd_bp_plugin_url . '/inc/js/wd_bp_install.js', array('jquery'));
240
  wp_enqueue_style('wd_bck_install', $wd_bp_plugin_url . '/inc/css/wd_bp_install.css');
241
  }
242
+ add_action('admin_enqueue_scripts', 'gawd_wd_bp_script_style');
243
 
244
  /**
245
  * Show notice to install backup plugin
246
  */
247
+ function gawd_wd_bp_install_notice() {
248
  global $wd_bp_plugin_url;
249
+ $screen = get_current_screen();
250
+ if($screen->id != "toplevel_page_gawd_subscribe" && $screen->id != "toplevel_page_gawd_settings" && $screen->id != "toplevel_page_gawd_analytics" && $screen->id != "analytics_page_gawd_settings" && $screen->id != "analytics_page_gawd_reports" && $screen->id != "analytics_page_gawd_tracking" && $screen->id != "analytics_page_gawd_goals" && $screen->id != "analytics_page_gawd_custom_reports" && $screen->id != "analytics_page_gawd_uninstall" && $screen->id != "analytics_page_overview_gawd" && $screen->id != "analytics_page_gawd_updates" ){
251
+ return;
252
+ }
253
+
254
  $prefix = 'gawd';
255
+ $meta_value = get_option('wd_bk_notice_status');
256
  if ($meta_value === '' || $meta_value === false) {
257
  ob_start();
258
  ?>
259
  <div class="notice notice-info" id="wd_bp_notice_cont">
260
  <p>
261
  <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/logo.png'; ?>">
262
+ <?php _e("Google Analytics WD advises: Install brand new FREE", $prefix) ?>
263
  <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
264
  target="_blank"><?php _e("Backup WD", $prefix) ?></a>
265
  <?php _e("plugin to keep your images and website safe.", $prefix) ?>
278
  }
279
 
280
  if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
281
+ add_action('admin_notices', 'gawd_wd_bp_install_notice');
282
  }
283
 
284
  /**
287
  * empty: notice,
288
  * 1 : never show again
289
  */
290
+ function gawd_wd_bp_install_notice_status() {
291
+ update_option('wd_bk_notice_status', '1', 'no');
292
  }
293
+ add_action('wp_ajax_wd_bp_dismiss', 'gawd_wd_bp_install_notice_status');
294
  }
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.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,10 @@ Upgrade to Google Analytics WD Pro for premium features:
103
 
104
  == Changelog ==
105
 
 
 
 
 
106
  = 1.1.2 =
107
  * Fixed: Conflict with some other plugins using Google API PHP library
108
  * Fixed: Unable to authorize again after logout
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.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.1.3 =
107
+ * Fixed: Empty settings page when plugin has token but accounts data lost for some reason
108
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
109
+
110
  = 1.1.2 =
111
  * Fixed: Conflict with some other plugins using Google API PHP library
112
  * Fixed: Unable to authorize again after logout