Version Description
- Bug Fixes:
- avoid tracking issues by not clearing the profiles list on automatic token resets
Download this release
Release Info
Developer | deconf |
Plugin | Google Analytics Dashboard for WP (GADWP) |
Version | 5.3.1.1 |
Comparing to | |
See all releases |
Code changes from version 5.3.1 to 5.3.1.1
- admin/settings.php +8 -16
- gadwp.php +2 -2
- readme.txt +5 -1
- tools/gapi.php +1 -1
- tools/tools.php +9 -7
admin/settings.php
CHANGED
@@ -1199,12 +1199,8 @@ final class GADWP_Settings {
|
|
1199 |
$options = self::update_options( 'general' );
|
1200 |
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1201 |
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1202 |
-
|
1203 |
-
|
1204 |
-
} else {
|
1205 |
-
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1206 |
-
}
|
1207 |
-
if ( $profiles ) {
|
1208 |
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1209 |
if ( ! $gadwp->config->options['tableid_jail'] ) {
|
1210 |
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
@@ -1223,7 +1219,7 @@ final class GADWP_Settings {
|
|
1223 |
} catch ( Exception $e ) {
|
1224 |
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1225 |
GADWP_Tools::set_error( $e, $timeout );
|
1226 |
-
$gadwp->gapi_controller->reset_token(
|
1227 |
}
|
1228 |
} else {
|
1229 |
if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
|
@@ -1243,7 +1239,7 @@ final class GADWP_Settings {
|
|
1243 |
}
|
1244 |
if ( isset( $_POST['Reset'] ) ) {
|
1245 |
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1246 |
-
$gadwp->gapi_controller->reset_token(
|
1247 |
GADWP_Tools::clear_cache();
|
1248 |
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1249 |
$options = self::update_options( 'Reset' );
|
@@ -1530,12 +1526,8 @@ final class GADWP_Settings {
|
|
1530 |
GADWP_Tools::delete_cache( 'gapi_errors' );
|
1531 |
}
|
1532 |
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1533 |
-
|
1534 |
-
|
1535 |
-
} else {
|
1536 |
-
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1537 |
-
}
|
1538 |
-
if ( $profiles ) {
|
1539 |
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1540 |
if ( isset( $gadwp->config->options['tableid_jail'] ) && ! $gadwp->config->options['tableid_jail'] ) {
|
1541 |
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
@@ -1554,7 +1546,7 @@ final class GADWP_Settings {
|
|
1554 |
} catch ( Exception $e ) {
|
1555 |
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1556 |
GADWP_Tools::set_error( $e, $timeout );
|
1557 |
-
$gadwp->gapi_controller->reset_token(
|
1558 |
}
|
1559 |
} else {
|
1560 |
if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
|
@@ -1599,7 +1591,7 @@ final class GADWP_Settings {
|
|
1599 |
}
|
1600 |
if ( isset( $_POST['Reset'] ) ) {
|
1601 |
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1602 |
-
$gadwp->gapi_controller->reset_token(
|
1603 |
GADWP_Tools::clear_cache();
|
1604 |
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1605 |
$options = self::update_options( 'Reset' );
|
1199 |
$options = self::update_options( 'general' );
|
1200 |
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1201 |
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1202 |
+
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1203 |
+
if ( is_array ( $profiles ) && ! empty( $profiles ) ) {
|
|
|
|
|
|
|
|
|
1204 |
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1205 |
if ( ! $gadwp->config->options['tableid_jail'] ) {
|
1206 |
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
1219 |
} catch ( Exception $e ) {
|
1220 |
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1221 |
GADWP_Tools::set_error( $e, $timeout );
|
1222 |
+
$gadwp->gapi_controller->reset_token();
|
1223 |
}
|
1224 |
} else {
|
1225 |
if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
|
1239 |
}
|
1240 |
if ( isset( $_POST['Reset'] ) ) {
|
1241 |
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1242 |
+
$gadwp->gapi_controller->reset_token();
|
1243 |
GADWP_Tools::clear_cache();
|
1244 |
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1245 |
$options = self::update_options( 'Reset' );
|
1526 |
GADWP_Tools::delete_cache( 'gapi_errors' );
|
1527 |
}
|
1528 |
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1529 |
+
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1530 |
+
if ( is_array ( $profiles ) && ! empty( $profiles ) ) {
|
|
|
|
|
|
|
|
|
1531 |
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1532 |
if ( isset( $gadwp->config->options['tableid_jail'] ) && ! $gadwp->config->options['tableid_jail'] ) {
|
1533 |
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
1546 |
} catch ( Exception $e ) {
|
1547 |
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1548 |
GADWP_Tools::set_error( $e, $timeout );
|
1549 |
+
$gadwp->gapi_controller->reset_token();
|
1550 |
}
|
1551 |
} else {
|
1552 |
if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
|
1591 |
}
|
1592 |
if ( isset( $_POST['Reset'] ) ) {
|
1593 |
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1594 |
+
$gadwp->gapi_controller->reset_token();
|
1595 |
GADWP_Tools::clear_cache();
|
1596 |
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1597 |
$options = self::update_options( 'Reset' );
|
gadwp.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://deconf.com
|
5 |
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
|
6 |
* Author: Alin Marcu
|
7 |
-
* Version: 5.3.1
|
8 |
* Author URI: https://deconf.com
|
9 |
* Text Domain: google-analytics-dashboard-for-wp
|
10 |
* Domain Path: /languages
|
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) )
|
|
16 |
|
17 |
// Plugin Version
|
18 |
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
|
19 |
-
define( 'GADWP_CURRENT_VERSION', '5.3.1' );
|
20 |
}
|
21 |
|
22 |
if ( ! defined( 'GADWP_ENDPOINT_URL' ) ) {
|
4 |
* Plugin URI: https://deconf.com
|
5 |
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
|
6 |
* Author: Alin Marcu
|
7 |
+
* Version: 5.3.1.1
|
8 |
* Author URI: https://deconf.com
|
9 |
* Text Domain: google-analytics-dashboard-for-wp
|
10 |
* Domain Path: /languages
|
16 |
|
17 |
// Plugin Version
|
18 |
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
|
19 |
+
define( 'GADWP_CURRENT_VERSION', '5.3.1.1' );
|
20 |
}
|
21 |
|
22 |
if ( ! defined( 'GADWP_ENDPOINT_URL' ) ) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://deconf.com/donate/
|
|
4 |
Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.9.4
|
7 |
-
Stable tag: 5.3.1
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -173,6 +173,10 @@ Google Analytics Dashboard for WP it's released under the GPLv2, you can use it
|
|
173 |
|
174 |
[GADWP v5.3 release notes](https://deconf.com/adding-gtag-js-to-your-site/)
|
175 |
|
|
|
|
|
|
|
|
|
176 |
= 5.3.1 =
|
177 |
* Bug Fixes:
|
178 |
* frontend_item_reports PHP notice when upgrading from a version lower than v4.8.0.1
|
4 |
Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.9.4
|
7 |
+
Stable tag: 5.3.1.1
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
173 |
|
174 |
[GADWP v5.3 release notes](https://deconf.com/adding-gtag-js-to-your-site/)
|
175 |
|
176 |
+
= 5.3.1.1 =
|
177 |
+
* Bug Fixes:
|
178 |
+
* avoid tracking issues by not clearing the profiles list on automatic token resets
|
179 |
+
|
180 |
= 5.3.1 =
|
181 |
* Bug Fixes:
|
182 |
* frontend_item_reports PHP notice when upgrading from a version lower than v4.8.0.1
|
tools/gapi.php
CHANGED
@@ -290,7 +290,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
|
|
290 |
* @param
|
291 |
* $all
|
292 |
*/
|
293 |
-
public function reset_token( $all =
|
294 |
$this->gadwp->config->options['token'] = "";
|
295 |
if ( $all ) {
|
296 |
$this->gadwp->config->options['tableid_jail'] = "";
|
290 |
* @param
|
291 |
* $all
|
292 |
*/
|
293 |
+
public function reset_token( $all = false ) {
|
294 |
$this->gadwp->config->options['token'] = "";
|
295 |
if ( $all ) {
|
296 |
$this->gadwp->config->options['tableid_jail'] = "";
|
tools/tools.php
CHANGED
@@ -234,7 +234,7 @@ if ( ! class_exists( 'GADWP_Tools' ) ) {
|
|
234 |
self::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $timeout );
|
235 |
}
|
236 |
|
237 |
-
// Count Errors
|
238 |
$midnight = strtotime( "tomorrow 00:00:00" ); // UTC midnight
|
239 |
$midnight = $midnight + 8 * 3600; // UTC 8 AM
|
240 |
$tomidnight = $midnight - time();
|
@@ -277,12 +277,14 @@ if ( ! class_exists( 'GADWP_Tools' ) ) {
|
|
277 |
$info .= 'Other Version: ' . '-' . "\n";
|
278 |
}
|
279 |
|
280 |
-
/*
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
|
|
|
|
286 |
|
287 |
// cURL Info
|
288 |
if ( function_exists( 'curl_version' ) && function_exists( 'curl_exec' ) ) {
|
234 |
self::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $timeout );
|
235 |
}
|
236 |
|
237 |
+
// Count Errors until midnight
|
238 |
$midnight = strtotime( "tomorrow 00:00:00" ); // UTC midnight
|
239 |
$midnight = $midnight + 8 * 3600; // UTC 8 AM
|
240 |
$tomidnight = $midnight - time();
|
277 |
$info .= 'Other Version: ' . '-' . "\n";
|
278 |
}
|
279 |
|
280 |
+
/*
|
281 |
+
* PHP extensions
|
282 |
+
* if ( is_callable( 'get_loaded_extensions' ) ) {
|
283 |
+
* $info .= 'Loaded Extensions: ' . implode(', ', get_loaded_extensions()) . "\n";
|
284 |
+
* } else {
|
285 |
+
* $info .= 'Loaded Extensions: ' . '-' . "\n";
|
286 |
+
* }
|
287 |
+
*/
|
288 |
|
289 |
// cURL Info
|
290 |
if ( function_exists( 'curl_version' ) && function_exists( 'curl_exec' ) ) {
|